Raised This Month: $32 Target: $400
 8% 

Help me to calculate HP of sniper and assassin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
GlobalPlague
Senior Member
Join Date: Feb 2016
Location: Pluto
Old 11-04-2021 , 07:31   Help me to calculate HP of sniper and assassin
Reply With Quote #1

Hello.

Here are the cvars that have to be changed:

Code:
cvar_sniperhp =	  register_cvar("zp_avsm_sniper_hp", "1.5")
cvar_assahp =	  register_cvar("zp_avsm_assassin_hp", "1.0")
These cvars work as multipliers. These cvars are from separated plugin, a plugin that is not part of the main code of the ZPA 1.6.1, that adds game mode called "sniper vs assassin".

In the "zombie_plague_advance.cfg" file, these are the settings of the assassin's health and the sniper's health:

For sniper:

Code:
zp_sniper_health 0 // Health  [0 - zombie count*base health]
zp_sniper_base_health 0 // Base health [0 - use human's health]
For assassin:

Code:
zp_assassin_health 10000 // Health [0 - human count*base health]
zp_assassin_base_health 100 // Base health [0 - use first zombie's health]
So, i want the assassin to have 30000000 health, while the sniper have 5000 health during Sniper VS Assassin round.

I tried to do it many times, but i never got the exact number i want.

The cvars in the .cfg file don't have to be changed, only the cvars that are in the separated plugin (assassin vs sniper plugin) have to be changed. I need help, because i can't do the calculation by myself and i don't know what number to add in the cvars of the "sniper vs assassin" plugin.

Thanks.
GlobalPlague is offline
TribalBlood
Member
Join Date: Oct 2020
Old 11-27-2021 , 21:26   Re: Help me to calculate HP of sniper and assassin
Reply With Quote #2

cvar_assahp = register_cvar("zp_avsm_assassin_hp", "3000.0")

10000 × 3000 = 30000000

zp_sniper_health 500 // Health [0 - zombie count*base health]

500 x 10 = 5000

cvar_sniperhp = register_cvar("zp_avsm_sniper_hp", "10.0")
__________________
My Steam Profile

- Online Rarely -
TribalBlood is offline
GlobalPlague
Senior Member
Join Date: Feb 2016
Location: Pluto
Old 12-01-2021 , 02:00   Re: Help me to calculate HP of sniper and assassin
Reply With Quote #3

Quote:
Originally Posted by TribalBlood View Post
cvar_assahp = register_cvar("zp_avsm_assassin_hp", "3000.0")

10000 × 3000 = 30000000

zp_sniper_health 500 // Health [0 - zombie count*base health]

500 x 10 = 5000

cvar_sniperhp = register_cvar("zp_avsm_sniper_hp", "10.0")
Thanks.
GlobalPlague is offline
Hn.S Xmix
Member
Join Date: May 2021
Old 01-26-2023 , 18:04   Re: Help me to calculate HP of sniper and assassin
Reply With Quote #4

Go to your file and try to change this ----->

PHP Code:
// Apply Sniper health multiplier
        
set_user_health(idfloatround(get_user_health(id) * get_pcvar_float(cvar_snvas_sniper_hp_multi))) 
PHP Code:
// Apply Assassin health multiplier
        
set_user_health(idfloatround(get_user_health(id) * get_pcvar_float(cvar_snvas_nem_hp_multi))) 
To this ----->
PHP Code:
        // Apply Sniper health multiplier
        
set_user_health(idget_pcvar_num(cvar_snvas_assassin_hp)) 
PHP Code:
        // Apply Assassin health multiplier
        
set_user_health(idget_pcvar_num(cvar_snvas_assassin_hp)) 
It applies to cvar_.. that you use for hp so you have to edit it by yourself.

Last edited by Hn.S Xmix; 01-26-2023 at 18:05.
Hn.S Xmix is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 05:30.


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