[SOLVED] Kick player from a car id?
#1

Hello, I'm using a hard type of this script, I have to give every car a name like PoliceCar1 and it's like 50 Police Cars.

Example:

Код:
new PoliceCar1
new PoliceCar2
new PoliceCar3
Код:
PoliceCar1 = AddStaticVehicleEx(596,1585.6294,-1671.8558,5.6147,270.2157,0,1,3600);
PoliceCar2 = AddStaticVehicleEx(596,1585.6694,-1667.5063,5.6124,270.3781,0,1,3600);
PoliceCar3 = AddStaticVehicleEx(596,1601.5731,-1683.8987,5.6119,89.8711,0,1,3600);
Код:
if(Vehicle == PoliceCar1)
		{
			if(gTeam[playerid] == TEAM_LSPD)
			{
  				if(PlayerInfo[playerid][pLAERank] >= 1)
				{

				}
				else
				{
				  SendClientMessage(playerid, COLOR_GREY,"	You are not authorized to use that vehicle.");
				  RemovePlayerFromVehicle(playerid);
				}
			}
			else
			{
  				SendClientMessage(playerid, COLOR_GREY,"	You are not a Police Officer.");
			  RemovePlayerFromVehicle(playerid);
			}
		}
		
		if(Vehicle == PoliceCar2)
		{
			if(gTeam[playerid] == TEAM_LSPD)
			{
  				if(PlayerInfo[playerid][pLAERank] >= 1)
				{

				}
				else
				{
				  SendClientMessage(playerid, COLOR_GREY,"	You are not authorized to use that vehicle.");
				  RemovePlayerFromVehicle(playerid);
				}
			}
			else
			{
  				SendClientMessage(playerid, COLOR_GREY,"	You are not a Police Officer.");
			  RemovePlayerFromVehicle(playerid);
			}
		}
		
		if(Vehicle == PoliceCar3)
		{
			if(gTeam[playerid] == TEAM_LSPD)
			{
  				if(PlayerInfo[playerid][pLAERank] >= 1)
				{

				}
				else
				{
				  SendClientMessage(playerid, COLOR_GREY,"	You are not authorized to use that vehicle.");
				  RemovePlayerFromVehicle(playerid);
				}
			}
			else
			{
  				SendClientMessage(playerid, COLOR_GREY,"	You are not a Police Officer.");
			  RemovePlayerFromVehicle(playerid);
			}
		}
So, as I was saying, it it possible to switch the names of the cars to the car's ID so I dont have to put names on every car and ad so many lines, like remove the PolceCar1 to the car id's so I only have to make one line on PlayerStateChange for all the police cars.

Thanks
Reply


Messages In This Thread
[SOLVED] Kick player from a car id? - by FreddeN - 19.02.2010, 15:02
Re: [HELP] Kick player from a car id? - by TTJJ - 19.02.2010, 15:17
Re: [HELP] Kick player from a car id? - by woot - 19.02.2010, 15:21
Re: [HELP] Kick player from a car id? - by Nero_3D - 19.02.2010, 15:22
Re: [HELP] Kick player from a car id? - by FreddeN - 19.02.2010, 16:31

Forum Jump:


Users browsing this thread: 2 Guest(s)