Get Offline Stuff - 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: Get Offline Stuff (
/showthread.php?tid=494241)
Get Offline Stuff -
Problems - 12.02.2014
can i make /admins to get online + offline admins ?
cause ma command get online only admins.
Re: Get Offline Stuff -
Vince - 12.02.2014
What saving system are you using? For some weird reason no one ever mentions that. Easy to do with SQL, not so much with file based systems.
Re: Get Offline Stuff -
Problems - 12.02.2014
what about dudb ?
Re: Get Offline Stuff -
Face9000 - 12.02.2014
Do you use dini?
Re: Get Offline Stuff -
Problems - 12.02.2014
Quote:
Originally Posted by Face9000
Do you use dini?
|
Nope
Dudb
Re: Get Offline Stuff -
phoon - 12.02.2014
It can.
Just create a script that saves admin's names in a file when /setlevel is used.
Then create a script that returns all names from the file you made when /admins is used.
Don't forget to modify the script when player is no more an admin.
Re: Get Offline Stuff -
SimonItaly - 12.02.2014
With a file-based system you can list all the file in your users directory to a text file (
dir /B >> list.log with Windows cmd), then open this list and read line by line every username like this:
pawn Код:
new File:list = fopen("list.log", io_read);
while(fread(list, string))
{
//maybe something to remove the extension of your file
if(strval(dUser(string).("adminlevel")) != 0) print(string);
}
fclose(list);
(thanks to PowerPC who answered me about this three years ago, lol)
Re: Get Offline Stuff -
PowerPC603 - 12.02.2014
Quote:
Originally Posted by DarkSlyder
With a file-based system you can list all the file in your users directory to a text file ( dir /B >> list.log with Windows cmd), then open this list and read line by line every username like this:
pawn Код:
new File:list = fopen("list.log", io_read); while(fread(list, string)) { //maybe something to remove the extension of your file if(strval(dUser(string).("adminlevel")) != 0) print(string); } fclose(list);
(thanks to PowerPC who answered me about this three years ago, lol)
|
I did?
Can't remember that, LOL.