PD Cars and Ambulances. - 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: PD Cars and Ambulances. (
/showthread.php?tid=236451)
PD Cars and Ambulances. -
iGetty - 07.03.2011
Okay, so I wanna know, how can I make it so that a car is only able to be used by a PD officer, or Medic/gang member of that gang.
I have this if it helps, Thanks:
pawn Код:
if(Groups[Player[playerid][Group]][CommandTypes] == 1 && Player[playerid][Group] != 0 || Groups[Player[playerid][Group]][CommandTypes] == 4)
Re: PD Cars and Ambulances. -
Roomeo - 07.03.2011
Post it again not like this how can we fix it liek this ? lol
Re: PD Cars and Ambulances. -
iGetty - 07.03.2011
Quote:
Originally Posted by Roomeo
Post it again not like this how can we fix it liek this ? lol
|
what?
Re: PD Cars and Ambulances. -
alpha500delta - 07.03.2011
Please change the code behind "&&" with your own, I copied a little bit of your code, keep in mind that it needs to be IS NOT otherwise people who ARE PD can't enter it.
pawn Код:
if(GetVehicleModel(GetPlayerVehicleID) == 520 && Groups[Player[playerid][Group]][CommandTypes] != 1)//If the carmodel is 520(hydra) and the player is NOT in CommandType 1
{
SendClientMessage(playerid, COLOR, "Pl0x you cannot drive dis");//Informing him/her...
RemovePlayerFromVehicle(playerid); //Removes player from vehicle, sometimes bugged
return 1;
}