[HELP PLEASE] can't use the CMD
#1

return 1;
}
IRPfine(playerid, var[])
{
new string[128], user, amount, percent;
if(!Logged(playerid)) return NoLogin(playerid);
if(Player[playerid][pAdmin] >= 2)
{
if(sscanf(var, "uis[32]", user, percent, var)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /pfine [playerid] [percent] [reason]");
if(!Logged(user)) return NoLoginB(playerid);
if(percent < 0 || percent > 100) return SendClientMessage(playerid, COLOR_GREY, "Percent is between 0 and 100.");
new idx = Player[playerid][pHouse];
new idx2 = Player[playerid][pBiz];
new TotalWealth = Player[user][pMoney]+Player[user][pBank]+HouseInfo[idx][hMoney]+BizInfo[idx2][bMoney];
amount = (percent*(TotalWealth))/100;
GiveZamoraMoney(user, -amount);
format(string, sizeof(string), "{FF0000}[Admin]{FF6347} %s has been fined $%d (%d percent) by %s, reason: %s", GetName(user), amount, percent, GetName(playerid), var);
SendClientMessageToAll(COLOR_LIGHTRED, string);
Log("log/Admins/fine.log", string);
}
else
{
NoAuth(playerid);
}


-
-
-
-
-
-
-
-
-
-
Well, I get no error from the command, But it crashes the server whenever I use it!
Please try to help as soon as possible
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)