Cerere Chat Color

Categoria cu cereri de pluginuri si nu numai.

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

Forum rules
Accesează link-ul pentru a putea vedea regulile forumului

Daca doriti sa vi se modifice un plugin, va rugam postati aici .
Post Reply
Myhe
Membru, skill 0
Membru, skill 0
Posts: 16
Joined: 25 Oct 2013, 08:13
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Contact:

14 Dec 2013, 15:16

Salut. vreau si eu un plugin, numele playerului care scrie pe y sa fie de culoare rosu T/albastru CT/gri SPEC si culoarea mesajului sa fie alb.
(ex. Image )
Thanks :*
Rapidserver
User avatar
aNNNdReY
Membru, skill +1
Membru, skill +1
Posts: 410
Joined: 07 Sep 2012, 23:45
Detinator Steam: Da
SteamID: ravyvevo
Has thanked: 65 times
Been thanked: 18 times

14 Dec 2013, 15:20

con_color "255+255+255" in server.cfg
User avatar
GhosT ***
Membru, skill +2
Membru, skill +2
Posts: 604
Joined: 04 Dec 2013, 21:52
Detinator Steam: Da
CS Status: Morphin . [ Retras ]
SteamID: Mutulica1428
Reputatie: Fost Moderator ajutator
Location: Dumesti.
Has thanked: 40 times
Been thanked: 99 times
Contact:

14 Dec 2013, 15:20

Ti-l dau in jumatate de ora , revin cu EDIT.
Myhe
Membru, skill 0
Membru, skill 0
Posts: 16
Joined: 25 Oct 2013, 08:13
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Contact:

14 Dec 2013, 15:22

aNNNdReY wrote:con_color "255+255+255" in server.cfg
Pai nu inteleg unde sa pun.
Myhe
Membru, skill 0
Membru, skill 0
Posts: 16
Joined: 25 Oct 2013, 08:13
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Contact:

14 Dec 2013, 15:23

GhosT *** wrote:Ti-l dau in jumatate de ora , revin cu EDIT.
Te astept ;)
User avatar
aNNNdReY
Membru, skill +1
Membru, skill +1
Posts: 410
Joined: 07 Sep 2012, 23:45
Detinator Steam: Da
SteamID: ravyvevo
Has thanked: 65 times
Been thanked: 18 times

14 Dec 2013, 15:25

Pui

Code: Select all

con_color "255+255+255"
in server.cfg
User avatar
GhosT ***
Membru, skill +2
Membru, skill +2
Posts: 604
Joined: 04 Dec 2013, 21:52
Detinator Steam: Da
CS Status: Morphin . [ Retras ]
SteamID: Mutulica1428
Reputatie: Fost Moderator ajutator
Location: Dumesti.
Has thanked: 40 times
Been thanked: 99 times
Contact:

14 Dec 2013, 15:48

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

#define ADMIN ADMIN_KICK	// Custom admin level

new gMaxPlayers
new gMsgSayText
new gTeams[3][] = 
	{
		"Spectator",
		"Terrorist",
		"Counter-Terrorist"
	}

public plugin_init()
{
	register_plugin("Green Admin Chat", "1.1", "Arion")
	register_clcmd("say", "handle_say")
	register_clcmd("say_team", "handle_teamsay")
	
	gMaxPlayers = get_maxplayers()
	gMsgSayText = get_user_msgid("SayText")
}

public handle_say(id)
{
	new message[192]
	read_args(message, 191)
	remove_quotes(message)
	if(!valid_message(message)) // Checks if message starts with / or @ or @@ or @@@
		{
			return PLUGIN_CONTINUE
		}
	
	new name[32]
	get_user_name(id, name, 31)
	
	new alive = is_user_alive(id)

	new userFlags = get_user_flags(id)
	
	if((userFlags & ADMIN) && alive) format(message, 191, "^x03%s ^x01: %s", name, message)  			 // Live admin
	else if((userFlags & ADMIN) && !alive) format(message, 191, "^x01*DEAD*^x04%s ^x01: %s", name, message)	 // Dead admin
	else if((!(userFlags & ADMIN)) && alive) format(message, 191, "^x03%s ^x01:  %s", name, message) 			 // Live normal player
	else format(message, 191, "^x01*DEAD*^x03%s ^x01:  %s", name, message)						 // Dead normal player
	
	for(new i = 1; i <= gMaxPlayers; i++)
		{
			if(!is_user_connected(i))
				continue
		
			if(alive && is_user_alive(i) || !alive && !is_user_alive(i)) // Prints the message
				{
					message_begin(MSG_ONE, gMsgSayText, {0, 0, 0}, i)
					write_byte(id)
					write_string(message)
					message_end()
				}
		}
	return PLUGIN_HANDLED
}

