• [TTT] player speed
    3 replies, posted
hi, ive encountered the known problem that from some reason i cant change the speed of players in the TTT server i dont want them to have a constant speed, i am making a weapon that when pressed on a specific button would make the player twice as fast until that button will be pressed again returning it to normal speed (just made a bool var that save if he is in speed mode or not, and when pressed on the button it makes changes the bool and according to what it was before changes the speed) now the thing is i dont want to change the speed for everyone or permanently so just changing the value at line 207 here ([url]https://github.com/garrynewman/garrysmod/blob/f2f64af2f5b015f2a321b71e069312f0bcf6d15f/garrysmod/gamemodes/terrortown/gamemode/player_ext.lua[/url]) is not the solution I'm looking for any idea how can i fix it? maybe something to do with the mul/hook here? thnx taco
Yeah, TTT is fucking weird with speed - here's something from the site's hook page: [quote] [b]TTTPlayerSpeed[/b] (ply, slowed) [i]Server[/i] Called when a player's ("ply") walking speed is computed. The "slowed" parameter indicates if they are using ironsights. The value returned by this hook is used as a multiplier of the default speeds, so returning 1.5 will let all players move 50% faster. Note that maps may not expect players to be faster. [/quote]
any idea on how to activate this hook? or to determine the size of the multiplier?
Add a hook by hook.add and then return the velocity you want. The default aiming velocity is 120 and normal speed is 220
Sorry, you need to Log In to post a reply to this thread.