eroare admin chat colors

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
User avatar
Fantasy1
Utilizator neserios (tepar)
Utilizator neserios (tepar)
Posts: 4843
Joined: 05 Jul 2012, 00:26
Detinator Steam: Da
Reputatie: Membru Club eXtreamCS (1 Mar)
Utilizator neserios (TEPAR!)
Has thanked: 278 times
Been thanked: 217 times
Contact:

25 Jul 2012, 10:33

Am o problema cu admin chat colors nu imi merge uitati aici pluginul.
amx.cfg:

Code: Select all

// AMX Mod X Configuration File
echo Executing AMX Mod X Configuration File

// Default access for all non admin players (see users.ini for access details)
//
// Default value: "z"
amx_default_access "z"

// Name of setinfo which should store a password on a client (you should change this)
// Note: Always prefix the field with an underscore (aka: "_")
// (Example: setinfo _pw "password")
//
// Default value: "_pw"
amx_password_field "_pw"

// Mode of logging to a server
// 0 - disable logging, players won't be checked (and access won't be set)
// 1 - normal mode which obey flags set in accounts
// 2 - kick all players not on list
//
// Default value: 1
amx_mode 1

// Show admins activity
// 0 - disabled
// 1 - show without admin name
// 2 - show with name
//
// Default value: 2
amx_show_activity 2

// Frequency in seconds and text of scrolling message

// Center typed colored messages (last parameter is a color in RRRGGGBBB format)

// Frequency in seconds of colored messages
//
// Default value: 180
amx_freq_imessage 180

// Ban times for the main ban menu (amx_banmenu)
// Use 0 for permanent ban
// Default values: 0 5 10 15 30 45 60
amx_plmenu_bantimes 0 5 10 15 30 45 60

// Slap damage amounts for the main slap menu (amx_slapmenu)
// Slay is automaticall inserted as the first option
// Default values: 0 1 5
amx_plmenu_slapdmg 0 1 5

// Set in seconds how fast players can chat (chat-flood protection)
//
// Default value: 0.75
amx_flood_time 0.75

// Amount of slots to reserve.
//
// Default value: 0
amx_reservation 0

// If you set this to 1, you can hide slots on your server.
// If server "full" of public slots and slots hidden, you must manually connect with connect console command
//
// Default value: 0
amx_hideslots 0

// Displaying of time remaining
// a - display white text on bottom
// b - use voice
// c - don't add "remaining" (only in voice)
// d - don't add "hours/minutes/seconds" (only in voice)
// e - show/speak if current time is less than this set in parameter
//
// Default value: "ab 1200" "ab 600" "ab 300" "ab 180" "ab 60" "bcde 11"
amx_time_display "ab 1200" "ab 600" "ab 300" "ab 180" "ab 60" "bcde 11"

// Announce "say thetime" and "say timeleft" with voice, set to 0 to disable.
//
// Default value: 1
amx_time_voice 1

// Minimum delay in seconds between two voting sessions
//
// Default value: 10
amx_vote_delay 10

// How long voting session goes on
//
// Default value: 10
amx_vote_time 10

// Display who votes for what option, set to 0 to disable, 1 to enable.
//
// Default value: 1
amx_vote_answers 1

// Some ratios for voting success

// Default value: 0.40
amx_votekick_ratio 0.40

// Default value: 0.40
amx_voteban_ratio 0.40

// Default value: 0.40
amx_votemap_ratio 0.40

// Default value: 0.02
amx_vote_ratio 0.02

// Max. time to which map can be extended
//
// Default value: 90
amx_extendmap_max 90

// Step for each extending
//
// Default value: 15
amx_extendmap_step 15

// If you set this to 0, clients cannot chose their language, instead they use
// whatever language the server is configured to use.
//
// Default value: 1
amx_client_languages 1

// Plugin Debug mode
// 0 - No debugging (garbage line numbers)
// 1 - Plugins with "debug" option in plugins.ini are put into debug mode
// 2 - All plugins are put in debug mode
// Note - debug mode will affect JIT performance
//
// Default value: 1
amx_debug 1

