View Full Version : Custom plugin events
How in SM create own events for plugin? Source Engine plugins can do it, but i don't find it in SM.
P.S. Yes, i search for it, but don't find answer. Now try understand how to write extension.
why not just use forwards?
Need not only say what action was happen. Need to have the possibility to block event in another plugin. If you say how do it with forwards be nice. But i think that events be more easy because need only add native based on existing function.
KissLick
04-08-2015, 15:54
https://wiki.alliedmods.net/Function_Calling_API_%28SourceMod_Scripting%2 9
I'm not sure what you want, but callbacks will be able to stop the forward by returning Plugin_Stop if you create the forward with ET_Hook if that's what you mean, more info here (https://wiki.alliedmods.net/Function_Calling_API_%28SourceMod_Scripting%2 9#Forwards)
Ok, try to explain you what i want do.
I have some function in plugin: example: give specific grenade set.
I did function that fire my event. I name it Laucher.
I did Event hook in Postmode for it event that fire my function.
I can in another plugin hook this event in pre mode and block it or change data thet passed via event.
Then i want use my function i call the Launcher.
I think you should be able to do that if you create it with ET_Hook and pass arguments by reference
vBulletin® v3.8.7, Copyright ©2000-2024, vBulletin Solutions, Inc.