[NEED HELP] Faction Restricted vehicles - 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: [NEED HELP] Faction Restricted vehicles (
/showthread.php?tid=393141)
[NEED HELP] Faction Restricted vehicles -
DaScripter - 17.11.2012
Hey Guys I'm working on a new script i want to know how to faction restrict vehicles please tell me first one to tell me and a EG of codes will get Rep
Respuesta: [NEED HELP] Faction Restricted vehicles -
[DOG]irinel1996 - 17.11.2012
You must make a variable for vehicles,
new Faction[MAX_VEHICLES].
Then give it a value for the cars you want, for example
Faction[2] = 1, it sets vehicle ID 2 to faction 1. Then make a condition in OnPlayerStateChange.
pawn Код:
if (newstate == PLAYER_STATE_DRIVER) {
if (Faction(GetPlayerVehicleID(playerid) != PlayerFactionVariable[playerid]) RemovePlayerFromVehicle(playerid);
}