Command Problem
#1

pawn Код:
if(strcmp(cmd, "/createfwall", true) == 0)
    {
        new rand,loop,Float:pX,Float:pY,Float:pZ,str[70];
        tmp = strtok(cmdtext, idx);
        if(!strlen(tmp))
        {
            SendClientMessage(playerid, COLOR_GRAD2, "Verwendung: /createfwall [Loop Number]");
            return 1;
        }
        else
        {
            if(loop < 1) return SendClientMessage(playerid,COLOR_GREY,"Loop number can't be 0 or lower than 0!");
            GetPlayerPos(playerid,pX,pY,pZ);
            pX = pX + 1.000000;//offset X
            pZ = pZ - 0.800000;//offset Z
            for(new i = 0; i < 16; i++)
            {
                if(i != 4 && i != 8 && i != 12) pX = pX + 4.00;
                else
                {
                    pX = pX - 12.00;
                    pY = pY + 4.00;
                }
                rand = random(20) + 25;
                CreateFirework(FireworkCount,pX,pY,pZ,rand,loop);
                FireworkCount ++;
            }
            format(str,sizeof(str),"There are %d fireworks total!",FireworkCount);
            SendClientMessage(playerid,COLOR_WHITE,string);
        }
        return 1;
    }
Everytime when i type /createfwall 1, or any number, it show's me this message:

pawn Код:
Loop number can't be 0 or lower than 0!
I missed something, but can't see what
Reply


Messages In This Thread
Command Problem - by Dripac - 15.03.2012, 17:53
Re: Command Problem - by Prumpuz - 15.03.2012, 18:02
Re: Command Problem - by Dripac - 15.03.2012, 18:07
AW: Command Problem - by Blunt P - 16.03.2012, 12:49
Re: AW: Command Problem - by Dripac - 16.03.2012, 12:51

Forum Jump:


Users browsing this thread: 2 Guest(s)