[rezolvat] Modificare Team Score

Modificari necesare ale pluginurilor

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

Post Reply
JooonnnX
Membru, skill +1
Membru, skill +1
Posts: 122
Joined: 13 Feb 2014, 19:05
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Has thanked: 18 times
Been thanked: 1 time
Contact:

08 Jul 2014, 15:59

Salut vreau sa-mi modificati pluginu de team scoare, am sa va dau o poza, cu bugu si dupa sursa

1. Poza
| Afiseaza codul
Image
Vreau sa apara mai jos sa nu se suprapuna peste acel text cu timpu de constructie si acolo acei 2 00 se baga peste bara acea, sa stea putin mai indepartate....


| Afiseaza codul
* Plugin generated by AMXX-Studio */

	#include < amxmodx >
	#include < dhudmessage >
	
	#pragma semicolon 1

		// --| Credite lui CryWolf pentru 'layout' !!
	new const
		PLUGIN_NAME[ ] 		= "Furien Score & Round",
		PLUGIN_VERSION[ ] 	= "0.2.1";
	
	/* Copyright (c) 2013 Askhanar  @eXtreamCS.com
	
	http://www.eXtreamCS.com/forum
	http://www.amxmodx.org
	http://www.amxmodx.ro
	
	*/
	
	
	// --| Culorile in RRR GGG BBB ( poate fi luata si in paint ).
	// --| Aici sunt culorile de la mesajele: Furien  AntiFurien si Round
	
	#define	iNameRed	0
	#define	iNameGreen	255
	#define	iNameBlue	255
	
	// --| Culorile in RRR GGG BBB ( poate fi luata si in paint ).
	// --| Aici sunt culorile de la mesajele: numarul de castiguri si runde.
	
	#define	iScoreRed	255
	#define	iScoreGreen	0
	#define	iScoreBlue	0
	
	new const
		g_szTeamsMessage[ ] 	= "    |-  ANTIBUILDER           BUILDER  -|    ",
		g_szScoreMessage[ ]	= "%02i                                                %02i",
		g_szRoundMessage[ ]	= "                  Round                     ",
		g_szRound[ ]		= "                    %02i                       ";
		
		
	enum _:iTeamWons
	{
		BUILDER,
		ANTIBUILDER
	}
	
	new g_iTeamWons[ iTeamWons ];
	new g_iRounds;
	
	new SyncHudTeamNames, SyncHudTeamScore;
			
				
public plugin_init( )
{
	
	register_plugin( PLUGIN_NAME, PLUGIN_VERSION, "Askhanar" );
	
	
	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[ ANTIBUILDER ] = 0;
	g_iTeamWons[ BUILDER ] = 0;
	
	SyncHudTeamNames = CreateHudSyncObj( );
	SyncHudTeamScore = CreateHudSyncObj( );
	
	
	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[ ANTIBUILDER ] = 0;	g_iTeamWons[ BUILDER ] = 0;	}
public ev_TerroristWin( )	g_iTeamWons[ ANTIBUILDER ]++;
public ev_CtWin( )	g_iTeamWons[ BUILDER ]++;

