Button Activated Gates That Only Open For A Certain Player Name
#6

I have used the code and changed it to match my username. I have also added the co-ordinates of my gate when its open and closed. This is what my code looks like so far;

Code:
#include <a_samp>

new IsGateOpen;

//MY ADMIN HOUSE GATE===========================================================
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{

    if (newkeys && SECONDARY_FIRE)
    {
        new name[24];
        GetPlayerName(playerid, name,sizeof(name));
        if (strcmp(name, "stuoyto",true) == 0)
        {
            if (IsGateOpen == 0)
            {
            MoveObject(987, -2648.56, -220.47, -2.88,   0.00, 0.00, 180.00);
            IsGateOpen = 1;
            return 1;
            }
            if (IsGateOpen == 1)
            {
            MoveObject(987, -2648.56, -220.47, 3.32,   0.00, 0.00, 180.00);
            IsGateOpen = 0;
            return 1;
            }
        }
    }
    return 1;
}
I am not even sure if this is the correct way of setting out the co-ordinates (if not plaese tell me what to put in the 'MoveObject' brackets).
However, when i compile the program the following error occurs;

Quote:

C:\Users\Stuart\Desktop\SAMP STUFF\My Server\filterscripts\VIPGates.pwn(9) : error 017: undefined symbol "SECONDARY_FIRE"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.
How can i sort this error?



Stuoyto
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)