Open all the files in a dir?
#1

Hello everyone.
In my server there are a lot of user files and maybe some of them are old users that have an admin rank.
I've already made a manual check cmd (es. /isadmin <Nickname>), but I'd like to do it automatically (like /listadmins), opening the /users directory, open the file and check if the player admin rank is bigger than 0.
Is that possibile? I'm talking about something like "dir" cmd for batch with also file opening.

Thanks in advance
(Sorry any mistake)
Reply
#2

48h bump.
Reply
#3

In pawno not, for that you need to find or create a plugin with another language
Reply
#4

you could create one extra file: "PlayerList.ini".
In this file, every line holds the name of the datafile (account-file) for every player:
Код:
PowerPC603.ini
CrazyGuy.ini
Spongebob.ini
Read this PlayerList file line by line and open/read/close the file that was listed on that line.
Then, when you reach the end of the file, you've processed all player's datafiles.

When a new player registers himself to your server, add the filename of his account to this PlayerList.ini file.

You can use the command "dir" (in the windows command prompt) to build this file:
Select "Execute..." from your start menu and enter "cmd".
This opens the command prompt.
Changedir to your server's directory.
Then type:
dir /B >> PlayerList.ini

This lists all files without size-info (only the filenames) and adds them all to the PlayerList.ini file.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)