Cerere Plugin Admin 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
Whiskas.
Membru, skill 0
Membru, skill 0
Posts: 11
Joined: 23 Feb 2020, 11:33
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0

22 May 2020, 14:15

Plugin Cerut:admin chat color cs go remake
Descriere (adica ce face el mai exact):vreau ca admini sa scrie cu verde in chat ,pe server am modul cs go remake si daca pun un plugin de pe net imi dispar rankurile ,vreau sa ramana rankurile si sa scrie cu verde
Serverul impune conditii strict HLDS/REHLDS?:da
Ai cautat pluginul?(daca da, precizeaza cum):da admin chat color
Necesita mod special?:cs:go remake
Zonek
BiNECUVANTAT
Membru, skill 0
Membru, skill 0
Posts: 29
Joined: 04 Nov 2018, 16:40
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
Has thanked: 1 time
Contact:

23 May 2020, 12:20

Code: Select all

 /***********************************************************************************\
 *                                                                                   *
 *  Green Admin Chat                                                                 *
 *  by Arion                   http://forums.alliedmods.net/member.php?u=26333       *
 *                                                                                   *
 *  e-Mail/MSN: arionkrause@gmail.com                                                *
 *                                                                                   *
 *  Author:  X-olent           http://forums.alliedmods.net/member.php?u=25165       *
 *  Original request thread:   http://forums.alliedmods.net/showthread.php?t=57993   *
 *                                                                                   *
 *  Description:                                                                     *
 *  With this plugin, all admin "say" and "say_team" will be green.                  *
 *                                                                                   *
 *  Works with CS 1.6, don't know about other mods.                                  *
 *                                                                                   *
 *  No conflits with messages starting with / and @                                  *
 *                                                                                   *
 *                                                                                   *
 *   Changelog:                                                                      *
 *                                                                                   *
 *   v1.0 First release                                                              *
 *   v1.1 Added custom admin level                                                   *
 *                                                                                   *
 *                                                                                   *
 \***********************************************************************************/
 

#include <amxmodx>
#include <amxmisc>

#define ADMIN ADMIN_RESERVATION	// 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: ^x04 %s", name, message)  			 // Live admin
	else if((userFlags & ADMIN) && !alive) format(message, 191, "^x01*DEAD*^x03%s ^x01: ^x04 %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)^x03 %s^x01 : ^x04 %s", gTeams[team], name, message)
	else if((userFlags & ADMIN) && !alive) format(message, 191, "^x01*DEAD*(%s)^x03 %s^x01 : ^x04 %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
}
Asta este ce folosesc eu la mine pe server. L-am gasit in PC si mie imi merge cu tot cu taguri. Astept sa-mi zici daca e ok.
BB.ALPHACS.RO
Whiskas.
Membru, skill 0
Membru, skill 0
Posts: 11
Joined: 23 Feb 2020, 11:33
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0

23 May 2020, 13:59

nu merge.Imi dispar Rankurile
BiNECUVANTAT
Membru, skill 0
Membru, skill 0
Posts: 29
Joined: 04 Nov 2018, 16:40
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
Has thanked: 1 time
Contact:

24 May 2020, 16:15

Atunci modifica din sursa unde iti adauga in paranteze rankul cu acel cod de scris verde. (inainte de %s care este numele pune tu variabila cu rankul si ce mai e)
BB.ALPHACS.RO
Post Reply

Return to “Cereri”

  • Information