Get file list in a directory
#1

So I have an account system file-based, and sometimes i'd like to do something to all users. Is there anyway I can get the list of file names in my directory?
Reply
#2

Of course you can.. only if you saved them somewhere. For example, if player register on your server then you gonna save his nickname to seperate file and do the same thing with other player and do it over and over. But you can't just get a file name, you have to type a file name.
Reply
#3

You can do this with a plugin, let me find it

EDIT: https://sampforum.blast.hk/showthread.php?tid=411268
Reply
#4

Quote:
Originally Posted by Riddick94
Посмотреть сообщение
Of course you can.. only if you saved them somewhere. For example, if player register on your server then you gonna save his nickname to seperate file and do the same thing with other player and do it over and over. But you can't just get a file name, you have to type a file name.
Actually Im doing that right now. But it's hard to maintain when deleting users, or things like that. I just was looking for a simplier way.
Reply
#5

You can't check file name (99,9% sure). I've never heard about function to check file name. Even in y_ini. So, I think, that's the only one way to check it, just save it to seperate text file and read it when you need, probably the best way. If you gonna delete user you can remove entry with y_ini (best way of file handling).
Reply
#6

I don't know whats wrong with Riddick but he seems pretty out to lunch.
Reply
#7

I've found this: https://sampforum.blast.hk/showthread.php?tid=113485

Thank you all anyway.
Reply
#8

FileManager and Directory2 are also quite useful plugins
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)