how to cheack if someone in my vehicle - 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)
+--- Thread: how to cheack if someone in my vehicle (
/showthread.php?tid=483624)
how to cheack if someone in my vehicle -
Gafsi - 27.12.2013
hello how to cheack if someone in my vehicle
Re: how to cheack if someone in my vehicle -
Miguel - 27.12.2013
Retrieve your vehicle's ID and compare it to everyone elses vehicle ID.
pawn Код:
new my_vehicle = GetPlayerVehicleID(playerid);
for (new i = 0; i != MAX_PLAYERS; ++i)
{
if (GetPlayerVehicleID(i) == my_vehicle)
{
// Player with id stored in i is in your vehicle.
break;
}
}