public handle_teamsay(id)
{
	new message[192]
	read_args(message, 191)
	remove_quotes(message)
	if(!valid_message(message))
		{
			return PLUGIN_CONTINUE
		}
		
	new name[32]
	get_user_name(id, name, 31)
	
	new alive = is_user_alive(id)
	
	new team = get_user_team(id)
	
	new userFlags = get_user_flags(id)
	
	if((userFlags & ADMIN) && alive) format(message, 191, "^x01(%s)^x04 %s^x01 : %s", gTeams[team], name, message)
	else if((userFlags & ADMIN) && !alive) format(message, 191, "^x01*DEAD*(%s)^x04 %s^x01 : %s", gTeams[team], name, message)
	else if((!(userFlags & ADMIN)) && alive) format(message, 191, "^x01(%s)^x03 %s^x01 : %s", gTeams[team], name, message)
	else format(message, 191, "^x01*DEAD*(%s)^x03 %s^x01 :  %s", gTeams[team], name, message)
	
	for(new i = 1; i <= gMaxPlayers; i++)
		{
			if(!is_user_connected(i))
				continue
		
			if(get_user_team(i) != team)
				continue
		
			if(alive && is_user_alive(i) || !alive && !is_user_alive(i))
				{
					message_begin(MSG_ONE, gMsgSayText, {0, 0, 0}, i)
					write_byte(id)
					write_string(message)
					message_end()
				}
		}
	return PLUGIN_HANDLED
}

bool:valid_message(const message[])  // Returns False case message starts with / or @ or @@ or @@@, otherwise, returns True
{
	if(message[0] == '/'
	|| message[0] == '@'
	|| message[0] == '@' && message[1] == '@'
	|| message[0] == '@' && message[1] == '@' && message[2] == '@'
	|| !strlen(message))
		{
			return false
		}
	
	return true
}
E green admin chat editat de mine sa arate cam asa :

Playeri : George :[/color] Si mesaju cu culoare normala
Admini George :[/color] Si mesaju cu culoare normala
Myhe
Membru, skill 0
Membru, skill 0
Posts: 16
Joined: 25 Oct 2013, 08:13
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Contact:

14 Dec 2013, 15:55

GhosT *** wrote:
| Afiseaza codul
#include <amxmodx>
#include <amxmisc>

#define ADMIN ADMIN_KICK	// Custom admin level

new gMaxPlayers
new gMsgSayText
new gTeams[3][] = 
	{
		"Spectator",
		"Terrorist",
		"Counter-Terrorist"
	}

public plugin_init()
{
	register_plugin("Green Admin Chat", "1.1", "Arion")
	register_clcmd("say", "handle_say")
	register_clcmd("say_team", "handle_teamsay")
	
	gMaxPlayers = get_maxplayers()
	gMsgSayText = get_user_msgid("SayText")
}

public handle_say(id)
{
	new message[192]
	read_args(message, 191)
	remove_quotes(message)
	if(!valid_message(message)) // Checks if message starts with / or @ or @@ or @@@
		{
			return PLUGIN_CONTINUE
		}
	
	new name[32]
	get_user_name(id, name, 31)
	
	new alive = is_user_alive(id)

	new userFlags = get_user_flags(id)
	
	if((userFlags & ADMIN) && alive) format(message, 191, "^x03%s ^x01: %s", name, message)  			 // Live admin
	else if((userFlags & ADMIN) && !alive) format(message, 191, "^x01*DEAD*^x04%s ^x01: %s", name, message)	 // Dead admin
	else if((!(userFlags & ADMIN)) && alive) format(message, 191, "^x03%s ^x01:  %s", name, message) 			 // Live normal player
	else format(message, 191, "^x01*DEAD*^x03%s ^x01:  %s", name, message)						 // Dead normal player
	
	for(new i = 1; i <= gMaxPlayers; i++)
		{
			if(!is_user_connected(i))
				continue
		
			if(alive && is_user_alive(i) || !alive && !is_user_alive(i)) // Prints the message
				{
					message_begin(MSG_ONE, gMsgSayText, {0, 0, 0}, i)
					write_byte(id)
					write_string(message)
					message_end()
				}
		}
	return PLUGIN_HANDLED
}

