02.08.2014, 10:12
Maybe try this can't say it will work because I am also understanding y_ini.
pawn Код:
CMD:unban(playerid, params[])
{
if(PlayerInfo[playerid][AdminLevel] >= 3)
{
new File[50], string[128];
if(sscanf(params, "u[50]",File)) return SendClientMessage(playerid, COLOR_YELLOW, "-XSBot-: Correct Usage: /unban [Player Name]");
format(File, sizeof(File), "Users/%s.ini", params);
if(!fexist(File)) return SendClientMessage(playerid, COLOR_RED, "-XSBot-: This player is not registered.");
if(INT_Int(File, "Banned") == 0) return SendClientMessage(playerid, COLOR_RED, "-XSBot-: This player is not marked as banned, unable to proceed with unbanning.");
INT_IntSet(File, "Banned", 0);
format(string, sizeof(string), "%s has been unbanned by %s", File, GetName(playerid));
SaveIn("UnbanLog",string);
format(string, sizeof(string), "-XSBot-: {FF0000}%s {FFFF00}has been unbanned by %s{FFFF00}.", params, GetColorNameID(playerid));
SendClientMessageToAll(COLOR_YELLOW, string);
}
else return SendErrorMessage(playerid, ADMIN_ERROR);
return 1;
}