30.06.2013, 13:49
This should fix it:
pawn Код:
COMMAND:fine(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] < 8)
{
SendClientMessage(playerid, COLOR_GREY, "You must be a level 8 admin to do this.");
}
else
{
new targetid;
new amount;
new playername[30];
new targetname[30];
new reason[128];
new result[200];
GetPlayerName(targetid, targetname, sizeof(targetname));
GetPlayerName(playerid, playername, sizeof(playername));
if(sscanf(params, "uis[128]", targetid, amount, reason)) return SendClientMessage(playerid, COLOR_GREY, "USAGE: /fine [ID] [AMOUNT] [REASON]");
if(PlayerInfo[targetid][pAdmin] > PlayerInfo[playerid][pAdmin]) return SendClientMessage(playerid, COLOR_GREY, "That players admin level is higher than yours.");
if(amount < 1) return SendClientMessage(playerid, COLOR_GREY, "The amount to fine can't be less than 1.");
GivePlayerMoney(targetid, -amount);
format(result, sizeof(result),"%s was fined $%i by %s, reason: {F5712A}%s", targetname, amount, playername, reason);
SendClientMessageToAll(COLOR_RED, result);
}
return 1;
}