Respawn car
#1

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.
Reply
#2

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;
    }
Reply
#3

Thx very much.it's working.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)