Creating forwards
I need some info on this function.
Questions: 1. need info on the parameters 2. I want to create a forward that hooks to an event in a plugin (eg. DeathMsg) (example??) 3. According to question 3 (if possible) would it cost less resources? Code:
Code:
|
Code:
How to add on the killer: Code:
Regards, Orange Monkey |
I was planning to also do this in FM_PlayerPreThink in one plugin and use the forward in the other plugins. Would it cost more resources by doing this?
Code:
Info on the returns? When to use them and such. Code:
|
It should be fine, I actually register one in StartFrame and you know how fast that executes 8)
Those return types are what the plugins return. So temp should = one of those values, so you can decided to do a different action after the forward is executed. So I dunno for example you could be killing clients after your forward but if a plugin returns STOP then you'll ignore that section of the script that kills the client. I think thats how it works :? |
Thanks.
|
So if you registered you forward with ET_CONTINUE, you could make up a nice switch statement and get different returns to activate different actions :lol:
|
It should be noted that executing a forward with ExecuteForward() is just as fast as how a module would do it (it is the same function).
callfunc_ has the same speed, but it's a bit cruftier to use. |
| All times are GMT -4. The time now is 16:26. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.