/kick /ban /warn
#4

Sorry, i forgot to paste the script
here it is(kick):
pawn Код:
if(strcmp(cmd, "/kick", true) == 0)
    {
        if(pInfo[playerid][Admin] >= 1)
        {
            tmp = strtok(cmdtext,idx), tmp2 = strtok(cmdtext,idx);
            new player1, Reason;
            player1 = strval(tmp);
            Reason = strval(tmp2);
            if(!strlen(tmp) && !strlen(tmp2))
         {
             SendClientMessage(playerid, COLOR_YELLOW, "USAGE: /kick [playerid] [reason]");
         }
                        else
         {
            GetPlayerName(player1, playername, sizeof(playername));  GetPlayerName(playerid, adminname, sizeof(adminname));
            format(string,sizeof(string),"You have kicked %s from the server!(Reason: %i)", playername, Reason);
            SendClientMessage(playerid, COLOR_GREEN, string);
            format(string,sizeof(string),"Administrator %s has kicked %s from the server!(Reason: %i)",adminname, playername, Reason);
            SendClientMessageToAll(COLOR_GREEN, string);
            printf("%s has kicked %s from the server !(Reason: %i)",adminname, playername, Reason);
            Kick(player1);

                        }
                }
                return 1;
}
warn and ban are almost the same
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)