// Plugin MultiLingual Debug
// To debug a language put its 2 letter code between quotes ("en", "de", etc)
// "" means disabled
//
// Default value: ""
amx_mldebug ""

//
// Beginning of Counter-Strike package specific configurations.
//

// Rank mode
// 0 - by nick
// 1 - by authid 
// 2 - by ip
//
// Default value: 1
csstats_rank 0

// Max size of the stats file
//
// Default value: 3500
csstats_maxsize 3500

// Whether or not to rank bots with csstats - set to 1 to rank bots, 0 otherwise.
//
// Default value: 0
csstats_rankbots 0

// Duration of HUD-statistics
//
// Default value: 12.0
amx_statsx_duration 12.0

// HUD-statistics display limit relative round freeze end
// Negative time will clear the HUD-statstics before the round freeze time has ended
//
// Default value: -2.0
amx_statsx_freeze -2.0

bh_enabled 1
bh_autojump 1
bh_showusage 0
surf_olympics 1
bullet_damage 1
pingfake_enable 1
pingfake_ping 14
pingfake_flux 2
pingfake_target 1
pingfake_bots 1
pingfake_multiplier 0.0
pingfake_fileonly 0
sjp_cost 500
sjp_thrust 10
sjp_min_speed 400
sjp_max_speed 1200
mp_buytime 0
mp_timelimit 30
namereplacer_mode 1
namereplacer_list 1
rw_ss2_XXX_nokill 1
rw_ss2_XXX_time 15
[/b]ab 600

plugins:

Code: Select all

; AMX Mod X plugins

; Admin Base - Always one has to be activated
admin.amxx		; admin base (required for any admin-related)
;admin_sql.amxx		; admin base - SQL version (comment admin.amxx)

; Basic
admincmd.amxx		; basic admin console commands
adminhelp.amxx		; help command for admin console commands
adminslots.amxx		; slot reservation
multilingual.amxx	; Multi-Lingual management

; Menus
menufront.amxx		; front-end for admin menus
cmdmenu.amxx		; command menu (speech, settings)
plmenu.amxx		; players menu (kick, ban, client cmds.)
;telemenu.amxx		; teleport menu (Fun Module required!)
mapsmenu.amxx		; maps menu (vote, changelevel)
pluginmenu.amxx		; Menus for commands/cvars organized by plugin

; Chat / Messages
adminchat.amxx		; console chat commands
antiflood.amxx		; prevent clients from chat-flooding the server
scrollmsg.amxx		; displays a scrolling message
imessage.amxx		; displays information messages
adminvote.amxx		; vote commands

; Map related
nextmap.amxx		; displays next map in mapcycle
mapchooser.amxx		; allows to vote for next map
timeleft.amxx		; displays time left on map

; Configuration
pausecfg.amxx		; allows to pause and unpause some plugins
statscfg.amxx		; allows to manage stats plugins via menu and commands

; Counter-Strike
;restmenu.amxx		; restrict weapons menu
statsx.amxx		; stats on death or round end (CSX Module required!)
;miscstats.amxx		; bunch of events announcement for Counter-Strike
;stats_logging.amxx	; weapons stats logging (CSX Module required!)

; Enable to use AMX Mod plugins
;amxmod_compat.amxx	; AMX Mod backwards compatibility layer

; Custom - Add 3rd party plugins here
PSS-Live_pGuard.amxx
autobuy.amxx
surf_olympics.amxx
ad_manager.amxx
pingfaker.amxx
new_ss_mod.amxx
NoFallDemage.amxx
resetscore.amxx
advanced_gag.amxx
SayRestart.amxx
syn_surfjetpack.amxx
tfts_transfer.amxx
nick.amxx
who.amxx
bullet_damage.amxx
blind.amxx
connect_exec.amxx
bunnyhop.amxx
NameReplacer.amxx
kiss_fm.amxx
amx_pikav5.amxx
BugSurf.amxx
spawnprotection.amxx
surf_ski_2_ruleswatcher.amxx
amx_ip.amxx
fixautobuy.amxx
CLICK AICI pentru FORUM
- Un Forum Care Nu Poate Fi Spart -
- Un Forum Care Nu Modifica Topicurile Cu Tepari -
- Vrei Indexare In Google? Posteaza Tzeparii La Noi -

