24.11.2012, 03:24
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,
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;
}