Raised This Month: $ Target: $400
 0% 

increase all weapon's damage


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Jacob
Senior Member
Join Date: Oct 2010
Old 01-12-2011 , 07:42   increase all weapon's damage
Reply With Quote #1

PHP Code:
public fw_TakeDamage(victiminflictorattackerFloat:damagedamage_type)
{
     if (!
is_user_connected(attacker))
     return 
HAM_IGNORED
 
     
new Float:newdamage
     newdamage
=damage 2.0     
     SetHamParamFloat
(4,new_damage)
     return 
HAM_IGNORED

is it right?i use it to increase weapon's damage, but ineffective.
Jacob is offline
Flipper_SPb
Senior Member
Join Date: Jun 2009
Location: Worldspawn
Old 01-12-2011 , 07:54   Re: increase all weapon's damage
Reply With Quote #2

You don't need to create the new var newdamage

PHP Code:
public fw_TakeDamage(victiminflictorattackerFloat:damagedamage_type)
{
     if (
is_user_connected(attacker))
          
SetHamParamFloat(4,damage 2.0)
     return 
HAM_IGNORED

Flipper_SPb is offline
Send a message via ICQ to Flipper_SPb
Flipper_SPb
Senior Member
Join Date: Jun 2009
Location: Worldspawn
Old 01-12-2011 , 07:58   Re: increase all weapon's damage
Reply With Quote #3

And you can replace (is_user_connected(attacker)) by (0 < attacker < 33)
Flipper_SPb is offline
Send a message via ICQ to Flipper_SPb
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 01-12-2011 , 08:02   Re: increase all weapon's damage
Reply With Quote #4

How you declare the forward ?
__________________
Arkshine is offline
Jacob
Senior Member
Join Date: Oct 2010
Old 01-12-2011 , 10:41   Re: increase all weapon's damage
Reply With Quote #5

Quote:
Originally Posted by Arkshine View Post
How you declare the forward ?
Yes.

Last edited by Jacob; 01-12-2011 at 20:11.
Jacob is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 01-12-2011 , 11:39   Re: increase all weapon's damage
Reply With Quote #6

I'm telling you to show how you declare the forward...
__________________
Arkshine is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 01-12-2011 , 18:56   Re: increase all weapon's damage
Reply With Quote #7

Quote:
Originally Posted by Jacob View Post
certainly.
The "?" means it's a question .
__________________
fysiks is offline
Jacob
Senior Member
Join Date: Oct 2010
Old 01-12-2011 , 20:23   Re: increase all weapon's damage
Reply With Quote #8

how to test it,i use this meathod:
PHP Code:
register_event("Damage""show_damage""b""2!0""3=0""4!0")
public 
show_damage(id)
{
new 
attacker get_user_attacker(id)
if (
is_user_connected(id) && is_user_connected(attacker))
{
new 
damage read_data(2)
set_hudmessage(0100200, -1.00.4420.14.00.020.02, -1)
show_hudmessage(attacker,"%i^n"damage)
}


Jacob is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 01-12-2011 , 20:26   Re: increase all weapon's damage
Reply With Quote #9

Jacob, I ask you : Show how you declare Ham_TakeDamage.
__________________
Arkshine is offline
Jacob
Senior Member
Join Date: Oct 2010
Old 01-12-2011 , 20:49   Re: increase all weapon's damage
Reply With Quote #10

Quote:
Originally Posted by Arkshine View Post
Jacob, I ask you : Show how you declare Ham_TakeDamage.
RegisterHam(Ham_TakeDamage, "player", "fw_TakeDamage")
Jacob is offline
Reply


Thread Tools
Display Modes

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 02:07.


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