Preventing team from entering vehicles?
#1

I'm trying to make a specific team in-able of entering a vehicle. *Its a zombie class*
Is there anyway to code this?
Thanks
Reply
#2

Код:
public OnPlayerEnterVehicle(playerid,vehicleid)
	{
	if(Team[playerid] == TEAM_ZOMBIE) // Change this to how you deal with teams in your script
		{
		RemovePlayerFromVehicle(playerid);
		}
	}
This method is better if you ask me since OnPlayerEnterVehicle isn't called when you place a player in a vehicle for instance.
Код:
public OnPlayerStateChange(playerid,newstate,oldstate)
	{
	if(newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER)
		Ѓ{
		if(Team[playerid] == TEAM_ZOMBIE) // Change this to how you deal with teams in your script
			{
			RemovePlayerFromVehicle(playerid);
			}
		}
	}
Reply
#3

Lock the doors with SetVehicleParamsForPlayer?
Reply
#4

Thanks
Works great!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)