SA-MP Forums Archive
Userfile help please. - 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: Userfile help please. (/showthread.php?tid=502415)



Userfile help please. - TonyII - 23.03.2014

Hey, how can I open a user file and check if the player is admin or not. I want a command that could show us all of the offline admins. I use YINI and this is how I save the user data.
pawn Код:
//OnPlayerDisconnect
new INI:File = INI_Open(UserPath(playerid));
INI_SetTag(File,"data");
INI_WriteInt(File,"Admin",PlayerInfo[playerid][pAdmin]);
INI_Close(File);



Re: Userfile help please. - MP2 - 23.03.2014

Quote:
Originally Posted by TonyII
Посмотреть сообщение
Hey, how can I open a user file and check if the player is admin or not. I want a command that could show us all of the offline admins.
You'd have to first have a list of all files, then read each file's admin level. mySQL is better for this sort of thing.


Re: Userfile help please. - TonyII - 23.03.2014

Quote:
Originally Posted by MP2
Посмотреть сообщение
You'd have to first have a list of all files, then read each file's admin level. mySQL is better for this sort of thing.
Alright, if I would try this with YINI would it cause lag to the server?


Re: Userfile help please. - MP2 - 23.03.2014

Yes, but it'd also be very difficult and complicated.