12.03.2015, 12:16
using settimerex.
PHP код:
public OnPlayerExitVehicle(playerid, vehicleid)
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
SetPVarInt(playerid, "vid", GetPlayerVehicleID(playerid));
SetTimerEx("removevehicle", 1000*60*2, false, "d", playerid);
}
return true;
}
forward removevehicle(playerid);
public removevehicle(playerid)
{
DestroyVehicle(GetPVarInt(playerid, "vid"));
SetPVarInt(playerid, "vid", 0);
return true;
}