Raised This Month: $2 Target: $400
 0% 

Solved [Server Managming] Incorrect colors in chat, HintText


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Kupio
New Member
Join Date: Jun 2020
Old 06-09-2020 , 18:41   [Server Managming] Incorrect colors in chat, HintText
Reply With Quote #1

Hey! What's up guys?
I've come back again
So today I run down on two questions.

P.s. I have the pracc server. Pracc is default 5on5 matches(team vs team). Im working on Server Managming with the plugin

Let's look at the screen..


1) You see [Kupio Pro League]{myNick} etc...
So Kupio Pro League is white, my nick is green.
Now look at the code, please

2) You see HintText of course.
It looks bad.

I've wanted to say that's code has written by github programmer a long time ago..

Code:
public Action Unready(client, args)
{
	char UnreadyAttemptSteamID[32];
	char UnreadyAttemptName[32];
	GetClientName(client, UnreadyAttemptName, sizeof(UnreadyAttemptName));
	if (CurrentRound == WARMUP)
	{
		if (IsClientValid(client) && PlayerReadyCheck(client))
		{
			GetClientAuthId(client, AuthId_Steam2, UnreadyAttemptSteamID, sizeof(UnreadyAttemptSteamID), false);
			if (FindStringInArray(PlayersReadyList, UnreadyAttemptSteamID) != -1)
			{
				int ReqRdy = GetConVarInt(RequiredReadyPlayers);
				int ArrayIndex = FindStringInArray(PlayersReadyList, UnreadyAttemptSteamID);
				RemoveFromArray(PlayersReadyList, ArrayIndex);
				ReadyPlayers--;
				PrintToChatAll("\x05 [Kupio Pro League]\x06 %s \x05is now unready. %d/%d players ready.", UnreadyAttemptName, ReadyPlayers, ReqRdy);
				PrintHintTextToAll("<font color='#87ff87'>%d/%d Players Ready</font><br><font color='#af5fff'>Type \x07!ready to ready up.</font>", ReadyPlayers, GetConVarInt(RequiredReadyPlayers));
				return Plugin_Handled;
			}
		}
	}
	else if (CurrentRound != WARMUP)
	{
		return Plugin_Handled;
	}
	return Plugin_Handled;
}
I've also wanted:
1) Completely make a green message: "\x05 [Kupio Pro League]\x06 %s \x05is now unready...etc";
2) Create correct HintText for nice picture at a glance.

I cant do this because I've started programming sourcemod plugins 3 days ago and I dont know a lot of sourcemod programming.

Can somebody help me with my diligences?


Last edited by Kupio; 06-10-2020 at 14:27.
Kupio is offline
Ilusion9
Veteran Member
Join Date: Jun 2018
Location: Romania
Old 06-10-2020 , 03:59   Re: [Server Managming] Incorrect colors in chat, HintText
Reply With Quote #2

1. put space before text.
PHP Code:
 PrintToChatAll(" \x06msg"); 
2.
PHP Code:

PrintHintTextToAll
("%d/%d Players Ready\nType !ready to ready up."ReadyPlayersGetConVarInt(RequiredReadyPlayers)); 
Just remove the colors.
__________________

Last edited by Ilusion9; 06-10-2020 at 07:16.
Ilusion9 is offline
Kupio
New Member
Join Date: Jun 2020
Old 06-10-2020 , 11:12   Re: [Server Managming] Incorrect colors in chat, HintText
Reply With Quote #3

Quote:
Originally Posted by Ilusion9 View Post
1. put space before text.
PHP Code:
 PrintToChatAll(" \x06msg"); 
2.
PHP Code:

PrintHintTextToAll
("%d/%d Players Ready\nType !ready to ready up."ReadyPlayersGetConVarInt(RequiredReadyPlayers)); 
Just remove the colors.
Nice work, man!
Everything works well.
Thanks a lot.
Kupio is offline
Reply


Thread Tools
Display Modes

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 06:43.


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