- Daca ai nevoie sa te ajut cu un addons/plugin etc se plateste, nu ajut cu nimic pe GRATIS -
krystann
Membru eXtream
Membru eXtream
Posts: 2552
Joined: 16 May 2009, 10:37
Detinator Steam: Nu
CS Status: Vine criza!
Reputatie: Fost moderator
Has thanked: 321 times
Been thanked: 141 times

25 Jul 2012, 10:38

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

#define PLUGIN 		"Admin Chat Colors"
#define VERSION 	"2.0"
#define AUTHOR 		"DeEjay LeonIda"

#define ACCESS_LEVEL	ADMIN_CHAT
#define ADMIN_LISTEN	ADMIN_BAN

new message[192]
new sayText
new teamInfo
new maxPlayers

new g_MessageColor
new g_NameColor
new g_AdminListen

new strName[191]
new strText[191]
new alive[11]

public plugin_init()
{
	register_plugin (PLUGIN, VERSION, AUTHOR)
	
	g_MessageColor = register_cvar ("amx_color", "2") // Message colors: [1] Default Yellow, [2] Green, [3] White, [4] Blue, [5] Red

	g_NameColor = register_cvar ("amx_namecolor", "6") // Name colors: [1] Default Yellow, [2] Green, [3] White, [4] Blue, [5] Red, [6] Team-color
	
	g_AdminListen = register_cvar ("amx_listen", "1") // Set whether admins see or not all messages (Alive, dead and team-only)
	
	
	sayText = get_user_msgid ("SayText")
	teamInfo = get_user_msgid ("TeamInfo")
	maxPlayers = get_maxplayers()
	
	
	register_message (sayText, "avoid_duplicated")
	
	register_clcmd ("amx_color", "set_color", ACCESS_LEVEL, "<color>")
	register_clcmd ("amx_namecolor", "set_name_color", ACCESS_LEVEL, "<color>")
	register_clcmd ("amx_listen", "set_listen", ACCESS_LEVEL, "<1 | 0>")
	
	register_clcmd ("say", "hook_say")
	register_clcmd ("say_team", "hook_teamsay")
}


public avoid_duplicated (msgId, msgDest, receiver)
{
	return PLUGIN_HANDLED
}


public hook_say(id)
{
	read_args (message, 191)
	remove_quotes (message)
	
	if (message[0] == '@' || message[0] == '/' || message[0] == '!' || equal (message, "")) // Ignores Admin Hud Messages, Admin Slash commands, 
											       // Gungame commands and empty messages
		return PLUGIN_CONTINUE

		
	new name[32]
	get_user_name (id, name, 31)
	
	new bool:admin = false
	
	if (get_user_flags(id) & ACCESS_LEVEL)
		admin = true
		
	
	new isAlive
	
	if (is_user_alive (id))
		{
			isAlive = 1
			alive = "^x01"
		}
	else
		{
			isAlive = 0
			alive = "^x01*DEAD* "
		}
	
	static color[10]
	

	
	if (admin)
		{
			// Name
			switch (get_pcvar_num (g_NameColor))
				{
					case 1:
						format (strName, 191, "%s%s", alive, name)

					case 2:
						format (strName, 191, "%s^x04%s", alive, name)
						
					case 3:
						{
							color = "SPECTATOR"
							format (strName, 191, "%s^x03%s", alive, name)
						}
						
					case 4:
						{
							color = "CT"
							format (strName, 191, "%s^x03%s", alive, name)
						}

					case 5:
						{
							color = "TERRORIST"
							format (strName, 191, "%s^x03%s", alive, name)
						}
					
					case 6:
						{
							get_user_team (id, color, 9)
								
							format (strName, 191, "%s^x03%s", alive, name)
						}
				}
			
			
			// Message
			switch (get_pcvar_num (g_MessageColor))
				{
					case 1:	// Yellow
						format (strText, 191, "%s", message)
						
					case 2:	// Green
						format (strText, 191, "^x04%s", message)
						
					case 3:	// White
						{
							copy (color, 9, "SPECTATOR")
							format (strText, 191, "^x03%s", message)
						}

					case 4:	// Blue
						{
							copy (color, 9, "CT")
							format (strText, 191, "^x03%s", message)
						}
						
					case 5:	// Red
						{
							copy (color, 9, "TERRORIST")
							format (strText, 191, "^x03%s", message)
						}
				}
		}
	
	else 	// Player is not admin. Team-color name : Yellow message
		{
			get_user_team (id, color, 9)
			
			format (strName, 191, "%s^x03%s", alive, name)
			
			format (strText, 191, "%s", message)
		}

	format (message, 191, "%s^x01 :  %s", strName, strText)
			
	sendMessage (color, isAlive)	// Sends the colored message
	
	return PLUGIN_CONTINUE
}


