18.02.2011, 16:51
Ok so I'm using the next command to unban people. After I use that the passwords are becoming invalid, it's like I edit the ini file with notepad. The passwords are encrypted, I'm using a very changed version of GodFather
This is my command, I have more but this is one of them
I hope you can help me
This is my command, I have more but this is one of them
Код:
if(strcmp(cmd, "/unban", true) == 0)
{
if(IsPlayerConnected(playerid))
{
new string2[256];
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GREY, "USAGE: /unban [full name(case sensative)]");
return 1;
}
if (PlayerInfo[playerid][pAdmin] >= 1337 || PlayerInfo[playerid][pBanAppealer])
{
format(string, sizeof(string), "%s.ini",tmp);
if(dini_Exists(string))
{
if(dini_Int(string, "Band") > 0)
{
new clearban[6];
format(clearban, sizeof(clearban),"None");
dini_Set(string, "BanReason",clearban);
dini_IntSet(string, "Band", 0);
dini_IntSet(string, "Warnings", 0);
string2 = dini_Get(string, "IP");
format(string, sizeof(string),"unbanip %s", string2);
SendRconCommand(string);
SendRconCommand("reloadbans");
format(string, 256, "AdmWarning: %s has unbanned account '%s' and IP '%s'.",PlayerName(playerid),tmp,string2);
ABroadCast(COLOR_LIGHTRED, string, 1);
return 1;
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, "That player is not account-banned. You have unbanned their IP.");
string2 = dini_Get(string, "IP");
format(string, sizeof(string), "unbanip %s", string2);
SendRconCommand(string);
SendRconCommand("reloadbans");
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, "That player does not exist!");
}
}
}
return 1;
}

