[HELP]How to know if one person is a driver

Hi Eveyrone,
I want to know if is it possible to know if one personne is a driver ?
Thanks
Mira

Get last player vehicle with : http://runtime.fivem.net/doc/reference.html#_0x9A9112A0FE9A4713
Then get driver ped with : http://runtime.fivem.net/doc/reference.html#_0xBB40DD2270B65366

If driver ped == player ped, then the player is a driver

2 Likes

Thanks for this answer !!!

Or get the seat of the player if is in veh @Kyominii :stuck_out_tongue:

I don’t find this native, if you have the function, share with us

local ped = GetPlayerPed(-1)
(GetPedInVehicleSeat(vehicle, -1) == ped)

MyBad Kyo’ you got the better proper way :slight_smile:

1 Like

@yosang : Yes, it is what I gave :slight_smile:

1 Like

So the best solution is from @yosang or @Kyominii ?

It’s the same, so both ^^

Okay Thanks everyone ^^