[ANY] ADVANCED and silent CVAR change [AGO 2019]
2 Attachment(s)
WELCOME INTRODUCTION: For months I've been looking for a way to get rid of those annoying chat reports whenever a CVAR changed (requested by admin, automatic plugins, etc), and I've not found a working solution. So I made this plugin. DESCRIPTION: This plugin adds new commands which replace sm_cvar, with the same functionality, and no chat spamming (it even works on FCVAR_NOTIFY convars). BONUS 1: You can also print result to server console. And you can also add a delay before a cvar is changed. *NEW*: Now you can set a cvar pointing to another cvar's value. INFO: Delay must be given as float string. 1.0=1 second // 0.5=half second. If omited, or <=0.0, plugin will change your cvar inmediatelly. REQUERIMENTS: - Sourcemod >= 1.9 Change log: Version 1.1 [1 AGO 2019] - Added ability to set a cvar pointing to another cvar's value. Version 1.0 [30 JUL 2019] (23 downloads) - Initial release. Convars: PHP Code:
PHP Code:
No user commands implemented. Known bugs: - None at the moment. Please, report here. To do list: - Post suggestions here. Using CVar pointing to another CVar value: To set a cvar to another cvar's value, you should pass its name prepended by a dollar sign, AT THE VERY BEGINING OF THE ARGUMENT. Example 1: Code:
sm_acvar mp_footsteps $mp_flashlight Above example will set "mp_footsteps" according to mp_flashlight's value. Example 2 (This is wrong): Code:
sm_acvar hostname "welcome to $mp_gamemode" If you want to use a dollar sign at the begining of a string, and it doesnt be parsed as a cvar, you should use a double dollar sign to override its functionality. Example 3: Code:
sm_acvar hostname "$$peedfire" Examples: sm_acvar sv_cheats 1 Changes 'sv_cheats' to '1' without any chat message.sm_acvar_server hostname "L4D1 TANK RUSH 24/7" Changes 'hostname' to 'L4D1 TANK RUSH 24/7' and prints result to server console only.sm_adcvar_server 5.0 mp_friendlyfire 1 Will change 'mp_friendlyfire' to '1' within next 5 seconds after command is entered. And result will be printed to serverīs console.sm_adcvar 0.1 sv_gametypes "coop, versus, teamversus" Will change 'sv_gametypes' to 'coop, versus, teamversus' within next 0.1 second after command is entered.Examples pointing to another cvar value: sm_acvar z_hunter_limit $survivor_limit Will set z_hunter_limit to survivor_limit's current value.sm_acvar mp_freezetime $mp_buytime Will set mp_freezetime to mp_buytime's current value.sm_acvar hostname "$$uPeR cR4zy $erVer" Will set hostname to $uPeR cR4zy $erver. IMPORTANT: In this example, only $$uPeR needs double '$' to avoid cvar pointing. $erVer doesn't need double dollar sign because it's not at the very begining of the string.Beta testing versions: - Beta testing versions will be posted here. The purpose of this is posting my work progress oftenly. They may include unused code, unstable behaviors, non-working features, and some stuff can be removed on next official release. Click "show" for BETA versions:
Spoiler
Official last version: |
Re: [ANY] ADVANCED and silent CVAR change [JUL 2019]
hi;
Quote:
|
Re: [ANY] ADVANCED and silent CVAR change [JUL 2019]
Quote:
I know a plugin that reloads current map (sm_reloadmap command). And I know a plugins that execs commands with delay (sm_delaycmd command). You can combine them: sm_delaycmd 5.0 sm_reloadmap. Is this what you are looking for? |
Re: [ANY] ADVANCED and silent CVAR change [JUL 2019]
no :(
Quote:
next rounds not working |
Re: [ANY] ADVANCED and silent CVAR change [JUL 2019]
Quote:
This script manages CONVARS, not commands. Tell me exactly what are you trying to do. Maybe you are using this plugin by mistake. I think you should do is: Code:
sm_delaycmd 30.0 sm_blind @all 300 You should also use a plugin that automatically loads your CFG on each round. listenserver.cfg and server.cfg are executed on each mapchange, not on each new round. |
Re: [ANY] ADVANCED and silent CVAR change [AGO 2019]
Great job, works well and is very useful.
Thank you for sharing this solution. :bacon!::bacon!: |
Re: [ANY] ADVANCED and silent CVAR change [AGO 2019]
I no longer need to change the codes of the plugins.
Code:
SetCvar("mp_maxrounds", 30); |
Re: [ANY] ADVANCED and silent CVAR change [AGO 2019]
Quote:
[Any] Delay Command |
Re: [ANY] ADVANCED and silent CVAR change [AGO 2019]
Quote:
|
Re: [ANY] ADVANCED and silent CVAR change [AGO 2019]
Quote:
Check new file on top, under section: "Beta testing versions". Please, tell me if this is ok. It hooks two Left4Dead events. I dont remember if this may be conflictive with other games. You must now set sm_acvar_override_flags |
All times are GMT -4. The time now is 16:45. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.