Command wont work!
#1

pawn Код:
#include <a_samp>
#include <a_players>
#include <a_objects>

#define PUTSPIKE 0x9ACD32AA
#define REMSPIKE 0xADFF2FAA
#define ERROR 0xAA3333AA
#define MAXSPIKES 30        // Max global spikes for your server.
new SpikesCount = 0;

public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/createspike",cmdtext,true)==0)
    {
        new skin = GetPlayerSkin(playerid);
        if (skin == 281 || skin == 282 || skin == 283 || skin == 288 || skin == 284
        || skin == 285 || skin == 286 || skin == 287 || skin == 265 || skin == 266
        || skin == 267 || skin == 280)
        {
            if (SpikesCount > MAXSPIKES) return SendClientMessage(playerid,ERROR,"ERROR: There is already too many spikes. Please remove some!");
            else if(SpikesCount < MAXSPIKES)
            {
                new Float:X,Float:Y,Float:Z, Float:ang = GetPlayerFacingAngle(playerid,ang);
                GetPlayerPos(playerid,X,Y,Z);
                CreateObject(1593, X+1,Y-2,Z-0.1,ang,0,0);
                SpikesCount++;
                SendClientMessage(playerid,PUTSPIKE,"INFO: You have placed a spike strip at your location.");
                return 1;
            }
        }
        else return SendClientMessage(playerid,ERROR,"ERROR: You are not a police officer!");
    }
    return 0;
}
But when I type /createspike in game it says 'SERVER: Unknown command'

P.S: This is not my whole script only the most important part
P.S: It's a filterscript.
P.S EDIT: No errors nor warnings with the pawn compiler
PLEASE try to help me. And THANKS to whoever does it.
Reply


Messages In This Thread
Command wont work! - by admantis - 17.12.2010, 01:15
Re: Command wont work! - by Benjo - 17.12.2010, 01:28
Re: Command wont work! - by admantis - 17.12.2010, 01:30
Re: Command wont work! - by Benjo - 17.12.2010, 01:34
Re: Command wont work! - by admantis - 17.12.2010, 01:36
Re: Command wont work! - by Benjo - 17.12.2010, 01:42
Re: Command wont work! - by admantis - 17.12.2010, 01:50
Re: Command wont work! - by Benjo - 17.12.2010, 01:53
Re: Command wont work! - by admantis - 17.12.2010, 02:13
Re: Command wont work! - by Benjo - 17.12.2010, 02:38

Forum Jump:


Users browsing this thread: 4 Guest(s)