Raised This Month: $51 Target: $400
 12% 

Leader glow time


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
prison
Junior Member
Join Date: Jul 2020
Old 07-08-2020 , 02:41   Leader glow time
Reply With Quote #1

hi guys, how do I make sure that the player's lighting is always on? and the now only seconds 2 in the early round of only

Code:
/*
 This is a remake of deadbeats leaderglow plugin.
====================================================
Plugin to cause the Lead Player (top score) on each Team to glow at the end of each round, i.e. after the round has ended, but before the next round starts.

If a player says "glow" it will respond with a short message explaining that the lead player on each team glows at the end of each round.

There must be at least 3 (THREE) players on the server before the glowing kicks in - doesn't make much sense otherwise icon_deep_clin.gif

Just a bit of fun really, but it's kinda nice to see who the top guy/gal is on each team at the end of the round. Shamelessly influenced by Ravenous Bug Blatter Beast's glow plugin for AdminMOD.
====================================================
 */

#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;
}
prison is offline
prison
Junior Member
Join Date: Jul 2020
Old 07-08-2020 , 09:12   Re: Leader glow time
Reply With Quote #2

Help pliz
prison is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 07-09-2020 , 13:24   Re: Leader glow time
Reply With Quote #3

I was gonna help but you bumped your thread early then I changed my mind.
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !

Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
prison
Junior Member
Join Date: Jul 2020
Old 07-09-2020 , 16:40   Re: Leader glow time
Reply With Quote #4

Quote:
Originally Posted by Natsheh View Post
I was gonna help but you bumped your thread early then I changed my mind.
I don't understand what you're talking about
prison is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 11:38.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode