AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   FM_PlayerPreThink (https://forums.alliedmods.net/showthread.php?t=27702)

WaZZeR++ 04-27-2006 09:27

FM_PlayerPreThink
 
Is it possible to register 2 foewards of the same type like this?
Dont have a test server at the moment....
EDIT: What does post do, can i gain some cpu with it?

Code:
new fmid[2] public plugin_init() {   fmid[0] = register_forward(FM_PlayerPreThink, "forward_playerprethink1")   fmid[1] = register_forward(FM_PlayerPreThink, "forward_playerprethink2") } public forward_playerprethink1(id) {   //something   return FMRES_IGNORED } public forward_playerprethink2(id) {   //something   return FMRES_IGNORED } public stop1() {   unregister_forward (FM_PlayerPreThink, fmid[0], 0) } public stop2() {   unregister_forward (FM_PlayerPreThink, fmid[1], 0) }

Twilight Suzuka 04-27-2006 10:40

Of course you can register two of the same...but why would you? Use a switching system or something.

Post does not gain CPU, it takes the same CPU as a pre, its just sent AFTER MM returns.


All times are GMT -4. The time now is 05:12.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.