eddiefish1
发表于 2005-1-19 19:25:24
老 Larnk 这么多人回了,你还不放上来? 我。。。。。。要。。。。。。。。
不要再收钱了,我那次按错键买了你那个捡钱的,现在可成了超级光蛋了! 不过穷还穷, 这捡钱的超好用,值!!!!!!!
leenh
发表于 2005-1-19 21:38:42
好!!!
要啊,有些朋友在开了all talk 的服务器里面被吵得要死
wzf828
发表于 2005-1-19 23:55:19
amxx已经有了
Post by larnk
就是在开alltalk或不开alltalk的服务器里面.
让死亡的Player可以相互Voice通话(不分队伍,只要挂了,警匪一家啦).但是活着的玩家听不到挂了的玩家的Voice.
如果需要的人够多的话,我就发出来。
解脱
发表于 2005-1-20 05:54:02
新东西总是要支持下的 :cool:
larnk
发表于 2005-1-20 08:23:30
规则如下:
1、活着的时候,队友可以相互听话。
2、牺牲后,可以听到所有人的对话,但牺牲的玩家说话,活着的玩家听不到(包括队友)
增加两个控制台命令:
amx_mute amx_unmute 后面跟人的名字,如果有人的麦太吵得话,我们可以mute他,那他就只能听不能说了。
代码很短,不发附件了,请自行编译。
#include <amxmodx>
#include <engine>
#include <cstrike>
#include <fun>
#include <amxmisc>
/*new g_teamsNames[] = {
"TERRORIST",
"CT"
}*/
/*Voice Comm Control
Control dead player can voice comm each other, but alive player can not hear them.
*/
public plugin_init(){
register_plugin("Voice Comm Control","0.0.1","Zhao")
register_event("ResetHUD", "eventResetHud", "be")
register_event("DeathMsg","eDeathMsg","a")
register_concmd("amx_mute","amx_mute_player",ADMIN_VOTE,"playername --Mute players Microphone")
register_concmd("amx_unmute","amx_mute_player",ADMIN_VOTE,"playername --Unmute player's Microphone")
set_task(15.0,"alltalkoff")
}
public alltalkoff(){
set_cvar_num("sv_alltalk",0)
}
public amx_mute_player(id,level,cid){
new playername
if (!cmd_access(id,level,cid,2))
return PLUGIN_HANDLED
//new argc = read_argc()
new cmdname
read_argv(0,cmdname,32)
read_argv(1,playername,32)
new player = cmd_target(id,playername,1)
if (!player) return PLUGIN_HANDLED
new imname,name2
get_user_name(player,imname,31)
get_user_name(id,name2,31)
if(equal(cmdname,"amx_mute")){
set_speak(player,SPEAK_MUTED)
console_print(id,"%s is Muted",imname)
log_amx("Mute:%s Muted %s microphone",name2,imname)
}
else{
set_speak(player,SPEAK_NORMAL)
console_print(id,"%s is Unmuted",imname)
log_amx("Mute:%s unmuted %s microphone",name2,imname)
}
return PLUGIN_HANDLED
}
public client_putinserver(id){
set_speak(id,SPEAK_LISTENALL)
}
public eventResetHud(id){
new clmsg
set_speak(id,SPEAK_NORMAL)
format(clmsg,512,"^x04[聊天控制]^x03现在语音通话被限制在队友之间")
message_begin(MSG_ONE, get_user_msgid("SayText"), {0,0,0}, id)
write_byte(id)
write_string(clmsg)
message_end()
}
public eDeathMsg(){
new victim=read_data(2)
new clmsg
set_speak(victim,SPEAK_LISTENALL)
remove_voice_from_alive(victim)
format(clmsg,512,"^x04[聊天控制]^x01牺牲了,可以听所有玩家语音通话,但活的队友听不到你的声音")
message_begin(MSG_ONE, get_user_msgid("SayText"), {0,0,0}, victim)
write_byte(victim)
write_string(clmsg)
message_end()
}
public remove_voice_from_alive(victim){
new players,playerscount
get_players(players,playerscount,"a")
for(new i=0;i<playerscount;i++){
set_client_listen(players,victim,0)
}
}
eddiefish1
发表于 2005-1-20 08:59:01
good job and thx!
金闪闪
发表于 2005-1-20 09:14:56
不错的插件。larnk总是带给我们惊喜。:43:
simulator
发表于 2005-1-20 09:23:23
不只惊喜,还有破产!
BoeZombie
发表于 2005-1-20 12:36:04
这次不是免费发了源码吗。
真是厉害......
larnk。考虑考虑 分组语音通讯吧!呵呵
人本自由
发表于 2005-1-20 15:00:16
楼上的酒你能阿,不发插件有病啊