1.
Code:
#include <amxmodx>
#include <amxmisc>
#include <hamsandwich>
new bool:g_alive[33];
public plugin_init()
{
RegisterHam(Ham_Spawn, "player", "FwdPlayerSpawn", 1);
RegisterHam(Ham_Killed, "player", "FwdPlayerDeath", 1);
}
public client_disconnect(client)
{
g_alive[client] = false;
}
public FwdPlayerSpawn(client)
{
if( ExecuteHam(Ham_IsAlive, client) )
{
g_alive[client] = true;
}
}
public FwdPlayerDeath(client, killer, shouldgib)
{
g_alive[client] = false;
}
public yourFunction(client)
{
if( g_alive[client] )
{
// alive
}
}
2.
Code:
fm_is_user_alive(client)
{
return (pev(client, pev_deadflag) == DEAD_NO && get_user_health(client) > 0) ? 1 : 0;
}
3.
Code:
if( ExecuteHam(Ham_IsAlive, client) )
{
// player is alive
}
Those are about the only ways I know.
__________________