public handle_teamsay(id)
{
	new message[192]
	read_args(message, 191)
	remove_quotes(message)
	if(!valid_message(message))
		{
			return PLUGIN_CONTINUE
		}
		
	new name[32]
	get_user_name(id, name, 31)
	
	new alive = is_user_alive(id)
	
	new team = get_user_team(id)
	
	new userFlags = get_user_flags(id)
	
	if((userFlags & ADMIN) && alive) format(message, 191, "^x01(%s)^x04 %s^x01 : %s", gTeams[team], name, message)
	else if((userFlags & ADMIN) && !alive) format(message, 191, "^x01*DEAD*(%s)^x04 %s^x01 : %s", gTeams[team], name, message)
	else if((!(userFlags & ADMIN)) && alive) format(message, 191, "^x01(%s)^x03 %s^x01 : %s", gTeams[team], name, message)
	else format(message, 191, "^x01*DEAD*(%s)^x03 %s^x01 :  %s", gTeams[team], name, message)
	
	for(new i = 1; i <= gMaxPlayers; i++)
		{
			if(!is_user_connected(i))
				continue
		
			if(get_user_team(i) != team)
				continue
		
			if(alive && is_user_alive(i) || !alive && !is_user_alive(i))
				{
					message_begin(MSG_ONE, gMsgSayText, {0, 0, 0}, i)
					write_byte(id)
					write_string(message)
					message_end()
				}
		}
	return PLUGIN_HANDLED
}

bool:valid_message(const message[])  // Returns False case message starts with / or @ or @@ or @@@, otherwise, returns True
{
	if(message[0] == '/'
	|| message[0] == '@'
	|| message[0] == '@' && message[1] == '@'
	|| message[0] == '@' && message[1] == '@' && message[2] == '@'
	|| !strlen(message))
		{
			return false
		}
	
	return true
}
E green admin chat editat de mine sa arate cam asa :

Playeri : George :[/color] Si mesaju cu culoare normala
Admini George :[/color] Si mesaju cu culoare normala


pai si unde il pun? si eu vreau ca admii sa nu scrie cu verde ci cu gri daca se poate.. si mesajul albu cum ti-am spus ms ;)
User avatar
Rony
Utilizator neserios (tepar)
Utilizator neserios (tepar)
Posts: 967
Joined: 11 Mar 2013, 11:43
Detinator Steam: Da
CS Status: CO-FOUNDER BETANO
Detinator server CS: CS1.6 , CS:GO
SteamID: 31r1
Reputatie: Membru Club eXtreamCS (1 luna)
Membru Club eXtreamCs (28 Feb)
Utilizator neserios (tepar)
Location: NAPOLI
Has thanked: 172 times
Been thanked: 66 times
Contact:

14 Dec 2013, 16:14

Myhe wrote:
GhosT *** wrote:
| Afiseaza codul
#include <amxmodx>
#include <amxmisc>

#define ADMIN ADMIN_KICK	// Custom admin level

new gMaxPlayers
new gMsgSayText
new gTeams[3][] = 
	{
		"Spectator",
		"Terrorist",
		"Counter-Terrorist"
	}

public plugin_init()
{
	register_plugin("Green Admin Chat", "1.1", "Arion")
	register_clcmd("say", "handle_say")
	register_clcmd("say_team", "handle_teamsay")
	
	gMaxPlayers = get_maxplayers()
	gMsgSayText = get_user_msgid("SayText")
}

