/unbanplayer --Help!
#5

Quote:
Originally Posted by [VLV
Cross - (Venomous-VLV.com) ]
Quote:
Originally Posted by Calgon
You're trying to ENCODE the string which opens the user file?
i guess so, well ya i want it to go into the User File and get there IP.
You're also not defining anything for file. Use my code.

pawn Код:
dcmd_unban(playerid, params[])
{
    new name[MAX_PLAYER_NAME], string[128], string2[256];
    if (sscanf(params, "s", name))
    {
        SendClientMessage(playerid, COLOR_WHITE, "SYNTAX - /unban [name]");
        SendClientMessage(playerid, COLOR_GREY, "Full name, this includes underscores. Also CaSe sEnSiTiVe.");
    }
    else
    {
      if(pStats[playerid][pAdmin] < 5)
      {
        SendClientMessage(playerid, COLOR_WHITE, BAD_ADMIN_MESSAGE);
        return 1;
      }
      else
      {
        format(string, sizeof(string), "CRP_Scriptfiles/Accounts/%s.ini", name);
        if(fexist(string))
        {
            string2 = dini_Get(string, "IP");
            format(string, sizeof(string), "unbanip %s", string2);
            SendRconCommand(string);
            format(string, sizeof(string), "You have successfully unbanned %s (IP: %s).", name, string2);
            SendClientMessage(playerid, COLOR_WHITE, string);
            SendRconCommand("reloadbans");
            SendClientMessage(playerid, COLOR_WHITE, "The bans list has been reloaded.");
        }
        else
        {
            SendClientMessage(playerid, COLOR_WHITE, "Invalid name, the name was not recognized.");
        }
      }
   
    }
    return 1;
}
You'll want to change a few things, and fix the indentation.
Reply


Messages In This Thread
/unbanplayer --Help! - by AKA_Cross - 16.09.2009, 18:06
Re: /unbanplayer --Help! - by Calgon - 16.09.2009, 18:53
Re: /unbanplayer --Help! - by Chaprnks - 16.09.2009, 21:51
Re: /unbanplayer --Help! - by AKA_Cross - 16.09.2009, 22:50
Re: /unbanplayer --Help! - by Calgon - 16.09.2009, 22:55
Re: /unbanplayer --Help! - by AKA_Cross - 17.09.2009, 02:44
Re: /unbanplayer --Help! - by AKA_Cross - 17.09.2009, 03:11
Re: /unbanplayer --Help! - by Calgon - 17.09.2009, 03:25
Re: /unbanplayer --Help! - by AKA_Cross - 17.09.2009, 04:06

Forum Jump:


Users browsing this thread: 1 Guest(s)