Its not supposed to be actually used in a practical example no matter how tempting it may be.
Firstly, this is a TUTORIAL and you are meant to learn from it. This can cause issues if global data is overwritten, especially tables. Thanks for viewing this tutorial, today we will be creating a DarkRP HUD.
#GMOD OLD DARKRP GAMEMODE CODE#
Note that when code is refreshed, the entire file is run again. On Linux (tested on Ubuntu 20.04.1 LTS) the game seems to use inotify watches to detect file changes which may max out depending on file count, making certain files not autorefresh.( However, editing the primary cl_init, shared, a files will trigger it, or any files included from those files but anything dynamically added will not trigger the event - current test-case is with include rules inside of a function, called in sh_a and cl_init / init includes sh_init and AddCSLuaFile ) It doesn't work with dynamically included / AddCSLuaFile'd content - either for all, or specific cases.It doesn't work with Visual Studio, VSCode works fine though.It doesn't work if Sublime Text's "Atomic Save" is enabled.It doesn't work if the file is inside a symbolic linked directory.Specifically, when editing SWEP/SENT base files, SWEPs/SENTs using this base will not refresh until they are refreshed themselves.It only supports files that are automatically included by the gamemode, from autorun, effects, entities and weapons. gmconstruct and gmflatgrass are this for the regular sandbox mode, but theyre slightly more justified in that theyre the only two official maps that come with the game (not counting ones imported from other games), whereas rpdowntown is a custom map.
These are the currently known limitations: Not knowing these restrictions can lead to confusion. RestrictionsĪutorefresh does not always work. This is useful if you're coding because your changes show up immediately - as soon as you save.
#GMOD OLD DARKRP GAMEMODE MOD#
DarkRP by default has an Administration Mod called FAdmin and a Prop Protection System called FPP (Falco's PP). Since Garry's Mod 13 all Lua scripts are reloaded "live" when they are changed on disk. DarkRP is a non-serious roleplay gamemode developed by FPtje (Falco Peijnenburg) over the course of the last 8 years, over this time it has grown into one of, if not the biggest gamemode in all of Garry's Mod.