forked from gamesensical/docs
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathevents.json
233 lines (233 loc) · 10.9 KB
/
events.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
{
"events": {
"paint": {
"description": "Fired every time the game renders a frame while being connected to a server. Can be used to draw to the screen using the [renderer.*](/docs/developers/globals/renderer) functions",
"page_ref": "/developers/globals/renderer",
"examples": [
"```lua\nclient.set_event_callback(\"paint\", function()\n\trenderer.text(15, 15, 255, 255, 255, 255, nil, 0, \"hello world\")\nend)\n```"
]
},
"paint_ui": {
"description": "Fired every time the game renders a frame, even if you're in the menu. Can be used to draw to the screen using the [renderer.*](/docs/developers/globals/renderer) functions",
"page_ref": "/developers/globals/renderer"
},
"run_command": {
"description": "Fired every time the game runs a command (usually 64 times a second, equal to tickrate) while you're alive. This is the best event for processing data that only changes when the game receives an update from the server, like information about other players.",
"properties": [
{
"chokedcommands": "Amount of commands that the client has choked",
"command_number": "Current command number"
}
]
},
"setup_command": {
"description": "Fired every time the game prepares a move command that's sent to the server. This is ran before cheat features like antiaim and can be used to modify user input (view angles, pressed keys, movement) how it's seen by the cheat. For example, setting `in_use = 1` will disable antiaim the same way pressing use key ingame does. This is the preferred method of setting user input and should be used instead of `client.exec` whenever possible",
"properties": [
{
"chokedcommands": "Amount of commands that the client has choked",
"command_number": "Current command number",
"pitch": "Pitch view angle",
"yaw": "Yaw view angle",
"roll": "Roll view angle, forcing this value will currently affect your movement speed",
"forwardmove": "Forward / backward speed (-450 to 450)",
"sidemove": "Left / right speed (-450 to 450)",
"move_yaw": "Yaw angle that's used for movement. If not set, view yaw is used",
"allow_send_packet": "Set to false to make the cheat choke the current command (when possible)",
"force_defensive": "Set to true to force defensive double tap mode",
"quick_stop": "True if quick stop feature is activated by the cheat",
"no_choke": "Set to true to avoid unnecessary choking like fake lag. Some features, like antiaim, do not respect this field",
"in_attack": "IN_ATTACK Button",
"in_jump": "IN_JUMP Button",
"in_duck": "IN_DUCK Button",
"in_forward": "IN_FORWARD Button",
"in_back": "IN_BACK Button",
"in_use": "IN_USE Button",
"in_cancel": "IN_CANCEL Button",
"in_left": "IN_LEFT Button",
"in_right": "IN_RIGHT Button",
"in_moveleft": "IN_MOVELEFT Button",
"in_moveright": "IN_MOVERIGHT Button",
"in_attack2": "IN_ATTACK2 Button",
"in_run": "IN_RUN Button",
"in_reload": "IN_RELOAD Button",
"in_alt1": "IN_ALT1 Button",
"in_alt2": "IN_ALT2 Button",
"in_score": "IN_SCORE Button",
"in_speed": "IN_SPEED Button",
"in_walk": "IN_WALK Button",
"in_zoom": "IN_ZOOM Button",
"in_weapon1": "IN_WEAPON1 Button",
"in_weapon2": "IN_WEAPON2 Button",
"in_bullrush": "IN_BULLRUSH Button",
"in_grenade1": "IN_GRENADE1 Button",
"in_grenade2": "IN_GRENADE2 Button",
"in_attack3": "IN_ATTACK3 Button",
"weaponselect": "",
"weaponsubtype": ""
}
]
},
"override_view": {
"description": "Lets you override the camera position and angles",
"properties": [
{
"x": "Camera X position",
"y": "Camera Y position",
"z": "Camera Z position",
"pitch": "Pitch view angle",
"yaw": "Yaw view angle",
"fov": "Field of view"
}
]
},
"console_input": {
"description": "Fired every time the user types something in the game console and presses enter. Return true from the event handler to make the game not process the input",
"properties": [
"console input text"
],
"examples": [
"```lua\nclient.set_event_callback(\"console_input\", function(text)\n\tclient.log(\"entered: '\", text, \"'\")\nend)\n```"
]
},
"output": {
"description": "This event lets you override the text drawn in the top left. There can only be one callback for this event. This event callback is invoked from print, client.log, client.color_log, \"Missed due to spread\" message, etc.",
"properties": [
{
"text": "Drawn text",
"r": "Drawn color: Red 0-255",
"g": "Drawn color: Green 0-255",
"b": "Drawn color: Blue 0-255",
"a": "Alpha 0-255"
}
],
"hint": {
"style": "warning",
"text": "Make sure to unset your callback when you don't need it. Otherwise you will break the built-in output and other scripts using this event."
}
},
"indicator": {
"description": "This event lets you lets you override how indicators are drawn. There can only be one callback for this event. This event callback is invoked from renderer.indicator and indicators like \"DT\".",
"properties": [
{
"text": "Drawn text",
"r": "Drawn color: Red 0-255",
"g": "Drawn color: Green 0-255",
"b": "Drawn color: Blue 0-255",
"a": "Alpha 0-255"
}
],
"hint": {
"style": "warning",
"text": "Make sure to unset your callback when you don't need it. Otherwise you will break the built-in indicators and other scripts using this event."
}
},
"player_chat": {
"description": "Fired when a player sends a message to chat",
"properties": [
{
"teamonly": "true if the message was sent to team chat",
"entity": "Entity index of the player sending the message",
"name": "Name of the player sending the message",
"text": "Chat message text"
}
]
},
"string_cmd": {
"description": "Fired before a string command (chat messages, weapon inspecting, buy commands) is sent to the server.",
"properties": [
"string command"
]
},
"net_update_start": {
"description": "Fired before the game processes entity updates from the server. (`FrameStageNotify FRAME_NET_UPDATE_START`) Be careful when using this event to modify entity data, some things have to be restored manually as not even a full update will update them"
},
"net_update_end": {
"description": "Fired after an entity update packet is received from the server. (`FrameStageNotify FRAME_NET_UPDATE_END`)"
},
"predict_command": {
"description": "Fired when the game prediction is ran",
"properties": [
{
"command_number": "Command number of the predicted command"
}
],
"hint": {
"style": "info",
"text": "This event is called a lot of times per second, avoid doing any heavy processing in it."
}
},
"pre_render": {
"description": "Fired before a frame is rendered"
},
"post_render": {
"description": "Fired after a frame is rendered"
},
"aim_fire": {
"description": "Fired when the rage aimbot shoots at a player",
"properties": [
{
"id": "Shot ID, this can be used to find the corresponding aim_hit / aim_miss event",
"target": "Target player entindex",
"hit_chance": "Chance the shot will hit, depends on spread",
"hitgroup": "Targeted hit group, this is not the same thing as a hitbox",
"damage": "Predicted damage the shot will do",
"backtrack": "Amount of ticks the player was backtracked",
"boosted": "True if accuracy boost was used to increase the accuracy of the shot",
"high_priority": "True if the shot was at a high priority record, like on shot backtrack",
"interpolated": "Player was interpolated",
"extrapolated": "Player was extrapolated",
"teleported": "Target player was teleporting (breaking lag compensation)",
"tick": "Tick the shot was fired at. This can be used to draw the hitboxes using client.draw_hitboxes",
"x": "X world coordinate of the aim point",
"y": "X world coordinate of the aim point",
"z": "Z world coordinate of the aim point"
}
],
"examples": [
"```lua\nlocal function time_to_ticks(t)\n\treturn floor(0.5 + (t / globals.tickinterval()))\nend\n\nlocal hitgroup_names = {'generic', 'head', 'chest', 'stomach', 'left arm', 'right arm', 'left leg', 'right leg', 'neck', '?', 'gear'}\n\nlocal function aim_fire(e)\n\tlocal flags = {\n\t\te.teleported and 'T' or '',\n\t\te.interpolated and 'I' or '',\n\t\te.extrapolated and 'E' or '',\n\t\te.boosted and 'B' or '',\n\t\te.high_priority and 'H' or ''\n\t}\n\tlocal group = hitgroup_names[e.hitgroup + 1] or '?'\n\tprint(string.format('Fired at %s (%s) for %d dmg (chance=%d%%, bt=%2d, flags=%s)', entity.get_player_name(e.target), group, e.damage, math.floor(e.hit_chance + 0.5), time_to_ticks(e.backtrack), table.concat(flags)))\nend\nclient.set_event_callback('aim_fire', aim_fire)\n```"
]
},
"aim_hit": {
"description": "Fired when the rage aimbot hit a shot at a player",
"properties": [
{
"id": "Shot ID, the corresponding aim_fire event has the same ID",
"target": "Target player entindex",
"hit_chance": "Actual hit chance the shot had",
"hitgroup": "Hit group that was hit. This is not the same thing as a hitbox",
"damage": "Actual damage the shot did"
}
],
"examples": [
"```lua\nlocal hitgroup_names = {'generic', 'head', 'chest', 'stomach', 'left arm', 'right arm', 'left leg', 'right leg', 'neck', '?', 'gear'}\n\nlocal function aim_hit(e)\n\tlocal group = hitgroup_names[e.hitgroup + 1] or '?'\n\tprint(string.format('Hit %s in the %s for %d damage (%d health remaining)', entity.get_player_name(e.target), group, e.damage, entity.get_prop(e.target, 'm_iHealth')))\nend\nclient.set_event_callback('aim_hit', aim_hit)\n```"
]
},
"aim_miss": {
"description": "Fired when the rage aimbot missed a shot at a player",
"properties": [
{
"id": "Shot ID, the corresponding aim_fire event has the same ID",
"target": "Target player entindex",
"hit_chance": "Actual hit chance the shot had",
"hitgroup": "Hit group that was missed. This is not the same thing as a hitbox",
"reason": "Reason the shot was missed. This can be 'spread', 'prediction error', 'death' or '?' (unknown / resolver)"
}
],
"examples": [
"```lua\nlocal hitgroup_names = {'generic', 'head', 'chest', 'stomach', 'left arm', 'right arm', 'left leg', 'right leg', 'neck', '?', 'gear'}\n\nlocal function aim_miss(e)\n\tlocal group = hitgroup_names[e.hitgroup + 1] or '?'\n\tprint(string.format('Missed %s (%s) due to %s', entity.get_player_name(e.target), group, e.reason))\nend\nclient.set_event_callback('aim_miss', aim_miss)\n```"
]
},
"pre_config_load": {
"description": "Fired before a config will be loaded"
},
"post_config_load": {
"description": "Fired after a config has been loaded"
},
"pre_config_save": {
"description": "Fired before a config will be saved"
},
"post_config_save": {
"description": "Fired after a config has been saved"
}
}
}