Day of Defeat Plugins Community
This site is an archive — everything is readable and downloadable, nothing can be posted. Admin
Archive › Old Forum Threads › General › Requests for DoD Plugins › adminvoice question
21 posts, 5 people · 6,188 views Thread Rating: ★★★★★
closedadminvoice question
Started by Tony Almeida on 01-27-2007, 03:27 PM
Tony Almeida
started this thread
Posts: 57
Threads: 7
Joined: Jan 2007
01-27-2007, 03:27 PM #1

Hey all,rnrnI was wondering if you could help me out...rnrnI just installed adminvoice plugin on our server and it works very well, however I was wondering if there was a way to change the color of the admin's name that pops up. For example, someone in spec is yellow and someone in game is green and so on.rnrnIs there a way to set +adminvoice to a specific color in order to determine an admin talking in the admin area rather that in the regular chat?rnrnI've looked around to try and find this out, however have become unsuccessful.rnrnAny ideas?

diamond-optic
posted here
Posts: 2,068
Threads: 103
Joined: May 2005
01-27-2007, 09:26 PM #2

i would guess no..nnim not sure if anyone know how to access that stuff thru amxx (or if you even can)nnafter being involved with amxx for a couple years.. ive never seen anyone find a way to change that kind of stuff... nn:(

Tony Almeida
started this thread
Posts: 57
Threads: 7
Joined: Jan 2007
01-29-2007, 06:31 AM #3

That stinks. I would think that someone would have made a way to differentiate admins vs pubbers. rnrnThanks for your reply anyway. :(

Wilson [29th ID]
posted here
Posts: 623
Threads: 57
Joined: Oct 2005
01-30-2007, 04:24 AM #4

I can make it show up yellow, red, or green regardless of the team. But no other colours.rnrnCan also change the colour of the chat pretty easily.

Tony Almeida
started this thread
Posts: 57
Threads: 7
Joined: Jan 2007
01-30-2007, 07:04 AM #5

Well that would be freakin sweet Wilson. rnrnHow would I go about changing it to yellow?rnrnI've looked in the configs and couldn't find a way how.

Wilson [29th ID]
posted here
Posts: 623
Threads: 57
Joined: Oct 2005
01-30-2007, 07:30 AM #6

Oh now I remember. There's a few ways to alter the players team and the only one that affects the voice thing is the message "PTeam"rnrnBasically, send that message to the clients right before the player speaks and it puts him in the spectators spot on the scoreboard and changes his microphone colour. Then when he lets go of speaking, you'd send another PTeam that puts him back on his team.rnrnHere's the breakdown of PTeam if I remember correctly:rnPTeam - MSG_ALLrnArg 1 (byte) IDrnArg 2 (byte) TEAM (1-allies, 2-axis, 3-spectate)

Tony Almeida
started this thread
Posts: 57
Threads: 7
Joined: Jan 2007
01-30-2007, 11:57 AM #7

The fact that I just worked about 14 hours and am going to bed shortly is making me a little slow...nnI don't quite understand what you mean about sending the PTeam message to the client. This has to be done manually every time?nnMaybe I'll figure it out after a bit of sleep.

Tony Almeida
started this thread
Posts: 57
Threads: 7
Joined: Jan 2007
01-30-2007, 07:46 PM #8

I looked around the sma file and couldn't find anything to change.nnThis is where I originally found the plug-in if it helps.nnhttp://forums.alliedmods.net/showthread.php?t=49863nnBoth the amxx and sma files are there.

Tony Almeida
started this thread
Posts: 57
Threads: 7
Joined: Jan 2007
01-31-2007, 08:26 PM #9
;3862']Oh now I remember. There's a few ways to alter the players team and the only one that affects the voice thing is the message "PTeam"rnrnBasically, send that message to the clients right before the player speaks and it puts him in the spectators spot on the scoreboard and changes his microphone colour. Then when he lets go of speaking, you'd send another PTeam that puts him back on his team.rnrnHere's the breakdown of PTeam if I remember correctly:rnPTeam - MSG_ALLrnArg 1 (byte) IDrnArg 2 (byte) TEAM (1-allies, 2-axis, 3-spectate)
rnrnWilson can you please break this down to my level so I can change the config or whatever. I don't quite fully understand how to change it because I'm not familiar with PTeam and where to change that info.rnrnThanks man.

Tony Almeida
started this thread
Posts: 57
Threads: 7
Joined: Jan 2007
02-07-2007, 11:38 PM #10

This really irritating now....nnDoes anyone know of another plugin much like adminvoice, but you can differentiate between admins and everyone else??

WARDOG
posted here
Posts: 141
Threads: 14
Joined: Jan 2006
02-08-2007, 04:42 AM #11

Hey Wilson, I'm not a coder, but if you take a look at the stock adminchat.sma, all the colors are set up in there already for chat, you just have to add the color manually. rnrnWouldn't it be possible simply to edit this some how, or a stand alone pluggin, to recognise "admin flags", so when they press there talk button, and or submit chat, it will "automaticly" give them the "desired colored Name", and or "Typed message"?rnrnIt would probably be easier to do it here, or a stand alone, than through Tonys pluggin would it not?, because no matter what pluggin he uses, or any other pluggin that uses admin voice, chat, any admin that chats or talks will get a color.rnrnI think this is what he is requesting, and I wouldn't mind having it also, sounds like a nice addon to highlight admins. ;)

diamond-optic
posted here
Posts: 2,068
Threads: 103
Joined: May 2005
02-08-2007, 08:38 PM #12

...the colors in the adminchat plugin are for hud msgs not chat msgs

Wilson [29th ID]
posted here
Posts: 623
Threads: 57
Joined: Oct 2005
02-08-2007, 10:06 PM #13

And tony's talking about voice not text.rnrnTo make a user's microphone show up as "in spectators" (will also reflect on scoreboard)rn

rnmessage_begin( MSG_ALL, get_user_msgid( "PTeam" ) );rnwrite_byte( id );rnwrite_byte( 3 );rnmessage_end();rn
rnrnTo set it back to normalrn
rnmessage_begin( MSG_ALL, get_user_msgid( "PTeam" ) );rnwrite_byte( id );rnwrite_byte( get_user_team(id) );rnmessage_end();rn
rnrnUse that and toggle back and forth.

Tony Almeida
started this thread
Posts: 57
Threads: 7
Joined: Jan 2007
03-27-2007, 01:17 PM #14

Thanks Wilson, you were right after all. :)

Tony Almeida
started this thread
Posts: 57
Threads: 7
Joined: Jan 2007
07-13-2007, 02:19 PM #15

Hello sexy people...rnrnSo long story short, gameservers.com lost all of our server info and I pretty much had to start all over. I had some files backed up....but not all sadly.rnrnOne of the .sma files that I didn't have backed up was vocomadmin. Wilson was kind enough to show me how to make any admins talking show up in yellow as seen below...rnrn

;3954']rnrnTo make a user's microphone show up as "in spectators" (will also reflect on scoreboard)rn
rnmessage_begin( MSG_ALL, get_user_msgid( "PTeam" ) );rnwrite_byte( id );rnwrite_byte( 3 );rnmessage_end();rn
rnrnI've added this and re-compiled the .amxx file, however it doesn't seem to be working. I also want to remove the "[AMXX]: You are speaking to the admins.",name) crap....it just spams the text area.rnrnHere's the original vocomadmin.sma....rnrn
rn/*rn*rn*Plugin: VocomAdminrn*By: Nut (www.necrophix.com)rn*rn*rn*Description:rn*rn*This plugin allows admins (who have the required access level) to bind a key to +adminvoice and chat viarn*vocom to other admins, regular players (or admins who don't have the required listen level) can not hear the voice chat.rn*rn*This plugin is based off the idea by KCE (http://www.nsmod.org/forums/index.php?s=&showtopic=2172&view=findpost&p=23204)rn*and Zor (http://forums.alliedmods.net/showthread.php?t=2400).rn*rn*The modified code snipplet comes from watch (http://forums.alliedmods.net/showpost.php?p=371898&postcount=9) who's idea on rn*how to get around the set_client_listening() bug, made this plugin possibe.rn*rn*Version:rn*rn*v0.1 - v0.8 - Basic plugin functionality coded.rn*v0.9 - Added abilitiy to define what admin level you want for talk/listenrn*v1.0 - inital releasern*v1.1 - fixed non admins being able to see chatrn*v1.2 - fixed people being able to see "is talking to admin" by non admins.rn*v1.3 - fixed admin level problems by checking it once and storing it.rn*v1.4 - removed some unneeded things (dont develop 2 plugins at the same time lol) cleaned up codern*/rnrn#include <amxmodx>rn#include <amxmisc>rn#include <fakemeta>rnrn#define PLUGIN "VocomAdmin"rn#define VERSION "1.3"rn#define AUTHOR "Nut"rnrn//defines for speak flags, ADMIN helps tell speak apart easierrn#define SPEAK_MUTED	0rn#define SPEAK_NORMAL	1rn#define SPEAK_ALL	2rn#define SPEAK_ADMIN	5rnrn//what admin level is required?rn#define ADMIN_LEVEL ADMIN_BANrnrnnew g_playerspk[33]rnnew g_admin[33]rnnew players[32]rnnew pCountrnrnpublic plugin_init() {rn	register_plugin(PLUGIN, VERSION, AUTHOR)rn	register_cvar(PLUGIN, VERSION, FCVAR_SERVER)rn	register_forward(FM_Voice_SetClientListening, "fm_mute_forward")rn	register_clcmd("+adminvoice", "vocomStart")rn	register_clcmd("-adminvoice", "vocomStop")rn}rnrnpublic client_connect(id) {rn	set_speak(id,SPEAK_NORMAL)rn	g_admin[id] = 0				//just incase, but client_auth gets called after this anyway.rn}rnrn//this is called after client connect.  Caused problems with admin check because rn//AMXX doesnt authorize on client connect... hence this event.rnpublic client_authorized(id) {  rn	if (get_user_flags(id) & ADMIN_LEVEL) { rn		g_admin[id] = 1rn	}rn}rnrn//player has left, lets reset this info for the next playerrnpublic client_disconnect(id) {rn	if (g_admin[id]) {rn		set_speak(id,SPEAK_NORMAL)rn		g_admin[id] = 0rn	}rn}rnrnpublic fm_mute_forward(receiver, sender, listen) {rn	if (receiver == sender) return FMRES_IGNOREDrn	if (get_speak(sender) == SPEAK_ADMIN) {rn		rn		if (g_admin[receiver] == 1) {rn			engfunc(EngFunc_SetClientListening, receiver, sender, SPEAK_NORMAL)rn		}else{rn			engfunc(EngFunc_SetClientListening, receiver, sender, SPEAK_MUTED)rn		}rnrn		return FMRES_SUPERCEDErn	}rn	return FMRES_IGNOREDrn}rnrnpublic set_speak(id,listen) {rn	g_playerspk[id] = listenrn}rnrnpublic get_speak(id) {rn	return g_playerspk[id]rn}rnrnpublic vocomStart(id) {rn	if (!g_admin[id]) {rn		client_print(id,print_chat,"[AMXX]: You have no access to this command.")rn		return PLUGIN_HANDLEDrn	}rnrn	client_cmd(id,"+voicerecord")rn	set_speak(id,SPEAK_ADMIN)rn	new name[33]rn	get_user_name(id,name,32)rnrn	get_players(players, pCount, "c") rn	for (new i = 0; i < pCount; i++) {rn		if (g_admin[i]) {rn			if (i != id) {rn				client_print(i,print_chat,"[AMXX]: %s is speaking to the other admins.",name)rn			}rn		}	rn	}rn	rn	client_print(id,print_chat,"[AMXX]: You are speaking to the admins.",name)rn	return PLUGIN_HANDLEDrn}rnrnpublic vocomStop(id) {rn	if(is_user_connected(id)) { 			//people who are disconnected shouldn't get this far, but it might give a runtime errorrn		client_cmd(id,"-voicerecord")rn		if(get_speak(id) == SPEAK_ADMIN) {rn			set_speak(id,SPEAK_NORMAL)rn		}rn	}rn	return PLUGIN_HANDLEDrn}rn
rnrnCould someone (or Wilson) please help me out with this?rnrnThanks a bunch folks. :D

