Hello i was wonder if this way can get client dead probably without any mistake
that i use register_message for "ScoreAttrib" and check if the flag was dead and else mean he's alive
for example of code :
PHP Code:
#include <amxmodx>
new g_IsDead=0
public plugin_init()
{
register_plugin("Get Client Dead","1.0","Nea")
register_message(get_user_msgid("ScoreAttrib"),"fn_CheckIfDied")
}
public fn_CheckIfDied(_1,_2,_3/*i don't care about them anyway*/)
{
new id = get_msg_arg_int(1) // We Get User ID
new flag = get_msg_arg_int(2) // Get User Status
if(flag ==1) // He's Dead Now
g_IsDead |= (1<<(id & 31))
else // He's Alive
g_IsDead &= ~ ( 1<< ( id & 31) )
}
so now we have a variable [g_IsDead] that we can use to check if player died in future use..and we can also use a function that can be run when client dead in fn_CheckIfDead..
but i wonder is that way is bad or something like that i don't know about?
cuz when i used DeathMsg,there's some cases that no detected ..
for example when player killed by C4 in (Counter-Strike) it's not sent message about that..