Help +rep
#7

No, he means that when someone is kicked, it bans them instead (I think).

Here's a /kick command that works fully.

pawn Код:
CMD:kick(playerid, params[])
{
    new targetid, reason[64], string[128];
    [ADMIN SYSTEM HERE] return SendClientMessageEx(playerid, COLOR_GREY, "You are not authourized to use this command.");
    else if(sscanf(params, "us[64]", targetid, reason)) return SendClientMessageEx(playerid, COLOR_GREY, "Usage: /kick [playerid] [reason]");
    else if(!IsPlayerConnectedEx(targetid) || !IsPlayerLogged(targetid)) return SendClientMessageEx(playerid, COLOR_GREY, "Invalid player specified.");
    else if(PlayerInfo[targetid][pAdminLevel] > PlayerInfo[playerid][pAdminLevel]) return SendClientMessageEx(playerid, COLOR_GREY, "You cannot kick administrators of a higher rank.");
    format(string, sizeof(string), "SERVER: %s was kicked by %s, reason: %s", GetPlayerNameEx(targetid), GetPlayerNameEx(playerid), reason);
    SendClientMessageToAllEx(COLOR_LIGHTRED, string);
    format(string, sizeof(string), "%s was kicked by %s, reason: %s", GetPlayerNameEx(targetid), GetPlayerNameEx(playerid), reason);
    Log("kick.txt", string);
    Kick(targetid);
    return 1;
}
Reply


Messages In This Thread
Help +rep - by AYOUYOU - 26.10.2014, 21:09
Re: Help +rep - by Blade_Cervetti - 26.10.2014, 21:11
Re: Help +rep - by Alex Magaсa - 26.10.2014, 21:13
Re: Help +rep - by AYOUYOU - 26.10.2014, 21:34
Re: Help +rep - by AYOUYOU - 26.10.2014, 21:49
Re: Help +rep - by Anzipane - 26.10.2014, 21:56
Re: Help +rep - by mkmk - 26.10.2014, 22:08
Re: Help +rep - by AYOUYOU - 26.10.2014, 22:28
Re: Help +rep - by Alex Magaсa - 26.10.2014, 22:40
Re: Help +rep - by mkmk - 26.10.2014, 23:04

Forum Jump:


Users browsing this thread: 1 Guest(s)