Posts: 642
Threads: 129
Joined: Jan 2011
Reputation:
0
Hi all. I was just wondering, how can i count how many files are in the Users directory of scriptfiles... they are .ini files. This isnt urgent, but i would really like to know. THANKS!
Posts: 642
Threads: 129
Joined: Jan 2011
Reputation:
0
no.. its like.. player names... sooo..., what to do?
Posts: 277
Threads: 52
Joined: Jan 2010
Reputation:
0
why you need it? per what exactly?
Posts: 642
Threads: 129
Joined: Jan 2011
Reputation:
0
i just want to do something like this on ONFilterScriptInit()
printf("%d user accounts loaded!", num);
Posts: 2,593
Threads: 34
Joined: Dec 2007
Open scriptfiles -> ctrl + a = success xd
or create file "Accounts.ini" and if player type /register update Accounts get+1 and set
Posts: 206
Threads: 31
Joined: Jul 2010
Reputation:
0
Or from the beginning make a...
new useraccounts;
ongamemodeinit
{
if(!Dini_Exists("useraccountsfile.ini"))
{
useraccounts = 0;
Dini_Create("useraccountsfile.ini");
Dini_SetInt("useraccountsfile.ini", "AccountsCreated", 0);
}
else
{
useraccounts = Dini_GetInt("useraccountsfile.ini", "AccountsCreated");
}
}
ongamemodeexit
{
if(!Dini_Exists("useraccountsfile.ini"))
{
useraccounts = 0;
Dini_Create("useraccountsfile.ini");
Dini_SetInt("useraccountsfile.ini", "AccountsCreated", 0);
}
else
{
Dini_SetInt("useraccountsfile.ini", "AccountsCreated", useraccounts);
}
}
after account registration make
useraccounts++;
then you can
printf("%d user accounts loaded!", useraccounts);
but... you'd have to make everyone re-register.