/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
#2

You must be having a Payday callback which will deduct the tax from the player's account! Show us that function's code.
Reply
#3

what should i search for to find it?
Reply
#4

CTRL + F in PAWN!

Search for 'Payday' i guess most of the script's use the same name for this callback!
Reply
#5

ok i dont get it.. whats the callback? im new to scripting
Reply
#6

anyone that can help me?
Reply
#7

bump
Reply
#8

Anyone??
Reply
#9

Paste your whole game mode in www.pastebin.com and give us a link here! We will try to fix it.

And you're not allowed to bump your thread before 48 hours. Stop Bumping it.
Reply
#10

You need to find the payday call back in your script and charge the tax in the callback
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)