public hook_teamsay(id)
{
	new playerTeam = get_user_team(id)
	new playerTeamName[19]
	
	switch (playerTeam) // Team names which appear on team-only messages
		{
			case 1:
				copy (playerTeamName, 11, "Terrorists")
				
			case 2:
				copy (playerTeamName, 18, "Counter-Terrorists")
				
			default:
				copy (playerTeamName, 9, "Spectator")
		}
		
	read_args (message, 191)
	remove_quotes (message)
	
	if (message[0] == '@' || message[0] == '/' || message[0] == '!' || equal (message, "")) // Ignores Admin Hud Messages, Admin Slash commands, 
											       // Gungame commands and empty messages
		return PLUGIN_CONTINUE

		
	new name[32]
	get_user_name (id, name, 31)
	
	new bool:admin = false
	
	if (get_user_flags(id) & ACCESS_LEVEL)
		admin = true
		
	
	new isAlive
	
	if (is_user_alive (id))
		{
			isAlive = 1
			alive = "^x01"
		}
	else
		{
			isAlive = 0
			alive = "^x01*DEAD* "
		}
	
	static color[10]
	

	
	if (admin)
		{
			// Name
			switch (get_pcvar_num (g_NameColor))
				{
					case 1:
						format (strName, 191, "%s(%s) %s", alive, playerTeamName, name)

					case 2:
						format (strName, 191, "%s(%s) ^x04%s", alive, playerTeamName, name)
						
					case 3:
						{
							color = "SPECTATOR"
							format (strName, 191, "%s(%s) ^x03%s", alive, playerTeamName, name)
						}
						
					case 4:
						{
							color = "CT"
							format (strName, 191, "%s(%s) ^x03%s", alive, playerTeamName, name)
						}

					case 5:
						{
							color = "TERRORIST"
							format (strName, 191, "%s(%s) ^x03%s", alive, playerTeamName, name)
						}
					
					case 6:
						{
							get_user_team (id, color, 9)
								
							format (strName, 191, "%s(%s) ^x03%s", alive, playerTeamName, name)
						}
				}
			
			
			// Message
			switch (get_pcvar_num (g_MessageColor))
				{
					case 1:	// Yellow
						format (strText, 191, "%s", message)
						
					case 2:	// Green
						format (strText, 191, "^x04%s", message)
						
					case 3:	// White
						{
							copy (color, 9, "SPECTATOR")
							format (strText, 191, "^x03%s", message)
						}

					case 4:	// Blue
						{
							copy (color, 9, "CT")
							format (strText, 191, "^x03%s", message)
						}
						
					case 5:	// Red
						{
							copy (color, 9, "TERRORIST")
							format (strText, 191, "^x03%s", message)
						}
				}
		}
	
	else 	// Player is not admin. Team-color name : Yellow message
		{
			get_user_team (id, color, 9)
			
			format (strName, 191, "%s(%s) ^x03%s", alive, playerTeamName, name)
			
			format (strText, 191, "%s", message)
		}
	
	format (message, 191, "%s ^x01:  %s", strName, strText)
	
	sendTeamMessage (color, isAlive, playerTeam)	// Sends the colored message
	
	return PLUGIN_CONTINUE	
}


