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在效果上应该没什么不同..应该就是停止读取下面内容..(其实我没有认真学这是什么 )