• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Pawn] possible to create a folder inside scriptfiles?
#2
So you want to check if:

- A directory exists or not

and if not:

- Create it



Quote:apart from filemanager which probably also doesn't do what i'm asking for

What kind of stupid assumption is that? Did you even check out the plugin? It can do exactly what you want:



Code:
if (!dir_exists("scriptfiles/my_directory/"))

{

? ? dir_create("scriptfiles/my_directory/");

}



If you meant you want a function that does both things at once you'd have to create your own function.

And that's as simple as this:

Code:
dir_check(const dirname[])

{

? ? if (!dir_exists(dirname))

? ? {

? ? ? ? dir_create(dirname);

? ? }

}

Code:
dir_check("scriptfiles/my_directory.");



Consider using this one?https://github.com/JarnoKai/SA-MP-FileManager/
  Reply


Messages In This Thread
RE: possible to create a folder inside scriptfiles? - by Kwarde - 2022-09-13, 05:34 AM

Forum Jump: