SA-MP Forums Archive
Difference IsPlayerInVehicle and GetPlayerVehicleID? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Difference IsPlayerInVehicle and GetPlayerVehicleID? (/showthread.php?tid=185420)



Difference IsPlayerInVehicle and GetPlayerVehicleID? - Jochemd - 24.10.2010

Hello,

There are two function: GetPlayerVehicleID and IsPlayerInVehicle. As far as I know, these two don't have a difference in what they do? I used the wiki, but it doesn't say anything about it. It does the same for me.

Can someone tell me the difference?

Regards, Jochem


Re: Difference IsPlayerInVehicle and GetPlayerVehicleID? - DVDK - 24.10.2010

IsPlayerInVehicle - returns 1 for yes, and 0 for no.
GetPlayerVehicleID- returns the id of the vehicle the player is currently in.


Re: Difference IsPlayerInVehicle and GetPlayerVehicleID? - Mauzen - 24.10.2010

GetPlayerVehicleID returns the id of the vehicle the player is in, or 0, if he is in no.
IsPlayerIn(any)Vehicle just returns 1 if the player is in the specified (or any) vehicle, and 0 if not


Re: Difference IsPlayerInVehicle and GetPlayerVehicleID? - Jochemd - 24.10.2010

Ok, thank you