|
发表于 2008-9-2 16:36:20
|
显示全部楼层
来自 中国–广东–潮州
回复: 在插件里第五局开启某插件如何编写?麻烦帮忙一下..
[PHP]
#include <amxmodx>
#include <amxmisc>
#define PLUGIN_NAME "Ryu_"
#define PLUGIN_VERSION "0.1"
#define PLUGIN_AUTHOR "CZ*Ryu"
#define iACTIVE_ROUND 5 //激活插件的局数
new iRoundCount = 0
public plugin_init()
{
register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR)
register_event("TextMsg","e_TextMsg_ResetRound","a","2&#Game_C","2&#Game_will_restart")
register_event("HLTV", "e_HLTV_NewRound", "a", "1=0", "2=0")
}
public e_TextMsg_ResetRound()
iRoundCount = 0
public e_HLTV_NewRound()
{
iRoundCount++
if ( is_plugin_loaded("要控制的插件.amxx") == -1 )
return
if ( iRoundCount != iACTIVE_ROUND )
pause("ac", "要控制的插件.amxx")
else
unpause("ac", "要控制的插件.amxx")
}
[/PHP] |
|