Destroy vehicle
#1

Код:
public OnPlayerExitVehicle(playerid, vehicleid)
{
	if(vehicleid==CEM[playerid][createdv])
	{
	    CEM[playerid][vexited]=1;
		SendClientMessage(playerid,0xFF0000AA,"Please get in this vehicle else it will be destroyed after 15 seconds.");
 		CEM[playerid][timer]=SetTimerEx("destroycreatedv",15000,false,"i",vehicleid);
 	}
	return 1;
}
public OnPlayerEnterVehicle(playerid, vehicleid)
{
	if((vehicleid==CEM[playerid][createdv])&&(CEM[playerid][vexited]=1))
 	{
 	    SendClientMessage(playerid,0x33AA33AA,"This vehicle will not be destroyed now");
 	    CEM[playerid][vexited]=0;
 		KillTimer(CEM[playerid][timer]);
	}
	return 1;
}
Actually the is meant to do this : A players gets tp-ed with a vehicle. That vehicle ID is stored in CEM[playerid][createdv]. When a player exits a vehicle, a timer starts to destroy the vehicle. If a player enters the vehicle again the timer gets killed. But if an another player enters that vehicle, the vehicle is still destroyed and I dont want that.
Reply


Messages In This Thread
Destroy vehicle - by Virus. - 29.12.2012, 07:29
Re: Destroy vehicle - by [HiC]TheKiller - 29.12.2012, 07:36
Re: Destroy vehicle - by Virus. - 29.12.2012, 10:02

Forum Jump:


Users browsing this thread: 1 Guest(s)