GetVehiclePedIsIn always return 0

Hello,
i’m a new in fivem scripting.
I try to know when a player was on a vehicle but my print always return false for IsPedOnVehicle.
Or GetVehiclePedIsIn return 0.
Someone can help me with this :
image

thanks

you need to use PlayerPedId() instead of PlayerId()

1 Like

Don’t call local = PlayerPedId() to call the same on native. Just call “player” in there.

Thanks just PlayerPedId() work !