[HowTo?] Make a counting of every file that is in "scriptfiles" folder. - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [HowTo?] Make a counting of every file that is in "scriptfiles" folder. (
/showthread.php?tid=108329)
[HowTo?] Make a counting of every file that is in "scriptfiles" folder. -
JonyAvati - 13.11.2009
Description
I'm making a new Role Play gamemode, and I want a registered users count, but I dont wanna use just a variable that adds +1 when somebody does /register, because files can be deleted, etc.
Can somebody tell me how? I've never seen something like this in any PAWN script.
Thanks
Re: [HowTo?] Make a counting of every file that is in "scriptfiles" folder. -
Joe Staff - 13.11.2009
Without using a plugin I don't believe it's possible. Incidently you can right-click the folder and go to properties, next to the file size it will tell you how many files there are, make sure to subtract for property files and whatnot.
Re: [HowTo?] Make a counting of every file that is in "scriptfiles" folder. -
(Jeff) - 13.11.2009
Quote:
Originally Posted by JonyAvati
Description
I'm making a new Role Play gamemode, and I want a registered users count, but I dont wanna use just a variable that adds +1 when somebody does /register, because files can be deleted, etc.
Can somebody tell me how? I've never seen something like this in any PAWN script.
Thanks
|
Lol, You Could Try Saving it to MySQL. Or a Plugin.or I'm not Familiar With Another Way.
Re: [HowTo?] Make a counting of every file that is in "scriptfiles" folder. -
JonyAvati - 13.11.2009
Quote:
Originally Posted by Y_Leѕѕ
The only way without bruteforcing (i.e. trying every combination of file name ever) it is with a plugin. My YSF plugin has additional file functions which include the ability to enumerate directories - there should be an example script for this included in the download. The other issue is why delete user files at all? Just keep them and mark them as unused.
|
Thank you, I think i'm going to use a variable at /register ^^