[HELP] loop
#1

i want to create a loop that works on someone that is in game and not in game... - i want to change something in dini to all the players... the login ones and the not connected... is it possible?
Reply
#2

anyone?
Reply
#3

Don't think it's possible.. depends on the file system, but I don't think it is possible.
Reply
#4

Deleted xD
Reply
#5

It is possible, just not -practical.

You need to store EVERY player name thats ever connected in a file, with their 'ini key' being a number that's in sequence with the last (so 0, 1, 2, 3 etc). You then need to store the total registered players in the same, or another file.

Then you can simply do:
pawn Код:
new file[8+24+4], key[2];
for(new i; i < YOUR-TOTAL-ACCOUNT-COUNT; i++)
{
     format(key, sizeof(key), "%i", i);
     format(file, sizeof(file); "accounts/%s.ini", dini_Get("account-list.ini", key));
     //Do your actions to the account file, the variable is named file!
}
Enjoy!
Reply
#6

But dini is a slow loading system and a server with 2000+ accounts will crash the server eventually.
Reply
#7

Quote:
Originally Posted by TheLazySloth
Посмотреть сообщение
But dini is a slow loading system and a server with 2000+ accounts will crash the server eventually.
Exactly why it's not practical.

(Although, when I was using dini to do what my first post on this thread said, it counted around 3000 accounts and never crashed, but lagged like hell whenever I tried to act on all account!)
Reply
#8

=] The best way to updates every single player (connected/offline) is by using MySQL as your saving/loading system. But be aware of big sring sizes, the bigger the sizes to more you risk crashing your server still.
Reply
#9

My recommendation would be to ditch dini and use SQLite / MySQL.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)