You are not in the LSPD - 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)
+--- Thread: You are not in the LSPD (
/showthread.php?tid=449787)
You are not in the LSPD -
lider1241 - 10.07.2013
Hello guys!
I would like to know how to build a code for locking LSPD vehicles for civilians who aren't in LSPD as cops.
When you attemp to enter a LSPD vehicle so you get like "locked vehicle" and then you got on client message "You are not in the LSPD"
Here a picture:
Is it copyied from other mode?
*its not mine mode and i dont got PWN file
Re: You are not in the LSPD -
firemanjv - 10.07.2013
You can't enter it because you are not a part of the LSPD
Re: You are not in the LSPD -
lider1241 - 10.07.2013
@firemanjv - i want the code how to make it for only LSPD staff can enter LSPD vehicles and civlians not.
Re: You are not in the LSPD -
Calabresi - 10.07.2013
There must be a variable that shows the faction of the player, for example PlayerInfo[playerid][pFaction], and another variable that shows the faction of vehicle, for example VehicleInfo[vID][vFaction]. Then, all you gotta do is;
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if(VehicleInfo[vehicleid][vFaction] != PlayerInfo[playerid][pFaction])
{
new msg[128];
format(msg, sizeof(msg), "You are not member of faction %d!", VehicleInfo[vehicleid][vFaction]);
SendClientMessage(playerid, -1, msg);
}
}
Just to give the idea.
Re: You are not in the LSPD -
xganyx - 10.07.2013
in the picture... you are civlian or LSPD ?
Re: You are not in the LSPD -
lider1241 - 10.07.2013
i did /quitfaction, actually its my friend on the picture with cheats not me - you guys -rep me for nothing for cheats
Re: You are not in the LSPD -
lider1241 - 10.07.2013
@Calabresi - BTW how do i create faction? I pawn beginner
Re: You are not in the LSPD -
Jack.7331 - 10.07.2013
Creating a faction would require either an enumeration or plethora of variables. Depends on how you define a faction.