Raised This Month: $51 Target: $400
 12% 

Set convar based on flag.


Post New Thread Reply   
 
Thread Tools Display Modes
Terminatorr
Member
Join Date: Dec 2018
Old 12-13-2018 , 11:02   Re: Set convar based on flag.
Reply With Quote #11

Quote:
Originally Posted by Bacardi View Post
You can change cvars from config file, rcon, console input and by SourceMod plugins.

Such as admin commands, sm_rcon, sm_cvar

If you like vip's to change few server cvars, you can do this by plugins and either Admin Menu Custom.
Got it, so in my case allowing only player with flag `o` to change cvars would be done through plugins or custommenu,
well, in the first code you sent to execute it requires flag `o` but once executed it allows all player with out flags to have it too, which is not what i want.
*edit: what i want to have auto enabled and used only by flag `o`, or only allowed to be enabled and used by flag `o`. and rest of player maintain using normal server configs.

About custom menu is there a way to make custommenu for flag `o` without plugin?

Last edited by Terminatorr; 12-13-2018 at 11:04.
Terminatorr is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 12-13-2018 , 11:30   Re: Set convar based on flag.
Reply With Quote #12

Quote:
Originally Posted by Terminatorr View Post
Got it, so in my case allowing only player with flag `o` to change cvars would be done through plugins or custommenu,
well, in the first code you sent to execute it requires flag `o` but once executed it allows all player with out flags to have it too, which is not what i want.
In post #6, it change SERVER cvar sv_enablebunnyhopping. It is same as you add cvar in server.cfg and change map. It will affect every player.

Quote:
Originally Posted by Terminatorr View Post
*edit: what i want to have auto enabled and used only by flag `o`, or only allowed to be enabled and used by flag `o`. and rest of player maintain using normal server configs.

About custom menu is there a way to make custommenu for flag `o` without plugin?
In post #8, I gave perfect example what will happen, when client side cvar is differ server cvar. It won't work. It is not that simple.
You did see flicker ?


You maybe need alternative plugin to do this.
https://www.sourcemod.net/plugins.ph...tion=&search=1


*edit
Am I still in wrong trail in this topic ? :S
__________________
Do not Private Message @me

Last edited by Bacardi; 12-13-2018 at 11:35.
Bacardi is offline
Terminatorr
Member
Join Date: Dec 2018
Old 12-14-2018 , 03:28   Re: Set convar based on flag.
Reply With Quote #13

Quote:
Originally Posted by Bacardi View Post
In post #6, it change SERVER cvar sv_enablebunnyhopping. It is same as you add cvar in server.cfg and change map. It will affect every player.


In post #8, I gave perfect example what will happen, when client side cvar is differ server cvar. It won't work. It is not that simple.
You did see flicker ?


You maybe need alternative plugin to do this.
https://www.sourcemod.net/plugins.ph...tion=&search=1


*edit
Am I still in wrong trail in this topic ? :S
Thank you i learned much from this. Maybe flicker is not the right word, i would say the player would seem like stuck between jumping and normal stand and there is not transitions.
Terminatorr is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 12-14-2018 , 04:57   Re: Set convar based on flag.
Reply With Quote #14

Quote:
Originally Posted by Terminatorr View Post
Thank you i learned much from this. Maybe flicker is not the right word, i would say the player would seem like stuck between jumping and normal stand and there is not transitions.
exactly.

However, I can show examples, how VIP's are allowerd to change server cvars, if you like ?
__________________
Do not Private Message @me
Bacardi is offline
Terminatorr
Member
Join Date: Dec 2018
Old 12-14-2018 , 05:03   Re: Set convar based on flag.
Reply With Quote #15

Quote:
Originally Posted by Bacardi View Post
exactly.

However, I can show examples, how VIP's are allowerd to change server cvars, if you like ?
YES please. quick question though, will the change be system wide, or will only enable the cvars for their own use only?
Previous bunny hope plugins link you mentioned have not found anyone supports flags accept for abner's but it through s many errors on the server console. and i wanted to find one for autobunnygopping which accelerate/speed up the player speed while run. could not find any too. if i could only learn how to make it myself, to be honest sometimes i find the docs too short and less descriptive, unlike JAVA docs where there are tons of examples and explanations. any way there is not way we could compare the two. i guise will have to keep learning from you guys
Terminatorr is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 12-15-2018 , 02:37   Re: Set convar based on flag.
Reply With Quote #16

Firstly if you have not understand yet, there is client side cvars and server side cvars.
And we can't change clients cvars from server (with addons mods), remember this.

Server and clients does have so called REPLICATED cvars (type in console: findflags REPLICATED)
example
Code:
"sv_gravity" = "800" client notify replicated                                    - World gravity.
When this kind cvar change on server -> cvar change also from clients, mimicking.
When client try change this same cvar -> "Can't change replicated ConVar sv_gravity from console of client, only server operator can change its value"

You can try change this cvar from client with plugin, using SendConVarValue, so it differ from server cvar value.
-But there is no guarantee it will work, and could cause wierd bugs.


If you are not happy with this, then you look next way to "hack" clients properties... netprops datamaps etc. etc.

(I have been busy in work, it take some time to answer)
__________________
Do not Private Message @me
Bacardi is offline
Terminatorr
Member
Join Date: Dec 2018
Old 12-15-2018 , 02:47   Re: Set convar based on flag.
Reply With Quote #17

