AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   how to execute a forward (https://forums.alliedmods.net/showthread.php?t=243788)

Porta0123 07-09-2014 13:51

how to execute a forward
 
hi, i want to execute a forward called "neo_class_enabled" i want execute when player use amx_test

my first think was use "ExecuteForward" but i dont know how to execute it without the name of the file,
i have this forward in one .ini but i dont know how to execute it...

Black Rose 07-09-2014 14:06

Re: how to execute a forward
 
You can send the forward to all plugins using CreateMultiForward() to set up a forward and then execute it using ExecuteForward().

(Simple) Example:
Code:
#include <amxmodx> new hForward; public plugin_init() {     hForward = CreateMultiForward("neo_class_enabled", ET_IGNORE, FP_CELL);     register_clcmd("amx_test", "clcmdTest"); } public clcmdTest(id) {     new ret;     ExecuteForward(hForward, ret, id) }

Porta0123 07-10-2014 08:29

Re: how to execute a forward
 
Thanks :3


All times are GMT -4. The time now is 21:10.

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