constant glow

В този раздел можете да подавате всякакви заявки за намиране, изработка или преработка на плъгини/модове.
Аватар
xydojke
Извън линия
Foreigner
Foreigner
Мнения: 8
Регистриран на: 27 Юли 2020, 11:02

constant glow

Мнение от xydojke » 31 Юли 2020, 10:38

Good morning! how to do in the plugin that the leader in frags in CT and TT glowed constantly, now it only glows on freezetime

Код за потвърждение: Избери целия код

#include <amxmodx> 
#include <amxmisc>
#include <fun>

new g_Version[] = "0.1";

/* Keep Track of Player ID for Lead Player on each Team */

new g_Lead_CT = -1
new g_Lead_T  = -1

/*
 *********************************************************
 * Find the lead player for each team and make them glow *
 *********************************************************
 */

GlowLeaders() {

	/* Skip the glowing if there's only two people playing */

	new i_numplayers = get_playersnum(0); /* get number of alive players */

	if (i_numplayers < 2) return

	i_numplayers = get_playersnum(1); /* get total number of players, including ones connecting */

	/* Figure out who the Lead Player is for each team */

	new i_Lead_CT_frags  = -100
	new i_Lead_T_frags   = -100
	new i_Lead_CT_deaths = -100
	new i_Lead_T_deaths  = -100
	new s_team[3]
	new i_frags
	new i_deaths

	g_Lead_CT = -1
	g_Lead_T  = -1

	for (new i_player = 0; i_player < i_numplayers; i_player++) {

		i_frags  = get_user_frags(i_player)
		i_deaths = get_user_deaths(i_player)
		
		get_user_team(i_player, s_team, 3)

		/* is player Lead CT? */

		if (equali(s_team,"CT",2))
			if ((i_frags > i_Lead_CT_frags) ||
				((i_frags == i_Lead_CT_frags) && (i_deaths < i_Lead_CT_deaths))) {

				i_Lead_CT_frags  = i_frags
				i_Lead_CT_deaths = i_deaths
				g_Lead_CT        = i_player
			}

		/* is player Lead Terrorist? */

		if (equali(s_team,"TE",2))
			if ((i_frags > i_Lead_T_frags) ||
				((i_frags == i_Lead_T_frags) && (i_deaths < i_Lead_T_deaths))) {

				i_Lead_T_frags  = i_frags
				i_Lead_T_deaths = i_deaths
				g_Lead_T        = i_player
			}
	}

	/* Make the Lead Player Glow for each team */

	if (g_Lead_CT != -1) set_user_rendering(g_Lead_CT, kRenderFxGlowShell, 0, 0, 255, kRenderNormal, 15)

	if (g_Lead_T  != -1) set_user_rendering(g_Lead_T,  kRenderFxGlowShell, 255, 0, 0, kRenderNormal, 15)
}

/*
 *********************************************************
 * Turn off glowing for the lead players on each team    *
 *********************************************************
 */

UnGlowLeaders() {

	if (g_Lead_CT != -1) set_user_rendering(g_Lead_CT, kRenderFxNone, 0, 0, 0, kRenderNormal, 0)

	if (g_Lead_T  != -1) set_user_rendering(g_Lead_T,  kRenderFxNone, 0, 0, 0, kRenderNormal, 0)
}

/*
 *********************************************************
 *  Stop Glowing at RoundStart                           *
 *********************************************************
 */

public roundStart()
{
	UnGlowLeaders()
}

/*
 *********************************************************
 *  Start Glowing at RoundEnd                            *
 *********************************************************
 */

public roundEnd()
{
	GlowLeaders()
}

/*
 *********************************************************
 *  Report Glowing
 *********************************************************
 */

public reportGlow(id)
{
	new s_message[] = "Lead Players Glow at RoundEnd to RoundStart"

	set_hudmessage(0,255,0, 0.05, 0.50, 2, 0.1, 3.0, 0.02, 0.02, 10)

	show_hudmessage(id, s_message)
	
	client_print(id, print_chat, s_message)
		
	return PLUGIN_HANDLED
}

/*
 *********************************************************
 *  Initialise the Plugin                                *
 *********************************************************
 */

public plugin_init()
{
	register_plugin("LeaderGlow Plugin(deadBeat", g_Version, "Man... or Astro-Man?");

	register_logevent("roundStart", 2, "1=Round_Start")
	register_logevent("roundEnd",   2, "1=Round_End")

	register_clcmd("say glow", "reportGlow")
	register_clcmd("say_team glow", "reportGlow")

	return PLUGIN_CONTINUE;
}

Аватар
OciXCrom
Извън линия
Администратор
Администратор
Мнения: 7206
Регистриран на: 06 Окт 2016, 19:20
Местоположение: /resetscore
Се отблагодари: 117 пъти
Получена благодарност: 1295 пъти
Обратна връзка:

constant glow

Мнение от OciXCrom » 31 Юли 2020, 13:22

Код за потвърждение: Избери целия код

#include <amxmodx>
#include <amxmisc>
#include <fun>

