[Help] Faction vehicle troubles - 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: [Help] Faction vehicle troubles (
/showthread.php?tid=461085)
[Help] Faction vehicle troubles -
xXRealLegitXx - 31.08.2013
Hello again, SAMP Forums! I have recently used the help of a job tutorial on the SA:MP Forums to create a faction. This faction is the SFPD. I have defined all their vehicles, but here is the line of Cruiser 1
Код:
new SFPDC1 = AddStaticVehicle(597,-1572.6292,742.7545,-5.4790,91.7643,7,1); // C1
I got to work under OnPlayerUpdate to check if the player is in a faction vehicle, and to check if they are in that faction or not using this code below
Код:
if(IsPlayerInVehicle(playerid, SFPDC1))
{
if(wJob[playerid] != 100)
return RemovePlayerFromVehicle(playerid);
}
But when I compile I get this error.
Код:
C:\Users\TWLeg_000\Documents\C++ SCRIPT\gamemodes\RP.pwn(6211) : error 017: undefined symbol "SFPDC1"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Error.
Even though I defined it earlier in the script. If someone could help me out, I would be most greatful!
- Jason
Re: [Help] Faction vehicle troubles -
Konstantinos - 31.08.2013
Replace to:
pawn Код:
SFPDC1 = AddStaticVehicle(597,-1572.6292,742.7545,-5.4790,91.7643,7,1); // C1
And add:
pawn Код:
// At the top, under includes and defines
new SFPDC1;
// Now it's global variable.
Re: [Help] Faction vehicle troubles -
xXRealLegitXx - 31.08.2013
Quote:
Originally Posted by Konstantinos
Replace to:
pawn Код:
SFPDC1 = AddStaticVehicle(597,-1572.6292,742.7545,-5.4790,91.7643,7,1); // C1
And add:
pawn Код:
// At the top, under includes and defines new SFPDC1; // Now it's global variable.
|
Oooh! Thank you! Can't beleive I didn't think of that.
EDIT: +REP