回复: 希望Rulzy更新HLDS监视软件
RULZY斑竹.你的这个监视插件确实需要更新一下.我用了几天发现内存的占用越来越多.为了稳定服务器我特地增加了2G的内存,结果日子稍长内存还是不够用.请您百忙之中再辛苦一下.谢谢!回复: 希望Rulzy更新HLDS监视软件
我觉得加个定时重启和关闭功能比较好。有时候需要关闭重启一下HLSW,释放资源。
而且有时候凌晨基本没有玩家的时候,能够关闭掉服务器,白天自动开启。
回复: 希望Rulzy更新HLDS监视软件
定时开个关,系统里本身有这个功能的!回复: 希望Rulzy更新HLDS监视软件
继续顶上来,希望能感动RULZY大哥能抽时间更新一下,谢谢了
回复: 希望Rulzy更新HLDS监视软件
对啊,有时候服务器出错关掉重启之后,就自动选了全部CPU很不方便啊,这样影响其他服务器运行.能搞个重启自动绑选择单个或者多个CPU的话
就不用天天都进服务器检查一次CPU分配了...
回复: 希望Rulzy更新HLDS监视软件
唉!!!看样子斑竹已经没有余力在这个软件上耗费了,大家就将就着用吧.面包总会有的.回复: 希望Rulzy更新HLDS监视软件
Post by travelwink对啊,有时候服务器出错关掉重启之后,就自动选了全部CPU很不方便啊,
这样影响其他服务器运行.能搞个重启自动绑选择单个或者多个CPU的话
就不用天天都进服务器检查一次CPU分配了...
试试刚出炉的http://www.dt-club.net/forum/showthread.php?t=41142
回复: 希望Rulzy更新HLDS监视软件
rulzy 真的很忙,好多人求他帮写插件,软件的,我顺便也在这里求下rulzy大哥了。求求你了。。帮修改下teamtalk.amxx。谢谢!!1,rcon amx_teamtalk 0/1 (开关)
2,自定义死亡跟活人通话的时间,如:5秒,8秒,10秒,0秒(无限)。
3,自定义时间过后恢复CS默认的语音模式。
原因:因为死人经常废话多,影响了活人的比赛,还有指挥活人比赛,影响发挥。
回复: 希望Rulzy更新HLDS监视软件
Post by kcleerulzy 真的很忙,好多人求他帮写插件,软件的,我顺便也在这里求下rulzy大哥了。求求你了。。帮修改下teamtalk.amxx。谢谢!!
1,rcon amx_teamtalk 0/1 (开关)
2,自定义死亡跟活人通话的时间,如:5秒,8秒,10秒,0秒(无限)。
3,自定义时间过后恢复CS默认的语音模式。
原因:因为死人经常废话多,影响了活人的比赛,还有指挥活人比赛,影响发挥。
// Required admin access level
#define ADMIN_VOICE ADMIN_CHAT
// Delay before a connected player see the text announce
#define ANNOUNCE_TASK_DELAY 30.0
// Comment this out if you don't want that a "no sound" player can hear admins using +adminvoice
// All other player settings are respected whatever this is commented or not.
#define SUPER_ADMIN_PRIORITY
/* ** END OF EDITABLE ** */
/* Changelog
*
* v1.0.2 (04/19/08)
* -few code corrections
* -updated player spawn detection
* -added HLTV & BOT checks
*
* v1.0.1 (03/31/08)
* -added colored chat
* -added chat command /vm that display voices settings
* -inform new players about /vm command
* -display adminlisten status when toggle_adminlisten command is used
* -added support for amx_show_activity cvar on amx_(un)mute command
*
* v1.0.0 (03/26/08)
* First release
*
*/
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#define VERSION "1.0.2"
#define MAX_PLAYERS 32
#define OFFSET_TEAM 114
new g_iClientSettings
new bool:g_bPlayerNonSpawnEvent
new g_iFwFmClientCommandPost
new bool:g_bAlive
new g_iAdminVoice
new bool:g_bAdmin
new bool:g_bInterAdminVoice
new bool:g_bAdminListen
new bool:g_bMuted
new g_szClientsIp
new Array:g_aMutedPlayersIps
new g_iMaxPlayers
new g_msgidSayText
new g_pcvarAlivesHear, g_pcvarDeadsHear
new g_amx_show_activity
public plugin_init()
{
register_plugin("Voices Management", VERSION, "ConnorMcLeod")
register_dictionary("voicesmanagement.txt")
register_dictionary("common.txt")
g_pcvarAlivesHear = register_cvar("vm_alives", "1")// 0:alive teamates , 1:alives , 2:all
g_pcvarDeadsHear = register_cvar("vm_deads", "2") // 0:dead teamates , 1:deads , 2:all
register_forward(FM_Voice_SetClientListening, "Forward_SetClientListening")
register_event("VoiceMask", "Event_VoiceMask", "b")
register_event("TextMsg", "Event_TextMsg_Restart", "a", "2=#Game_will_restart_in")
register_event("ResetHUD", "Event_ResetHUD", "b")
register_event("DeathMsg", "Event_DeathMsg", "a")
register_clcmd("+adminvoice", "AdminCommand_VoiceOn")
register_clcmd("-adminvoice", "AdminCommand_VoiceOff")
register_clcmd("+interadminvoice", "AdminCommand_InterAdminOn")
register_clcmd("-interadminvoice", "AdminCommand_InterAdminOff")
register_clcmd("+adminlisten", "AdminCommand_ListenOn")
register_clcmd("-adminlisten", "AdminCommand_ListenOff")
register_clcmd("toggle_adminlisten", "AdminCommand_ListenToggle")
register_concmd("amx_mute", "AdminCommand_Mute", ADMIN_VOICE, "<name/#userid>")
register_concmd("amx_unmute", "AdminCommand_UnMute", ADMIN_VOICE, "<name/#userid>")
register_clcmd("say /vm", "ClientCommand_SayStatus")
register_clcmd("say_team /vm", "ClientCommand_SayStatus")
register_clcmd("fullupdate", "ClientCommand_fullupdate")
}
public plugin_cfg()
{
server_cmd("sv_alltalk 1;alias sv_alltalk")
server_exec()
g_iMaxPlayers = get_maxplayers()
g_aMutedPlayersIps = ArrayCreate(22)
g_msgidSayText = get_user_msgid("SayText")
g_amx_show_activity = get_cvar_pointer("amx_show_activity")
}
public ClientCommand_SayStatus(id)
{
new iDeads = get_pcvar_num(g_pcvarDeadsHear),
iAlives = get_pcvar_num(g_pcvarAlivesHear)
new szDeadsStatus, szAlivesStatus
switch( iAlives )
{
case 0:szAlivesStatus = "VM_ALIVES_TEAMATES"
case 1:szAlivesStatus = "VM_ALIVES"
case 2:szAlivesStatus = "VM_ALL"
}
switch( iDeads )
{
case 0:szDeadsStatus = "VM_DEADS_TEAMATES"
case 1:szDeadsStatus = "VM_DEADS"
case 2:szDeadsStatus = "VM_ALL"
}
col_mess(id, id, "%L", id, "VM_ALIVES_STATUS", id, szAlivesStatus)
col_mess(id, id, "%L", id, "VM_DEADS_STATUS", id, szDeadsStatus)
}
public taskAnnounce(id)
{
if( is_user_connected(id) )
{
col_mess(id, id, "%L", id, "VM_ANNOUCE")
}
}
public ClientCommand_fullupdate(id)
{
g_bPlayerNonSpawnEvent = true
static const szFwFmClientCommandPost[] = "fwFmClientCommandPost"
g_iFwFmClientCommandPost = register_forward(FM_ClientCommand, szFwFmClientCommandPost, 1)
return PLUGIN_CONTINUE
}
public fwFmClientCommandPost(iPlayerId) {
unregister_forward(FM_ClientCommand, g_iFwFmClientCommandPost, 1)
g_bPlayerNonSpawnEvent = false
return FMRES_HANDLED
}
public Event_TextMsg_Restart()
{
for(new id=1; id <= g_iMaxPlayers; ++id)
{
if(g_bAlive)
{
g_bPlayerNonSpawnEvent = true
}
}
}
public Event_ResetHUD(id)
{
if( !is_user_alive(id) )
{
return
}
if(g_bPlayerNonSpawnEvent)
{
g_bPlayerNonSpawnEvent = false
return
}
g_bAlive = true
}
public client_authorized(id)
{
g_bAdmin = bool:(get_user_flags(id) & ADMIN_VOICE)
}
public client_putinserver(id)
{
g_bAlive = false
g_bAdminListen = false
g_bInterAdminVoice = false
if(is_user_bot(id) || is_user_hltv(id))
return
static szIp
get_user_ip(id, szIp, 21)
g_szClientsIp = szIp
static szTempIp, iArraySize
iArraySize = ArraySize(g_aMutedPlayersIps)
for(new i; i<iArraySize; i++)
{
ArrayGetString(g_aMutedPlayersIps, i, szTempIp, 21)
if( equal(szIp, szTempIp) )
{
ArrayDeleteItem(g_aMutedPlayersIps, i)
g_bMuted = true
break
}
}
set_task(ANNOUNCE_TASK_DELAY, "taskAnnounce", id)
}
public client_disconnect(id)
{
if(g_iAdminVoice == id)
{
g_iAdminVoice = 0
}
if(g_bMuted)
{
ArrayPushString(g_aMutedPlayersIps, g_szClientsIp)
g_bMuted = false
}
}
public Event_DeathMsg()
{
g_bAlive = false
}
public Event_VoiceMask(id)
{
g_iClientSettings = read_data(1)
g_iClientSettings = read_data(2)
}
public Forward_SetClientListening(iReceiver, iSender, bool:bListen)
{
#if defined SUPER_ADMIN_PRIORITY
if(g_iAdminVoice)
{
if(g_iAdminVoice == iSender)
{
engfunc(EngFunc_SetClientListening, iReceiver, iSender, true)
forward_return(FMV_CELL, true)
return FMRES_SUPERCEDE
}
engfunc(EngFunc_SetClientListening, iReceiver, iSender, false)
forward_return(FMV_CELL, false)
return FMRES_SUPERCEDE
}
if( !g_iClientSettings || g_iClientSettings & (1<<(iSender-1)) )
{
return FMRES_IGNORED
}
#else
if( !g_iClientSettings || g_iClientSettings & (1<<(iSender-1)) )
{
return FMRES_IGNORED
}
if(g_iAdminVoice)
{
if(g_iAdminVoice == iSender)
{
engfunc(EngFunc_SetClientListening, iReceiver, iSender, true)
forward_return(FMV_CELL, true)
return FMRES_SUPERCEDE
}
engfunc(EngFunc_SetClientListening, iReceiver, iSender, false)
forward_return(FMV_CELL, false)
return FMRES_SUPERCEDE
}
#endif
if(g_bMuted)
{
engfunc(EngFunc_SetClientListening, iReceiver, iSender, false)
forward_return(FMV_CELL, false)
return FMRES_SUPERCEDE
}
if(g_bInterAdminVoice)
{
if(g_bAdmin)
{
engfunc(EngFunc_SetClientListening, iReceiver, iSender, true)
forward_return(FMV_CELL, true)
return FMRES_SUPERCEDE
}
engfunc(EngFunc_SetClientListening, iReceiver, iSender, false)
forward_return(FMV_CELL, false)
return FMRES_SUPERCEDE
}
if(g_bAdminListen)
{
engfunc(EngFunc_SetClientListening, iReceiver, iSender, true)
forward_return(FMV_CELL, true)
return FMRES_SUPERCEDE
}
if(g_bAlive)
{
switch(get_pcvar_num(g_pcvarAlivesHear))
{
case 0:
{
if( g_bAlive && get_pdata_int(iReceiver, OFFSET_TEAM) == get_pdata_int(iSender, OFFSET_TEAM) )
{
engfunc(EngFunc_SetClientListening, iReceiver, iSender, true)
forward_return(FMV_CELL, true)
return FMRES_SUPERCEDE
}
}
case 1:
{
if( g_bAlive )
{
engfunc(EngFunc_SetClientListening, iReceiver, iSender, true)
forward_return(FMV_CELL, true)
return FMRES_SUPERCEDE
}
}
case 2:
{
engfunc(EngFunc_SetClientListening, iReceiver, iSender, true)
forward_return(FMV_CELL, true)
return FMRES_SUPERCEDE
}
}
}
else
{
switch(get_pcvar_num(g_pcvarDeadsHear))
{
case 0:
{
if( !g_bAlive && get_pdata_int(iReceiver, OFFSET_TEAM) == get_pdata_int(iSender, OFFSET_TEAM) )
{
engfunc(EngFunc_SetClientListening, iReceiver, iSender, true)
forward_return(FMV_CELL, true)
return FMRES_SUPERCEDE
}
}
case 1:
{
if( !g_bAlive )
{
engfunc(EngFunc_SetClientListening, iReceiver, iSender, true)
forward_return(FMV_CELL, true)
return FMRES_SUPERCEDE
}
}
case 2:
{
engfunc(EngFunc_SetClientListening, iReceiver, iSender, true)
forward_return(FMV_CELL, true)
return FMRES_SUPERCEDE
}
}
}
engfunc(EngFunc_SetClientListening, iReceiver, iSender, false)
forward_return(FMV_CELL, false)
return FMRES_SUPERCEDE
}
public AdminCommand_ListenOn(id)
{
if( !g_bAdmin )
return PLUGIN_HANDLED
g_bAdminListen = true
return PLUGIN_HANDLED
}
public AdminCommand_ListenOff(id)
{
if( g_bAdminListen )
{
g_bAdminListen = false
}
return PLUGIN_HANDLED
}
public AdminCommand_ListenToggle(id)
{
if( !g_bAdmin )
{
return PLUGIN_HANDLED
}
g_bAdminListen = !g_bAdminListen
col_mess(id, id, "%L", id, "VM_LISTEN_STATUS", g_bAdminListen ? "ON" : "OFF")
return PLUGIN_HANDLED
}
public AdminCommand_VoiceOn(id)
{
if(!g_bAdmin)
{
return PLUGIN_HANDLED
}
if(g_iAdminVoice)
{
col_mess(id, id, "%L", id, "VM_ALREADY_INUSE")
return PLUGIN_HANDLED
}
g_iAdminVoice = id
new name
pev(id, pev_netname, name, 31)
for(new player = 1; player <= g_iMaxPlayers; player++)
{
if( is_user_connected(player) && !is_user_hltv(player) && !is_user_bot(player) )
{
col_mess(player, id, "%L", player, "VM_ADMIN_TALK", name)
}
}
client_cmd(id, "+voicerecord")
return PLUGIN_HANDLED
}
public AdminCommand_VoiceOff(id)
{
if( !g_bAdmin )
{
return PLUGIN_HANDLED
}
if(g_iAdminVoice != id)
{
client_cmd(id, "-voicerecord")
return PLUGIN_HANDLED
}
client_cmd(id, "-voicerecord")
g_iAdminVoice = 0
return PLUGIN_HANDLED
}
public AdminCommand_InterAdminOn(id)
{
if( !g_bAdmin )
{
return PLUGIN_HANDLED
}
g_bInterAdminVoice = true
client_cmd(id, "+voicerecord")
new name
get_user_name(id, name, 31)
for(new i=1; i<=g_iMaxPlayers; i++)
{
if( !g_bAdmin || !is_user_connected(i) )
{
continue
}
col_mess(i, id, "%L", i, "VM_INTER_START", name)
}
return PLUGIN_HANDLED
}
public AdminCommand_InterAdminOff(id)
{
if(!g_bInterAdminVoice)
return PLUGIN_HANDLED
g_bInterAdminVoice = false
client_cmd(id, "-voicerecord")
new name
get_user_name(id, name, 31)
for(new i=1; i<=g_iMaxPlayers; i++)
{
if( !g_bAdmin || !is_user_connected(i) )
{
continue
}
col_mess(i, id, "%L", i, "VM_INTER_STOP", name)
}
return PLUGIN_HANDLED
}
public AdminCommand_Mute(id, level, cid)
{
if( !cmd_access(id, level, cid, 2, true) )
{
return PLUGIN_HANDLED
}
new szPlayer
read_argv(1, szPlayer, 31)
new iPlayer = cmd_target(id, szPlayer, CMDTARGET_OBEY_IMMUNITY | CMDTARGET_NO_BOTS)
if( !iPlayer )
{
return PLUGIN_HANDLED
}
if( g_bAdmin )
{
client_print(id, print_console, "%L", id ? id : LANG_SERVER, "VM_MUTE_ADMIN")
return PLUGIN_HANDLED
}
if( g_bMuted )
{
client_print(id, print_console, "%L", id ? id : LANG_SERVER, "VM_AR_MUTED")
return PLUGIN_HANDLED
}
g_bMuted = true
client_print(id, print_console, "%L", id ? id : LANG_SERVER, "VM_MUTED")
if(g_amx_show_activity)
{
new name, name2
get_user_name(id, name, 31)
get_user_name(iPlayer, name2, 31)
show_activity_col(id, name, name2, "VM_MUTE_ACTIVITY")
}
return PLUGIN_HANDLED
}
public AdminCommand_UnMute(id, level, cid)
{
if( !cmd_access(id, level, cid, 2, true) )
{
return PLUGIN_HANDLED
}
new szPlayer, iPlayer
read_argv(1, szPlayer, 31)
iPlayer = cmd_target(id, szPlayer, CMDTARGET_OBEY_IMMUNITY | CMDTARGET_NO_BOTS)
if( !iPlayer )
{
return PLUGIN_HANDLED
}
if( !g_bMuted )
{
client_print(id, print_console, "%L", id ? id : LANG_SERVER, "VM_NOT_MUTED")
return PLUGIN_HANDLED
}
g_bMuted = false
client_print(id, print_console, "%L", id ? id : LANG_SERVER, "VM_UNMUTED")
if(g_amx_show_activity)
{
new name, name2
get_user_name(id, name, 31)
get_user_name(iPlayer, name2, 31)
show_activity_col(id, name, name2, "VM_UNMUTE_ACTIVITY")
}
return PLUGIN_HANDLED
}
col_mess(id, sender, string[], any:...)
{
static szMessage
szMessage = 0x01
vformat(szMessage, 127, string, 4)
replace_all(szMessage, 127, "!n", "^x01")
replace_all(szMessage, 127, "!t", "^x03")
replace_all(szMessage, 127, "!g", "^x04")
message_begin(MSG_ONE_UNRELIABLE, g_msgidSayText, _, id)
write_byte(sender)
write_string(szMessage)
message_end()
}
show_activity_col(id, name[], name2[], ML_KEY[])
{
switch(get_pcvar_num(g_amx_show_activity))
{
case 5: // hide name only to admins, show nothing to normal users
{
for (new i=1; i<=g_iMaxPlayers; i++)
{
if (is_user_connected(i) && !is_user_bot(i) && !is_user_hltv(i))
{
if (is_user_admin(i))
{
col_mess(i, id, " ** !g !n%L: %L", i, "ADMIN", i, ML_KEY, name2)
}
}
}
}
case 4: // show name only to admins, show nothing to normal users
{
for (new i=1; i<=g_iMaxPlayers; i++)
{
if (is_user_connected(i) && !is_user_bot(i) && !is_user_hltv(i))
{
if (is_user_admin(i))
{
col_mess(i, id, " ** !g !n%L !t%s!n: %L", i, "ADMIN", name, i, ML_KEY, name2)
}
}
}
}
case 3: // show name only to admins, hide name from normal users
{
for (new i=1; i<=g_iMaxPlayers; i++)
{
if (is_user_connected(i) && !is_user_bot(i) && !is_user_hltv(i))
{
if (is_user_admin(i))
{
col_mess(i, id, " ** !g !n%L !t%s!n: %L", i, "ADMIN", name, i, ML_KEY, name2)
}
else
{
col_mess(i, id, " ** !g !n%L: %L", i, "ADMIN", i, ML_KEY, name2)
}
}
}
}
case 2: // show name to all
{
for (new i=1; i<=g_iMaxPlayers; i++)
{
if (is_user_connected(i) && !is_user_bot(i) && !is_user_hltv(i))
{
col_mess(i, id, " ** !g !n%L !t%s!n: %L", i, "ADMIN", name, i, ML_KEY, name2)
}
}
}
case 1: // hide name to all
{
for (new i=1; i<=g_iMaxPlayers; i++)
{
if (is_user_connected(i) && !is_user_bot(i) && !is_user_hltv(i))
{
col_mess(i, id, " ** !g !n%L: %L", i, "ADMIN", i, ML_KEY, name2)
}
}
}
}
}
回复: 希望Rulzy更新HLDS监视软件
g_pcvarAlivesHear = register_cvar("vm_alives", "1")// 0:alive teamates , 1:alives , 2:allg_pcvarDeadsHear = register_cvar("vm_deads", "2") // 0:dead teamates , 1:deads , 2:all
vm_alives 1
vm_deads2
设置成这样就是活人只能听到活人说话,死人能听到所有人说话!