Closed indraraj26 closed 6 years ago
Huh Are you sure that problem exists on clear build without AMXX?
Let me test without Amxx
how can i test without Amxx ? is there any way to print something without amxx i tested with latest Amxmodx version here is the output : version Protocol version 48 Exe version 1.1.2.7/Stdio (cstrike) ReHLDS version: 3.3.0.605-dev Build date: 22:55:56 Nov 8 2017 (1306) Build from: https://github.com/dreamstalker/rehlds/commit/dab2663 amxx version AMX Mod X 1.8.3-dev+5144 (http://www.amxmodx.org) Authors: David "BAILOPAN" Anderson, Pavol "PM OnoTo" Marko Felix "SniperBeamer" Geyer, Jonny "Got His Gun" Bergstrom Lukasz "SidLuke" Wlasinski, Christian "Basic-Master" Hammacher Borja "faluco" Ferrer, Scott "DS" Ehlert Compiled: Oct 31 2017 15:08:16 Built from: https://github.com/alliedmodders/amxmodx/commit/175d492 Build ID: 5144:175d492 Core mode: JIT+ASM32
Test plugin to reproduce :
#include <amxmodx>
#include <hamsandwich>
#include <csx>
#define DMG_GRENADE ( 1 << 24 )
public plugin_init ()
{
RegisterHam ( Ham_TakeDamage, "player", "fwd_TakeDamage" );
}
public fwd_TakeDamage ( id, i_Inflictor, i_Attacker, Float:f_Damage, i_DamageBits )
{
if ( i_DamageBits & DMG_GRENADE )
{
client_print ( id, print_chat, "Grenade triggered." );
}
else
{
client_print(id,print_chat,"no triggered");
}
}
public grenade_throw ( index, greindex, wId )
{
user_kill(index);
client_print(index,print_chat,"user kill to check grenade damage")
}
Works fine for me. id in your code is victim id, so if you expect to read both messages "user kill..." and "grenade triggered" you need to use i_Attacker instead of id
@voed Thanks for testing my plugin its resolved it was issue with my other plugin (ham_takedmg) where i checked !is_user_alive then stop which lead to this Thanks a lot!
Guys, Have you ever notice when i throw grenade and i got killed by other guy before grenade explode then there is no effect of grenade to other but early we get kills/dmg even if i dead This was working in official HLDS