Sending client commands via server
Posted: Sat May 30, 2020 9:17 pm
Attempted to make a command that toggles client cvars via the server. I attempted to do this by iterating across all players via PlayerIter and using the send_convar_value() method.
Example - I want to set r_drawothermodels to 2 for all human players at once. It throws up an error:
sv_cheats was set to 1 before I attempted this. Is it impossible to toggle client cvars via the server, or am I missing something?
Code: Select all
for humanPlayer in PlayerIter('human'):
humanPlayer.send_convar_value(convarName, convarValue)
Example - I want to set r_drawothermodels to 2 for all human players at once. It throws up an error:
Code: Select all
SetConVar: Can't set server cvar r_drawothermodels to 2, not marked as FCVAR_REPLICATED on client
sv_cheats was set to 1 before I attempted this. Is it impossible to toggle client cvars via the server, or am I missing something?