Ulysses Stuff > Releases
Sourcebans & ULX/ULib
thegtz:
Do you know where I can get a working copy of gatekeeper for gmod 13?
-----
L 12/08/2012 - 18:54:52: Lua Error: Couldn't include file 'includes\modules\gatekeeper.lua' (File not found) (@addons/ulx/lua/includes/modules/sourcebans.lua (line 25))
Couldn't include file 'includes\modules\gatekeeper.lua' (File not found) (@addons/ulx/lua/includes/modules/sourcebans.lua (line 25))
L 12/08/2012 - 18:54:52: Lua Error:
[ERROR] addons/ulx/lua/includes/modules/sourcebans.lua:25: Module not found!
1. require - [C]:-1
2. unknown - addons/ulx/lua/includes/modules/sourcebans.lua:25
3. require - [C]:-1
4. unknown - addons/ulx/lua/ulx/modules/sourcebans_init.lua:5
5. include - [C]:-1
6. unknown - addons/ulx/lua/ulx/init.lua:28
7. include - [C]:-1
8. unknown - addons/ulx/lua/ulib/modules/ulx_init.lua:2
9. include - [C]:-1
10. unknown - addons/ulib/lua/ulib/init.lua:75
11. include - [C]:-1
12. unknown - addons/ulib/lua/autorun/ulib_init.lua:3
centran:
--- Quote from: thegtz on December 08, 2012, 05:30:28 PM ---Do you know where I can get a working copy of gatekeeper for gmod 13?
--- End quote ---
Don't use it. You don't need it.
Replace line 25 of sourcebans.lua with this
--- Code: -----require("gatekeeper");
--- End code ---
centran:
--- Quote from: Mors Quaedam on December 08, 2012, 06:03:58 AM ---I get this when I start my server:
--- End quote ---
try the following.
--- Code: ---local CATEGORY_NAME = "sourcebans"
function ulx.sban( calling_ply, target_ply, minutes, reason )
if target_ply:IsBot() then
ULib.tsayError( calling_ply, "Cannot ban a bot", true )
return
end
local steamid = target_ply:SteamID()
local name = target_ply:Nick()
sourcebans.BanPlayerBySteamID( steamid, minutes*60, reason, calling_ply, name )
local time = "for #i minute(s)"
if minutes == 0 then time = "permanently" end
local str = "#A banned #T " .. time
if reason and reason ~= "" then str = str .. " (#s)" end
ulx.fancyLogAdmin( calling_ply, str, target_ply, minutes ~= 0 and minutes or reason, reason )
end
local sban = ulx.command( CATEGORY_NAME, "ulx sban", ulx.sban, "!sban" )
sban:addParam{ type=ULib.cmds.PlayerArg }
sban:addParam{ type=ULib.cmds.NumArg, hint="minutes, 0 for perma", ULib.cmds.optional, ULib.cmds.allowTimeString, min=0 }
sban:addParam{ type=ULib.cmds.StringArg, hint="reason", ULib.cmds.optional, ULib.cmds.takeRestOfLine, completes=ulx.common_kick_reasons }
sban:defaultAccess( ULib.ACCESS_ADMIN )
sban:help( "Bans target." )
function ulx.sbanid( calling_ply, steamid, minutes, reason )
steamid = steamid:upper()
if not ULib.isValidSteamID( steamid ) then
ULib.tsayError( calling_ply, "Invalid steamid." )
return
end
local name
local plys = player.GetAll()
for i=1, #plys do
if plys[ i ]:SteamID() == steamid then
name = plys[ i ]:Nick()
break
end
end
sourcebans.BanPlayerBySteamID( steamid, minutes*60, reason, calling_ply, name )
local time = "for #i minute(s)"
if minutes == 0 then time = "permanently" end
local str = "#A banned steamid #s "
if name then
steamid = steamid .. "(" .. name .. ") "
end
str = str .. time
if reason and reason ~= "" then str = str .. " (#4s)" end
ulx.fancyLogAdmin( calling_ply, str, steamid, minutes ~= 0 and minutes or reason, reason )
end
local sbanid = ulx.command( CATEGORY_NAME, "ulx sbanid", ulx.sbanid , "!sbanid" )
sbanid:addParam{ type=ULib.cmds.StringArg, hint="steamid" }
sbanid:addParam{ type=ULib.cmds.NumArg, hint="minutes, 0 for perma", ULib.cmds.optional, ULib.cmds.allowTimeString, min=0 }
sbanid:addParam{ type=ULib.cmds.StringArg, hint="reason", ULib.cmds.optional, ULib.cmds.takeRestOfLine, completes=ulx.common_kick_reasons }
sbanid:defaultAccess( ULib.ACCESS_SUPERADMIN )
sbanid:help( "Bans steamid." )
function ulx.sunban( calling_ply, steamid )
steamid = steamid:upper()
if not ULib.isValidSteamID( steamid ) then
ULib.tsayError( calling_ply, "Invalid steamid." )
return
end
name = ULib.bans[ steamid ] and ULib.bans[ steamid ].name
sourcebans.UnbanPlayerBySteamID(steamid, "in game unban", calling_ply )
if name then
ulx.fancyLogAdmin( calling_ply, "#A unbanned steamid #s", steamid .. " (" .. name .. ")" )
else
ulx.fancyLogAdmin( calling_ply, "#A unbanned steamid #s", steamid )
end
end
local sunban = ulx.command( CATEGORY_NAME, "ulx sunban", ulx.sunban )
sunban:addParam{ type=ULib.cmds.StringArg, hint="steamid" }
sunban:defaultAccess( ULib.ACCESS_ADMIN )
sunban:help( "Unbans steamid." )
--- End code ---
Mors Quaedam:
Upon running !sbanid I get this
Mors Quaedam:
I dug a bit deeper with this error by putting require("sourcebans") at the top of the sban.lua, and I get this error now:
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version