I need help adding faction 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: I need help adding faction vehicles (
/showthread.php?tid=386761)
I need help adding faction vehicles -
AchievementMaster360 - 21.10.2012
Hello
Recently i got the Ravens Roleplay script i mapped stuff and it looks great. I know how to add vehicles owned by the state but when i want to add vehicles owned by the LSPD and army i dont know how to do that
Please help
Thanks for reading
Re: I need help adding faction vehicles -
tsonn1 - 21.10.2012
You're gonna have to do something like this:
Under ur enums:
pawn Код:
enum scInfo
{
Locked,
CarRank,
GangCar,
JobCar,
AdminCar,
IsLeaderCar,
pFCar,
IllegalGangCar,
LastDriver[MAX_PLAYER_NAME]
}
new ScriptCar[CAR_AMOUNT][scInfo];
OnGameModeInit:
pawn Код:
for(new scid; scid < CAR_AMOUNT; scid++)
{
SkriptiAuto[scid][Locked] = 1;
SkriptiAuto[scid][CarRank] = 0;
SkriptiAuto[scid][GangCar] = 0;
SkriptiAuto[scid][JobCar] = 0;
SkriptiAuto[scid][AdminCar] = 0;
SkriptiAuto[scid][IsLeaderCar] = 0;
}
new vid;
//-------------------------------[Here they come - THE CARS!]-------------------------------------------------//
vid = AddStaticVehicleEx(492,1088.9807,-291.0322,73.7699,177.1524,86,0, 30000); // Some cop car I guess. :D
ScriptCar[vid][GangCar] = 1;