SA-MP Forums Archive
Admin Fine? - 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: Admin Fine? (/showthread.php?tid=333198)



Admin Fine? - Gooday - 10.04.2012

How to make /FINE

"Administrator %S has fined %s for %i$. Reason: %s

+REP!


Re: Admin Fine? - ViniBorn - 10.04.2012

Editing. --'

pawn Код:
CMD:fine(playerid, params[])
{
    if(!IsPlayerAdmin(playerid))
        SendClientMessage(playerid,-1,"You are not an admin.");

    new ID,Money,Reason[32];
    if(sscanf(params, "uds[32]", ID,Money,Reason))
        return SendClientMessage(playerid, -1, "/fine [ID] [Money] [Reason]");

    new VBString[128],Admin[MAX_PLAYER_NAME],Name[MAX_PLAYER_NAME];
    GetPlayerName(playerid,Admin,MAX_PLAYER_NAME);
    GetPlayerName(ID,Name,MAX_PLAYER_NAME);
    format(VBString, 128, "Administrator %s has fined %s for %i$. Reason: %s",Admin, Name, Money, Reason);
    SendClientMessageToAll(-1,VBString);
    GivePlayerMoney(ID,-Money);
}