9
9
| | Type | Description |
10
10
| ----------------------- | -------------- | --------------------------- |
11
11
| ** ` hook_name ` ** | ** ` string ` ** | event name |
12
- | ** ` protected ` function** | ** ` function ` ** | Functions to trigger unload |
12
+ | ** ` protected ` function** | ** ` function ` ** | Functions to trigger events |
13
13
14
14
``` lua
15
15
-- Source: https://rifk7.com/index.php?threads/events.294/
33
33
34
34
** ` hooks.add_lua_unload_callback(function) ` ** <mark style =" color :purple ;" >` :Void ` </mark >
35
35
36
- | | Type | Description |
37
- | -------------- | -------------- | --------------------------- |
38
- | ** ` function ` ** | ** ` function ` ** | Functions to trigger events |
36
+ | | Type | Description |
37
+ | -------------- | -------------- | ---------------------------------- |
38
+ | ** ` function ` ** | ** ` function ` ** | Functions to trigger unload script |
39
39
40
40
``` lua
41
41
// Example # 1
57
57
58
58
** ` hooks.add_menu_callback(menu_item_name, protected_function) ` ** <mark style =" color :purple ;" >` :Void ` </mark >
59
59
60
- | | Type | Description |
61
- | ------------------------ | -------------- | --------------------------- |
62
- | ** ` menu_item_name ` ** | ** ` String ` ** | Menu name |
63
- | ** ` protected_function ` ** | ** ` function ` ** | Functions to trigger unload |
60
+ | | Type | Description |
61
+ | ------------------------ | -------------- | ------------------------------- |
62
+ | ** ` menu_item_name ` ** | ** ` String ` ** | Menu name |
63
+ | ** ` protected_function ` ** | ** ` function ` ** | Functions to trigger menu value |
64
64
65
65
``` lua
66
66
local checkbox_item = menu .add_checkbox (" Example Checkbox" , false );
73
73
74
74
** ` hooks.add_delayed_callback(delay, protected_function) ` ** <mark style =" color :purple ;" >` :Void ` </mark >
75
75
76
- | | Type | Description |
77
- | ------------------------ | -------------- | --------------------------- |
78
- | ** ` delay ` ** | ** ` float ` ** | Delay time |
79
- | ** ` protected_function ` ** | ** ` function ` ** | Functions to trigger unload |
76
+ | | Type | Description |
77
+ | ------------------------ | -------------- | -------------------------- |
78
+ | ** ` delay ` ** | ** ` float ` ** | Delay time |
79
+ | ** ` protected_function ` ** | ** ` function ` ** | Functions to trigger delay |
80
80
81
81
``` lua
82
82
local num = 1
@@ -86,6 +86,27 @@ hooks.add_delayed_callback(10, function()
86
86
end )
87
87
```
88
88
89
+ ### add\_ voice\_ msg\_ callback  ;
90
+
91
+ ** ` hooks.add_voice_msg_callback(packet_id, protected_function) ` ** <mark style =" color :purple ;" >` :Void ` </mark >
92
+
93
+ | | Type | Description |
94
+ | ------------------------ | -------------- | -------------------------- |
95
+ | ** ` packet_id ` ** | ** ` int ` ** | packet id |
96
+ | ** ` protected_function ` ** | ** ` function ` ** | Functions to trigger event |
97
+
98
+ #### Function value:
99
+
100
+ | Name | Type |
101
+ | ------------------ | --------- |
102
+ | ** ` sender_index ` ** | ** ` int ` ** |
103
+ | ** ` value_1 ` ** | ** ` int ` ** |
104
+ | ** ` value_2 ` ** | ** ` int ` ** |
105
+ | ** ` value_3 ` ** | ** ` int ` ** |
106
+ | ** ` value_4 ` ** | ` int ` |
107
+
108
+
109
+
89
110
## game events:
90
111
91
112
{% embed url="https://wiki.alliedmods.net/Counter-Strike:_Global_Offensive_Events " %}
@@ -253,3 +274,14 @@ on ragebot multipoint setup
253
274
| hitbox | [ hitbox] ( enumerations/hitbox.md ) | |
254
275
| should\_ multipoint\_ hitbox | bool | |
255
276
| should\_ override | bool | |
277
+
278
+ ### on\_ dispatch\_ user\_ message
279
+
280
+ on\_ dispatch\_ user\_ message
281
+
282
+ 🔗 struct <mark style =" color :blue ;" >** ` dispatch_user_message ` ** </mark >
283
+
284
+ | | Type | Description |
285
+ | ------------- | -------- | ----------- |
286
+ | message\_ type | int | |
287
+ | message | bf\_ read | |
0 commit comments