public handle_say(id)
{
	new message[192]
	read_args(message, 191)
	remove_quotes(message)
	if(!valid_message(message)) // Checks if message starts with / or @ or @@ or @@@
		{
			return PLUGIN_CONTINUE
		}
	
	new name[32]
	get_user_name(id, name, 31)
	
	new alive = is_user_alive(id)

	new userFlags = get_user_flags(id)
	
	if((userFlags & ADMIN) && alive) format(message, 191, "^x03%s ^x01: %s", name, message)  			 // Live admin
	else if((userFlags & ADMIN) && !alive) format(message, 191, "^x01*DEAD*^x04%s ^x01: %s", name, message)	 // Dead admin
	else if((!(userFlags & ADMIN)) && alive) format(message, 191, "^x03%s ^x01:  %s", name, message) 			 // Live normal player
	else format(message, 191, "^x01*DEAD*^x03%s ^x01:  %s", name, message)						 // Dead normal player
	
	for(new i = 1; i <= gMaxPlayers; i++)
		{
			if(!is_user_connected(i))
				continue
		
			if(alive && is_user_alive(i) || !alive && !is_user_alive(i)) // Prints the message
				{
					message_begin(MSG_ONE, gMsgSayText, {0, 0, 0}, i)
					write_byte(id)
					write_string(message)
					message_end()
				}
		}
	return PLUGIN_HANDLED
}

public handle_teamsay(id)
{
	new message[192]
	read_args(message, 191)
	remove_quotes(message)
	if(!valid_message(message))
		{
			return PLUGIN_CONTINUE
		}
		
	new name[32]
	get_user_name(id, name, 31)
	
	new alive = is_user_alive(id)
	
	new team = get_user_team(id)
	
	new userFlags = get_user_flags(id)
	
	if((userFlags & ADMIN) && alive) format(message, 191, "^x01(%s)^x04 %s^x01 : %s", gTeams[team], name, message)
	else if((userFlags & ADMIN) && !alive) format(message, 191, "^x01*DEAD*(%s)^x04 %s^x01 : %s", gTeams[team], name, message)
	else if((!(userFlags & ADMIN)) && alive) format(message, 191, "^x01(%s)^x03 %s^x01 : %s", gTeams[team], name, message)
	else format(message, 191, "^x01*DEAD*(%s)^x03 %s^x01 :  %s", gTeams[team], name, message)
	
	for(new i = 1; i <= gMaxPlayers; i++)
		{
			if(!is_user_connected(i))
				continue
		
			if(get_user_team(i) != team)
				continue
		
			if(alive && is_user_alive(i) || !alive && !is_user_alive(i))
				{
					message_begin(MSG_ONE, gMsgSayText, {0, 0, 0}, i)
					write_byte(id)
					write_string(message)
					message_end()
				}
		}
	return PLUGIN_HANDLED
}

bool:valid_message(const message[])  // Returns False case message starts with / or @ or @@ or @@@, otherwise, returns True
{
	if(message[0] == '/'
	|| message[0] == '@'
	|| message[0] == '@' && message[1] == '@'
	|| message[0] == '@' && message[1] == '@' && message[2] == '@'
	|| !strlen(message))
		{
			return false
		}
	
	return true
}
E green admin chat editat de mine sa arate cam asa :

Playeri : George :[/color] Si mesaju cu culoare normala
Admini George :[/color] Si mesaju cu culoare normala


pai si unde il pun? si eu vreau ca admii sa nu scrie cu verde ci cu gri daca se poate.. si mesajul albu cum ti-am spus ms ;)

asta e default culorile..
OFF:de pe ce server ai luat screen?
Myhe
Membru, skill 0
Membru, skill 0
Posts: 16
Joined: 25 Oct 2013, 08:13
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Contact:

14 Dec 2013, 16:24

culorilea le-am laut dp respawn.indungi.ro spunemi unde pun codul pus de tine..
User avatar
C.Artur
Fost moderator
Fost moderator
Posts: 7386
Joined: 04 Oct 2013, 13:32
Detinator Steam: Da
Reputatie: Fost Super Moderator
Location: Cluj Napoca
Has thanked: 136 times
Been thanked: 99 times
Contact:

14 Dec 2013, 16:42

https://forums.alliedmods.net/showthread.php?t=63610

Iti explica acolo tot,citeste cu atentie mare.
Myhe
Membru, skill 0
Membru, skill 0
Posts: 16
Joined: 25 Oct 2013, 08:13
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Contact:

14 Dec 2013, 18:06

Ms puteti da TC
Post Reply

Return to “Cereri”

  • Information