|
发表于 2009-4-30 12:19:38
|
显示全部楼层
来自 中国–上海–上海–浦东新区
本帖最后由 BliaNe 于 2009-4-30 15:19 编辑
问题1: roundmsg
不能使用 换行符
^n \n 都不行!!
解决办法:
找到- public show_hint(id)
- {
- set_hudmessage(255, 255, 255, -1.0, 0.4, 0, 0.0, 2.5,_,_,1)
- show_hudmessage(id, g_HintMsg)
- set_hudmessage(128, 64, 0, -1.0, 0.63, 0, 0.0, 2.5,0.0,0.0,4)
- show_hudmessage(id, g_RoundMsg[g_RestRoundCounter-1][255])
- }
复制代码 替换为- public show_hint(id)
- {
- set_hudmessage(255, 255, 255, -1.0, 0.4, 0, 0.0, 2.5,_,_,1)
- show_hudmessage(id, g_HintMsg)
- while (replace(g_RoundMsg[g_RestRoundCounter-1][255], 255, "\n", "^n")) {}
- set_hudmessage(128, 64, 0, -1.0, 0.63, 0, 0.0, 2.5,0.0,0.0,4)
- show_hudmessage(id, g_RoundMsg[g_RestRoundCounter-1][255])
- }
复制代码 问题2: amx_clear_restwpns
不能清除 cfgcmd roundmsg
比如
amxmodx\configs\amxx.cfg 中设置
amx_add_restwpns "d" "1" "1" "sv_alltalk 0" "注意:刀战模式"
amxmodx\configs\maps\de_dust2.cfg 中设置
amx_clear_restwpns
amx_add_restwpns "d" "1" "1" "sv_alltalk 1" "注意:刀战模式"
这样设置的话 当地图换成 de_dust2 时 第一局客户端会显示
两个 "注意:刀战模式"
解决方法:
找到- public cmdClearRestrictWeapons(id, level, cid)
- {
- g_RestrictCount = 0
- for(new i=0;i<MAX_REST_ROUND_COUNT;i++)
- g_weaponflags[i] = FLAG_Z
- return PLUGIN_HANDLED
- }
复制代码 替换为- public cmdClearRestrictWeapons(id, level, cid)
- {
- g_RestrictCount = 0
- for(new i=0;i<MAX_REST_ROUND_COUNT;i++)
- {
- g_weaponflags[i] = FLAG_Z
- g_CfgCmd[i][511] = 0
- g_RoundMsg[i][255] = 0
- }
- return PLUGIN_HANDLED
- }
复制代码 |
|