Plugin-uriDHUD Team Details (XMAS Edition)

Moderatori: Moderators, Founder

Mesaj

Avatar utilizator
CEO
Posts
3802
Descriere: DHUD Team Details (arata sus un dhudmessage cu numele echipelor, runde castigate si chestiile de baza) dedicat craciunului.
Totul a plecat de la o nostalgie a mea si de la un server de tip xmas care urmeaza sa apara anul acesta cu ideile mele personale nu doar copy paste bineinteles!

Descarcare:
xmas_score.sma |

Cod: Selectaţi tot

/* Plugin generated by AMXX-Studio */

	#include < amxmodx >
	#if AMXX_VERSION_NUM < 183
		#include < dhudmessage >
	#endif

	
	#pragma semicolon 1

		// --| Credite lui CryWolf pentru 'layout' !!
		// --| Credite lui Askhanar pentru baza plugin-ului 'DHUD Team Detalis' - extreamcs.com
	new const
		PLUGIN_NAME[ ] 		= "Score (XMAS)",
		PLUGIN_AUTHOR[ ]    = "Askhanar + csfweed01",
		PLUGIN_VERSION[ ] 	= "0.1.7";
	
	#define	iTerroRed	255
	#define	iTerroGreen	0
	#define	iTerroBlue	0
	
	#define	iRoundsRed	255
	#define	iRoundsGreen	255
	#define	iRoundsBlue	255
	
	new const
		g_szCts[ ] 	= "SANTA [%02i]                        ",
		g_szTerrorists[ ]	= "                          [%02i] GRINCH",
		g_szRounds[ ]	= "vs^nRound %02i";
		
		
	enum _:iTeamWons
	{
		TERRO,
		CT
	}
	
	new g_iTeamWons[ iTeamWons ];
	new g_iRounds;
				
public plugin_init( )
{
	
	register_plugin( PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR );
	
	
	register_event( "HLTV", "ev_NewRound", "a", "1=0", "2=0" );
	register_event( "TextMsg", "ev_RoundRestart", "a", "2&#Game_C", "2&#Game_w" );
	
	register_event( "SendAudio", "ev_TerroristWin", "a", "2&%!MRAD_terwin" );
	register_event( "SendAudio", "ev_CtWin", "a", "2&%!MRAD_ctwin" );
	
	g_iRounds = 0;
	g_iTeamWons[ TERRO ] = 0;
	g_iTeamWons[ CT ] = 0;
	
	set_task( 1.0, "task_DisplayHudScore", _, _, _, "b", 0 );
	// Add your code here...
}


public ev_NewRound( )	g_iRounds++;
public ev_RoundRestart( )
{
	g_iRounds = 0;
	
	g_iTeamWons[ TERRO ] = 0;
	g_iTeamWons[ CT ] = 0;
}
public ev_TerroristWin( )
{ 	
	g_iTeamWons[ TERRO ]++;
}
public ev_CtWin( )
{	
	g_iTeamWons[ CT ]++;
}

public task_DisplayHudScore( )
{
	
	static iPlayers[ 32 ];
	static iPlayersNum;
		
	get_players( iPlayers, iPlayersNum, "ch" );
	if( !iPlayersNum )
		return;
	
	static szCrap[ 32 ];
	static iTerro, iCt;
	
	get_players( szCrap, iTerro, "aech", "TERRORIST" );
	get_players( szCrap, iCt, "aech", "CT" );
	
	static id, i;
	for( i = 0; i < iPlayersNum; i++ )
	{
		id = iPlayers[ i ];
		
		set_dhudmessage( 0, 70, 247, -1.0, is_user_alive( id ) ? 0.01 : 0.16 , 0, _, 2.0, 1.0, 1.0 );
		show_dhudmessage( id, g_szCts, g_iTeamWons[ CT ] );
		

		set_dhudmessage( iRoundsRed, iRoundsGreen, iRoundsBlue, -1.0, is_user_alive( id ) ? 0.01 : 0.16 , 0, _, 2.0, 1.0, 1.0 );
		show_dhudmessage( id, g_szRounds, g_iRounds);
		
		set_dhudmessage( iTerroRed, iTerroGreen, iTerroBlue, -1.0, is_user_alive( id ) ? 0.01 : 0.16 , 0, _, 2.0, 1.0, 1.0 );
		show_dhudmessage( id, g_szTerrorists, g_iTeamWons[ TERRO ] );				
	}
	
}
Nume: DHUD Team Details (XMAS) - Score (XMAS)
Versiune: 0.1.7 (Askhanar + csfweed01)


Instalare:
1. Fisierul xmas_score.sma il puneti in addons/amxmodx/scripting
2. Fisierul xmas_score.amxx il puneti in addons/amxmodx/plugins
3. Intrati in fisierul addons/amxmodx/configs/plugins.ini si adaugati la urma:

Cod: Selectaţi tot

xmas_score.amxx
Imagini:
* Optimizat pentru orice rezolutie ca de exemplu 800x600
(se actualizeaza in functie de runda actuala si rundele castigate de echipele respective)
https://i.postimg.cc/VLzQwmNN/image.png
https://i.postimg.cc/qv833cTw/image.png
https://i.postimg.cc/GhRTG7cf/image.png
========================
CONTACT : diliulro@yahoo.com
========================
Scrie răspuns