Unban cmd help?
#4

pawn Код:
dcmd_unban(playerid,params[]) {
{
        if(AccInfo[playerid][Level] >= 2)
        {
            new tmp[256], Index;        tmp = strtok(params,Index);
            if(!strlen(params)) return SendClientMessage(playerid, red, "USAGE: /unban [name]");
            new adminname[MAX_PLAYER_NAME], string[128], unbanname[256];
            unbanname = tmp;
            if(udb_Exists(unbanname))    {
            dUserSetINT(unbanname).("banned", 0);
            GetPlayerName(playerid, adminname, sizeof(adminname));
            AdministratorMessage(COLOR_YELLOW, %s,1);
            format(string,sizeof(string),"Server: %s (ID: %d) has unbanned the name: \"%s\" .",adminname,playerid,unbanname);
            SendClientMessageToAll(green,string);
            dini_IntSet(file,"", 0); // Edit This, I replaced your "SaveToFile"
            print(string);
            return 1;
            } else return SendClientMessage(playerid, red, "ERROR: No player with this name.");
        } else return SendClientMessage(playerid,red,"ERROR: You are not a high enough level to use this command");
Sorry for the late reply
Forgot to mention, Stick both of these into your script to get the "AdministratorMessage" Working or just edit it to something else

pawn Код:
forward AdministratorMessage(color,const string[],level);
pawn Код:
public AdministratorMessage(color,const string[],level)
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            if (AccInfo[i][Level] >= level)
            {
            }
        }
    }
    return 1;
}
Reply


Messages In This Thread
Unban cmd help? - by Snipa - 08.11.2010, 23:41
Re: Unban cmd help? - by Ritchie999 - 09.11.2010, 00:08
Re: Unban cmd help? - by Snipa - 09.11.2010, 01:02
Re: Unban cmd help? - by Ritchie999 - 09.11.2010, 01:22
Re: Unban cmd help? - by Snipa - 09.11.2010, 02:08
Re: Unban cmd help? - by MrDeath537 - 09.11.2010, 04:32
Re: Unban cmd help? - by Ritchie999 - 09.11.2010, 21:25
Re: Unban cmd help? - by Snipa - 09.11.2010, 23:57
Re: Unban cmd help? - by Ritchie999 - 10.11.2010, 21:13

Forum Jump:


Users browsing this thread: 1 Guest(s)