[SOLVED] Forbidden Vehicles Help
#1

The script works when it comes to the forbidden vehicles, they get destroyed and the message is displayed, thats all fine. The problem is that the message is displayed when ever you try and get into any car (it isnt destroyed just message appears).

Im sure i'm missing something very simple but please help, i don't want the message to be displayed when you get into any car other than the forbidden ones.



Код:
public OnPlayerEnterVehicle(playerid,vehicleid,ispassenger)
{
	new model = GetVehicleModel(vehicleid);

	switch(model)
	{
	  case 520,432,425,477,464,465,501,601,441 : {DestroyVehicle(vehicleid);}
	}

	format(string,sizeof(string),"~r~ That is a forbidden vehicle ~r~",pname);
	GameTextForPlayer(playerid,string,12000,3);
	return 1;
}
Reply
#2

yes you have right it's very simple
try this
pawn Код:
public OnPlayerEnterVehicle(playerid,vehicleid,ispassenger)
{
    new model = GetVehicleModel(vehicleid);

    switch(model)
    {
      case 520,432,425,477,464,465,501,601,441 : {DestroyVehicle(vehicleid);    format(string,sizeof(string),"~r~ That is a forbidden vehicle ~r~",pname); GameTextForPlayer(playerid,string,12000,3); }
   
    }


    return 1;
}
Reply
#3

Thanks, works great.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)