22.04.2011, 11:04
i tried to do that if you enter a NRG-500 it will send you a message and destroy the vehicle after 60 seconds... tell me what's wrong...
up:
somewhere in script not in any public!:
in OnPlayerEnterVehicle:
and on GameModeInit:
up:
Код:
new destroy_NRG[MAX_PLAYERS]; forward Destroy_NRG(playerid);
Код:
public Destroy_NRG(playerid) { KillTimer(destroy_NRG[playerid]); new vehicleid = GetPlayerVehicleID(playerid); DestroyVehicle(vehicleid); return 1; }
Код:
if(vehicleid == 522 && ispassenger) { KillTimer(destroy_NRG[playerid]); destroy_NRG[playerid] = SetTimerEx("Destroy_NRG", 60000, false, "i", playerid); SendClientMessage(playerid, COLOUR_LIGHTBLUE, "You just entered the vehicle 'NRG-500'"); SendClientMessage(playerid, COLOUR_RED, "This vehicle will deasapir in 60 seconds!"); return 1; }
Код:
CreateVehicle(522, 2493.2388,-1666.8898,12.9077,94.9658, 0, 0, 60000);