Sending client commands via server

All other Source.Python topics and issues.
JustGR
Junior Member
Posts: 20
Joined: Tue Apr 28, 2020 12:39 pm

Sending client commands via server

Postby JustGR » 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.

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?
Speed0x
Member
Posts: 84
Joined: Sun Feb 05, 2017 4:55 pm

Re: Sending client commands via server

Postby Speed0x » Sat May 30, 2020 10:40 pm

you can't change drawmodels.
JustGR
Junior Member
Posts: 20
Joined: Tue Apr 28, 2020 12:39 pm

Re: Sending client commands via server

Postby JustGR » Sat May 30, 2020 11:23 pm

Yeah figured.

Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 6 guests