View Single Post
oceanyss
Member
Join Date: Jan 2012
Old 09-01-2021 , 05:20   Re: can someone help me with this?
Reply With Quote #6

Quote:
Originally Posted by Darkwob View Post
Thank you for the answer, but I couldn't do what I tried to do in the plugin. can you help
Changing a player's movement speed is a bit tricky for L4D2 as the game will automatically default any movement speed to default after running your code once.

What you want to do is move the following line to OnPlayerRunCmd so your plugin is constantly telling the game to update the player's movement speed to whatever your value is. Then add a check to OnPlayerRunCmd to ensure this change only works if your StickyGoo timer is running

SetEntDataFloat(client, laggedMovementOffset, GetConVarFloat(cvarStickyGooSpeed), true);

Hope this helps
oceanyss is offline