AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Directories help (https://forums.alliedmods.net/showthread.php?t=328058)

RaidoNek 10-24-2020 17:37

Directories help
 
Hello guys, i've been searching for a long time about this, but i haven't found anything yet. Is there any way to search for all files, that are in directory? Example: I will have a directory in models( models/example ) and in it i will have like one.cfg, two.ini and three.bsp and i want to store these files somewhere, is it possible?

CrazY. 10-24-2020 18:01

Re: Directories help
 
Not with an amxx plugin, if you make a module maybe.
You will have to manually define the files, either in a text file or in the plugin itself

OciXCrom 10-24-2020 18:33

Re: Directories help
 
There is a way. There are functions for looping directories just like you can loop files.

https://www.amxmodx.org/api/file/open_dir
https://www.amxmodx.org/api/file/next_file
https://www.amxmodx.org/api/file/close_dir
https://www.amxmodx.org/api/file/dir_exists
https://www.amxmodx.org/api/file/read_dir

RaidoNek 10-25-2020 12:51

Re: Directories help
 
OciXCrom, thank you, i will try :D, also thank CraZy, but i don't know how to make module :D


All times are GMT -4. The time now is 00:40.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.