I've been working on this for the last 4-5 hours and i finally finished it. And guess what? You don't have to go through all the trouble i've gone because i'm such a nice person that i'll share it with you here. It's working perfectly on my Sony DualShock 2 connected through the USB port and i believe it would work on DualShock 3 too. And it should work on every gamepad which has 12 buttons, 4 way POV (digital d-pad) and 2 analog sticks. By the way if the axis-commands feature worked as if it should, i'd have done something wonderful but no matter what this is very nice work already.
VERY IMPORTANT NOTE:
As there's no way to tell the profiler software that Niko is in a car or on foot, you have to manually double-tap the "triangle" button to toggle "ON FOOT" and "IN VEHICLE" profiles. To get into/out of cars, normally just tapping the "triangle" button should suffice but it doesn't strangely. You have to hold that "triangle" button a little longer than tapping for the software to accept the input. You can tell which profile are you in now by clicking L3 when on foot, or R2 when in a vehicle. If Niko crouches or the vehicle accelerates it means that "ON FOOT" and "IN VEHICLE" profiles are selected respectively.
See you around