how can i make a cop car only
#1

how can i make a script where if a player from team robbers enters the police model car he gets wanted
Reply
#2

Mhmm, is your script dynamic?

If so try this..

Код:
 if(DynamicCars[GetPlayerVehicleID(playerid)-1][FactionCar] != 255)
		{
		    if(DynamicFactions[DynamicCars[GetPlayerVehicleID(playerid)-1][FactionCar]][fType] == 1)
		    {
		        if(PlayerInfo[playerid][pFaction] != DynamicCars[GetPlayerVehicleID(playerid)-1][FactionCar])
		        {
					RemoveDriverFromVehicle(playerid);
		        }
		    }
		}
Reply
#3

Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
	//your codes...
	if(newstate == PLAYER_STATE_DRIVER)
	{
		new Veh=GetVehicleModel(GetPlayerVehicleID(playerid))-400;
		if (GetPVarInt(playerid,"Team")==TEAM_CIV)//you will need to modify that, iam using pvars
		{
			if(Veh=016 || Veh=027 || Veh=032 || Veh=097 || Veh=120 || Veh=123 || Veh=196 || Veh=197 || Veh=198 || Veh=199 || Veh=201)
			{
				new string[64];
				format(string,sizeof(string),"you stole a cop car (Model %d)",Veh+400);//add a %s with NameArrayOfThatCar[Veh]
				SendClientMessage(playerid,0xff5555ff,string);
				SetPlayerWantedLevel(playerid,4);
   			}
		}
	}
	//your codes...
	return 1;
}
Reply
#4

dint work
Reply
#5

On top

new CopCar[5]; 5 - Count your all cop cars

OnGameModeInit

CopCar[0] = AddStaticVe...
CopCar[1] = AddStaticVe...
...

OnStateChange

for(...
if(vehicleid == CopCar[i])
{
RemovePlayer..
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)