31.03.2014, 16:19
Hello, I have problem with /kick command. Code:
When I tipe it it's kick player but don't show this message:
pawn Код:
CMD:kick(playerid, params[])
{
if(PInfo[playerid][adminlevel] == 3) {
new PID;
new reason[64];
new str[128];
new Playername[MAX_PLAYER_NAME], Adminname[MAX_PLAYER_NAME];
GetPlayerName(playerid, Adminname, sizeof(Adminname));
GetPlayerName(PID, Playername, sizeof(Playername));
if(sscanf(params, "us", PID,reason)) return SendClientMessage(playerid, RAUDONA, "USAGE: /kick [playerid] [reason]");
if(!IsPlayerConnected(PID))
return SendClientMessage(playerid, RAUDONA, "Player is not connected!");
format(str, sizeof(str), "'%s' has been kicked by administrator '%s'. Reason: %s ", Playername, Adminname, reason);
SendClientMessageToAll(RAUDONA, str);
Kick(PID);
}
else
{
SendClientMessage(playerid, RAUDONA, "You have to be level 3 to use that command!"); //return this message
}
return 1;
}
pawn Код:
format(str, sizeof(str), "'%s' has been kicked by administrator '%s'. Reason: %s ", Playername, Adminname, reason);
SendClientMessageToAll(RAUDONA, str);