Quote:
Originally Posted by Bacardi View Post
Firstly if you have not understand yet, there is client side cvars and server side cvars.
And we can't change clients cvars from server (with addons mods), remember this.

Server and clients does have so called REPLICATED cvars (type in console: findflags REPLICATED)
example
Code:
"sv_gravity" = "800" client notify replicated                                    - World gravity.
When this kind cvar change on server -> cvar change also from clients, mimicking.
When client try change this same cvar -> "Can't change replicated ConVar sv_gravity from console of client, only server operator can change its value"

You can try change this cvar from client with plugin, using SendConVarValue, so it differ from server cvar value.
-But there is no guarantee it will work, and could cause wierd bugs.



If you are not happy with this, then you look next way to "hack" clients properties... netprops datamaps etc. etc.

(I have been busy in work, it take some time to answer)
#1 Got it, i am guessing here, Abners bhopping, and hexvip's set speed of client, they rather had the whole functions written instead of doing cvars `SetConVarValue`. i mean if we could change convars and ahve them affect only certain flag that would result less plugins devel otherwise.
#2 now slightly moving on little , how can i disable players taking control over bot, i have cheats 0 by the way, wonder if that required cheats 1, then i am definitely hacked.
#3 can i relay on SMAC anti cheats to the bans for me, or should i install sourcebans/++ or other things too, once player been banned, how can i unban them?

*Edit: Abners bunny works for certain flag only, even though it through s this error, `ConVarRef abner_bhop_flag doesn't point to an existing ConVar` wonder if its safe to use then.
#4 I know i ask out of subject now, but i just wanted help ratehr than creating new thread, hope that is ok . I keep getting this while i run my server i keep getting this errors `CSoundEmitterSystemBase::GetParametersForSou nd: No such sound ambient/animal/crickets.wav
Error parsing BotProfile.db - unknown attribute 'Rank'
Error parsing BotProfile.db - unknown attribute 'Rank'
Error parsing BotProfile.db - unknown attribute 'Rank'
Error parsing BotProfile.db - unknown attribute 'Rank'
Error parsing BotProfile.db - unknown attribute 'Rank'
Error parsing BotProfile.db - unknown attribute 'Rank'
Error parsing BotProfile.db - unknown attribute 'Rank'
Error parsing BotProfile.db - unknown attribute 'Rank'
Initializing Steam libraries for secure Internet server
[S_API FAIL] SteamAPI_Init() failed; SteamAPI_IsSteamRunning() failed. `
after a lot of googling ,found that will have to create a file steam_appid.txt on root dir of server, but found it already tehre with content of 730, while my game is 740, however server runs and can join.

Last edited by Terminatorr; 12-15-2018 at 02:54.
Terminatorr is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 12-15-2018 , 03:16   Re: Set convar based on flag.
Reply With Quote #18

...little pit off topic.
There unfortunally hidden cvars, you can find them with right plugin tough.

About bot control
Code:
bot_controllable
Unknown command "bot_controllable"
help bot_controllable
"bot_controllable" = "1" game replicated                                         - Determines whether bots can be controlled by players
sm_cvar bot_controllable 0
[SM] Changed cvar "bot_controllable" to "0".
L 12/15/2018 - 10:14:37: [basecommands.smx] "Console<0><Console><Console>" changed cvar (cvar "bot_controllable") (value "0")

4)You need Ignore most of server console output errors... there have been and there will more of those. It's Valve thing.




If you want fanzy Ban page in internet (you need understand little MySQL and server host), then use SourceBans. Otherwise you don't need.

you can unban:
removeid "steamid"
writeid


or
sm_unban "steamid"


*edit
I take back, when I say I give examples of how admins can change few server cvars. It would be long post. I don't have time.
__________________
Do not Private Message @me

Last edited by Bacardi; 12-15-2018 at 04:26.
Bacardi is offline
Terminatorr
Member
Join Date: Dec 2018
Old 12-25-2018 , 22:46   Re: Set convar based on flag.
Reply With Quote #19

Quote:
Originally Posted by Bacardi View Post
...little pit off topic.
There unfortunally hidden cvars, you can find them with right plugin tough.

About bot control
Code:
bot_controllable
Unknown command "bot_controllable"
help bot_controllable
"bot_controllable" = "1" game replicated                                         - Determines whether bots can be controlled by players
sm_cvar bot_controllable 0
[SM] Changed cvar "bot_controllable" to "0".
L 12/15/2018 - 10:14:37: [basecommands.smx] "Console<0><Console><Console>" changed cvar (cvar "bot_controllable") (value "0")

4)You need Ignore most of server console output errors... there have been and there will more of those. It's Valve thing.




If you want fanzy Ban page in internet (you need understand little MySQL and server host), then use SourceBans. Otherwise you don't need.

you can unban:
removeid "steamid"
writeid


or
sm_unban "steamid"


*edit
I take back, when I say I give examples of how admins can change few server cvars. It would be long post. I don't have time.
Thank you man, you are awasme.
Maybe one day if you had time, it would be nice to see an example, moreover, i remember i have seen a reply by you on an instant defuser CSGO script, i was wondering if its possible have it auto enabled on default for a flag.
Terminatorr is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 12-26-2018 , 03:14   Re: Set convar based on flag.
Reply With Quote #20

*pRed have done this ages ago.
Peek inside others plugin
https://www.sourcemod.net/plugins.ph...tion=&search=1
Bacardi is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 20:38.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode