View Single Post
mug1wara
AlliedModders Donor
Join Date: Jun 2018
Old 07-23-2018 , 07:31   Re: CS:GO Player Health by 200 HP = round end
Reply With Quote #2

Learn how to code yourself, it's easy. Also quite annoying getting "easy" requests such as this, when it's just a couple lines.

PHP Code:
#include <sourcemod>
#include <sdktools>
#include <cstrike>

#pragma semicolon 1

public void OnMapStart()
{
    
HookEvent("player_death"Event_Death);
}

public 
Action Event_Death(Event hEvent, const char[] sNamebool bDontBroadcast)
{
    for (
int i 1<= MaxClientsi++)
    {
        if (
IsClientInGame(i) && IsPlayerAlive(i))
        {
            
int iHealth GetClientHealth(i);
            
            
int iTeam GetClientTeam(i);
            
            if (
iHealth >= 200)
            {
                
CS_TerminateRound(7.0iTeam CSRoundEnd_CTWin CSRoundEnd_TerroristWin);
                
                
PrintToChatAll("%N Has won the round."i);
            }
        }
    }


Last edited by mug1wara; 07-23-2018 at 18:11.
mug1wara is offline