Checks fail all the time?
I don't know where to post this since it is a mix of SH mod and ZP mod, and I hope you guys in here can help me.
What I want to do, is to make a check to see if a player is a zombie or not, if he is, then set the SH powers. If I do this, it works, but ofc. for both zombie and survivor: PHP Code:
PHP Code:
PHP Code:
|
Re: Checks fail all the time?
Quote:
PHP Code:
|
Re: Checks fail all the time?
Thank you, but that will set the SH powers if the guy is a zombie, but I want it to be only on humans.
The survivor check doesn't work, since it is only the last man standing which becomes a survivor, all others are humans, and there are no checks for that, which is why I did this: PHP Code:
PHP Code:
|
Re: Checks fail all the time?
Quote:
Quote:
PHP Code:
|
Re: Checks fail all the time?
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:
PHP Code:
Some more reading: I tried adding this check before a model is set using a superhero: PHP Code:
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. |
Re: Checks fail all the time?
It still makes no sense to set the attributes everytime that a human spawns for something that doesn't differ between two players that are the same "hero".
Also, your use of pcvars is totally wrong. |
Re: Checks fail all the time?
If I do it in plugin_init() it will also set the attributes when you spawn, I just need a check to see if he is a zombie, if not, then set these powers.
And as said before, if I delete the zp checks totally, it works as it should, and set HP/AP on all players if they have this hero. What is wrong with my pcvars? |
Re: Checks fail all the time?
pcvarHealth and pcvarArmor are cvar pointers and not the value of the cvar.
|
Re: Checks fail all the time?
That I did not catch. I have always been using this method, also for radius of a blast or something like that. The sh native ask for the pcvars and reads the values:
Code:
/** |
Re: Checks fail all the time?
Quote:
|
| All times are GMT -4. The time now is 03:36. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.