blobby
posted here
Posts: 421
Threads: 47
Joined: Apr 2007
07-13-2007, 07:56 PM #16

Lol you have alot of troubles at once tony m8 i can remember my server loosing all its files due to our hosts wow what fun trying to track everything down again now i store it all on cds just incase lol

Tony Almeida
started this thread
Posts: 57
Threads: 7
Joined: Jan 2007
07-16-2007, 07:17 AM #17

That's smart man......I'm doing that from now on.nngrrrr

diamond-optic
posted here
Posts: 2,068
Threads: 103
Joined: May 2005
07-16-2007, 09:50 AM #18

i thought it was common sense lol..nni have basically a mirror of my servers (both gameserver & webserver) on one of my local drives (well except all the default dod sounds/models)

Tony Almeida
started this thread
Posts: 57
Threads: 7
Joined: Jan 2007
07-16-2007, 07:23 PM #19

Yeah it is common sense....rofl....rnrnI'm special I guess. :D

Tony Almeida
started this thread
Posts: 57
Threads: 7
Joined: Jan 2007
07-17-2007, 07:51 PM #20

So can anyone fix the sma and let me know where to input the coding that Wilson posted above?rnrnI tried putting it in myself, but I kept getting errors when I was compiling it.

Tony Almeida
started this thread
Posts: 57
Threads: 7
Joined: Jan 2007
07-22-2007, 08:19 AM #21

Well I removed "[AMXX]: You are speaking to the admins.",name) easily, but still can't get the spec thing to work....grrrrr....

Archive › Old Forum Threads › General › Requests for DoD Plugins › adminvoice question
DoD Plugins Archive · Repository · Old Forum Threads · Maps · Admin · built 14 Sep 2026 00:34 UTC