31.07.2010, 00:41
how can i make a script where if a player from team robbers enters the police model car he gets wanted
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); } } }
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; }