Difference between revisions of "LUA:Remove FAdmin"

From Official DarkRP Wiki
Jump to navigation Jump to search
(How to do it)
Line 1: Line 1:
 
= Removing FAdmin =
 
= Removing FAdmin =
 
First of all, '''don't remove any FAdmin files'''. DarkRP depends on them, don't be an idiot. Do it right.
 
First of all, '''don't remove any FAdmin files'''. DarkRP depends on them, don't be an idiot. Do it right.
 +
 +
Secondly, there used to be a different guide here that told you to make a Lua script that would disable FAdmin. That's actually a terrible way of doing it. It doesn't really disable FAdmin. It just disables the FAdmin scoreboard. People have reported several problems with that method.
  
 
== How to do it ==
 
== How to do it ==
1. Go to lua/darkrp_modules in your DarkRP modification addon (see [[DarkRP:ModifyingDarkRP|here]]). <br />
+
1. Make sure the DarkRPMod is installed
2. Create a folder. Call it what you like. <br />
+
 
2. In that folder, make a file called sh_removeFAdmin.lua (make sure it isn't secretly sh_removeFAdmin.lua.txt, make sure "show file extensions" is turned on)<br />
+
2. In the darkrpmod, open ''lua\darkrp_config\disabled_defaults.lua'' with a text editor (preferably Sublime text or Notepad++, the Windows notepad program tends to mess things up)
3. Paste the following code in it: <br />
+
 
 +
3. In that file you should see something like this:
 +
 
 
{{Code|1=
 
{{Code|1=
timer.Simple(0, function()
+
/*---------------------------------------------------------------------------
FAdmin.GlobalSetting.FAdmin = false
+
The list of modules that are disabled. Set to true to disable, false to enable.
if CLIENT then
+
Modules that are not in this list are enabled by default.
usermessage.Hook("FAdmin_GlobalSetting", function() end)
+
---------------------------------------------------------------------------*/
end
+
DarkRP.disabledDefaults["modules"] = {
end)
+
["afk"]              = true,
 +
["chatsounds"]      = false,
 +
["events"]          = false,
 +
["fpp"]              = false,
 +
["f1menu"]          = false,
 +
["f4menu"]          = false,
 +
["hitmenu"]          = false,
 +
["hud"]              = false,
 +
["hungermod"]        = true,
 +
["playerscale"]      = false,
 +
["sleep"]            = false,
 +
["fadmin"]          = false,
 +
}
 
}}
 
}}
4. Restart the server or changelevel.
+
 
 +
4. Simply change the "false" next to ["fadmin"] to "true". After you're done, that line should look like this:
 +
 
 +
{{Code|1=
 +
["fadmin"]          = true,
 +
}}
 +
 
 +
5. Done.

Revision as of 10:44, 31 July 2014

Removing FAdmin

First of all, don't remove any FAdmin files. DarkRP depends on them, don't be an idiot. Do it right.

Secondly, there used to be a different guide here that told you to make a Lua script that would disable FAdmin. That's actually a terrible way of doing it. It doesn't really disable FAdmin. It just disables the FAdmin scoreboard. People have reported several problems with that method.

How to do it

1. Make sure the DarkRPMod is installed

2. In the darkrpmod, open lua\darkrp_config\disabled_defaults.lua with a text editor (preferably Sublime text or Notepad++, the Windows notepad program tends to mess things up)

3. In that file you should see something like this:

/*---------------------------------------------------------------------------
The list of modules that are disabled. Set to true to disable, false to enable.
Modules that are not in this list are enabled by default.
---------------------------------------------------------------------------*/
DarkRP.disabledDefaults["modules"] = {
	["afk"]              = true,
	["chatsounds"]       = false,
	["events"]           = false,
	["fpp"]              = false,
	["f1menu"]           = false,
	["f4menu"]           = false,
	["hitmenu"]          = false,
	["hud"]              = false,
	["hungermod"]        = true,
	["playerscale"]      = false,
	["sleep"]            = false,
	["fadmin"]           = false,
}

4. Simply change the "false" next to ["fadmin"] to "true". After you're done, that line should look like this:

["fadmin"]           = true,

5. Done.