23.03.2017, 17:49
pawn Код:
COMMAND:kick(playerid, params[]) {
if(PlayerInfo[playerid][pAdmin] < 1 && !IsPlayerAdmin(playerid)) return SendError(playerid, CANT_USE_CMD);
new iPlayer, iReason[158];
if(sscanf(params, "us[157]", iPlayer, iReason)) return SCP(playerid, "< PlayerID / PartOfName > < Reason >");
if(IsPlayerConnected(iPlayer)) {
AdminLog(PlayerInfo[playerid][pID], PlayerInfo[iPlayer][pID], iReason, "[KICK]");
ServerKick(iPlayer, iReason, ReturnPlayerName(playerid));
} else return SendError(playerid, PLAYER_NOT_FOUND);
return 1;
}
Thanks