11.02.2012, 09:54
Hi all!
My kick-command doesn't work, when I just type /kick ID, there's written:
Server Closed the connection...
It should show a red message to everybody, but it doesn't, and the reason isn't even involved!
Here's my command:
My kick-command doesn't work, when I just type /kick ID, there's written:
Server Closed the connection...
It should show a red message to everybody, but it doesn't, and the reason isn't even involved!
Here's my command:
PHP код:
CMD:kick(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] >= 5) {
new PID;
new reason[64];
new str[128];
new Playername[MAX_PLAYER_NAME], Adminname[MAX_PLAYER_NAME];
GetPlayerName(playerid, Playername, sizeof(Adminname));
GetPlayerName(PID, Playername, sizeof(Playername));
if(sscanf(params, "u", PID)) return SendClientMessage(playerid, COLOR_GREY, "USAGE: /kick [playerid] [reason]");
if(!IsPlayerConnected(PID))
return SendClientMessage(playerid, COLOR_GREY, "Player is not connected!");
Kick(PID);
format(str, sizeof(str), "%s has been kicked by administrator %s! Reason: %s ", Playername,Adminname, reason);
SendClientMessageToAll(COLOR_RED, str);
}
else
{
SendClientMessage(playerid, COLOR_GREY, "You are not an administrator, so you can't use this command!");
}
return 1;
}