|
发表于 2009-3-1 10:13:07
|
显示全部楼层
来自 中国–浙江–杭州
bs拿别人的东西改两个数字就拿来卖钱
我在用的
copy自alliedmods- #include <amxmodx>
- #include <amxmisc>
- new timer_count = 0
- new disc_pl_ip[32][16], disc_pl_count = 0
- public plugin_init() {
- register_plugin("Kick retry players","1.0","Niro")
- register_logevent("roundstart", 2, "0=World triggered", "1=Round_Start")
- return PLUGIN_CONTINUE
- }
- public roundstart() {
- timer_count = 1
- remove_task(9182)
- set_task(0.0, "timer",9182)
- }
- public timer(){
- if(timer_count<20)
- {
- set_task(1.0, "timer",9182)
- timer_count++
- }
- else
- {
- timer_count = 0
- disc_pl_count = 0
- }
- }
- public client_connect(id) {
- new ip[16]
- get_user_ip(id,ip,16,1)
- for(new i=0;i<disc_pl_count;i++)
- {
- if(equal(ip,disc_pl_ip[i]))
- server_cmd("kick #%d Please retry after 20 seconds of round start",get_user_userid(id))
- }
- return PLUGIN_CONTINUE
- }
- public client_disconnect(id) {
- if(timer_count>0)
- {
- new ip[16]
- get_user_ip(id,ip,16,1)
- disc_pl_ip[disc_pl_count] = ip
- disc_pl_count++
- }
- return PLUGIN_CONTINUE
- }
复制代码 |
|