public task_DisplayHudScore( )
{
	static iPlayers[ 32 ];
	static iPlayersNum;
		
	get_players( iPlayers, iPlayersNum, "ch" );
	if( !iPlayersNum )
		return;
		
	static id, i;
	for( i = 0; i < iPlayersNum; i++ )
	{
		id = iPlayers[ i ];
		
		if( 1 <= get_user_team( id ) <= 3 )
		{
			set_hudmessage( iNameRed, iNameGreen, iNameBlue, -1.0, is_user_alive( id ) ? 0.01 : 0.16 , 0, _, 1.0, _, _, 2 );
			ShowSyncHudMsg( id, SyncHudTeamNames, g_szTeamsMessage );
			
			set_hudmessage( iScoreRed, iScoreGreen, iScoreBlue, -1.0, is_user_alive( id ) ? 0.01 : 0.16 , 0, _, 1.0, _, _, 3 );
			ShowSyncHudMsg( id, SyncHudTeamScore, g_szScoreMessage,  g_iTeamWons[ ANTIBUILDER ], g_iTeamWons[ BUILDER ]  );
			
			
			set_dhudmessage( iNameRed, iNameGreen, iNameBlue, -1.0, is_user_alive( id ) ? 0.03 : 0.18 , 0, _, 1.0, _, _ );
			show_dhudmessage( id, g_szRoundMessage );
			
			set_dhudmessage( iScoreRed, iScoreGreen, iScoreBlue, -1.0, is_user_alive( id ) ? 0.06 : 0.21 , 0, _, 1.0, _, _ );
			show_dhudmessage( id, g_szRound, g_iRounds );
		}
	
	}
}
RoyalServer
User avatar
YONTU
Scripter eXtreamCS
Scripter eXtreamCS
Posts: 2466
Joined: 10 May 2013, 14:25
Detinator Steam: Nu
CS Status: Everyone is looking at ur shoes
Reputatie: Moderator ajutator
Fost scripter eXtreamCS
Location: Gura Humorului
Has thanked: 256 times
Been thanked: 288 times
Contact:

09 Jul 2014, 19:00

Mutat in sectiunea corespunzatoare. (din scripting si adus aici)
„Peste douăzeci de ani vei fi dezamăgit din cauza lucrurilor pe care nu le-ai făcut, nu din cauza celor pe care le-ai făcut.” - Mark Twain
„Asa e si in viata, hotii castiga, prostii care invata pierd.” - Mihai Nemeș


Bio.LeagueCs.Ro - Biohazard v4.4 Xmas Edition
discord: IonutC#5114

Experinta in: Java/Spring boot/Angular/C/C++/C#/Javascript/Python/HTML/CSS/Pawn/SQL
Ai nevoie de ajutorul meu? Ma poti gasi doar la adresa de discord de mai sus.
JooonnnX
Membru, skill +1
Membru, skill +1
Posts: 122
Joined: 13 Feb 2014, 19:05
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Has thanked: 18 times
Been thanked: 1 time
Contact:

09 Jul 2014, 20:04

uppppppppppp
JooonnnX
Membru, skill +1
Membru, skill +1
Posts: 122
Joined: 13 Feb 2014, 19:05
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Has thanked: 18 times
Been thanked: 1 time
Contact:

10 Jul 2014, 16:13

upppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppp
#Vali
Fost moderator
Fost moderator
Posts: 2611
Joined: 24 Jan 2012, 11:00
Detinator Steam: Da
SteamID: id/spryt3
Reputatie: Fost Moderator
Fost Scripter eXtreamCS.com
1.2 / 3
Location: root
Has thanked: 81 times
Been thanked: 144 times
Contact:

10 Jul 2014, 17:14

| Afiseaza codul
#include < amxmodx >
#include < dhudmessage >

#pragma semicolon 1

// --| Credite lui CryWolf pentru 'layout' !!
new const
PLUGIN_NAME[ ] 		= "Furien Score & Round",
PLUGIN_VERSION[ ] 	= "0.2.1";

/* Copyright (c) 2013 Askhanar  @eXtreamCS.com

http://www.eXtreamCS.com/forum
http://www.amxmodx.org
http://www.amxmodx.ro

*/


// --| Culorile in RRR GGG BBB ( poate fi luata si in paint ).
// --| Aici sunt culorile de la mesajele: Furien  AntiFurien si Round

#define	iNameRed	0
#define	iNameGreen	255
#define	iNameBlue	255

// --| Culorile in RRR GGG BBB ( poate fi luata si in paint ).
// --| Aici sunt culorile de la mesajele: numarul de castiguri si runde.

#define	iScoreRed	255
#define	iScoreGreen	0
#define	iScoreBlue	0

new const
g_szTeamsMessage[ ] 	= " ^n   |-  ANTIBUILDER           BUILDER  -|    ",
g_szScoreMessage[ ]	= "^n%02i                                                %02i",
g_szRoundMessage[ ]	= "^n               Round                     ",
g_szRound[ ]		= "^n                    %02i                       ";


