funcenum EventHook { /** * Called when a game event is fired. * * @param event Handle to event. This could be INVALID_HANDLE if every plugin hooking * this event has set the hook mode EventHookMode_PostNoCopy. * @param name String containing the name of the event. * @param dontBroadcast True if event was not broadcast to clients, false otherwise. * @return Ignored for post hooks. Plugin_Handled will block event if hooked as pre. */ Action:public(Handle:event, const String:name[], bool:dontBroadcast), /** * Called when a game event is fired. * * @param event Handle to event. This could be INVALID_HANDLE if every plugin hooking * this event has set the hook mode EventHookMode_PostNoCopy. * @param name String containing the name of the event. * @param dontBroadcast True if event was not broadcast to clients, false otherwise. * @noreturn */ public(Handle:event, const String:name[], bool:dontBroadcast), };
typeset EventHook { // Called when a game event is fired. // // @param event Handle to event. This could be INVALID_HANDLE if every plugin hooking // this event has set the hook mode EventHookMode_PostNoCopy. // @param name String containing the name of the event. // @param dontBroadcast True if event was not broadcast to clients, false otherwise. // @return Ignored for post hooks. Plugin_Handled will block event if hooked as pre. /// function Action (Event event, const char[] name, bool dontBroadcast); // // Called when a game event is fired. // // @param event Handle to event. This could be INVALID_HANDLE if every plugin hooking // this event has set the hook mode EventHookMode_PostNoCopy. // @param name String containing the name of the event. // @param dontBroadcast True if event was not broadcast to clients, false otherwise. // @noreturn /// function void (Event event, const char[] name, bool dontBroadcast); };
And yeah, I see that it works if you keep "Handle", but then you can't do the new syntax "hEvent.GetEventInt" stuff, because it won't compile with "Handle"
Sometimes it's better to keep using handles. I base that "sometimes" off that dynamic arrays work properly all the way when you have them as handles but will bug in some methods when you use ArrayList.