SA-MP Forums Archive
Blocking Cop Vehicles From Civilians And Other teams - 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: Blocking Cop Vehicles From Civilians And Other teams (/showthread.php?tid=45817)



Blocking Cop Vehicles From Civilians And Other teams - Spy1228 - 03.08.2008

I was wondering how to block the cop vehicles from the civillians and all of those people non cops......... so anyone can tell me how i can block the vehicles and make them only for cops?
really its annoying all the ppl in my server steal all the cop cars and the cops cant work lol :S

if anyone can help me help me please


Re: Blocking Cop Vehicles From Civilians And Other teams - [HiC]TheKiller - 03.08.2008

Do you have gTeam? if you do this might work(Only if you don't change teams without spawning):
pawn Код:
OnPlayerSpawn(playerid)
{
  if(gTeam[playerid]==TEAM_COPS)/*Change this to your team ill just say TEAM_COPS*/
  {
       SetVehicleParamsForPlayer(YOURVEHICLEID,playerid,0,0);
  }
  return 1;
}



Re: Blocking Cop Vehicles From Civilians And Other teams - oObig_manOo - 25.03.2010

hi
this topic is important i have the same problem and i wanna know how to give player wanted level when he get in police car?


Re: Blocking Cop Vehicles From Civilians And Other teams - Ro[X]y - 25.03.2010

Код:
OnPlayerEnterVehicle

if(IsACopCar(vehicleid))
{
  new wanted = GetPlayerWantedLevel(playerid);
  SetPlayerWantedLevel(playerid, wanted+1);
  SendClientMessage(playerid, COLOR, "You got one (more) wanted level because of that you go into a patrol car, You fucked up!")
}