[HowTo?] Make a counting of every file that is in "scriptfiles" folder.
#1

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
Reply
#2

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.
Reply
#3

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.
Reply
#4

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 ^^
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)