pawn Код:
new NamesRP[][] =
{
"Danny_Williams",
"Nick_Harmold",
"Francisca_Perrotti"
"Hannah_Ress",
"Mathilde_Rhynes",
"Jarod_Otani",
"Dallas_Poppe",
"Russell_Secord",
"Timmy_Taitt",
"Shantel_Golden",
"Lavina_Kilpatrick",
"Janina_Drummond",
"Stephan_Mohan",
"Victor_Lown",
"Chris_Tabler",
"Hung_Pushard",
"Jennefer_Forsyth",
"Tyler_Mitchels"
};
CMD:namekick(playerid, params[])
{
new playerb;
if(!IsPlayerLoggedIn(playerid)) SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
else if(PlayerInfo[playerid][pAdmin] < 1 && PlayerInfo[playerid][pMapper] < 4 && !PlayerInfo[playerid][pMod]) SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
else if(sscanf(params, "u", playerb)) SendClientMessage(playerid, COLOR_WHITE, "[Usage]: /namekick [playerid]");
else if(!IsPlayerConnected(playerb)) SendClientMessage(playerid, COLOR_GREY, "Invalid player id.");
else if(IsPlayerNPC(playerb)) SendClientMessage(playerid, COLOR_GREY, "You can't kick NPCs out of the server.");
else if(PlayerInfo[playerid][pAdmin] < PlayerInfo[playerb][pAdmin]) SendClientMessage(playerid, COLOR_GREY, "Player has a higher admin level than you.");
else{
new string[145],rand = random(sizeof(NamesRP));
format(string, sizeof(string), "AdmCmd: %s has been kicked by %s (%s), reason: Change your name good example: %s", RPN(playerb), RPN(playerid), RPIP(playerid), NamesRP[rand]);
SendClientMessageToAll(COLOR_LIGHTRED, string);
Log("logs/kick.log", string);
SetTimerEx("kickbugfix", 500, false, "i", playerb);
}
return 1;
}