Ulysses Stuff > General Chat & Help and Support
admin sweps = ulx_concommand
Locou:
It works now!
If i try to spawn a SWEP ULib say:
"You do not have access to this command, Locou."
lua/ULib/user.ini
// Examples of admin accounts:
// "STEAM_0:1:959562" "pepper" "abcdefghijklmnopqrstuv" "c"
"STEAM_0:1:959562" "pepper" "abcdefghijklmnopqrstuv" "c"
I've also tryed "Locou" "pepper" "abcdefghijklmnopqrstuv" "a"
] _pw pepper
[UCL] You are already authenticated.
Megiddo:
Are there errors on startup, and what line are you using for concommand?
Locou:
Full swep_menu.lua code:
--- Code: ----- SWEP menu, Garry Newman 2005
--
-- To disable this menu just change Enabled to false below.
--
--
assert( _file.Exists( "lua/ULib/init.lua" ), "<Insert script name> needs ULib to run!" )
_OpenScript( "ULib/init.lua" )
assert( ULib.VERSION >= 1, "<Insert script name> requires ULib version 1 or higher to run!" ) -- Insert what version you want in place of 1
g_SWEPMenu = {}
g_SWEPMenu.Enabled = true
g_SWEPMenu.MenuTitle = "SWEP Weapons Admin"
g_SWEPMenu.SpawnRate = 3.0
g_SWEPMenu.Players = {}
g_SWEPMenu.ShowCategories = true
g_SWEPMenu.ExcludeFolders = { ".",
"..",
"football",
"build",
"hideandseek" }
if (g_SWEPMenu.Enabled) then
g_SWEPs = {}
function AddSWEPToMenu( category, name, filepath )
-- Strip some crap from the weapon names..
--name = string.gsub(name, "weapon_", "")
--name = string.gsub(name, "tpc_", "")
name = string.gsub(name, ".lua", "")
filepath = string.gsub(filepath, "lua/weapons/", "")
filepath = string.gsub(filepath, ".lua", "")
local tWeapon = {}
tWeapon.category = category;
tWeapon.name = name;
tWeapon.filename = filepath;
table.insert( g_SWEPs, tWeapon );
end
function ProcessSWEPFolder( k, name )
for i=1, table.getn(g_SWEPMenu.ExcludeFolders) do
if (g_SWEPMenu.ExcludeFolders[i] == name) then
return;
end
end
local FileName = "lua/weapons/" .. name ;
if (_file.IsDir(FileName) == false) then return end;
local tFiles = _file.Find( FileName .. "/*.lua" );
for i=1, table.getn(tFiles) do
AddSWEPToMenu( name, tFiles[i], FileName .."/".. tFiles[i] );
end
end
function PopulateSWEPList()
local tFiles = _file.Find( "lua/weapons/*" );
table.foreach( tFiles, ProcessSWEPFolder );
end
function PlayerSendSWEPMenu( iPlayer )
if (iPlayer==0) then return end;
if (_GetRule( "AllowObjectSpawning" )==false) then return; end;
local LastCat = ""
-- Set up this player's settings
g_SWEPMenu.Players[iPlayer] = {}
g_SWEPMenu.Players[iPlayer].NextSpawn = 0
for i=1, table.getn(g_SWEPs) do
if ( LastCat ~= g_SWEPs[i].category and g_SWEPMenu.ShowCategories ) then
_spawnmenu.AddItem( iPlayer, g_SWEPMenu.MenuTitle, "@" .. g_SWEPs[i].category, "" );
LastCat = g_SWEPs[i].category
end
_spawnmenu.AddItem( iPlayer, g_SWEPMenu.MenuTitle, "+" .. g_SWEPs[i].name, "SWEPSpawn " .. g_SWEPs[i].filename );
end
end
function cc_SpawnSWEP( iPlayer, strFilename )
-- Time between spawns.
if ( g_SWEPMenu.Players[iPlayer].NextSpawn > _CurTime() and _MaxPlayers() > 1 ) then
return;
end
if ( _GetRule( "AllowObjectSpawning" )==false ) then return end;
if ( _file.Exists( "lua/weapons/" .. strFilename .. ".lua" ) == false ) then return end;
if ( not _PlayerInfo( iPlayer, "alive") ) then return end;
-- Make sure this is in our spawnables list
local bFound = false;
for i=1, table.getn(g_SWEPs) do
if ( g_SWEPs[i].filename == strFilename ) then bFound = true; end;
end
if ( not bFound ) then return end;
PlayerLookTrace( iPlayer, 200 );
if ( _TraceHit() == false ) then return end;
local vSpawnPos = _TraceEndPos();
local vNormal = _TraceGetSurfaceNormal();
vSpawnPos = vecAdd( vSpawnPos, vecMul( vNormal, 50 ) )
local iEnt = _EntCreate( "weapon_swep" )
_EntSetPos( iEnt, vSpawnPos )
_EntSetKeyValue( iEnt, "Script", strFilename )
_EntSpawn( iEnt )
_util.DropToFloor( iEnt )
g_SWEPMenu.Players[iPlayer].NextSpawn = _CurTime() + g_SWEPMenu.SpawnRate;
end
PopulateSWEPList();
HookEvent( "eventPlayerInitialSpawn", PlayerSendSWEPMenu );
ULib.CONCOMMAND( "SWEPSpawn", cc_SpawnSWEP, "Spawn SWEP weapon; Syntax: <filename>", ACCESS_IMMUNITY);
end
--- End code ---
full startup in console:
--- Code: ---Game.dll loaded for "GMod 9.0.4"
GMod Folder: c:\programme\valve\steam\steamapps\sourcemods\gmod9
Processing Lua config file..
Finished Lua Config.
Creating Lua instance..
Lua Script: init/init.lua
Lua Script: init/BarrierInit.lua
Lua Script: init/EXTREME functions.lua
Host_Error: CVEngineServer::PrecacheModel: 'models/Gibs/Antlion_gib_medium_2.mdl' overflow, too many models
Host_Error: CVEngineServer::PrecacheModel: 'models/Gibs/Antlion_gib_small_3.mdl' overflow, too many models
Host_Error: CVEngineServer::PrecacheModel: 'models/Gibs/Antlion_gib_small_1.mdl' overflow, too many models
Host_Error: CVEngineServer::PrecacheModel: 'models/Gibs/HGIBS.mdl' overflow, too many models
Host_Error: CVEngineServer::PrecacheModel: 'models/Gibs/HGIBS_rib.mdl' overflow, too many models
Host_Error: CVEngineServer::PrecacheModel: 'models/Gibs/HGIBS_scapula.mdl' overflow, too many models
Host_Error: CVEngineServer::PrecacheModel: 'models/Gibs/HGIBS_spine.mdl' overflow, too many models
Host_Error: CVEngineServer::PrecacheModel: 'models/props/cs_italy/orangegib3.mdl' overflow, too many models
Lua Script: init/e_commands.lua
Lua Script: init/makecode.lua
Line 1: unexpected symbol near '/'
LUA: Errors when running script 'init/makecode.lua'
Lua Script: init/propprotector.lua
Lua Script: init/racehook3.lua
Line 1: unexpected symbol near '/'
LUA: Errors when running script 'init/racehook3.lua'
Lua Script: init/ropegun.lua
Lua Script: init/swep_menu.lua
///////////////////////////////
// Ulysses Library //
///////////////////////////////
// Loading... //
// defines.lua //
// misc.lua //
// util.lua //
// tables.lua //
// database.lua //
// ai.lua //
// color.lua //
// concommand.lua //
// download.lua //
// entity.lua //
// list.lua //
// menu.lua //
// messages.lua //
// misc.lua //
// phys.lua //
// player.lua //
// say.lua //
// ucl.lua //
// ucl_public.lua //
// vector.lua //
// compat.lua //
// Load Complete! //
///////////////////////////////
Lua Script: init/ticker.lua
Lua Script: init/ulx_init.lua
///////////////////////////////
// ULX //
///////////////////////////////
// Loading... //
// base.lua //
// util.lua //
// fun.lua //
// menus.lua //
// end.lua //
// Load Complete! //
///////////////////////////////
Lua Script: init/vmfloader.lua
Line 21: attempt to call field 'AddAddon' (a nil value)
LUA: Errors when running script 'vmfloader/beta2/addons/propprotection.lua'
Lua Script: init/zzpropprotector.lua
Lua created.
maxplayers set to 1
[ECS] - EThink function : 028E9D14. Frequency : 0.5
[ECS] - EThink function : 028E8E74. Frequency : 0.5
[ECS] - eSwep : entmover ( e_commands/sweps/weapon_entmover.lua )
[ECS] - EThink function : 028EA878. Frequency : 0.25
[ECS] - EThink function : 028EAD64. Frequency : 0.25
[ECS] - EThink function : 028EADD0. Frequency : 0.25
[ECS] - eSwep : selectgun ( e_commands/sweps/weapon_select.lua )
[ECS] - EThink function : 028EB250. Frequency : 0.5
[ECS] - EThink function : 028EB97C. Frequency : 1
[ECS] - EThink function : 028EB910. Frequency : 0.75
Heap: 256.00 Mb
Parsed 23 text messages
execing config.cfg
Can't use cheat cvar cam_command in multiplayer, unless the server has sv_cheats set to 1.
1 CPU, Frequency: 2.2 Ghz, Features: AuthenticAMD SSE MMX 3DNow RDTSC CMOV FCMOV
GetAllManifestFiles: Unable to load maplist.txt
execing valve.rc
execing autoexec.cfg
Banning all bitches...
Usage: addip < minutes > < ipaddress >
Use 0 minutes for permanent
Usage: addip < minutes > < ipaddress >
Use 0 minutes for permanent
...Done
Banning all imposters...
...Done
couldn't exec HuntsMod/picture
CModelLoader::Map_IsValid: No such map 'none'
map load failed: none not found or invalid
GMod Folder: c:\programme\valve\steam\steamapps\sourcemods\gmod9
Loading map 'gm_construct'..
maxplayers set to 1
execing game.cfg
Spawn Server gm_construct
Begin loading faces (loads materials)
End loading faces (loads materials)
GMod Folder: c:\programme\valve\steam\steamapps\sourcemods\gmod9
Creating Lua instance..
Lua Script: init/init.lua
Lua Script: init/BarrierInit.lua
Lua Script: init/EXTREME functions.lua
Late precache of models/Gibs/Antlion_gib_medium_2.mdl
Late precache of models/Gibs/Antlion_gib_small_3.mdl
Late precache of models/Gibs/Antlion_gib_small_1.mdl
Late precache of models/Gibs/HGIBS.mdl
Late precache of models/Gibs/HGIBS_rib.mdl
Late precache of models/Gibs/HGIBS_scapula.mdl
Late precache of models/Gibs/HGIBS_spine.mdl
Late precache of models/props/cs_italy/orangegib3.mdl
Lua Script: init/e_commands.lua
Lua Script: init/makecode.lua
Lua Error: Line 1: unexpected symbol near '/'
LUA: Errors when running script 'init/makecode.lua'
Lua Script: init/propprotector.lua
Lua Script: init/racehook3.lua
Lua Error: Line 1: unexpected symbol near '/'
LUA: Errors when running script 'init/racehook3.lua'
Lua Script: init/ropegun.lua
Lua Script: init/swep_menu.lua
///////////////////////////////
// Ulysses Library //
///////////////////////////////
// Loading... //
// defines.lua //
// misc.lua //
// util.lua //
// tables.lua //
// database.lua //
// ai.lua //
// color.lua //
// concommand.lua //
// download.lua //
// entity.lua //
// list.lua //
// menu.lua //
// messages.lua //
// misc.lua //
// phys.lua //
// player.lua //
// say.lua //
// ucl.lua //
// ucl_public.lua //
// vector.lua //
// compat.lua //
// Load Complete! //
///////////////////////////////
Lua Script: init/ticker.lua
Lua Script: init/ulx_init.lua
///////////////////////////////
// ULX //
///////////////////////////////
// Loading... //
// base.lua //
// util.lua //
// fun.lua //
// menus.lua //
// end.lua //
// Load Complete! //
///////////////////////////////
Lua Script: init/vmfloader.lua
Lua Error: Line 21: attempt to call field 'AddAddon' (a nil value)
LUA: Errors when running script 'vmfloader/beta2/addons/propprotection.lua'
Lua Script: init/zzpropprotector.lua
Lua created.
[ECS] - EThink function : 028F1868. Frequency : 0.5
[ECS] - EThink function : 028EEBF8. Frequency : 0.5
[ECS] - eSwep : entmover ( e_commands/sweps/weapon_entmover.lua )
[ECS] - EThink function : 028F0CE0. Frequency : 0.25
[ECS] - EThink function : 028EA02C. Frequency : 0.25
[ECS] - EThink function : 028E9480. Frequency : 0.25
[ECS] - eSwep : selectgun ( e_commands/sweps/weapon_select.lua )
[ECS] - EThink function : 028EDA1C. Frequency : 0.5
[ECS] - EThink function : 028E5C1C. Frequency : 1
[ECS] - EThink function : 028E59DC. Frequency : 0.75
execing skill.cfg
Unknown command "sk_player_head"
Unknown command "sk_player_chest"
Unknown command "sk_player_stomach"
Unknown command "sk_player_arm"
Unknown command "sk_player_leg"
Executing listen server config file
Setting MPRules from console variables..
The Navigation Mesh was built using a different version of this map.
Game started
couldn't exec listenserver.cfg
Initializing renderer...
Populating Spawn List............................. Done!
[PROP] Lan/Listenserver copatibilitymode activated
[PROP] Locou (Locou) initialized
[LUA] Error calling 'DoEventHook' : 'Line 16: attempt to concatenate local 'simpleName' (a nil value)'
[LUA] Error calling 'DoEventHook' : 'Line 44: attempt to call field 'func' (a nil value)'
Late precache of models/player/gman_high.mdl
[PROP] Locou (Locou) initialized
Locou has connected
[UCL] Access set.
Welcome to GMod 9.0.4! We're playing gm_construct.
Late precache of models/props_junk/sawblade001a.mdl
--- End code ---
Megiddo:
You have a lua virus which blocks SWEP spawning. Your virus is called 'racehook3.lua'. You can see it loaded in your load log above. For more information on this virus visit http://forums.facepunchstudios.com/showthread.php?t=169052
Locou:
Ok it works now! (reinstall gmod)
At first i had the same problem as above! "You do not have access to this command, Locou."
I tryed at first ACCESS_ALL. Works!
And then i tryed ACCESS_RESERVATION. And it works too!
Somthing with ACCESS_IMMUNITY isn't right, but i'm so happy! It works now!!
Thanks a lot! ;D
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version