// Uncomment to remove glow on round start.
//#define REMOVE_GLOW_ON_ROUND_START

new g_Version[] = "0.1";

/* Keep Track of Player ID for Lead Player on each Team */

new g_Lead_CT = -1
new g_Lead_T  = -1

/*
 *********************************************************
 * Find the lead player for each team and make them glow *
 *********************************************************
 */

GlowLeaders() {

	/* Skip the glowing if there's only two people playing */

	new i_numplayers = get_playersnum(0); /* get number of alive players */

	if (i_numplayers < 2) return

	i_numplayers = get_playersnum(1); /* get total number of players, including ones connecting */

	/* Figure out who the Lead Player is for each team */

	new i_Lead_CT_frags  = -100
	new i_Lead_T_frags   = -100
	new i_Lead_CT_deaths = -100
	new i_Lead_T_deaths  = -100
	new s_team[3]
	new i_frags
	new i_deaths

	g_Lead_CT = -1
	g_Lead_T  = -1

	for (new i_player = 0; i_player < i_numplayers; i_player++) {

		i_frags  = get_user_frags(i_player)
		i_deaths = get_user_deaths(i_player)

		get_user_team(i_player, s_team, 3)

		/* is player Lead CT? */

		if (equali(s_team,"CT",2))
			if ((i_frags > i_Lead_CT_frags) ||
				((i_frags == i_Lead_CT_frags) && (i_deaths < i_Lead_CT_deaths))) {

				i_Lead_CT_frags  = i_frags
				i_Lead_CT_deaths = i_deaths
				g_Lead_CT        = i_player
			}

		/* is player Lead Terrorist? */

		if (equali(s_team,"TE",2))
			if ((i_frags > i_Lead_T_frags) ||
				((i_frags == i_Lead_T_frags) && (i_deaths < i_Lead_T_deaths))) {

				i_Lead_T_frags  = i_frags
				i_Lead_T_deaths = i_deaths
				g_Lead_T        = i_player
			}
	}

	/* Make the Lead Player Glow for each team */

	if (g_Lead_CT != -1) set_user_rendering(g_Lead_CT, kRenderFxGlowShell, 0, 0, 255, kRenderNormal, 15)

	if (g_Lead_T  != -1) set_user_rendering(g_Lead_T,  kRenderFxGlowShell, 255, 0, 0, kRenderNormal, 15)
}

#if defined REMOVE_GLOW_ON_ROUND_START
/*
 *********************************************************
 * Turn off glowing for the lead players on each team    *
 *********************************************************
 */

UnGlowLeaders() {

	if (g_Lead_CT != -1) set_user_rendering(g_Lead_CT, kRenderFxNone, 0, 0, 0, kRenderNormal, 0)

	if (g_Lead_T  != -1) set_user_rendering(g_Lead_T,  kRenderFxNone, 0, 0, 0, kRenderNormal, 0)
}

/*
 *********************************************************
 *  Stop Glowing at RoundStart                           *
 *********************************************************
 */

public roundStart()
{
	UnGlowLeaders()
}
#endif

/*
 *********************************************************
 *  Start Glowing at RoundEnd                            *
 *********************************************************
 */

public roundEnd()
{
	GlowLeaders()
}

/*
 *********************************************************
 *  Report Glowing
 *********************************************************
 */

public reportGlow(id)
{
	new s_message[] = "Lead Players Glow at RoundEnd to RoundStart"

	set_hudmessage(0,255,0, 0.05, 0.50, 2, 0.1, 3.0, 0.02, 0.02, 10)

	show_hudmessage(id, s_message)

	client_print(id, print_chat, s_message)

	return PLUGIN_HANDLED
}

/*
 *********************************************************
 *  Initialise the Plugin                                *
 *********************************************************
 */

public plugin_init()
{
	register_plugin("LeaderGlow Plugin(deadBeat", g_Version, "Man... or Astro-Man?");

	#if defined REMOVE_GLOW_ON_ROUND_START
	register_logevent("roundStart", 2, "1=Round_Start")
	#endif

	register_logevent("roundEnd",   2, "1=Round_End")

	register_clcmd("say glow", "reportGlow")
	register_clcmd("say_team glow", "reportGlow")

	return PLUGIN_CONTINUE;
}

Аватар
xydojke
Извън линия
Foreigner
Foreigner
Мнения: 8
Регистриран на: 27 Юли 2020, 11:02

constant glow

Мнение от xydojke » 31 Юли 2020, 15:01

OciXCrom написа: 31 Юли 2020, 13:22

Код за потвърждение: Избери целия код

#include <amxmodx>
#include <amxmisc>
#include <fun>

// Uncomment to remove glow on round start.
//#define REMOVE_GLOW_ON_ROUND_START

new g_Version[] = "0.1";

/* Keep Track of Player ID for Lead Player on each Team */

new g_Lead_CT = -1
new g_Lead_T  = -1

/*
 *********************************************************
 * Find the lead player for each team and make them glow *
 *********************************************************
 */

