Maxspeed problems
Hello. When I use set_user_maxspeed I get two problems:
1) When I change weapon it resets. 2) Maxspeed is always the same. I tested it some times, for example: Default maxspeed is 250, if I set lower maxspeed (200) it'll OK but if I set more than 250 (251, 300, 850...), maxspeed will be the same. I found this https://forums.alliedmods.net/showpo...33&postcount=5 but I don't undestand well. PD: I always do this PHP Code:
PHP Code:
|
Re: Maxspeed problems
So, use curweapon event then.
Edit: Here's example PHP Code:
|
Re: Maxspeed problems
Quote:
Use Ham_Item_PreFrame |
Re: Maxspeed problems
Quote:
|
Re: Maxspeed problems
Quote:
|
Re: Maxspeed problems
CBasePlayer::ResetMaxSpeed is the internal cstrike function called when the game is changing player maxspeed, so it is the best place for a plugin to manage maxspeed changes.
Also, you should use cvar pointers instead of cvars names, it is faster. You need hamsandwhich updating version for following code to compile and to run. PHP Code:
|
Re: Maxspeed problems
I'll try that, thanks.
Edit: I think, I'm doing something wrong but I got problems. I copy&paste and works fine, but I tried to add this to my menu. I did this: PHP Code:
PHP Code:
|
Re: Maxspeed problems
Set a bool to true in case 1 for each player, and check in OnCBasePlayer_ResetMaxSpeed_P if the player has that bool set to true, if so then return HAM_SUPERCEDE else return HAM_IGNORED. The bool must be an array of 33 (to hold all players).
If you want to optimize your code a bit more, use bitsums. To know how to use bitsums, search the forums for the tutorial. |
Re: Maxspeed problems
I did that, the plugin compile but give me 2 warnings:
Code:
// C:\Program Files (x86)\Counter-Strike 1.6\cstrike\addons\amxmodx\scripting\Classes.sma(73) : warning 211: possibly unintended assignment PHP Code:
PHP Code:
|
Re: Maxspeed problems
PHP Code:
PHP Code:
|
All times are GMT -4. The time now is 16:16. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.