command problem
#1

what's the wrong with this part of a command
pawn Код:
if(strcmp(subcmd, "mats",true) == 0)
            {
                tmp = strtok(cmdtext,idx);
                if(!strlen(tmp))
                {
                    SendClientMessage(playerid, COLOR_WHITE, "USAGE: /flocker store mats [a/b/c]");
                    return 1;
                }
                if(strcmp(tmp, "a",true) == 0)
                {
                    new amountx = strval(tmp);
                    if(amountx > PlayerInfo[playerid][pMats])
                    {
                        return SendClientMessage(playerid,COLOR_GREY," You don't have that many of that material!");
                    }
                    if(amountx < 1 || amountx > 50000)
                    {
                        SendClientMessage(playerid, COLOR_GREY, "   Amount must be between 1 and 50000.");
                        return 1;
                    }
                    if(FamilyInfo[fam][FamilyMats] + amountx > 200000)
                    {
                        SendClientMessage(playerid,COLOR_GREY,"   Family locker can't hold more than 200,000 materials type A.");
                        return 1;
                    }
                    PlayerInfo[playerid][pMats] -= amountx;
                    FamilyInfo[fam][FamilyMats] += amountx;
                    SaveFamilies();
                    format(string, sizeof(string), "* %s deposits materials into a safe.", PlayerRPName(playerid));
                    ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                }
Reply
#2

What's the problem ?

We aren't ghosts.. Show the error code..
Reply
#3

not error codes the command is not working when I do /flocker store mats
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)