AMXX-BG.INFO cs_ham_bots_api.inc Raw include

cs_ham_bots_api.inc

Original include source with line numbers.

Back Download .inc
1 #if defined _cs_ham_bots_api_included
2 #endinput
3 #endif
4 #define _cs_ham_bots_api_included
5
6 #if AMXX_VERSION_NUM >= 175
7 #pragma reqlib cs_ham_bots_api
8 #if !defined AMXMODX_NOAUTOLOAD
9 #pragma loadlib cs_ham_bots_api
10 #endif
11 #else
12 #pragma library cs_ham_bots_api
13 #endif
14
15 /**
16 * Hooks the virtual table for CZ Bots entity class.
17 * An example would be: RegisterHamBots(Ham_TakeDamage, "player_hurt");
18 * Look at the Ham enum for parameter lists.
19 *
20 * @param function The function to hook.
21 * @param callback The forward to call.
22 * @param post Whether or not to forward this in post.
23 * @return Returns a handle to the forward. Use EnableHamForwardBots/DisableHamForwardBots to toggle the forward on or off.
24 */
25 native RegisterHamBots(Ham:function, const Callback[], Post=0);
26
27 /**
28 * Stops a ham forward from triggering for CZ Bots.
29 * Use the return value from RegisterHamBots as the parameter here!
30 *
31 * @param fwd The forward to stop.
32 */
33 native DisableHamForwardBots(fwd);
34
35 /**
36 * Starts a ham forward back up for CZ Bots.
37 * Use the return value from RegisterHamBots as the parameter here!
38 *
39 * @param fwd The forward to re-enable.
40 */
41 native EnableHamForwardBots(fwd);
42
43
44 // This is the callback from the module. Do not modify this!
45 public HamHook:__RegisterHamBots(Ham:function, EntityId, const Callback[], Post)
46 return RegisterHamFromEntity(function, EntityId, Callback, Post);
47