View Single Post
sHoC
Senior Member
Join Date: Nov 2015
Location: Italy
Old 06-23-2018 , 10:52   Re: [CSGO REQ] Remaining Players Plugin
Reply With Quote #9

Quote:
Originally Posted by KlausLaw View Post
Code:
public void OnPluginStart()
{
	CreateTimer(1.0, Timer_HudMsg, _, TIMER_REPEAT);
	SetHudTextParams(0.4, 0.2, 1.0, 2, 2, 252, 1, 0);
}

public Action Timer_HudMsg(Handle timer)
{
	static int iAlivePlayers;
	iAlivePlayers = 0;
	for (int i = 1; i <= MaxClients; i++)
	{
		if (!IsClientInGame(i) || !IsPlayerAlive(i))continue;
		iAlivePlayers++;
	}
	for (int i = 1; i <= MaxClients; i++)
	{
		if (!IsClientInGame(i))continue;
		ShowHudText(i, 1, "Remaining players: %d", iAlivePlayers);
	}
}
Enjoy
can someone edit this one and add kills count? Remaining players: X Kills: 3
ty
__________________
sHoC is offline