Raised This Month: $ Target: $400
 0% 

Subplugin Submission [ZP] Addon: Quad Damage (Human)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
abdul-rehman
Veteran Member
Join Date: Jan 2010
Location: Khi, Pakistan
Old 08-01-2011 , 05:37   Re: [ZP] Addon: Quad Damage (Human)
Reply With Quote #1

You dont need to check if victim is player since you registered the Ham_TakeDamage with "player" entities only, also if you check pev_valid(victim) with an entity you will get the same results whether the entitiy is player or non-player.
__________________

My Plugins For ZP

Inactive due to College and Studies
abdul-rehman is offline
Send a message via Yahoo to abdul-rehman Send a message via Skype™ to abdul-rehman
yokomo
Surprise Ascot!
Join Date: May 2010
Location: Malaysia
Old 08-01-2011 , 05:42   Re: [ZP] Addon: Quad Damage (Human)
Reply With Quote #2

Quote:
Originally Posted by bibu View Post
Alright, but you still need to check in TakeDamage if attacker is a player.
What do you mean by that? using pev_valid(attacker)?

Quote:
Originally Posted by abdul-rehman View Post
You dont need to check if victim is player since you registered the Ham_TakeDamage with "player" entities only, also if you check pev_valid(victim) with an entity you will get the same results whether the entitiy is player or non-player.
Then how about this? http://www.youtube.com/watch?v=akUFdbdZky8 can you explain it to me?
__________________
Team-MMG CS1.6 Servers:
✅ MultiMod -- 103.179.44.152:27016
✅ Zombie Plague -- 103.179.44.152:27015
✅ Zombie Escape -- 103.179.44.152:27017
✅ Klassik Kombat -- 103.179.44.152:27018
✅ Boss-Battle -- 103.179.44.152:27019
yokomo is offline
Excalibur.007
Veteran Member
Join Date: Sep 2009
Location: Singapore
Old 08-01-2011 , 06:43   Re: [ZP] Addon: Quad Damage (Human)
Reply With Quote #3

Quote:
Originally Posted by yokomo View Post
What do you mean by that? using pev_valid(attacker)?


Then how about this? http://www.youtube.com/watch?v=akUFdbdZky8 can you explain it to me?
pev_valid(entity) checks if the entity is valid or not. So just use is_user_alive(entity)

and for the (!id | !infector),
I don't think is necessary. But if it for known error log, then leave it there. I still don't find problems in ZP 4.3 Fix 5a.
Excalibur.007 is offline
abdul-rehman
Veteran Member
Join Date: Jan 2010
Location: Khi, Pakistan
Old 08-01-2011 , 06:59   Re: [ZP] Addon: Quad Damage (Human)
Reply With Quote #4

Quote:
Originally Posted by Excalibur.007 View Post
pev_valid(entity) checks if the entity is valid or not. So just use is_user_alive(entity)

and for the (!id | !infector),
I don't think is necessary. But if it for known error log, then leave it there. I still don't find problems in ZP 4.3 Fix 5a.
You still need to add this check in zp_user_infected_post
if (!infector) return;
since sometimes the infector is set to 0 (in the case of first zombie) so if you then do something with the infector (like check its zombie class) then ZP would throw a run-time error.
__________________

My Plugins For ZP

Inactive due to College and Studies
abdul-rehman is offline
Send a message via Yahoo to abdul-rehman Send a message via Skype™ to abdul-rehman
Excalibur.007
Veteran Member
Join Date: Sep 2009
Location: Singapore
Old 08-01-2011 , 07:09   Re: [ZP] Addon: Quad Damage (Human)
Reply With Quote #5

Oh, didn't notice the problem :X.
Excalibur.007 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 16:08.


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