Raised This Month: $ Target: $400
 0% 

double damage?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ngsucks
Member
Join Date: Jul 2004
Old 07-10-2004 , 04:43   double damage?
Reply With Quote #1

i wanted to make double damage.

for example.

if some one uses the mp5's or m4a1, make it doulbe the normal damage..


im lost on how to go about doing this...
__________________
Superhero's @ -{D.o}-
Custom Heroes
ip link: 209.123.8.21:27010

WWW.Frag-Wire.COM!
$30 dollars for a 16 player server!
ngsucks is offline
Dygear
SourceMod Donor
Join Date: Apr 2004
Location: Levittown, NY
Old 07-10-2004 , 05:34  
Reply With Quote #2

here is how i would do it.

Code:
#include <amxmodx> #include <cstrike> plugin_init(){     register_plugin("2x damage","0.1","Dygear") } round_start(){     new dyHealth[32], dyDamage[32], dyUserID[32]     get_user_health(id, dyHealth, 31)     get_user_userid(id, dyUserID, 31)         /*     * You can get users health at round start then     * any time they are hit, you get the damage     * by finding there health at the start of the round     * log it to a file and taking it when they get hit,     * then find the users health and at that point do this ...     * logdyHealth - dyhealth = dyDamage     * then just take the dyDamage and x2 :).     */     /* TELL ME IF THERE IS A BETTER WAY TO GET DAMAGE.     * B/C I NEED TO KNOW, FOR A PLUGIN THAT IS GOING     * TO BE RELEASED SOON, JUST NEED THIS ONE FUCKIN THING.     */ }
__________________
Dygear is offline
Send a message via AIM to Dygear Send a message via MSN to Dygear Send a message via Skype™ to Dygear
ngsucks
Member
Join Date: Jul 2004
Old 07-10-2004 , 05:39  
Reply With Quote #3

thanks ur bomb!

but this wont work for a superhero!

anyoen who knows a different way!
or will this work fora superhero?

is there a way to get the amount of damage i do to the enemy?
if there is i can do that, then do shExtraDamage(id, enemy, damage, "2x damage")
__________________
Superhero's @ -{D.o}-
Custom Heroes
ip link: 209.123.8.21:27010

WWW.Frag-Wire.COM!
$30 dollars for a 16 player server!
ngsucks is offline
Ryan
Senior Member
Join Date: May 2004
Location: NH, USA
Old 07-10-2004 , 12:41  
Reply With Quote #4

if you want attacks to do double damage you need to use the damage event...

Code:
public Ev_Damage( vIndex ) {     new aIndex = get_user_attacker( vIndex );     new iDamage = read_data( 2 );         shExtraDamage( aIndex, vIndex, iDamage /*, This probably isnt necessary ... "2x damage"*/ );     return PLUGIN_CONTINUE; } register_plugin() {     // ... other stuff in here     register_event( "Damage", "Ev_Damage", "b" );     return PLUGIN_CONTINUE; }
__________________
Warcraft 3: Expansion
Homepage | Downloads | Forums
Ryan is offline
Send a message via AIM to Ryan
ngsucks
Member
Join Date: Jul 2004
Old 07-10-2004 , 17:06  
Reply With Quote #5

u da man if this wrks!

thnks
__________________
Superhero's @ -{D.o}-
Custom Heroes
ip link: 209.123.8.21:27010

WWW.Frag-Wire.COM!
$30 dollars for a 16 player server!
ngsucks is offline
Dygear
SourceMod Donor
Join Date: Apr 2004
Location: Levittown, NY
Old 07-10-2004 , 20:56  
Reply With Quote #6

Ryan would that also work for this.

http://forums.alliedmods.net/showthread.php?t=3570

What i am trying to do it, get the ammount of damage done, and free say style it in to the center of the screen.
__________________
Dygear is offline
Send a message via AIM to Dygear Send a message via MSN to Dygear Send a message via Skype™ to Dygear
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 14:42.


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