26.07.2011, 00:10
Here is my old /ban cmd modify for your needs:
Note: You got to fix colors and messages to get this working.
pawn Код:
dcmd_ban(playerid, params[])
{
if(IsPlayerAdmin2[playerid] == 2)
{
new level;
new pid;
if (sscanf(params, "us", pid, level))
{
SendClientMessage(playerid, 0xFF0000AA, "USAGE: /ban [ID] [Reason] - Ban a rule-breaker.");
}
else if (pid == INVALID_PLAYER_ID) SendClientMessage(playerid, 0xFF0000AA, "Player not found");
else
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
new pname[MAX_PLAYER_NAME];
GetPlayerName(pid, pname, sizeof(pname));
new string[256];
format(string, sizeof(string), "Administrator %s have banned %s for: %s", name, pname, level);
SendClientMessageToAll(COLOR_BLUE, string);
Ban(pid);
}
return 1;
}
else return SendClientMessage(playerid,COLOR_RED,"ERROR: You need to be an admin level 4 or higher to use this command.");