Ulysses Stuff > Ulysses Release Archives

Cvar Addon Module 0.2

(1/1)

Chironex:
THIS IS FOR ULX 3.2x

This small module (smallest ever :)) allow you to add buttons and sliders into the Admin menu, from your configuration files (server/gamemodes/maps configs).

Here is some examples:

ulx addCvarSlider <slider label> <console variable> <slider max value> <optional: deny overflow>
ulx addCvarSlider "Max Wire Thrusters:" "sbox_maxwire_thrusters" 20
ulx addCvarSlider "Max Wire Values:" "sbox_maxwire_values" 100 1

ulx addCvarButton <label when disabled> <label when enabled> <console variable>
ulx addCvarButton "Enable CDS" "Disable CDS" "CDS_Enabled"


Changelog:
v0.2: the only problem found has been fixed


Report bugs/suggestions/anything, thanks.

Place this file into "addons/ulx/lua/ulx/modules" :

MrPresident:
this is pure win.. thank you. ;D ;D ;D

Chironex:
;)

Megiddo:
Good job! :D

Chironex:
Thanks lol,

I made a small update, now it sets the cvar to the limit you specify, if the cvar current value is greater than your limit...i don't know if you understand what i've just said, so here is an example:

Say you have this cvar: "sbox_maxwire_shits" with a default value: 50

In the old version of this script, if you do:  ulx addCvarSlider "Wire Shits:" "sbox_maxwire_shits" 10 , this will create a slider with max value 10, but the current value of this cvar is still 50 until you click Apply.

Well, now this problem is fixed, redownload from first post :)

Navigation

[0] Message Index

Go to full version