Ulysses

Ulysses Stuff => General Chat & Help and Support => Topic started by: Monskiller on April 27, 2016, 02:17:43 PM

Title: Question about sv_allowcslua.
Post by: Monskiller on April 27, 2016, 02:17:43 PM
Is it possible to allow clientside lua for a specific group/rank with ULX?
I'd like to allow trusted people the ability to load their custom HUDs. And restrict it from everyone else.
Title: Re: Question about sv_allowcslua.
Post by: roastchicken on April 27, 2016, 02:41:41 PM
Unless there is another way (while sv_allowcslua is set to 1) to prevent clientside lua to be run, I'm going to guess no as it is a server-side cvar meaning it will apply to all players.
Title: Re: Question about sv_allowcslua.
Post by: MrPresident on April 27, 2016, 04:13:37 PM
roastchicken is correct here. There's no way (that I know of) to do this.
Title: Re: Question about sv_allowcslua.
Post by: JamminR on April 27, 2016, 07:08:44 PM
After all is said and done though, someone writing a modular / changeable multiple choice server controlled HUD system is an awesome project idea.
Gamemode HUDs are controlled server-side for connecting clients, who's to say there isn't some way to allow different ones?
At worst, the player would have to re-connect to initialize maybe. At best, change on the fly.
Title: Re: Question about sv_allowcslua.
Post by: Monskiller on April 28, 2016, 04:10:42 AM
After all is said and done though, someone writing a modular / changeable multiple choice server controlled HUD system is an awesome project idea.
Gamemode HUDs are controlled server-side for connecting clients, who's to say there isn't some way to allow different ones?
At worst, the player would have to re-connect to initialize maybe. At best, change on the fly.

That would be awesome.
Allow players to code/upload their own custom HUDs. In sandbox at least since on other gamemodes (TTT, DarkRp, Murderer) could be used for cheating.
It's the only reason I would want sv_allowcslua.
Title: Re: Question about sv_allowcslua.
Post by: roastchicken on April 28, 2016, 08:18:42 PM
If my memory serves me correctly, there was (and maybe still is) a script on ScriptFodder that had some HUD-switching functionality but I think it was only for TTT. I don't think it would be very difficult to make a simple Derma menu to switch between different HUDs. I guess theoretically you could allow players to run custom lua via a menu element and (http://wiki.garrysmod.com/favicon.ico) Player:SendLua (http://wiki.garrysmod.com/page/Player/SendLua) or the net library but that would be extremely vulnerable to exploitation. I think the best way would be to have players send lua code to you so you can vet it, and then add it to a list of options in a HUD-switcher of sorts.
Title: Re: Question about sv_allowcslua.
Post by: JamminR on April 28, 2016, 08:33:11 PM
I'm with roastchicken.
You do not want end users just running random code, HUD or not.
My general idea was along what it sounds like roastchicken possibly saw elsewhere - the server owner controls all HUDs, and simply allows players to choose/change between them.
Title: Re: Question about sv_allowcslua.
Post by: Megiddo on April 30, 2016, 10:00:09 AM
You could look at ulx luarun and adopt it to your use.