|
L 09/30/2009 - 17:41:30: [AMXX] Run time error 4 (plugin "amx_round7s.amxx") - debug not enabled!
L 09/30/2009 - 17:41:30: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).- #include <amxmodx>
- #include <fakemeta>
- #include <hamsandwich>
- new check[33] = 0
- #define X_POS -1.0
- #define Y_POS 0.4
- #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)
- client_print(id,print_center,"^x04[提示]^x03首局前7秒禁止移动")
- 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)
- client_print(id,print_center,"^x04[提示]^x03首局前7秒禁止移动")
- 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
- }
复制代码 |
|