GlowLeaders() {

	/* Skip the glowing if there's only two people playing */

	new i_numplayers = get_playersnum(0); /* get number of alive players */

	if (i_numplayers < 2) return

	i_numplayers = get_playersnum(1); /* get total number of players, including ones connecting */

	/* Figure out who the Lead Player is for each team */

	new i_Lead_CT_frags  = -100
	new i_Lead_T_frags   = -100
	new i_Lead_CT_deaths = -100
	new i_Lead_T_deaths  = -100
	new s_team[3]
	new i_frags
	new i_deaths

	g_Lead_CT = -1
	g_Lead_T  = -1

	for (new i_player = 0; i_player < i_numplayers; i_player++) {

		i_frags  = get_user_frags(i_player)
		i_deaths = get_user_deaths(i_player)

		get_user_team(i_player, s_team, 3)

		/* is player Lead CT? */

		if (equali(s_team,"CT",2))
			if ((i_frags > i_Lead_CT_frags) ||
				((i_frags == i_Lead_CT_frags) && (i_deaths < i_Lead_CT_deaths))) {

				i_Lead_CT_frags  = i_frags
				i_Lead_CT_deaths = i_deaths
				g_Lead_CT        = i_player
			}

		/* is player Lead Terrorist? */

		if (equali(s_team,"TE",2))
			if ((i_frags > i_Lead_T_frags) ||
				((i_frags == i_Lead_T_frags) && (i_deaths < i_Lead_T_deaths))) {

				i_Lead_T_frags  = i_frags
				i_Lead_T_deaths = i_deaths
				g_Lead_T        = i_player
			}
	}

	/* Make the Lead Player Glow for each team */

	if (g_Lead_CT != -1) set_user_rendering(g_Lead_CT, kRenderFxGlowShell, 0, 0, 255, kRenderNormal, 15)

	if (g_Lead_T  != -1) set_user_rendering(g_Lead_T,  kRenderFxGlowShell, 255, 0, 0, kRenderNormal, 15)
}

#if defined REMOVE_GLOW_ON_ROUND_START
/*
 *********************************************************
 * Turn off glowing for the lead players on each team    *
 *********************************************************
 */

UnGlowLeaders() {

	if (g_Lead_CT != -1) set_user_rendering(g_Lead_CT, kRenderFxNone, 0, 0, 0, kRenderNormal, 0)

	if (g_Lead_T  != -1) set_user_rendering(g_Lead_T,  kRenderFxNone, 0, 0, 0, kRenderNormal, 0)
}

/*
 *********************************************************
 *  Stop Glowing at RoundStart                           *
 *********************************************************
 */

public roundStart()
{
	UnGlowLeaders()
}
#endif

/*
 *********************************************************
 *  Start Glowing at RoundEnd                            *
 *********************************************************
 */

public roundEnd()
{
	GlowLeaders()
}

/*
 *********************************************************
 *  Report Glowing
 *********************************************************
 */

public reportGlow(id)
{
	new s_message[] = "Lead Players Glow at RoundEnd to RoundStart"

	set_hudmessage(0,255,0, 0.05, 0.50, 2, 0.1, 3.0, 0.02, 0.02, 10)

	show_hudmessage(id, s_message)

	client_print(id, print_chat, s_message)

	return PLUGIN_HANDLED
}

/*
 *********************************************************
 *  Initialise the Plugin                                *
 *********************************************************
 */

public plugin_init()
{
	register_plugin("LeaderGlow Plugin(deadBeat", g_Version, "Man... or Astro-Man?");

	#if defined REMOVE_GLOW_ON_ROUND_START
	register_logevent("roundStart", 2, "1=Round_Start")
	#endif

	register_logevent("roundEnd",   2, "1=Round_End")

	register_clcmd("say glow", "reportGlow")
	register_clcmd("say_team glow", "reportGlow")

	return PLUGIN_CONTINUE;
}
now only at the end of the round glow, you need a constant glow of the leader CT, T

Аватар
JackEyedJones
Извън линия
Потребител
Потребител
Мнения: 399
Регистриран на: 10 Сеп 2018, 17:26
Местоположение: Plovdiv, Bulgaria, Europe, Entire World
Се отблагодари: 4 пъти
Получена благодарност: 69 пъти
Обратна връзка:

constant glow

Мнение от JackEyedJones » 31 Юли 2020, 16:58

Иска постоянно да светят играчите, не само в края и началото на рунда.

Аватар
OciXCrom
Извън линия
Администратор
Администратор
Мнения: 7206
Регистриран на: 06 Окт 2016, 19:20
Местоположение: /resetscore
Се отблагодари: 117 пъти
Получена благодарност: 1295 пъти
Обратна връзка:

constant glow

Мнение от OciXCrom » 31 Юли 2020, 19:50

Перфектно разбирам английски, мерси. Glow-ът не се премахва автоматично след като е зададен. Вероятно има плъгин който го ресетира.

Публикувай отговор
  • Подобни теми
    Отговори
    Преглеждания
     Последно мнение

Обратно към “Заявки за плъгини”

Кой е на линия

Потребители разглеждащи този форум: Google [Bot] и 9 госта