[HELP] Checking through userfiles
#1

I managed to do it before but totally forgot the way.
I wanted to make a command check through ALL userfiles to bring a value, help ?
Reply
#2

Bump.
Reply
#3

SQL.
Reply
#4

Without MySQL...
Reply
#5

You mean using while and fread?
Reply
#6

I don't remember how did I do it before, I need help with ANYTHING that lets me check through ALL userfiles.
Reply
#7

I don't get you, are you talking about something like this?
pawn Код:
stock IsPlayerNameRegistered(playerid) {
    new PlayerName[MAX_PLAYER_NAME], file[39];
    format(file, sizeof(file), "userfiles/%s.ini", PlayerName);
    if(fexist(file)) return SendClientMessage(playerid, -1, "This player name is already registered!");
    return 1;
}
Reply
#8

EDIT: This forum works too slowly.
Reply
#9

Quote:
Originally Posted by ******
Посмотреть сообщение
There is no way to scan files without a plugin. However, with a plugin such as y_files you can use standard file pattens such as "*.ini" to list files.

It can, however, depend on your user system. For example mine has an index file which relates username to filename, so you can iterate through that file to get all user files without a plugin.

The other option would be "fmatch", but in my experience that doesn't seem to work.
I simply want something to check through my userfiles 'n list people who have "BlahBlah=1".
Mind giving me an example ?
Reply
#10

Bump
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)