|
发表于 2009-7-3 10:59:40
|
显示全部楼层
来自 中国–广东–广州
今天终于考完试了!!
这个你再测试一下!记住,什么情况都要测试!!- #include <amxmodx>
- #include <fakemeta>
- #include <hamsandwich>
- new check[33] = 0
- #define X_POS -1.0
- #define Y_POS 0.5
- #define HOLE_TIME 7.0
- public plugin_init()
- {
- register_plugin("block player","1.0","anzzy")
- RegisterHam(Ham_Spawn, "player", "Player_Spawn", 1)
- register_logevent("EventRoundStart", 2, "1=Round_Start")
- register_event("TextMsg", "eStart_Game", "a", "2=#Game_Commencing", "2=#Game_will_restart_in")
- }
- public EventRoundStart(id)
- {
- if(check[id] == 1)
- return PLUGIN_HANDLED
-
- set_pev(id, pev_flags, pev(id,pev_flags) | FL_FROZEN)
- set_hudmessage(255, 0, 0, X_POS, Y_POS, 1, 0.5, HOLE_TIME, 0.1, 0.1, -1)
- show_hudmessage(id, "you can't move!^nPlease waite for 7 Seconds!")
- set_task(7.0,"remove",id)
- return PLUGIN_CONTINUE
- }
- public Player_Spawn(id)
- {
- if(check[id]==1)
- return PLUGIN_HANDLED
-
- set_task(1.0,"checks",id)
- set_hudmessage(255, 0, 0, X_POS, Y_POS, 1, 0.5, HOLE_TIME, 0.1, 0.1, -1)
- show_hudmessage(id, "you can't move!^nPlease waite for 7 Seconds!")
- return PLUGIN_CONTINUE
- }
- public checks(id)
- {
- if(!is_user_alive(id))
- return PLUGIN_HANDLED
- set_pev(id, pev_flags, pev(id,pev_flags) | FL_FROZEN)
- set_task(6.0,"remove",id)
- return PLUGIN_CONTINUE
- }
- public remove(id)
- {
- new flags = pev(id,pev_flags)
- flags &= ~FL_FROZEN
- set_pev(id,pev_flags,flags)
- check[id] = 1
- }
- public client_putinserver(id)
- {
- if (is_user_alive(id))
- check[id] = 0
- }
- public client_disconnect(id)
- {
- remove_task(id)
- check[id] = 0
- }
- public eStart_Game(id)
- {
- check[id] = 0
- }
复制代码 |
|