Discord
Steam
/
Garry's Mod
/
Developers
/
how to CreateD..
Login/Join
Event Log
how to CreateDir server side?
8 replies, posted
Search
In This Thread
i cant seem to create folders on server side only if SERVER then file.CreateDir( "roleweapons" ) -- Create the directory end its in my init.lua file
you don't need to write "if server then" if its in init.lua file just write file.CreateDir( "roleweapons" )
it might be my server but its not making any thing
try to print("test") to check if the script is even working
Where are you placing this init.lua file? It should load serverside only if you place it in autorun/server/
Where are you wanting to create folders
Don't forget to AddCSLuaFile() if its a script or it's not going to load.
That's only for client files.
The folder will be in your garrysmod/garrysmod/data folder. That's the only place you can create directories. Dunno if you knew that already or not.
Sorry, you need to
Log In
to post a reply to this thread.