SA-MP Forums Archive
command problem - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: command problem (/showthread.php?tid=575209)



command problem - MW - 24.05.2015

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);
                }



Re : command problem - KillerDVX - 24.05.2015

What's the problem ?

We aren't ghosts.. Show the error code..



Re: command problem - MW - 25.05.2015

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