|
发表于 2009-1-15 13:29:02
|
显示全部楼层
来自 中国–广东–韶关
- #define PLUGIN "Friends_slaylosers"
- #define VERSION "0.3.16"
- #define AUTHOR "iG_os"
- #include <amxmodx>
- #include <amxmisc>
- public End_terwin()
- {
- set_task(1.2,"Kill_losers",2) // 传送输的队伍 CT
- return PLUGIN_CONTINUE
- }
- public End_ctwin()
- {
- set_task(1.2,"Kill_losers",1) // 传送输的队伍 T
- return PLUGIN_CONTINUE
- }
- public Kill_losers(LoseTeam)
- {
-
- if(!get_cvar_num("mp_slaylosers"))
- return
- new name[32], team
- new numplayers = get_maxplayers()
- for
- (new i=1; i<=numplayers;i++){
- if
- (!is_user_connected(i))
- continue
- team = get_user_team(i)
- if
- ((team==LoseTeam) && (is_user_alive(i))){
- get_user_name(i,name,31)
- client_cmd(i, "spk ambience/mgun_burst2") //播放机枪声音
- set_hudmessage(49, 179, 113, -1.0, 0.25, 0, 0.01, 15.0, 0.01, 0.01, -1)
- show_hudmessage(0,"<处死任务失败者>")
- user_kill(i,1) //不扣分
- //user_kill(i,0) //失败者扣一分
- }
- }
- }
- public plugin_init()
- {
-
- register_plugin(PLUGIN,VERSION,AUTHOR)
- register_event("SendAudio","End_terwin","a","2&%!MRAD_terwin")
-
- register_event("SendAudio","End_ctwin","a","2&%!MRAD_ctwin")
-
-
- register_cvar("mp_slaylosers","1",FCVAR_SERVER)
- }
复制代码
改了下 但是有警告,不知道什么原因:'( |
|