Raised This Month: $ Target: $400
 0% 

He damage kill problem


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
nightscreem
Veteran Member
Join Date: Jul 2004
Location: Belgium
Old 05-17-2006 , 08:09   He damage kill problem
Reply With Quote #1

so my problem is when i kill someone with a he grenade it says the man that got killed, killed himself, how can i fix that, that i killed him?

Code:
#include <amxmodx> #include <amxmisc> #include <fun> #include <engine> #include <cstrike> #define PLUGINNAME  "He damage Multiplier" #define VERSION     "1.0" #define AUTHOR      "Nightscream" #define MAX_CZ_LENGHT   32 public plugin_init() {     register_plugin( PLUGINNAME, VERSION, AUTHOR )     register_cvar( "amx_hemulti", "1")     register_event( "Damage", "hedmg", "be" ) } public hedmg( id ) {         new victim = id;     new dmg_take = read_data( 2 );     new dmgtype = read_data( 3 );     new multiplier = get_cvar_num( "amx_hemulti" );     new damage = dmg_take * multiplier;         new iWeapID, attacker = get_user_attacker( victim, iWeapID );         new name[33];     get_user_name( victim, name, 32);         if( !is_user_alive( attacker ) || !is_user_alive( victim ) ) {         return PLUGIN_HANDLED     }         if( iWeapID == CSW_HEGRENADE ) {         fakedamage( victim, "weapon_grenade", float(damage), dmgtype )         client_print( attacker, print_chat, "[AMXX] the he did %i damage to %s", damage, name )             }     return PLUGIN_CONTINUE }
__________________
- Bye bye!
nightscreem is offline
VEN
Veteran Member
Join Date: Jan 2005
Old 05-17-2006 , 08:38  
Reply With Quote #2

Add that before fakedamage
Code:
set_msg_block(get_user_msgid("DeathMsg"),BLOCK_ONCE)
and after fakedamage add that
Code:
make_deathmsg(attacker, victim, 0, "weapon_grenade")
VEN is offline
nightscreem
Veteran Member
Join Date: Jul 2004
Location: Belgium
Old 05-17-2006 , 13:29  
Reply With Quote #3

thx gonna try it later
__________________
- Bye bye!
nightscreem is offline
nightscreem
Veteran Member
Join Date: Jul 2004
Location: Belgium
Old 05-18-2006 , 11:13  
Reply With Quote #4

Ok thx now it shows i killed him but he doesn't show grenade icon he shows the suicide icon how can i fix that

[edit]
nvm i fixed it
Code:
make_deathmsg(attacker, victim, 0, "grenade")

[edit]
my frags wont increase when killed with he grenade
Code:
public hedmg( id ) {         new victim_id = id;     new dmg_take = read_data( 2 );     new dmgtype = read_data( 3 );     new multiplier = get_cvar_num( "amx_hemulti" );     new damage = dmg_take * multiplier;     //new health = get_user_health( victim_id )         new iWeapID, attacker_id = get_user_attacker( victim_id, iWeapID );         new name[33];     get_user_name( victim_id, name, 32);         if( !is_user_alive( attacker_id ) || !is_user_alive( victim_id ) ) {         return PLUGIN_HANDLED     }         if( iWeapID == CSW_HEGRENADE ) {         fakedamage( victim_id, "weapon_grenade", float(damage), dmgtype )         client_print( attacker_id, print_chat, "[AMXX] the he did %i damage to %s", damage, name )                     //make_deathmsg( attacker, victim, 0, "weapon_grenade" )         message_begin( MSG_ALL, get_user_msgid( "DeathMsg" ),{ 0,0,0 },0 )         write_byte( attacker_id )         write_byte( victim_id )         write_byte( 0 )         write_string( "grenade" )         message_end()     }     return PLUGIN_CONTINUE }
__________________
- Bye bye!
nightscreem is offline
VEN
Veteran Member
Join Date: Jan 2005
Old 05-18-2006 , 12:18  
Reply With Quote #5

You have to increase them manually.
VEN is offline
nightscreem
Veteran Member
Join Date: Jul 2004
Location: Belgium
Old 05-18-2006 , 15:52  
Reply With Quote #6

ok thx for your help
__________________
- Bye bye!
nightscreem 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:27.


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