Server crash.
#1

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;
}
My server is crashing whenever I try to unban a offline player. Any clues why?
Reply


Messages In This Thread
Server crash. - by canip0000 - 11.07.2016, 18:15
Re: Server crash. - by DarkSkull - 11.07.2016, 18:22
Re: Server crash. - by Mencent - 11.07.2016, 18:29
Re: Server crash. - by Konstantinos - 11.07.2016, 18:31
Re: Server crash. - by canip0000 - 11.07.2016, 18:41

Forum Jump:


Users browsing this thread: 1 Guest(s)