public set_color (id, level, cid)
{
	if (!cmd_access(id, level, cid, 2))
		return PLUGIN_HANDLED
		
	new arg[1], newColor
	read_argv (1, arg, 1)
	
	newColor = str_to_num (arg)
	
	if (newColor >= 1 && newColor <= 5)
		{
			set_cvar_num ("amx_color", newColor)
			set_pcvar_num (g_MessageColor, newColor)
	
			if (get_pcvar_num (g_NameColor) != 1 &&
			       ((newColor == 3 &&  get_pcvar_num (g_NameColor) != 3)
			     || (newColor == 4 &&  get_pcvar_num (g_NameColor) != 4)
			     || (newColor == 5 &&  get_pcvar_num (g_NameColor) != 5)))
				{
					set_cvar_num ("amx_namecolor", 2)
					set_pcvar_num (g_NameColor, 2)
				}
		}
		
	return PLUGIN_HANDLED
}


public set_name_color (id, level, cid)
{
	if (!cmd_access(id, level, cid, 2))
		return PLUGIN_HANDLED
		
	new arg[1], newColor
	read_argv (1, arg, 1)
	
	newColor = str_to_num (arg)
	
	if (newColor >= 1 && newColor <= 6)
		{
			set_cvar_num ("amx_namecolor", newColor)
			set_pcvar_num (g_NameColor, newColor)
			
			if ((get_pcvar_num (g_MessageColor) != 1
			    && ((newColor == 3 &&  get_pcvar_num (g_MessageColor) != 3)
			     || (newColor == 4 &&  get_pcvar_num (g_MessageColor) != 4)
			     || (newColor == 5 &&  get_pcvar_num (g_MessageColor) != 5)))
			     || get_pcvar_num (g_NameColor) == 6)
				{
					set_cvar_num ("amx_color", 2)
					set_pcvar_num (g_MessageColor, 2)
				}
		}
	
	return PLUGIN_HANDLED
}


public set_listen (id, level, cid)
{
	if (!cmd_access(id, level, cid, 2))
		return PLUGIN_HANDLED
		
	new arg[1], newListen
	read_argv(1, arg, 1)
	
	newListen = str_to_num (arg)
	
	set_cvar_num ("amx_listen", newListen)
	set_pcvar_num (g_AdminListen, newListen)
	
	return PLUGIN_HANDLED
}


public sendMessage (color[], alive)
{
	new teamName[10]
	
	for (new player = 1; player < maxPlayers; player++)
		{
			if (!is_user_connected(player))
				continue

			if (alive && is_user_alive(player) || !alive && !is_user_alive(player) || get_pcvar_num(g_AdminListen) && get_user_flags(player) & ADMIN_LISTEN)
				{
					get_user_team (player, teamName, 9)	// Stores user's team name to change back after sending the message
					
					changeTeamInfo (player, color)		// Changes user's team according to color choosen
					
					writeMessage (player, message)		// Writes the message on player's chat
					
					changeTeamInfo (player, teamName)	// Changes user's team back to original
				}
		}
}


public sendTeamMessage (color[], alive, playerTeam)
{
	new teamName[10]
	
	for (new player = 1; player < maxPlayers; player++)
		{
			if (!is_user_connected(player))
				continue

			if (get_user_team(player) == playerTeam || get_pcvar_num(g_AdminListen) && get_user_flags(player) & ADMIN_LISTEN)
				{
					if (alive && is_user_alive(player) || !alive && !is_user_alive(player) || get_pcvar_num(g_AdminListen) && get_user_flags(player) & ADMIN_LISTEN)
						{
							get_user_team (player, teamName, 9)	// Stores user's team name to change back after sending the message
							
							changeTeamInfo (player, color)		// Changes user's team according to color choosen
							
							writeMessage (player, message)		// Writes the message on player's chat
							
							changeTeamInfo (player, teamName)	// Changes user's team back to original
						}
				}
		}
}


