1- #define PLUGIN_VERSION " 1.2 "
1+ #define PLUGIN_VERSION " 1.3 "
22
33#pragma semicolon 1
44#pragma newdecls required
@@ -74,6 +74,10 @@ public void OnPluginStart()
7474#endif
7575}
7676
77+ #if debug
78+ static Handle g_hDebugTimer [MAXPLAYERS +1 ];
79+ #endif
80+
7781public void OnMapEnd ()
7882{
7983 for (int i = 0 ; i <= MAXPLAYERS ; i ++ )
@@ -500,7 +504,7 @@ void EF_ToogleEvents(bool bHook)
500504 HookEvent (" heal_success" , EF_ev_HealSuccess );
501505 HookEvent (" revive_success" , EF_ev_HealSuccess );
502506 HookEvent (" player_incapacitated" , EF_ev_HealSuccess );
503-
507+
504508 bIsHooked = true ;
505509 }
506510 else if (bIsHooked && ! bHook ){
@@ -511,7 +515,7 @@ void EF_ToogleEvents(bool bHook)
511515 UnhookEvent (" heal_success" , EF_ev_HealSuccess );
512516 UnhookEvent (" revive_success" , EF_ev_HealSuccess );
513517 UnhookEvent (" player_incapacitated" , EF_ev_HealSuccess );
514-
518+
515519 bIsHooked = false ;
516520 }
517521}
@@ -527,7 +531,7 @@ bool IsValidClient(int client)
527531 +==========================================+
528532*/
529533#if debug
530- static bool g_bDebugEnabled [MAXPLAYERS +1 ], Handle g_hDebugTimer [ MAXPLAYERS + 1 ] ;
534+ static bool g_bDebugEnabled [MAXPLAYERS +1 ];
531535
532536Action CmdDebug (int client , int args )
533537{
@@ -549,6 +553,7 @@ Action CmdDebug(int client, int args)
549553Action EF_t_LoadDebug (Handle timer , int client )
550554{
551555 g_hDebugTimer [client ] = CreateTimer (0.1 , EF_t_DebugMe , client , TIMER_REPEAT | TIMER_FLAG_NO_MAPCHANGE );
556+ return Plugin_Handled ;
552557}
553558
554559Action EF_t_DebugMe (Handle timer , int client )
@@ -580,6 +585,8 @@ Action EF_t_DebugMe(Handle timer, int client)
580585 }
581586 else
582587 DisableDebug (client );
588+
589+ return Plugin_Continue ;
583590}
584591
585592void DisableDebug (int client )
0 commit comments