SA-MP Forums Archive
Help please - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Help please (/showthread.php?tid=602939)



Help please - Riccardomen - 15.03.2016

There is a way to set on all files the string AccountLocked=0 or 1

i'll explain better

Folder : Accounts



/// In Folder Accounts we have

Name_Surname.ini
Name_Sname.ini

I want just set the key "AccountLoecked=0" to all files

i tried with dini but nothing happned

Anyone can help me please?


Re: Help please - kyriakos587 - 15.03.2016

new file[50],name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,MAX_PLAYER_NAME);
format(file,sizeof(file),"Accounts/%s.ini",name);
if(dini_Exists(file)){
dini_IntSet(file,"AccountLocked",0 or 1);}else if(!dini_Exists(file)){
dini_Create(file);
dini_IntSet(file,"AccountLocked",0 or 1);}
}


Re: Help please - Riccardomen - 06.12.2016

sorry if i post now..
anyway thanks , solved