Raised This Month: $ Target: $400
 0% 

help server_cmd


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
AdogeN
Senior Member
Join Date: Feb 2007
Old 08-31-2007 , 05:13   help server_cmd
Reply With Quote #1

I want .
client say /voiceon or /voiceoff .
voice on off. Themselves.
Code:
#include <amxmodx>
#include <amxmisc>
#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "AGN"
 
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say /voiceon", "action1")
register_clcmd("say /voiceoff", "action2") 
}
public action1(id) {
server_cmd("sv_voiceenable 1")
client_print(id,print_chat,"[server] Voice On") 
}
public action2(id) {
server_cmd("sv_voiceenable 0")
client_print(id,print_chat,"[server] Voice off") 
}
AdogeN is offline
vl@d
Senior Member
Join Date: Dec 2006
Location: Romania
Old 08-31-2007 , 07:30   Re: help server_cmd
Reply With Quote #2

dont understand.
You meen to have the players to turn that comand off and on when ever they wish?
__________________


I hate Spammers....
vl@d is offline
Drak
Veteran Member
Join Date: Jul 2005
Old 08-31-2007 , 08:35   Re: help server_cmd
Reply With Quote #3

When using server command like that, it will disable it for the whole server.
The CVar maybe client side to. So doing "client_cmd" might work.
__________________
Oh yeah
Drak is offline
Send a message via MSN to Drak
_Master_
Senior Member
Join Date: Dec 2006
Old 08-31-2007 , 11:17   Re: help server_cmd
Reply With Quote #4

NO.
sv_ cvars are active if running a server.
cl_ cvars are active client-side.

Search these forums to find out how you can enable/disable voicecom (other than std in-game mute menu)
_Master_ is offline
M249-M4A1
I <3 Mac
Join Date: May 2005
Location: Not interested
Old 08-31-2007 , 13:39   Re: help server_cmd
Reply With Quote #5

voice_enable works in client-side, it just disables your own voice communication (and you cant hear others too)
__________________

Last edited by M249-M4A1; 08-31-2007 at 13:50.
M249-M4A1 is offline
toazron1
Senior Member
Join Date: Oct 2006
Old 08-31-2007 , 15:50   Re: help server_cmd
Reply With Quote #6

Plus you need to restart the game if you try to turn it back on after you shut it off, for NS anyway.
__________________
toazron1 is offline
Send a message via AIM to toazron1
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 16:14.


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