Destroy car on player exit
#4

well the easiest way i think would be:
pawn Код:
new bool:IsDriver[MAX_PLAYERS] = false;
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
  {
  if(newstate==PLAYER_STATE_DRIVER)
    {
    IsDriver[playerid]=true;
    }
  }
pawn Код:
public OnPlayerExitVehicle(playerid, vehicleid)
  {
  if(IsDriver)
    {
    new currentveh;
    currentveh = GetPlayerVehicleID(playerid);
    DestroyVehicle(currentveh);
    IsDriver[playerid]=false;
    TextDrawShowForPlayer(playerid,Cardestroyed);
    SetTimerEx("cardestroyedhide", 5000, 0, "i", playerid);
    }
}
OR SMTH LIKE THAT!!!!

Edit: yes even like @ post above
Reply


Messages In This Thread
Destroy car on player exit - by gamerhead - 07.05.2011, 16:19
Re: Destroy car on player exit - by austin070 - 07.05.2011, 16:23
Re: Destroy car on player exit - by BizzyD - 07.05.2011, 16:23
Re: Destroy car on player exit - by marrcko - 07.05.2011, 16:26
Re: Destroy car on player exit - by Babul - 07.05.2011, 16:27
Re: Destroy car on player exit - by gamerhead - 07.05.2011, 16:44

Forum Jump:


Users browsing this thread: 1 Guest(s)