[Help] Faction vehicle troubles
#1

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
Reply
#2

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.
Reply
#3

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
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)