11.07.2016, 18:15
pawn Код:
CMD:unban(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] >= 1)
{
new path[36], string[128], integer;
if (isnull(params)) return SendClientMessage(playerid, COLOR_LIGHTRED, "USAGE: /unban [Account name]");
format(path, sizeof(path), "Users/%s.ini", params);
if(!fexist(path)) return SendClientMessage(playerid, COLOR_LIGHTRED, "[ ! ]{FFFFFF} User is not registered!");
new INI:files = INI_Open(path);
INI_SetTag(files,"data");
INI_WriteInt(files, "Banned", 0);
INI_Close(files);
// format(string, sizeof(string), "%s has been unbanned by %s", File, GetName(playerid));
SendClientMessage(playerid, COLOR_LIGHTRED, "SERVER: Community member %s has been successfully unbanned. Player stats reloaded & saved.");
}
else return SendClientMessage(playerid, COLOR_LIGHTRED, "[ ! ] You don't have access to this command. (Game Admins +1)");
return 1;
}