3dTextLabel
#6

Quote:
Originally Posted by ikbenremco
Посмотреть сообщение
Post a command like kick or ban
Thanks for trying to help me here is a kick command

pawn Код:
COMMAND:kick(playerid,params[])
{
    if(PlayerInfo[playerid][AdminLevel] >= LEVEL_kick)
    {
        new player, reason[128];
        if(sscanf(params, "rs[128]", player, reason))
        {
            SendClientMessage(playerid, WHITE,"{FFFF00}Usage: /kick [PlayerID/PartOfName] [Reason]");
            return 1;
        }
        if(PlayerInfo[player][AdminLevel] == MAX_ADMIN_LEVEL)
        {
            SendClientMessage(playerid, WHITE,"{FF0000}>> You cannot use this command on this admin");
            return 1;
        }
        if(player == playerid)
        {
            SendClientMessage(playerid, WHITE, "{FF0000}>> You cannot kick yourself");
            return 1;
        }
        if(IsPlayerConnected(player) && player != INVALID_PLAYER_ID && player != playerid && PlayerInfo[player][AdminLevel] != MAX_ADMIN_LEVEL)
        {
            new string[128];
            format(string,sizeof(string),"** %s has been kicked from the server [Reason: %s]",GetName(player),reason);
            SendClientMessageToAll(GREY,string);
            print(string);
            PlayerInfo[player][KickCount]++;
            #if PRINT_BYKICK == true
            printf("[KICK]: %s has been kicked", GetName(playerid));
            #endif
            Kick(player);
        }
        else
        {
            SendClientMessage(playerid, WHITE, "{FF0000}>> Player is not connected or is yourself or is the highest level admin");
        }
    }
    else
    {
        SendClientMessage(playerid, WHITE, NO_PERM);
    }
    return 1;
}
Reply


Messages In This Thread
3dTextLabel - by .v - 27.09.2012, 17:04
Re: 3dTextLabel - by Mr.Anonymous - 27.09.2012, 17:14
Re: 3dTextLabel - by ikbenremco - 27.09.2012, 17:17
Re: 3dTextLabel - by .v - 27.09.2012, 17:31
Re: 3dTextLabel - by ikbenremco - 27.09.2012, 17:38
Re: 3dTextLabel - by .v - 27.09.2012, 17:39
Re: 3dTextLabel - by ikbenremco - 27.09.2012, 17:53
Re: 3dTextLabel - by .v - 27.09.2012, 18:02
Re: 3dTextLabel - by Mr.Anonymous - 28.09.2012, 13:26

Forum Jump:


Users browsing this thread: 2 Guest(s)