/settax - 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: /settax (
/showthread.php?tid=394813)
/settax -
Don_Cage - 24.11.2012
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;
}
Re: /settax -
Ballu Miaa - 24.11.2012
You must be having a Payday callback which will deduct the tax from the player's account! Show us that function's code.
Re: /settax -
Don_Cage - 24.11.2012
what should i search for to find it?
Re: /settax -
Ballu Miaa - 24.11.2012
CTRL + F in PAWN!
Search for '
Payday' i guess most of the script's use the same name for this callback!
Re: /settax -
Don_Cage - 24.11.2012
ok i dont get it.. whats the callback? im new to scripting
Re: /settax -
Don_Cage - 25.11.2012
anyone that can help me?
Re: /settax -
Don_Cage - 25.11.2012
bump
Re: /settax -
Don_Cage - 26.11.2012
Anyone??
Re: /settax -
Ballu Miaa - 26.11.2012
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.
Re: /settax -
EliteApple - 26.11.2012
You need to find the payday call back in your script and charge the tax in the callback