There was a typo yes, sorry for that.
To clarify what I meant:
I want to set the hero powers using this native, if they are humans or survivors.
Basically, in SH mod, we put sh_set_hero_hpap in plugin_init(), which has no id, and I can therefor not add any checks before I set it. Now I just want to add a check before the hero powers are applied. The native pretty much explains itself. It sets the extra health and armor accordingly to the pcvars specified.
I am passing id, because I want to check the player who just spawned (in sh_client_spawn(id) and in sh_hero_init())
The thing is, I did it this way:
PHP Code:
if (zp_get_user_zombie(id) && zp_get_user_nemesis(id)) return
which I see is the same as
PHP Code:
if (!zp_get_user_zombie(id) && is_user_alive(id))
I can try it with the ! in front, but to be honest, I do not think it will work.
Some more reading:
I tried adding this check before a model is set using a superhero:
PHP Code:
if (zp_get_user_zombie(id) && zp_get_user_nemesis(id)) return
and it works, there is no model on the zombie. If I delete this check, I have wolverine-like knife, if I add it, I have normal zombie knife when zombie.
All I need now is the hero setting of hp/ap/gravity/damage multiplier.
To do this, it uses closely the same as the SH native where I set health and armor, and they should also be done in plugin_init().
I am totally stuck on why this wont work.
__________________