Small problem [+rep]
#1

Well I have the problem that this command is not doing what it's supposted to

Код HTML:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
	if(GetVehicleModel(vehicleid) == Missioncar)
 	{
  		if(GetPlayerTeam(playerid) == 2)
    	{
			SendClientMessage(playerid, COLOR_WHITE, "<!>Head to the marker which is added to your minimap!");
			SendClientMessage(playerid, COLOR_WHITE, "<!>If you succed in the mission you will be awarded!");
			return 1;
		}
		if(GetPlayerTeam(playerid) == 1)
		{
		    SendClientMessage(playerid, COLOR_WHITE, "<!>You must be USA team to drive this vehicle!");
		    RemovePlayerFromVehicle(playerid);
		    return 1;
		}
	}
	return 1;
}
If you are team 2 it should say:
Код HTML:
SendClientMessage(playerid, COLOR_WHITE, "<!>Head to the marker which is added to your minimap!");
			SendClientMessage(playerid, COLOR_WHITE, "<!>If you succed in the mission you will be awarded!");
And if you are team 1 it should do and say:
Код HTML:
		    SendClientMessage(playerid, COLOR_WHITE, "<!>You must be USA team to drive this vehicle!");
		    RemovePlayerFromVehicle(playerid);
But nothing is happening when player is entering the vehicle..
No problems while compiling
Reply
#2

Change
pawn Код:
if(GetVehicleModel(vehicleid) == Missioncar)
to:
pawn Код:
if(vehicleid == Missioncar)
Reply
#3

Oh wow That's was kinda easy hehe, thanks mate!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)