enum _:iTeamWons
{
	BUILDER,
	ANTIBUILDER
}

new g_iTeamWons[ iTeamWons ];
new g_iRounds;

new SyncHudTeamNames, SyncHudTeamScore;


public plugin_init( )
	{
	
	register_plugin( PLUGIN_NAME, PLUGIN_VERSION, "Askhanar" );
	
	
	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[ ANTIBUILDER ] = 0;
	g_iTeamWons[ BUILDER ] = 0;
	
	SyncHudTeamNames = CreateHudSyncObj( );
	SyncHudTeamScore = CreateHudSyncObj( );
	
	
	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[ ANTIBUILDER ] = 0;	g_iTeamWons[ BUILDER ] = 0;	}
public ev_TerroristWin( )	g_iTeamWons[ ANTIBUILDER ]++;
public ev_CtWin( )	g_iTeamWons[ BUILDER ]++;

public task_DisplayHudScore( )
	{
	static iPlayers[ 32 ];
	static iPlayersNum;
	
	get_players( iPlayers, iPlayersNum, "ch" );
	if( !iPlayersNum )
		return;
	
	static id, i;
	for( i = 0; i < iPlayersNum; i++ )
		{
		id = iPlayers[ i ];
		
		if( 1 <= get_user_team( id ) <= 3 )
			{
			set_hudmessage( iNameRed, iNameGreen, iNameBlue, -1.0, is_user_alive( id ) ? 0.01 : 0.16 , 0, _, 1.0, _, _, 2 );
			ShowSyncHudMsg( id, SyncHudTeamNames, g_szTeamsMessage );
			
			set_hudmessage( iScoreRed, iScoreGreen, iScoreBlue, -1.0, is_user_alive( id ) ? 0.01 : 0.16 , 0, _, 1.0, _, _, 3 );
			ShowSyncHudMsg( id, SyncHudTeamScore, g_szScoreMessage,  g_iTeamWons[ ANTIBUILDER ], g_iTeamWons[ BUILDER ]  );
			
			
			set_dhudmessage( iNameRed, iNameGreen, iNameBlue, -1.0, is_user_alive( id ) ? 0.03 : 0.18 , 0, _, 1.0, _, _ );
			show_dhudmessage( id, g_szRoundMessage );
			
			set_dhudmessage( iScoreRed, iScoreGreen, iScoreBlue, -1.0, is_user_alive( id ) ? 0.06 : 0.21 , 0, _, 1.0, _, _ );
			show_dhudmessage( id, g_szRound, g_iRounds );
		}
		
	}
}
JooonnnX
Membru, skill +1
Membru, skill +1
Posts: 122
Joined: 13 Feb 2014, 19:05
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Has thanked: 18 times
Been thanked: 1 time
Contact:

14 Jul 2014, 12:00

Mersi am sa incerc sa vad... daca nu mai raspund inseamna ca-i bine !
User avatar
YONTU
Scripter eXtreamCS
Scripter eXtreamCS
Posts: 2466
Joined: 10 May 2013, 14:25
Detinator Steam: Nu
CS Status: Everyone is looking at ur shoes
Reputatie: Moderator ajutator
Fost scripter eXtreamCS
Location: Gura Humorului
Has thanked: 256 times
Been thanked: 288 times
Contact:

14 Jul 2014, 23:07

10 Iul 2014 17:14 - Rezolvat!
„Peste douăzeci de ani vei fi dezamăgit din cauza lucrurilor pe care nu le-ai făcut, nu din cauza celor pe care le-ai făcut.” - Mark Twain
„Asa e si in viata, hotii castiga, prostii care invata pierd.” - Mihai Nemeș


Bio.LeagueCs.Ro - Biohazard v4.4 Xmas Edition
discord: IonutC#5114

Experinta in: Java/Spring boot/Angular/C/C++/C#/Javascript/Python/HTML/CSS/Pawn/SQL
Ai nevoie de ajutorul meu? Ma poti gasi doar la adresa de discord de mai sus.
Post Reply

Return to “Modificari pluginuri”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 3 guests