@@ -29,11 +29,17 @@ bool forbidSelfRegister;
2929
3030ConVar g_hDisableAddons ;
3131
32+ GlobalForward g_hFWD_CasterRegistered ;
33+ GlobalForward g_hFWD_CasterUnregistered ;
34+
3235public APLRes AskPluginLoad2 (Handle myself , bool late , char [] error , int err_max )
3336{
3437 CreateNative (" IsClientCaster" , Native_IsClientCaster );
3538 CreateNative (" IsIDCaster" , Native_IsIDCaster );
3639
40+ g_hFWD_CasterRegistered = new GlobalForward (" OnCasterRegistered" , ET_Ignore , Param_Cell );
41+ g_hFWD_CasterUnregistered = new GlobalForward (" OnCasterUnregistered" , ET_Ignore , Param_Cell );
42+
3743 RegPluginLibrary (" caster_system" );
3844 return APLRes_Success ;
3945}
@@ -232,6 +238,10 @@ Action Cast_Cmd(int client, int args)
232238 casterTrie .SetValue (buffer , true );
233239 CPrintToChat (client , " %t " , " SelfCast1" );
234240 CPrintToChat (client , " %t " , " SelfCast2" );
241+
242+ Call_StartForward (g_hFWD_CasterRegistered );
243+ Call_PushCell (client );
244+ Call_Finish ();
235245 }
236246
237247 return Plugin_Handled ;
@@ -257,6 +267,10 @@ Action Caster_Cmd(int client, int args)
257267 ReplyToCommand (client , " \x01 %t " , " RegCasterReply" , target );
258268 CPrintToChat (target , " %t " , " RegCasterTarget" , client );
259269 CPrintToChat (target , " %t " , " SelfCast2" );
270+
271+ Call_StartForward (g_hFWD_CasterRegistered );
272+ Call_PushCell (target );
273+ Call_Finish ();
260274 }
261275 else
262276 {
@@ -279,6 +293,10 @@ Action NotCasting_Cmd(int client, int args)
279293 CPrintToChat (client , " %t " , " Reconnect1" );
280294 CPrintToChat (client , " %t " , " Reconnect2" );
281295
296+ Call_StartForward (g_hFWD_CasterUnregistered );
297+ Call_PushCell (client );
298+ Call_Finish ();
299+
282300 // Reconnection to disable their addons
283301 CreateTimer (3.0 , Reconnect , client );
284302 }
@@ -303,6 +321,10 @@ Action NotCasting_Cmd(int client, int args)
303321 {
304322 CPrintToChat (target , " %t " , " UnregCasterTarget" , client );
305323 NotCasting_Cmd (target , 0 );
324+
325+ Call_StartForward (g_hFWD_CasterUnregistered );
326+ Call_PushCell (target );
327+ Call_Finish ();
306328 }
307329 ReplyToCommand (client , " \x01 %t " , " UnregCasterSuccess" , target );
308330 }
0 commit comments