Y_INI RemoveEntry Issue
#1

Any idea why this command won't remove the player's file from ...scriptfiles/jAdmin/Accounts ?
pawn Code:
YCMD:ban(params)
{
    if(help) return SCM(playerid, HELP,"[Ban] With this command you can ban a player");
    new id, name2[MAX_PLAYER_NAME], str[128], reason[35], file[30];
    if(sscanf(o,"us[35]", id, reason)) return SCM(playerid, GREY,"Syntax Error: /ban [PlayerName/ID] [Reason]");
    if(id == INVALID_PLAYER_ID) return SCM(playerid, GREY,"This player is offline");
    GetPlayerName(id, name2, sizeof(name2));
    format(file,sizeof(file),"/jAdmin/Accounts/%s.ini",name2);
    new INI:File = INI_Open(file);
    INI_RemoveEntry(File, file);
    INI_Close(File);
    format(str, sizeof(str),"banip %s", GetIP(id));
    SendRconCommand(str);
    Ban(id);
    #if SAVE_LOGS == true
    DATE;
    format(str, sizeof(str),"%s has been banned for %s on date %d/%d/%d", name2, reason, y,m,d);
    BanLog(str);
    #endif
    return 1;
}
Reply


Messages In This Thread
Y_INI RemoveEntry Issue - by Jafet_Macario - 30.09.2011, 13:24
Re: Y_INI RemoveEntry Issue - by Jafet_Macario - 30.09.2011, 13:39
Re: Y_INI RemoveEntry Issue - by Jafet_Macario - 30.09.2011, 14:18
Re: Y_INI RemoveEntry Issue - by Jafet_Macario - 30.09.2011, 14:56

Forum Jump:


Users browsing this thread: 1 Guest(s)