19.07.2011, 21:16
Quote:
The title says it all, is there a function to check if ANY player is in/driving that vehicle.
|
PHP код:
VehicleHasPlayer(vehicleid, &player_seat = -1)
{
for(new i = 0, j = GetMaxPlayers(); i < j; i++)
if(IsPlayerConnected(i))
if(IsPlayerInVehicle(i, vehicleid))
{
player_seat = GetPlayerVehicleSeat(i);
return i;
}
return (-1);
}