what's wrong with it?
#1

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:
Код:
new destroy_NRG[MAX_PLAYERS];
forward Destroy_NRG(playerid);
somewhere in script not in any public!:
Код:
public Destroy_NRG(playerid)
{
	KillTimer(destroy_NRG[playerid]);
	new vehicleid = GetPlayerVehicleID(playerid);
	DestroyVehicle(vehicleid);
	return 1;
}
in OnPlayerEnterVehicle:
Код:
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;
	}
and on GameModeInit:
Код:
CreateVehicle(522, 2493.2388,-1666.8898,12.9077,94.9658, 0, 0, 60000);
Reply


Messages In This Thread
what's wrong with it? - by omer5198 - 22.04.2011, 11:04
Re: what's wrong with it? - by Vince - 22.04.2011, 11:28
Re: what's wrong with it? - by omer5198 - 22.04.2011, 12:06
Re: what's wrong with it? - by linuxthefish - 22.04.2011, 12:10
Re: what's wrong with it? - by nuriel8833 - 22.04.2011, 13:54
Re: what's wrong with it? - by [ADC]Aldi96 - 22.04.2011, 14:13

Forum Jump:


Users browsing this thread: 1 Guest(s)