YINI unban help.
#1

Ok, so here's the deal, i've been working on a unban command using zcmd,sscanf,yini.
it opens the users profile fine, but it doesn't overwrite the old data, it just writes a new line.
can anyone help me out here?, any help will be much appreciated.

pawn Code:
CMD:unban(playerid, params[])
{
    new name[24],str[128];
    if(sscanf(params, "s", name)) return SendClientMessage(playerid, grey, "Usage: /unban [playername]");
    new string[32];
    format(string,sizeof(string),PATH,name);
    INI_Load(string);
    if(!fexist(string)) return SendClientMessage(playerid, red, "Invalid Playerid / Name.");
    INI_WriteInt("Banned",0);
    INI_Close(File);
    format(str,sizeof(str),"Account unbanned 'Name: %s' ",name);
    SCM(playerid, red, str);
    return 1;
}
Reply
#2

you need to use
pawn Code:
INI_SetTag(File,"Your_Data_Tag");
Reply
#3

Thanks +rep
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)