10.09.2012, 11:33
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.
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;
}