how to ?
#1

Okay i got gTeams n stuff.

But with my script if the player is in TEAM_HITMAN and he enters his car it says its for hitmen only and removes player from vehicle.

I have two questions.

How do i stop it from saying its for hitman only IF the player is a hitman?

Script : (Onplayerstatechange)

WHAT I HAVE TRIED :

Код:
  if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
  {
		switch (GetVehicleModel(GetPlayerVehicleID(playerid)))
		{
			case 409:
			{
  	if(TEAM_MAYOR == 1)
	  		{
		  			SendClientMessage(playerid, COLOR_GREEN, "Welcome to you're vehicle.");
				}
				else
				{
					RemovePlayerFromVehicle(playerid);
					SendClientMessage(playerid, COLOR_RED, "This is for Mayors only!");
				}
			}
		}
	}
NORMAL SCRIPT I FOUND:

Код:
  if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
  {
		switch (GetVehicleModel(GetPlayerVehicleID(playerid)))
		{
			case 405:
			{
 				if(gTeam[playerid] == TEAM_HITMAN)
	  		{
		  	//		GameTextForPlayer(playerid, "~g~You have entered a faction vehicle.", 3000, 3);
				}
				else
				{
					RemovePlayerFromVehicle(playerid);
					SendClientMessage(playerid, COLOR_RED, "This is for Hitmen only!");
				}
			}
		}
	}
SECOND QUESTION

How do i make it so it sends a message and doesnt let the player in the vehicle BEFORE he enters it?

Because some people enter the SWAT truck and gain the armour. Which i dont want.
Reply


Messages In This Thread
how to ? - by coole210 - 14.06.2009, 17:14
Re: how to ? - by Grim_ - 14.06.2009, 17:18
Re: how to ? - by jonesy - 14.06.2009, 17:24
Re: how to ? - by coole210 - 14.06.2009, 18:16
Re: how to ? - by coole210 - 16.06.2009, 02:10

Forum Jump:


Users browsing this thread: 1 Guest(s)