24.11.2012, 01:03
Код:
CMD:ban(playerid, params[])
{
new name[MAX_PLAYER_NAME+1], string[24+MAX_PLAYER_NAME+1];
new id, reason[126];
if (sscanf(params, "us[126]", id, reason))
return SendClientMessage (playerid, -1, "Usage: /ban [ID] [reason]");
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "%s(%d) was banned from the server by %s(%d). Reason: %s .", name, id, name, id, reason);
SendClientMessageToAll(RED, string);
Ban(id);
return 1;
}
Server shows
Код:
[10:13:24] {FFFFFF}SA-MP {B9B9BF}0.3e {FFFFFF}Started
[10:13:27] Connecting to 10.1.1.34:7777...
[10:13:31] Connected. Joining the game...
[10:13:31] Connected to {B9B9BF}Castaway Island Test
[10:13:39] <Steven_Colt> Hello
[10:13:43] Usage: /ban [ID] [reason]
[10:13:53] Steven_Colt(0) was banned from the server by BLA
[10:13:54] Server closed the connection.
Код:
Steven_Colt(0) was banned from the server by Steven_Colt(0). Reason : BLA


