23.02.2011, 11:01
pawn Код:
COMMAND:kick(playerid, params[])
{
new pid;
if(PlayerInfo[playerid][pAdminlevel] >= 1)
{
if(sscanf(params, "us[128]", pid, params[2])) return SendClientMessage(playerid, 0xFFFFFFFF, "/kick [playerid/name] [reason]");
if(!IsPlayerConnected(pid)) return SendClientMessage(playerid, 0xFFFFFFFF, "This player is not connected");
new adminname[MAX_PLAYER_NAME], paramname[MAX_PLAYER_NAME], string[180];
GetPlayerName(pid, paramname, sizeof(paramname));
GetPlayerName(playerid, adminname, sizeof(adminname));
format(string, sizeof(string), "%s has been kicked by %s for: %s", paramname, adminname, params[2]);
SendClientMessageToAll(AdminColor, string);
Kick(pid);
} else if(PlayerInfo[playerid][pAdminLevel] == 0) return SendClientMessage(playerid, 0xAAAAAAAA, "You are not admin or the required level.");
return 1;
}
EDIT: nvm