/work
#1

Hey i'm making a pilots server, and i'm trying to make the "/work" command.

This is what i have:
pawn Код:
new Ccp[MAX_PLAYERS];

if(strcmp("/work", cmdtext, true) == 0)
    {
        Ccp[playerid] = 1;
        SetPlayerCheckpoint(playerid, -1367.5624,-221.9253,14.1484, 3.0);
        SendClientMessage(playerid, 0xFFFFFFFF, "You started with working. Please follow the checkpoints");
        return 1;
    }

// THIS IS OnPlayerEnterCheckpoint

if(Ccp[playerid] == 1) // This checks if our variable equals to 1, if so: it continues
    {
        DisablePlayerCheckpoint(playerid); // This makes sure that there will be a new checkpoint
        Ccp[playerid] = 2; // Changes the variable, so we can use it later again with OnPlayerEnterCheckpoint
        SetPlayerCheckpoint(playerid, -1367.5624,-221.9253,14.1484, 3.0); // Creates a new checkpoint at a different position
        SendClientMessage(playerid, 0xFFFFFFFF, "The passengers are in your plane now.\nNow, go to the new checkpoint to unload the passengers ");
        return 1;
    }
But it doesnt want to compile because then i have this errors:
Код:
C:\Users\r530\Desktop\Pilots Server\gamemodes\pilot.pwn(162) : error 017: undefined symbol "Ccp"
C:\Users\r530\Desktop\Pilots Server\gamemodes\pilot.pwn(162) : warning 215: expression has no effect
C:\Users\r530\Desktop\Pilots Server\gamemodes\pilot.pwn(162) : error 001: expected token: ";", but found "]"
C:\Users\r530\Desktop\Pilots Server\gamemodes\pilot.pwn(162) : error 029: invalid expression, assumed zero
C:\Users\r530\Desktop\Pilots Server\gamemodes\pilot.pwn(162) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
So, i'm asking someone to fix this for me and i want that you only can use this command if you are in a shamal.
Reply


Messages In This Thread
/work - by Jimmy0wns - 30.12.2012, 21:35
Re: /work - by Jimmy0wns - 30.12.2012, 21:40
Re: /work - by Tamer - 30.12.2012, 21:41
Re: /work - by RedCrossER - 30.12.2012, 21:42
Re: /work - by tyler12 - 30.12.2012, 21:42
Re: /work - by Jimmy0wns - 30.12.2012, 21:42
Re: /work - by Jimmy0wns - 30.12.2012, 21:58

Forum Jump:


Users browsing this thread: 1 Guest(s)