global function RespawnProtection_Init void function RespawnProtection_Init(){ AddCallback_OnPlayerRespawned( OnPlayerRespawned ) } void function OnPlayerRespawned( entity player ) { thread RespawnProtection(player,GetCurrentPlaylistVarFloat("respawnprotection",0.0)) } void function RespawnProtection( entity player , float time ){ OnThreadEnd( function() : ( player ) { //cancel protect if player attack if( IsDemigod( player ) ) { DisableDemigod( player ); } } ) player.EndSignal( "OnDeath" ) player.EndSignal( "OnDestroy" ) player.EndSignal( "OnPrimaryAttack" ) if( IsDemigod( player ) ) { DisableDemigod( player ); } else{ //start protect EnableDemigod( player ) wait time //cancel protect DisableDemigod( player ); } }