/kick /ban /warn
#9

pawn Код:
if(!strcmp(cmd,"/kick",true))
{
    if(pInfo[playerid][Admin] > 0)
    {
        tmp = strtok(cmdtext,idx);
        if(!strlen(tmp) || strlen(tmp) > 5) return SendClientMessage(playerid, COLOR_YELLOW, "USAGE: /kick [playerid] [reason]");
        new id = strval(tmp);
        if(!IsPlayerConnected(id)) return SendClientMessage(playerid,ADMINFS_MESSAGE_COLOR,"/kick : Bad player ID");
        new Reason = strrest(cmdtext,idx);
        GetPlayerName(id,playername,sizeof(playername));
        GetPlayerName(id,adminname,sizeof(adminname));
        format(string,sizeof(string),"You have kicked %s from the server!(Reason: %s)", playername, Reason);
        SendClientMessage(playerid, COLOR_GREEN, string);
        format(string,sizeof(string),"Administrator %s has kicked %s from the server!(Reason: %s)",adminname, playername, Reason);
        SendClientMessageToAll(COLOR_GREEN, string);
        printf("%s has kicked %s from the server !(Reason: %s)",adminname, playername, Reason);
        Kick(id);
        return 1;
    }
}
Reply


Messages In This Thread
/kick /ban /warn - by geerdinho8 - 05.01.2012, 13:31
Re: /kick /ban /warn - by Konstantinos - 05.01.2012, 13:41
Re: /kick /ban /warn - by [ABK]Antonio - 05.01.2012, 13:50
Re: /kick /ban /warn - by geerdinho8 - 05.01.2012, 15:38
Re: /kick /ban /warn - by [MG]Dimi - 05.01.2012, 15:43
Re: /kick /ban /warn - by geerdinho8 - 05.01.2012, 15:57
Re: /kick /ban /warn - by geerdinho8 - 05.01.2012, 16:45
Re: /kick /ban /warn - by geerdinho8 - 06.01.2012, 13:32
Re: /kick /ban /warn - by sabretur - 06.01.2012, 13:42
Re: /kick /ban /warn - by geerdinho8 - 06.01.2012, 13:46

Forum Jump:


Users browsing this thread: 1 Guest(s)