/settax
#1

Hello again.. /settax is ment to set the tax to the chosen amount and every hour tax the players on the server, but my cmd dosnt tax anyone no mather whats the tax etc so i would like some help.
Here is the CMD,
pawn Код:
if(strcmp(cmd,"/settax",true)==0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(PlayerInfo[playerid][pLeader] != 7)
            {
                SendClientMessage(playerid, COLOR_GREY, "   You are not the President !");
                return 1;
            }
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp)) {
                SendClientMessage(playerid, COLOR_WHITE, "USAGE: /settax [ammount]");
                return 1;
            }
            moneys = strval(tmp);
            if(moneys < 1 || moneys > 5000) { SendClientMessage(playerid, COLOR_GREY, "   Tax may not be below 1 or above 5000 !"); return 1; }
            Tax = moneys;
            SaveStuff();
            SaveAnticheat();
            format(string, sizeof(string), "* The Tax is $%d per player, from now on.", Tax);
            SendClientMessage(playerid, COLOR_WHITE, string);

            new y, m, d;
            new h,mi,s;
            getdate(y,m,d);
            gettime(h,mi,s);
            format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s [CMD] -> /settax %d",d,m,y,h,mi,s,sendername, moneys);
            CommandLog(string);
        }
        return 1;
    }
Reply


Messages In This Thread
/settax - by Don_Cage - 24.11.2012, 03:24
Re: /settax - by Ballu Miaa - 24.11.2012, 03:49
Re: /settax - by Don_Cage - 24.11.2012, 03:56
Re: /settax - by Ballu Miaa - 24.11.2012, 05:52
Re: /settax - by Don_Cage - 24.11.2012, 06:27
Re: /settax - by Don_Cage - 25.11.2012, 02:27
Re: /settax - by Don_Cage - 25.11.2012, 08:58
Re: /settax - by Don_Cage - 26.11.2012, 09:17
Re: /settax - by Ballu Miaa - 26.11.2012, 11:20
Re: /settax - by EliteApple - 26.11.2012, 11:45

Forum Jump:


Users browsing this thread: 1 Guest(s)