How to detect..
#3

Quote:
Originally Posted by Joe Torran C
Hello,

How can i detect if a certain vehicle is occupied or not?
My suggestion:
pawn Код:
stock IsVehicleInUse(vehicleid)
{
  for(new i=0; i<GetMaxPlayers(); i++)
  {
    if(IsPlayerConnected(i))
    {
      if(GetPlayerVehicleID(i) == vehicleid)
      return true;
    }
  }
  return false;
}
Reply


Messages In This Thread
How to detect.. - by NewTorran - 07.06.2010, 10:29
Re: How to detect.. - by Desert - 07.06.2010, 11:27
Re: How to detect.. - by Norck - 07.06.2010, 12:46

Forum Jump:


Users browsing this thread: 1 Guest(s)