Original command of /kick is:
Код:
dcmd_kick(playerid,params[]) {
if(PlayerInfo[playerid][LoggedIn] == 1) {
if(PlayerInfo[playerid][Level] >= 3) {
new tmp[256], tmp2[256], Index; tmp = strtok(params,Index), tmp2 = strtok(params,Index);
if(!strlen(params)) return SendClientMessage(playerid, red, "USAGE: /kick [playerid] [reason]");
new player1, playername[MAX_PLAYER_NAME], adminname[MAX_PLAYER_NAME], string[128];
player1 = strval(tmp);
if(IsPlayerConnected(player1) && player1 != INVALID_PLAYER_ID && player1 != playerid && (PlayerInfo[player1][Level] != ServerInfo[MaxAdminLevel]) ) {
GetPlayerName(player1, playername, sizeof(playername)); GetPlayerName(playerid, adminname, sizeof(adminname));
CMDMessageToAdmins(playerid,"KICK");
if(!strlen(tmp2)) {
format(string,sizeof(string),"%s has been kicked by Administrator %s [no reason given] ",playername,adminname); SendClientMessageToAll(grey,string);
SaveToFile("KickLog",string); print(string); return Kick(player1);
} else {
format(string,sizeof(string),"%s has been kicked by Administrator %s [reason: %s] ",playername,adminname,params[2]); SendClientMessageToAll(grey,string);
SaveToFile("KickLog",string); print(string); return Kick(player1); }
} else return SendClientMessage(playerid, red, "Player is not connected or is yourself or is the highest level admin");
} else return SendClientMessage(playerid,red,"ERROR: You are not a high enough level to use this command");
} else return SendClientMessage(playerid,red,"ERROR: You must be logged in to use this commands");
}
There where is:
Код:
if(PlayerInfo[playerid][Level] >= 3) {
Change to:
Код:
if(PlayerInfo[playerid][Level] = 1) {
= - only with this level (>= means this level or higher)
1 - only with level 1