Quantcast
Channel: SA-MP Forums
Viewing all articles
Browse latest Browse all 18226

What The Error It Does Not Unban Me

$
0
0
Code:

CMD:unbanofflineplayer(playerid, params[])
{
        new string[128],tname[24];
        if(sscanf(params, "s[24]", tname)) return SendClientMessage(playerid,-1,"Correct Usage: /unbanofflineplayer [Player Name] ");
        new filestring[79];
        format(filestring, sizeof(filestring), "/ladmin/users/%s.sav", tname);
        if(!dini_Exists(filestring)) return SendClientMessage(playerid,COLOR_RED, "The name you've chosen was not found in our database ");
        else
        {
        dini_IntSet(filestring, "banned", 0);
        new cmdstring[145];
                format(cmdstring, sizeof(cmdstring), "unbanip %s", PlayerInfo[filestring][bip]);
                SendRconCommand(cmdstring);
                SendRconCommand("reloadbans");
                new done[128];
                format(done, sizeof(done),"You have successfully unbanned %s", tname);
                SendClientMessage(playerid, -1,done);
        }
        return 1;
}


Viewing all articles
Browse latest Browse all 18226

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>