how can i make a cop car only - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: how can i make a cop car only (
/showthread.php?tid=164354)
how can i make a cop car only -
Smokey619 - 31.07.2010
how can i make a script where if a player from team robbers enters the police model car he gets wanted
Re: how can i make a cop car only -
Yamoo - 31.07.2010
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);
}
}
}
Re: how can i make a cop car only -
Babul - 31.07.2010
Код:
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;
}
Re: how can i make a cop car only -
Smokey619 - 31.07.2010
dint work
Re: how can i make a cop car only -
ikey07 - 31.07.2010
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..
}