How to find out which playerid is driving a vehicle
#5

pawn Код:
stock GetVehicleDriver(vehicle) //the function
{
  for(new i=0; i<MAX_PLAYERS, IsPlayerConnected(i); i++) //check for every connected players
  {
    if(GetPlayerVehicleID(i) == vehicle && GetPlayerState(i) == PLAYER_STATE_DRIVER) return i; //if the player chechek drives the car it returns his ID
  }
  return INVALID_PLAYER_ID; //else it returns INVALID_PLAYER_ID
}
Reply


Messages In This Thread
How to find out which playerid is driving a vehicle - by adsy - 07.02.2010, 22:37
Re: How to find out which playerid is driving a vehicle - by XeoN_13 - 07.02.2010, 22:44
Re: How to find out which playerid is driving a vehicle - by adsy - 07.02.2010, 22:46
Re: How to find out which playerid is driving a vehicle - by adsy - 07.02.2010, 22:53
Re: How to find out which playerid is driving a vehicle - by Coicatak - 07.02.2010, 23:03

Forum Jump:


Users browsing this thread: 1 Guest(s)