public changeTeamInfo (player, team[])
{
	message_begin (MSG_ONE, teamInfo, _, player)	// Tells to to modify teamInfo (Which is responsable for which time player is)
	write_byte (player)				// Write byte needed
	write_string (team)				// Changes player's team
	message_end()					// Also Needed
}


public writeMessage (player, message[])
{
	message_begin (MSG_ONE, sayText, {0, 0, 0}, player)	// Tells to modify sayText (Which is responsable for writing colored messages)
	write_byte (player)					// Write byte needed
	write_string (message)					// Effectively write the message, finally, afterall
	message_end ()						// Needed as always
}
User avatar
tweky
Fost moderator
Fost moderator
Posts: 2632
Joined: 22 Jun 2009, 00:54
Detinator Steam: Da
CS Status: Inactiv
Detinator server CS: Da
SteamID: twekymihai
Reputatie: Fost eXtream Mod
Nume anterior: Mihaita
Fost Membru Club eXtreamCS
Location: Ilfov
Has thanked: 117 times
Been thanked: 166 times
Contact:

25 Jul 2012, 12:36

Admin Chat Colors
in amxx.cfg treci >

Code: Select all

amx_namecolor 6
amx_color 2
bafta.
User avatar
Fantasy1
Utilizator neserios (tepar)
Utilizator neserios (tepar)
Posts: 4843
Joined: 05 Jul 2012, 00:26
Detinator Steam: Da
Reputatie: Membru Club eXtreamCS (1 Mar)
Utilizator neserios (TEPAR!)
Has thanked: 278 times
Been thanked: 217 times
Contact:

25 Jul 2012, 13:46

degeaba am trecut si nu merge am scirs si cu listen 1 si cu listen 0 degeaba
CLICK AICI pentru FORUM
- Un Forum Care Nu Poate Fi Spart -
- Un Forum Care Nu Modifica Topicurile Cu Tepari -
- Vrei Indexare In Google? Posteaza Tzeparii La Noi -

- Daca ai nevoie sa te ajut cu un addons/plugin etc se plateste, nu ajut cu nimic pe GRATIS -
User avatar
K1d0x
Fost moderator
Fost moderator
Posts: 800
Joined: 26 Feb 2012, 15:57
Detinator Steam: Da
CS Status: We Build Together ;3 RedFear
Detinator server CS: PuB.RedFear.Ro
SteamID: k1dox
Reputatie: Fost moderator ajutator
Location: Reșița
Been thanked: 152 times
Contact:

25 Jul 2012, 15:51

Ti-am zis pe mess ca ai un plugin care intra in conflict cu admin_chat_colors (nu am cum sa imi dau seama care), incearca sa dezactivezi toate plugin-urile (inafara de cele default) si adauga admin_chat_colors.amxx ultimul in lista apoi o sa vezi care este problema.

Apoi iei pe rand plugin-urile si le activezi (poti face amx_pausecfg pause plugin)

PS: prima data intra in addons/amxmodx/configs/pausecfg.ini si verifica sa nu fie oprit plugin-ul admin_chat_colors.amxx
Image
32slots.net - Sursa ta de încredere de KIT-uri CS 1.6
RedFear.Ro România - | Afiseaza codul
Vă aştept cu un Register pe Forum
- Suntem în căutare de Dezvoltatori & Administratori :
HTML
PHP
MYSQL
C++
Ofer Server CS spre administrare | Afiseaza codul
Condiții : 
- Să dispui de timp liber
- Să ai cunoștințe AMXX & HLDS
Boostul este asigurat de către Mine (PM pentru. detalii)
ik1d0x@redfear.ro
Post Reply

Return to “Cereri”

  • Information
  • Who is online

    Users browsing this forum: Bing [Bot] and 22 guests