04.10.2014, 04:31
pawn Код:
command(ban, playerid, params[])
{
if(IsPlayerAdmin(playerid))//RCON
{
new ID, R[25], string[100];//R = Reason
new name[MAX_PLAYER_NAME], name2[MAX_PLAYER_NAME];
if(sscanf(params, "is", ID, R)) return SendClientMessage(playerid, 0xFF0000AA, "USAGE: /ban [ID] [Reason]");
{
if(ID != INVALID_PLAYER_ID)
{
SInfo[ID][Banned]=1;//To Make Player Banned When He Connect
GetPlayerName(playerid, name, sizeof(name));
GetPlayerName(ID, name2, sizeof(name2));
format(string, sizeof(string), "%s[%d] has been banned By The Admin %s[%d] - %s", ID,name2, playerid, name, R);
SendClientMessageToAll(0xFF1493FF, string);
Kick(ID);
}
else SendClientMessage(playerid, 0xFF0000AA, "ID Not Connected.")