AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Noclip Custom Speed Issue (https://forums.alliedmods.net/showthread.php?t=339771)

tmob 09-30-2022 08:31

Noclip Custom Speed Issue
 
I'm trying to put the user into noclip, that's easy I can do that, but I want the user to have a variable speed, that's the hard part. Whenever I try to use the code below, the player like gets stuck in place like an anti-cheat is pulling them back into position, why would this be happening? If I just enable noclip with set_user_noclip and don't try to change the maxspeed, it works fine.

Code here: https://pastebin.com/HXDc8mdt

lexzor 09-30-2022 12:16

Re: Noclip Custom Speed Issue
 
i think pev_maxspeed is callen when player is touching the ground. try to use pev_velocity (https://forums.alliedmods.net/showthread.php?t=258449)

tmob 10-01-2022 00:02

Re: Noclip Custom Speed Issue
 
Quote:

Originally Posted by lexzor (Post 2790056)
i think pev_maxspeed is callen when player is touching the ground. try to use pev_velocity (https://forums.alliedmods.net/showthread.php?t=258449)

Thanks that worked, but it requires player cvars and server max speed cvars to be higher than the variable speed :c. I'll have to do a hacky fix and calculate the position after the frame, would be easy if I was taught anything about vectors, -_- but I'm not old enough to take any physics or calculus classes.


All times are GMT -4. The time now is 15:37.

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