Is it possible to check if there is a person in a specific 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Is it possible to check if there is a person in a specific vehicle? (
/showthread.php?tid=119202)
Is it possible to check if there is a person in a specific vehicle? -
Celson - 07.01.2010
Is it possible to check if there is a person in a specific vehicle?
Re: Is it possible to check if there is a person in a specific vehicle? -
beckzy - 07.01.2010
Код:
IsAnyPlayerInVehicle(vehicleid)
{
for (new i = 0; i != MAX_PLAYERS; i++)
{
if (IsPlayerInVehicle(i, vehicleid)) return 1;
}
return 0;
}
Re: Is it possible to check if there is a person in a specific vehicle? -
Celson - 07.01.2010
Quote:
Originally Posted by BeckzyBoi
Код:
IsAnyPlayerInVehicle(vehicleid)
{
for (new i = 0; i != MAX_PLAYERS; i++)
{
if (IsPlayerInVehicle(i, vehicleid)) return 1;
}
return 0;
}
|
Thanks
Re: Is it possible to check if there is a person in a specific vehicle? -
Deat_Itself - 07.01.2010
Quote:
Originally Posted by BeckzyBoi
Код:
IsAnyPlayerInVehicle(vehicleid)
{
for (new i = 0; i != MAX_PLAYERS; i++)
{
if (IsPlayerInVehicle(i, vehicleid)) return 1;
}
return 0;
}
|
a bit wrong its IsPlayerInAnyVehicle
Re: Is it possible to check if there is a person in a specific vehicle? -
Celson - 07.01.2010
Quote:
Originally Posted by _Saif_
Quote:
Originally Posted by BeckzyBoi
Код:
IsAnyPlayerInVehicle(vehicleid)
{
for (new i = 0; i != MAX_PLAYERS; i++)
{
if (IsPlayerInVehicle(i, vehicleid)) return 1;
}
return 0;
}
|
a bit wrong its IsPlayerInAnyVehicle
|
IsPlayerInAnyVehicle checks to see if the specified player is in a vehicle. IsAnyPlayerInVehicle checks to see if there is a player in the specified vehicle.