Added CvarGetDefault() native to retrieve the default value of a cvar. (value got the first time when module hooks a cvar change or from CvarRegister native).
Added CvarReset() native to set back the default value of a cvar. (same comment as above).
Added CvarRegisterBoolean() stock to register more easily a cvar where the value must be either 0 or 1.
Added CvarGetFlagsString() stock to get a concatenated string from a sum of cvar flags.
Added new status CvarStatus_Cached to know whether a cvar is cached.
Added new output for the default value of cvar for CvarInfo() native, CvarHookChanged() forward and callback of CvarHookChange()/CvarHookChangeAll().
Command
Added an alias named cu of cvarutil command, because more fast to type :p.
Added the ability for "info" to pass an index to select the cvar (index at left when you do a "list"), because way more fast to type :p.
Added a new line in the "info" output displaying the default value.
Added a new column "CACHED" to show in what plugin a cvar is cached using CvarCache native.
Added also a list of plugins where the cvar is cached in the "info" output.
Improvement
Added postponing of the sending of cvars change which have been hooked by the module before the Amxx plugins were fully loaded.
Changed the behavior of the cvars where default value was always set at map change. Meaning if you change value and restart, the value was not kept. (it's now like AMXX does)
When hooking a cvar, the first call (if ignoreFirstCall set to false) will now use the default value if known as the old one instead of an empty string.
Fast clean up in cu_amx_cvar_fix plugin.
Bug
Fixed [somewhow] the issue where the Amxx buffer were overwritten in this situation of a native using such buffer and called inside a cvar callback.
Fixed a potential re-entrancy issue when you would call set_pcvar_* natives inside a cvar callback to change it's value.
Fixed few minor things here and there. Don't remember what.
Command
Fixed the output of list where cvars not registered from plugins could be listed.
Fixed the output of list where a min/max cvar bound from a same plugin was displaying there was more than 1 reference.
Fixed the output of list where a correct [partial] plugin name provided would return always no results.
Fixed the output of list where plugin id would be shifted (because of CSX module loading "csstats.amxx" internally) resulting wrong name.
Native
Fixed PluginInfo() native where plugin id retrieved needs to be incremented by 1 if CSX module is loaded .
I would like to purpose a new feature, if it's possible of course.
I think that it will be usefull to be able to hook the creation of cvars, and so to be able to modify / block it.
Indeed, some default cvars like "bot_*" ( Condition-zero mainly ) are really useless when your server doesn't have bots, and can furthermore create some issues ( WARNING: datagram overflowed ... ).
Hello Arkshine i'ved used your module on a linux server and i don't know why received this errors :
Code:
"amx_nextmap" changed to "cs_havana"
"amx_nextmap" changed to "de_chateau"
"amx_nextmap" changed to "de_aztec"
"amx_nextmap" changed to "cs_siege"
"amx_nextmap" changed to "de_cbble"
kyller dropped
"amx_nextmap" changed to "de_dust"
"amx_nextmap" changed to "cs_office"
"amx_nextmap" changed to "cs_italy"
HITLER dropped
"amx_nextmap" changed to "cs_militia"
advanced_bans.amxx
amx_who.amxx
; AMX Mod X plugins; Admin Base - Always one has to be activated
admin.amxx ; admin base (required for any admin-related)
;admin_sql.amxx ; admin base - SQL version (comment admin.amxx)
; Basic
admincmd.amxx ; basic admin console commands
adminhelp.amxx ; help command for admin console commands
adminslots.amxx ; slot reservation
; Menus
cmdmenu.amxx ; command menu (speech, settings)
;telemenu.amxx ; teleport menu (Fun Module required!)
mapsmenu.amxx ; maps menu (vote, changelevel)
pluginmenu.amxx ; Menus for commands/cvars organized by plugin
plmenu.amxx
; Chat / Messages
adminchat.amxx ; console chat commands
imessage.amxx ; displays information messages
adminvote.amxx ; vote commands
; Map related
nextmap.amxx ; displays next map in mapcycle
mapchooser.amxx ; allows to vote for next map
timeleft.amxx ; displays time left on map
; Configuration
pausecfg.amxx ; allows to pause and unpause some plugins
statscfg.amxx ; allows to manage stats plugins via menu and commands
; Counter-Strike
restmenu.amxx ; restrict weapons menu
statsx.amxx ; stats on death or round end (CSX Module required!)
;miscstats.amxx ; bunch of events announcement for Counter-Strike
;stats_logging.amxx ; weapons stats logging (CSX Module required!)
; Enable to use AMX Mod plugins
;amxmod_compat.amxx
; AMX Mod backwards compatibility layer
; Custom - Add 3rd party plugins here
; Active
resetscore.amxx
amx_immunity.amxx
Krond-Functions.amxx
amx_show_ip.amxx
ultimate_ss.amxx
ad_manager.amxx
advanced_blind.amxx
advanced_gag.amxx
amx_restartround.amxx
last_maps.amxx
ptb.amxx
amx_exterminate.amxx
invisible_spectator.amxx
admin_freelook.amxx
admin_spec_esp.amxx
no_name_change.amxx
cvar.amxx
Meta List :
Spoiler
Code:
Currently running plugins:
[ 1] AMX Mod X, v1.8.1.3746, Aug 16 2008, by AMX Mod X Dev Team, see http://www.amxmodx.org
[ 2] Fun, v1.8.1.3746, Aug 16 2008, by AMX Mod X Dev Team, see http://www.amxmodx.org
[ 3] Engine, v1.8.1.3746, Aug 16 2008, by AMX Mod X Dev Team, see http://www.amxmodx.org
[ 4] FakeMeta, v1.8.1.3746, Aug 16 2008, by AMX Mod X Dev Team, see http://www.amxmodx.org
[ 5] CStrike, v1.8.1.3746, Aug 16 2008, by AMX Mod X Dev Team, see http://www.amxmodx.org
[ 6] CSX, v1.8.1.3746, Aug 16 2008, by AMX Mod X Dev Team, see http://www.amxmodx.org/
[ 7] Ham Sandwich, v1.8.1.3746, Aug 16 2008, by AMX Mod X Dev Team, see http://www.amxmodx.org
7 plugins
The module
Code:
cvar_util_amxx_i386.so
i put it in modules folder. In modules.ini i don't write anything,maybe its wrong.
I made a plugin with this code :
- What version of the module you're using ? (to make sure, "amxx modules" or "cvarutil version)
- Please explain with words what is actually the problem
- Paste output of "cvarutil list" command
- My problem is : when i use Cvar Utilities 1.4 on linux server (this version :
Code:
version : 48/1.1.2.6/Stdio 5787 secure
) my server crashed and show me a lot of times
Code:
"amx_nextmap" changed to "cs_havana" "amx_nextmap" changed to "de_chateau" "amx_nextmap" changed to "de_aztec" "amx_nextmap" changed to "cs_siege" "amx_nextmap" changed to "de_cbble"
Give me a reproducible way. I load your plugins, then I do what ? Because as it is, I see no problem, especially when you block hostname change and the problem is on amx_nextmap.