new bool:round_zdt register_event("HLTV", "event_RoundStart", "a", "1=0", "2=0")
public event_RoundStart() { if (playersnum() >= 2) { round_zdt = true } else { round_zdt = false } }
if (!is_user_alive(id) || round_zdt) return FMRES_IGNORED;
下面是引用 fouury 於 2011-09-30 21:14 發表的 : 看了插件.其中當作條件判斷的值是在回合開始時判斷有多少人的..如果你這回合存在兩個人..數值就會判斷成有兩個人以上而開啟.但如果其中一人離開只剩一人時. 因為數值沒有更新為只剩一人接著關閉.也就不會彈出字幕了. 必須等到下局才會顯示........
public zp_round_started(gamemode, id) { if (playersnum() >= 2) { round_zdt = true } }
下面是引用 andyt0621 於 2011-10-01 11:13 發表的 : 這種插件..不是判斷is_user_conected(index)的人數就可以嗎..(我沒看到樓主那個插件
#include <amxmodx> #define PLUGIN "wait msg" #define VERSION "0.1" #define AUTHOR "AzR" public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) } public client_PostThink(id) { if (!is_user_alive(id)) return; if (playersnum() == 1) { client_print(id, print_center, "正在等待玩家加入...") } } stock playersnum() { new id, num num = 0 for (id = 1; id <= 32; id++) { if (is_user_connected(id)) { num++ } } return num; }
下面是引用 ~幻想戀空~ 於 2011-10-01 18:38 發表的 : 感謝以上回答者熱情幫助^^ 問題似乎已經解決了! 另外還有個小問題return; 跟return PLUGIN_CONTINUE有什麼不同的地方呢??
下面是引用 andyt0621 於 2011-10-01 19:02 發表的 : return; 跟return PLUGIN_CONTINUE在效果上應該沒什麼不同..應該就是停止讀取下面內容..(其實我沒有認真學這是什麼 )