some cases have to delay by 1 frame before do anything to player, try if it helps. Not guarantee
PHP Code:
public OnPluginStart()
{
HookEvent("player_spawn", player_spawn);
}
public player_death(Handle:event, const String:name[], bool:dontBroadcast)
{
CreateTimer(0.0, timer_delay, GetEventInt(event, "userid"), TIMER_FLAG_NO_MAPCHANGE);
}
public Action:timer_delay(Handle:timer, any:userid)
{
new client = GetClientOfUserId(userid);
if(client != 0 && IsClientInGame(client) && IsPlayerAlive(client))
{
// Do something
}
return Plugin_Continue;
}
__________________