SA-MP Forums Archive
Respawn car - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Respawn car (/showthread.php?tid=96727)



Respawn car - Rokis - 10.09.2009

Hi, i have a problem with car respawning. I need that then the car explodes it disapear (not respawning).


Код:
public OnVehicleDeath(vehicleid, killerid)
{
	new model = GetVehicleModel(vehicleid);
	if(model == JESTER || model == SULTAN || model == TURISMO || model == SOLAIR || model == WAYFARER || model == STRATUM || model == BUFFALO || model == ELEGY || model == INFERNUS || model == FORTUNE || model == CLUB || model == FELTZER || model == STALLION || model == BRAVURA || model == 551 || model == CHEETAH || model == SUPERGT)
	if(model == BF400 || model == PCJ600 || model == FCR900 || model == REGINA || model == MESA || model == SAVANNA || model == BLADE || model == BANSHEE || model == URANUS || model == SABRE || model == JOURNEY || model == PHOENIX || model == WINDSOR || model == BULLET || model == TAHOMA || model == COMET || model == ELEGANT || model == SUNRISE || model == BLISTAC || model == NRG500)
	{
	DestroyVehicle(vehicleid);
	return 1;}
i try like this, no errors or warns, but it doesn't work. The car is respawning. ;/

Sry for my bad english.



Re: Respawn car - MadeMan - 10.09.2009

Put all models in same if statement.

Like this:

pawn Код:
public OnVehicleDeath(vehicleid, killerid)
{
    new model = GetVehicleModel(vehicleid);
    if(model == JESTER || model == SULTAN || model == TURISMO || model == SOLAIR || model == WAYFARER || model == STRATUM || model == BUFFALO || model == ELEGY || model == INFERNUS || model == FORTUNE || model == CLUB || model == FELTZER || model == STALLION || model == BRAVURA || model == 551 || model == CHEETAH || model == SUPERGT ||
    model == BF400 || model == PCJ600 || model == FCR900 || model == REGINA || model == MESA || model == SAVANNA || model == BLADE || model == BANSHEE || model == URANUS || model == SABRE || model == JOURNEY || model == PHOENIX || model == WINDSOR || model == BULLET || model == TAHOMA || model == COMET || model == ELEGANT || model == SUNRISE || model == BLISTAC || model == NRG500)
    {
        DestroyVehicle(vehicleid);
        return 1;
    }



Re: Respawn car - Rokis - 10.09.2009

Thx very much.it's working.