07.05.2011, 16:26
well the easiest way i think would be:
OR SMTH LIKE THAT!!!!
Edit: yes even like @ post above
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);
}
}
Edit: yes even like @ post above