Raised This Month: $51 Target: $400
 12% 

Block Damage on Round End


Post New Thread Reply   
 
Thread Tools Display Modes
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 01-07-2011 , 19:07   Re: Block Damage on Round End
Reply With Quote #11

In code from your last post, put cvar check first.
Also, HAM_HANDLED should be use when you alter something, since you only make some checks, you should return HAM_IGNORED.
You may also want to check mp_friendlyfire cvar value.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
.MMYTH.
BANNED
Join Date: Sep 2010
Location: Brasil - RS
Old 01-08-2011 , 15:35   Re: Block Damage on Round End
Reply With Quote #12

some new sugestions ?
.MMYTH. is offline
Send a message via MSN to .MMYTH.
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 01-08-2011 , 16:01   Re: Block Damage on Round End
Reply With Quote #13

get_cvar_num("mp_frinflyfire") ; no pcvar + wrong cvar name.
OVERRIDE ? Why are you using that ? You set on-the-fly a param, you don't need to return something. Though, you can use HANDLED instead.

Do you test your plugin?
__________________

Last edited by Arkshine; 01-08-2011 at 16:09.
Arkshine is offline
.MMYTH.
BANNED
Join Date: Sep 2010
Location: Brasil - RS
Old 01-08-2011 , 16:09   Re: Block Damage on Round End
Reply With Quote #14

HAM_OVERRIDE for SetHamReturnFloat(0.0)
.MMYTH. is offline
Send a message via MSN to .MMYTH.
NucL3ra
Veteran Member
Join Date: Sep 2008
Location: Bucuresti , Romania
Old 01-08-2011 , 16:17   Re: Block Damage on Round End
Reply With Quote #15

This could be good for HNS servers since lots of CTs kill Terrorists (hiders) after the round is end and it's kinda silly. But in rest i don't see the point.

Also if it's only for teammates (?) change the name to Block Friendly Damage on Round End (but I can't see it usage if that's the case)
NucL3ra is offline
Send a message via Yahoo to NucL3ra
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 01-08-2011 , 16:31   Re: Block Damage on Round End
Reply With Quote #16

Quote:
Originally Posted by .MMYTH. View Post
HAM_OVERRIDE for SetHamReturnFloat(0.0)
Badly read your code. Though, you could simply return HAM_SUPERCEDE.
__________________
Arkshine is offline
.MMYTH.
BANNED
Join Date: Sep 2010
Location: Brasil - RS
Old 01-08-2011 , 17:06   Re: Block Damage on Round End
Reply With Quote #17

what's the big diference then will cause on the function ?
.MMYTH. is offline
Send a message via MSN to .MMYTH.
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 01-08-2011 , 17:30   Re: Block Damage on Round End
Reply With Quote #18

I'm not sure overriding the return value will block the damage, because that's something done at the end, and the function will be still executed. Superceding means you block from the start the function to be executed. To block the damage either to pass 0.0 on the fly on the damage param or superceding will work for sure.

Did you test your plugin ?
__________________
Arkshine is offline
.MMYTH.
BANNED
Join Date: Sep 2010
Location: Brasil - RS
Old 01-08-2011 , 17:43   Re: Block Damage on Round End
Reply With Quote #19

I don't use ff in my server
.MMYTH. is offline
Send a message via MSN to .MMYTH.
nikhilgupta345
Veteran Member
Join Date: Aug 2009
Location: Virginia
Old 01-08-2011 , 18:31   Re: Block Damage on Round End
Reply With Quote #20

Wtf is this???

"get_cvar_num("mp_frinflyfire")"
__________________
Quote:
Originally Posted by DarkGod View Post
nikhilgupta generates his plugins using sheer awesome.
If you like my work, please
nikhilgupta345 is offline
Send a message via ICQ to nikhilgupta345 Send a message via Yahoo to nikhilgupta345
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 17:06.


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