Raised This Month: $ Target: $400
 0% 

Weapon Damage


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Vegetaz
Member
Join Date: Oct 2006
Old 02-13-2007 , 14:01   Weapon Damage
Reply With Quote #1

Code:
#include <amxmod>
#include <Vexd_Utilities>
#include <Fun>

public plugin_init()
{
	register_plugin("Scout Damage", "99.9", "Blah")
	register_event("Damage", "scout_damage", "b", "2!0")
}
public damage(id)
{
	if (!is_user_alive(id)) return

	new damage = read_data(2)
	new weapon, bodypart, attacker = get_user_attacker(id, weapon, bodypart)
	new headshot = bodypart == 1 ? 1 : 0

	if ( weapon == CSW_SCOUT && is_user_alive(id) ) {
		new extraDamage = floatround(damage * 2.0") - damage)
		if (extraDamage > 0) ExtraDamage( id, attacker, extraDamage, "scout", headshot )
	}
}
If someone says how to fix this code, i will apriciate that
Vegetaz is offline
 



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 00:40.


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