Raised This Month: $ Target: $400
 0% 

Checks fail all the time?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Jelle
[b]MOAR CANDY[/b]
Join Date: Aug 2009
Location: Denmark
Old 05-04-2010 , 18:28   Re: Checks fail all the time?
Reply With Quote #1

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.
__________________
No idea what to write here...
Jelle is offline
Send a message via MSN to Jelle
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 05-04-2010 , 19:25   Re: Checks fail all the time?
Reply With Quote #2

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.
__________________
fysiks is offline
Reply



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 03:36.


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