10.04.2012, 17:28
How to make /FINE
"Administrator %S has fined %s for %i$. Reason: %s
+REP!
"Administrator %S has fined %s for %i$. Reason: %s
+REP!
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);
}