IsVehicleInUse? - 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: IsVehicleInUse? (
/showthread.php?tid=159802)
IsVehicleInUse? -
ZFunn - 14.07.2010
If the car is used, it can not be stolen.
How can I do?
I try with isvehicleinuse
Re: IsVehicleInUse? -
Nero_3D - 14.07.2010
This function doesnt exist like you noticed
Just loop through all players and if it found someone inside stop it
pawn Код:
stock IsVehicleInUse(vehicleid)
{
for(new i; i != MAX_PLAYERS; i++)
{
if(GetPlayerVehicleID(i) == vehicleid)
{
return i;
}
}
return INVALID_PLAYER_ID;
}