CoD4X Server and BigBrotherBot (b3) helpchange color scoreboard

Post Reply

Topic author
_MoMo_
Registered
Posts: 9
Joined: 30 Aug 2020 18:17
4
Contact:

change color scoreboard

Post by _MoMo_ »

Hello, Can u help me how can i change scoreboard properties like colors and fonts using server side script?
User avatar

Gen Stranger
KAB Administrator
Posts: 362
Joined: 19 Jan 2004 18:28
20
Contact:

Re: change color scoreboard

Post by Gen Stranger »

_MoMo_ wrote: 14 Sep 2020 17:28 Hello, Can u help me how can i change scoreboard properties like colors and fonts using server side script?
I am not sure but I think that was talked about on cod4x.me
it's far out of my understanding and programing skill.

see https://cod4x.me/index.php?/forums/topi ... oard-code/
Gen Stranger
Stranger-KAB

Topic author
_MoMo_
Registered
Posts: 9
Joined: 30 Aug 2020 18:17
4
Contact:

Re: change color scoreboard

Post by _MoMo_ »

Your tips helped me a lot and I found this and tested it and it worked :

_scoreboard.gsc

Code: Select all

init()
{
	switch(game["allies"])
	{
	case "sas":
		setdvar("g_TeamName_Allies", &"MPUI_SAS_SHORT");

		precacheShader("faction_128_sas");
		setdvar("g_TeamIcon_Allies", "faction_128_sas");
		setdvar("g_TeamColor_Allies", ".5 .5 .5");
		setdvar("g_ScoresColor_Allies", "0 0 0");

		break;
	
	case "marines":
		setdvar("g_TeamName_Allies", &"MPUI_MARINES_SHORT");

		precacheShader("faction_128_usmc");
		setdvar("g_TeamIcon_Allies", "faction_128_usmc");
		setdvar("g_TeamColor_Allies", "1 0 0 1");
		setdvar("g_ScoresColor_Allies", "1 0 0 1");
		break;
	}

	switch(game["axis"])
	{
	case "opfor":
	case "arab":
		setdvar("g_TeamName_Axis", &"MPUI_OPFOR_SHORT");

		precacheShader("faction_128_arab");
		setdvar("g_TeamIcon_Axis", "faction_128_arab");
		setdvar("g_TeamColor_Axis", "1 0 0 1");		
		setdvar("g_ScoresColor_Axis", "1 0 0 1");
		break;
	
	default:
		setdvar("g_TeamName_Axis", &"MPUI_SPETSNAZ_SHORT");

		precacheShader("faction_128_ussr");
		setdvar("g_TeamIcon_Axis", "faction_128_ussr");
		setdvar("g_TeamColor_Axis", "0.890196 1 0.184314 1");		
		setdvar("g_ScoresColor_Axis", "0.890196 1 0.184314 1");
		break;
	}
	setdvar("g_ScoresColor_Spectator", ".25 .25 .25");
	setdvar("g_ScoresColor_Free", ".76 .78 .10");
	setdvar("g_teamColor_MyTeam", ".6 .8 .6" );
	setdvar("g_teamColor_EnemyTeam", "1 .45 .5" );	
}
https://file.io/e7FweTw3haN3

I hope it works for you :)
User avatar

Gen Stranger
KAB Administrator
Posts: 362
Joined: 19 Jan 2004 18:28
20
Contact:

Re: change color scoreboard

Post by Gen Stranger »

_MoMo_ wrote: 15 Sep 2020 11:47 Your tips helped me a lot and I found this and tested it and it worked :

_scoreboard.gsc

Code: Select all

init()
{
	switch(game["allies"])
	{
	case "sas":
		setdvar("g_TeamName_Allies", &"MPUI_SAS_SHORT");

		precacheShader("faction_128_sas");
		setdvar("g_TeamIcon_Allies", "faction_128_sas");
		setdvar("g_TeamColor_Allies", ".5 .5 .5");
		setdvar("g_ScoresColor_Allies", "0 0 0");

		break;
	
	case "marines":
		setdvar("g_TeamName_Allies", &"MPUI_MARINES_SHORT");

		precacheShader("faction_128_usmc");
		setdvar("g_TeamIcon_Allies", "faction_128_usmc");
		setdvar("g_TeamColor_Allies", "1 0 0 1");
		setdvar("g_ScoresColor_Allies", "1 0 0 1");
		break;
	}

	switch(game["axis"])
	{
	case "opfor":
	case "arab":
		setdvar("g_TeamName_Axis", &"MPUI_OPFOR_SHORT");

		precacheShader("faction_128_arab");
		setdvar("g_TeamIcon_Axis", "faction_128_arab");
		setdvar("g_TeamColor_Axis", "1 0 0 1");		
		setdvar("g_ScoresColor_Axis", "1 0 0 1");
		break;
	
	default:
		setdvar("g_TeamName_Axis", &"MPUI_SPETSNAZ_SHORT");

		precacheShader("faction_128_ussr");
		setdvar("g_TeamIcon_Axis", "faction_128_ussr");
		setdvar("g_TeamColor_Axis", "0.890196 1 0.184314 1");		
		setdvar("g_ScoresColor_Axis", "0.890196 1 0.184314 1");
		break;
	}
	setdvar("g_ScoresColor_Spectator", ".25 .25 .25");
	setdvar("g_ScoresColor_Free", ".76 .78 .10");
	setdvar("g_teamColor_MyTeam", ".6 .8 .6" );
	setdvar("g_teamColor_EnemyTeam", "1 .45 .5" );	
}
https://file.io/e7FweTw3haN3

I hope it works for you :)
I will try it and see what it does
thanks and I am glad you found what you needed.
Gen Stranger
Stranger-KAB

Topic author
_MoMo_
Registered
Posts: 9
Joined: 30 Aug 2020 18:17
4
Contact:

Re: change color scoreboard

Post by _MoMo_ »

Tnx Bro .
Attachments
Untitled.png
User avatar

Gen Stranger
KAB Administrator
Posts: 362
Joined: 19 Jan 2004 18:28
20
Contact:

Re: change color scoreboard

Post by Gen Stranger »

_MoMo_ wrote: 15 Sep 2020 15:18Tnx Bro .
Hmm I haven't tried it yet but that does look good
Gen Stranger
Stranger-KAB

Topic author
_MoMo_
Registered
Posts: 9
Joined: 30 Aug 2020 18:17
4
Contact:

Re: change color scoreboard

Post by _MoMo_ »

Yes, it is good for beautifying and coloring the scoreboard . :)

Topic author
_MoMo_
Registered
Posts: 9
Joined: 30 Aug 2020 18:17
4
Contact:

Re: change color scoreboard

Post by _MoMo_ »

Hello. Can Somebody Tell me How can i run client console command from server using b3?
For example i want to connect the player into another server using a command
is it possible? I saw in some servers
User avatar

Gen Stranger
KAB Administrator
Posts: 362
Joined: 19 Jan 2004 18:28
20
Contact:

Re: change color scoreboard

Post by Gen Stranger »

_MoMo_ wrote: 20 Sep 2020 05:16 Hello. Can Somebody Tell me How can i run client console command from server using b3?
For example i want to connect the player into another server using a command
is it possible? I saw in some servers
almost anything is possible with a b3 plugin however I never saw one to do that - I guess you will have to learn to make one.
and since I no longer use b3 I could not even write one at this time.
Gen Stranger
Stranger-KAB
Post Reply