Player is using weapon
Is there a way to detect if player is using a weapon?
I know about user_has_weapon but it checks if player have the weapon not if he is using it at the moment. I need this to reset user maxspeed after a speed boost given by set_user_maxspeed(id, 500.0). If I just set it to 230 (m4a1 and most of primary weapons maxspeed) you will have to switch weapons to get the default weapon maxspeed. So im wondering if its possible to check if user is using a certain weapon and set the weapon maxspeed to him. |
Re: Player is using weapon
Put this at the to of plugin :
const Ham:Ham_Player_ResetMaxSpeed = Ham_Item_PreFrame And when you want to restore player maxspeed do : ExecuteHamB(Ham_Player_ResetMaxSpeed, id) The game will check what is the player active weapon and set speed back. |
Re: Player is using weapon
@ConnorMcLeod what diference:
PHP Code:
PHP Code:
|
Re: Player is using weapon
Readability.
Explaination on the tip is there : http://forums.alliedmods.net/showthr...469#post846469 |
| All times are GMT -4. The time now is 08:40. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.