Made zr_suicide_world_damage CVAR for respawning as zombie if a zombie was killed by the world.
This commit is contained in:
		@@ -392,7 +392,7 @@ public Action:PlayerDeath(Handle:event, const String:name[], bool:dontBroadcast)
 | 
			
		||||
{
 | 
			
		||||
    new index = GetClientOfUserId(GetEventInt(event, "userid"));
 | 
			
		||||
    new attacker = GetClientOfUserId(GetEventInt(event, "attacker"));
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    SetPlayerFOV(index, DEFAULT_FOV);
 | 
			
		||||
    
 | 
			
		||||
    ExtinguishEntity(index);
 | 
			
		||||
@@ -436,20 +436,21 @@ public Action:PlayerDeath(Handle:event, const String:name[], bool:dontBroadcast)
 | 
			
		||||
                new bonus = GetClassKillBonus(pClass[index]);
 | 
			
		||||
                AddPlayerScore(attacker, bonus);
 | 
			
		||||
            }
 | 
			
		||||
            
 | 
			
		||||
            if (!IsClientPlayer(attacker))
 | 
			
		||||
            {
 | 
			
		||||
                gKilledByWorld[index] = true;
 | 
			
		||||
            }
 | 
			
		||||
            else
 | 
			
		||||
            {
 | 
			
		||||
                gKilledByWorld[index] = false;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        
 | 
			
		||||
        new debug_val = GetConVarInt(gCvars[CVAR_DEBUG]);
 | 
			
		||||
        new String:debug_msg[64];
 | 
			
		||||
        
 | 
			
		||||
        for (new x = 0; x < MAXTIMERS; x++)
 | 
			
		||||
        {
 | 
			
		||||
            if (tHandles[index][x] != INVALID_HANDLE)
 | 
			
		||||
            {
 | 
			
		||||
                if (debug_val > 1)
 | 
			
		||||
                {
 | 
			
		||||
                    Format(debug_msg, sizeof(debug_msg), "PlayerDeath - Killing timer %i with handle %x.", x, tHandles[index][x]);
 | 
			
		||||
                    ZR_DebugPrintToConsole(0, debug_msg);
 | 
			
		||||
                }
 | 
			
		||||
                KillTimer(tHandles[index][x]);
 | 
			
		||||
                tHandles[index][x] = INVALID_HANDLE;
 | 
			
		||||
            }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user