Ulysses Stuff > Releases for ULX v1.*
Gun Admin Check
Golden-Death:
Well im stumped. For some reason, no matter what I do, if I run any script that has a ULX specific function, it doesnt work. (IE: hasAccess keeps coming out as a nil value, as well as CONCOMMAND)
--- Code: ---
] lua _PlayerGiveSWEP(1,"jetpack.lua")
Lua Error: Line 8: attempt to call global 'ULX_CONCOMMAND' (a nil value)
LUA: Errors when running script 'access.lua'
] lua_openscript access.lua
] gd_test
No access for you!
--- End code ---
Golden-Death:
Bah im beginnign to hate this thing. Please tell me if this works.
Make a lua file called 'access.lua' in the lua folder. Fill it:
--- Code: ---function cc_gd_test( userid, args, argv, argc )
if hasAccess( userid, ACCESS_KICK ) == true then
ulx_console( userid, "Authorized." )
else
ulx_console( userid, "No Access." )
end
end
ULX_CONCOMMAND( "gd_test", cc_gd_test )
--- End code ---
Open the weapon script, add to the top:
--- Code: ---_ServerCommand("gd_test\n")
--- End code ---
Now load the game and type
--- Code: ---lua_openscript access.lua
--- End code ---
then load your weapon. If you can use it, the console should say authorized, if not, it should say No Access. Please confirm.
Slayer_NL:
Well it says authorized when i spawn it and pick it up. BUT Normal players can still pick it up.
Golden-Death:
Yeah I've noticed that too, I have no idea why. Is hasAccess broken?
Slayer_NL:
Ok thanks for helping. When you have a fix please post it. ;D
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version