Page 1 of 1

[CS:GO] player.friction

Posted: Thu Nov 08, 2018 7:31 pm
by velocity
Looks like setting the player.friction doesn't work, friction remains the same. I tried with others like player.gravity which worked fine.

On Spawn
-> player.friction =8

Re: [CS:GO] player.friction

Posted: Sun Nov 11, 2018 3:53 pm
by Ayuto
Could you please try this?:

Syntax: Select all

player.set_network_property_float('m_flFriction', 8)

Re: [CS:GO] player.friction

Posted: Tue Nov 13, 2018 2:06 pm
by velocity
I certainly will! How do I know if it is a network_property or just set_property?

Re: [CS:GO] player.friction

Posted: Tue Nov 13, 2018 4:28 pm
by Ayuto
set_property_X is just a wrapper for set_network_property_X and set_datamap_property_X. If it's a network property it will use the first method, else the latter.

Re: [CS:GO] player.friction

Posted: Fri Nov 16, 2018 2:20 pm
by velocity
It doesn't work

Syntax: Select all

player.set_network_property_float('m_flFriction', 8)
not even with set_property

Re: [CS:GO] player.friction

Posted: Fri Nov 16, 2018 3:19 pm
by Ayuto
Then it's probably a read-only property.

Re: [CS:GO] player.friction

Posted: Fri Nov 16, 2018 6:13 pm
by Kami
Hey, I'm not sure if this works the same way it does in Sourcemod but it seems they can send different values of the same convar to different players.

I found Player.send_convar_value(cvar_name, value) in the documentation, so you could propably try and do:

Syntax: Select all

player.send_convar_value("sv_friction", 0.1)


I'm not sure what values go for friction but you get the idea.

You may need to remove the NOTIFY flag from sv_friction or it will tell the player that you changed it.

Edit:

I did a test with this method and I couldn't get it to work this way either :(

Re: [CS:GO] player.friction

Posted: Sat Nov 17, 2018 7:46 pm
by velocity
yeah, it doesn't work either :(

A sourcemod plugin does it tho: https://forums.alliedmods.net/showthread.php?p=2537196