Increase cvar by a code
Hello i wanted to ask if is this a true way to increase for this point humans dealt damage reward to zombie??
PHP Code:
|
Re: Increase cvar by a code
depends on when the cvar gets updated, if it gets updated every shot fired or every single damage taken, then yes it should work, but that's not the proper way. You should be handling that stuff in TraceAttack & TakeDamage by adjusting the damage using a new float variable
https://www.amxmodx.org/api/ham_const |
Re: Increase cvar by a code
Quote:
|
Re: Increase cvar by a code
You'll need to update the damage everytime u kill a zombie then. use DeathMsg event or Ham_Killed. Use a variable to store the bonus damage in, and increase it using get_pcvar_num(). Hook TakeDamage & TraceAttack.
https://forums.alliedmods.net/showthread.php?t=80208 : This is a great example of how you could do it. |
Re: Increase cvar by a code
Quote:
Heres my code: PHP Code:
|
Re: Increase cvar by a code
So debug it...
Code:
|
Re: Increase cvar by a code
Quote:
|
All times are GMT -4. The time now is 11:00. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.