@amxts/core 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (247) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +162 -0
  3. package/README.ru.md +162 -0
  4. package/amxmodx/base/include/amxconst.inc +594 -0
  5. package/amxmodx/base/include/amxmisc.inc +902 -0
  6. package/amxmodx/base/include/amxmodx.inc +3447 -0
  7. package/amxmodx/base/include/amxmodx_version.inc +20 -0
  8. package/amxmodx/base/include/cellarray.inc +525 -0
  9. package/amxmodx/base/include/cellstack.inc +166 -0
  10. package/amxmodx/base/include/celltrie.inc +412 -0
  11. package/amxmodx/base/include/core.inc +202 -0
  12. package/amxmodx/base/include/csstats.inc +298 -0
  13. package/amxmodx/base/include/csstats_const.inc +29 -0
  14. package/amxmodx/base/include/cstrike.inc +1287 -0
  15. package/amxmodx/base/include/cstrike_const.inc +521 -0
  16. package/amxmodx/base/include/csx.inc +259 -0
  17. package/amxmodx/base/include/cvars.inc +547 -0
  18. package/amxmodx/base/include/datapack.inc +161 -0
  19. package/amxmodx/base/include/dbi.inc +154 -0
  20. package/amxmodx/base/include/dodconst.inc +152 -0
  21. package/amxmodx/base/include/dodfun.inc +152 -0
  22. package/amxmodx/base/include/dodstats.inc +69 -0
  23. package/amxmodx/base/include/dodx.inc +161 -0
  24. package/amxmodx/base/include/engine.inc +1343 -0
  25. package/amxmodx/base/include/engine_const.inc +310 -0
  26. package/amxmodx/base/include/engine_stocks.inc +248 -0
  27. package/amxmodx/base/include/esf.inc +70 -0
  28. package/amxmodx/base/include/esf_const.inc +74 -0
  29. package/amxmodx/base/include/fakemeta.inc +1127 -0
  30. package/amxmodx/base/include/fakemeta_const.inc +793 -0
  31. package/amxmodx/base/include/fakemeta_stocks.inc +395 -0
  32. package/amxmodx/base/include/fakemeta_util.inc +882 -0
  33. package/amxmodx/base/include/file.inc +666 -0
  34. package/amxmodx/base/include/float.inc +422 -0
  35. package/amxmodx/base/include/fun.inc +333 -0
  36. package/amxmodx/base/include/gameconfig.inc +93 -0
  37. package/amxmodx/base/include/geoip.inc +264 -0
  38. package/amxmodx/base/include/ham_const.inc +4352 -0
  39. package/amxmodx/base/include/hamsandwich.inc +439 -0
  40. package/amxmodx/base/include/hlsdk_const.inc +808 -0
  41. package/amxmodx/base/include/json.inc +777 -0
  42. package/amxmodx/base/include/lang.inc +119 -0
  43. package/amxmodx/base/include/message_const.inc +1130 -0
  44. package/amxmodx/base/include/message_stocks.inc +161 -0
  45. package/amxmodx/base/include/messages.inc +604 -0
  46. package/amxmodx/base/include/newmenus.inc +387 -0
  47. package/amxmodx/base/include/ns.inc +754 -0
  48. package/amxmodx/base/include/ns_const.inc +196 -0
  49. package/amxmodx/base/include/nvault.inc +154 -0
  50. package/amxmodx/base/include/regex.inc +348 -0
  51. package/amxmodx/base/include/sockets.inc +183 -0
  52. package/amxmodx/base/include/sorting.inc +107 -0
  53. package/amxmodx/base/include/sqlx.inc +582 -0
  54. package/amxmodx/base/include/string.inc +786 -0
  55. package/amxmodx/base/include/string_const.inc +156 -0
  56. package/amxmodx/base/include/string_stocks.inc +325 -0
  57. package/amxmodx/base/include/textparse_ini.inc +214 -0
  58. package/amxmodx/base/include/textparse_smc.inc +261 -0
  59. package/amxmodx/base/include/tfcconst.inc +84 -0
  60. package/amxmodx/base/include/tfcstats.inc +62 -0
  61. package/amxmodx/base/include/tfcx.inc +148 -0
  62. package/amxmodx/base/include/time.inc +118 -0
  63. package/amxmodx/base/include/tsconst.inc +154 -0
  64. package/amxmodx/base/include/tsfun.inc +198 -0
  65. package/amxmodx/base/include/tsstats.inc +65 -0
  66. package/amxmodx/base/include/tsx.inc +88 -0
  67. package/amxmodx/base/include/vault.inc +60 -0
  68. package/amxmodx/base/include/vector.inc +131 -0
  69. package/amxmodx/base/include/xs.inc +1570 -0
  70. package/as/amxts.d.ts +153 -0
  71. package/as/constants.ts +4730 -0
  72. package/as/effects.ts +1449 -0
  73. package/as/entities.ts +5482 -0
  74. package/as/events.ts +3054 -0
  75. package/as/facade.ts +4639 -0
  76. package/as/flags.ts +299 -0
  77. package/as/fs.ts +287 -0
  78. package/as/hooks.ts +18536 -0
  79. package/as/kit.ts +25 -0
  80. package/as/lib/check.ts +86 -0
  81. package/as/modules/http.ts +184 -0
  82. package/as/natives.ts +11845 -0
  83. package/as/os.ts +30 -0
  84. package/as/promise.ts +1392 -0
  85. package/as/promise.types.d.ts +82 -0
  86. package/as/remote.ts +288 -0
  87. package/as/tsconfig.json +22 -0
  88. package/as/vector.ts +65 -0
  89. package/bin/amxts.mjs +10 -0
  90. package/includes/menu_core.inc +355 -0
  91. package/includes/order.txt +54 -0
  92. package/includes/sources.json +27 -0
  93. package/includes/universal_config.inc +355 -0
  94. package/lint/oxlint-plugin.mjs +77 -0
  95. package/node_modules/assemblyscript/LICENSE +201 -0
  96. package/node_modules/assemblyscript/NOTICE +93 -0
  97. package/node_modules/assemblyscript/package.json +63 -0
  98. package/node_modules/assemblyscript/std/README.md +6 -0
  99. package/node_modules/assemblyscript/std/assembly/array.ts +526 -0
  100. package/node_modules/assemblyscript/std/assembly/arraybuffer.ts +77 -0
  101. package/node_modules/assemblyscript/std/assembly/atomics.ts +127 -0
  102. package/node_modules/assemblyscript/std/assembly/bindings/asyncify.ts +16 -0
  103. package/node_modules/assemblyscript/std/assembly/bindings/dom.ts +291 -0
  104. package/node_modules/assemblyscript/std/assembly/bindings/node.ts +6 -0
  105. package/node_modules/assemblyscript/std/assembly/builtins.ts +2631 -0
  106. package/node_modules/assemblyscript/std/assembly/compat.ts +2 -0
  107. package/node_modules/assemblyscript/std/assembly/console.ts +42 -0
  108. package/node_modules/assemblyscript/std/assembly/crypto.ts +9 -0
  109. package/node_modules/assemblyscript/std/assembly/dataview.ts +181 -0
  110. package/node_modules/assemblyscript/std/assembly/date.ts +373 -0
  111. package/node_modules/assemblyscript/std/assembly/diagnostics.ts +11 -0
  112. package/node_modules/assemblyscript/std/assembly/error.ts +44 -0
  113. package/node_modules/assemblyscript/std/assembly/function.ts +38 -0
  114. package/node_modules/assemblyscript/std/assembly/index.d.ts +2822 -0
  115. package/node_modules/assemblyscript/std/assembly/iterator.ts +35 -0
  116. package/node_modules/assemblyscript/std/assembly/map.ts +260 -0
  117. package/node_modules/assemblyscript/std/assembly/math.ts +3289 -0
  118. package/node_modules/assemblyscript/std/assembly/memory.ts +123 -0
  119. package/node_modules/assemblyscript/std/assembly/number.ts +388 -0
  120. package/node_modules/assemblyscript/std/assembly/object.ts +36 -0
  121. package/node_modules/assemblyscript/std/assembly/performance.ts +9 -0
  122. package/node_modules/assemblyscript/std/assembly/polyfills.ts +27 -0
  123. package/node_modules/assemblyscript/std/assembly/process.ts +50 -0
  124. package/node_modules/assemblyscript/std/assembly/reference.ts +48 -0
  125. package/node_modules/assemblyscript/std/assembly/regexp.ts +12 -0
  126. package/node_modules/assemblyscript/std/assembly/rt/README.md +83 -0
  127. package/node_modules/assemblyscript/std/assembly/rt/common.ts +81 -0
  128. package/node_modules/assemblyscript/std/assembly/rt/index-incremental.ts +2 -0
  129. package/node_modules/assemblyscript/std/assembly/rt/index-minimal.ts +2 -0
  130. package/node_modules/assemblyscript/std/assembly/rt/index-stub.ts +1 -0
  131. package/node_modules/assemblyscript/std/assembly/rt/index.d.ts +37 -0
  132. package/node_modules/assemblyscript/std/assembly/rt/itcms.ts +419 -0
  133. package/node_modules/assemblyscript/std/assembly/rt/rtrace.ts +15 -0
  134. package/node_modules/assemblyscript/std/assembly/rt/stub.ts +133 -0
  135. package/node_modules/assemblyscript/std/assembly/rt/tcms.ts +254 -0
  136. package/node_modules/assemblyscript/std/assembly/rt/tlsf.ts +592 -0
  137. package/node_modules/assemblyscript/std/assembly/rt.ts +87 -0
  138. package/node_modules/assemblyscript/std/assembly/set.ts +220 -0
  139. package/node_modules/assemblyscript/std/assembly/shared/feature.ts +65 -0
  140. package/node_modules/assemblyscript/std/assembly/shared/runtime.ts +11 -0
  141. package/node_modules/assemblyscript/std/assembly/shared/target.ts +11 -0
  142. package/node_modules/assemblyscript/std/assembly/shared/tsconfig.json +11 -0
  143. package/node_modules/assemblyscript/std/assembly/shared/typeinfo.ts +72 -0
  144. package/node_modules/assemblyscript/std/assembly/staticarray.ts +401 -0
  145. package/node_modules/assemblyscript/std/assembly/string.ts +847 -0
  146. package/node_modules/assemblyscript/std/assembly/symbol.ts +114 -0
  147. package/node_modules/assemblyscript/std/assembly/table.ts +16 -0
  148. package/node_modules/assemblyscript/std/assembly/tsconfig.json +6 -0
  149. package/node_modules/assemblyscript/std/assembly/typedarray.ts +1945 -0
  150. package/node_modules/assemblyscript/std/assembly/uri.ts +17 -0
  151. package/node_modules/assemblyscript/std/assembly/util/bytes.ts +107 -0
  152. package/node_modules/assemblyscript/std/assembly/util/casemap.ts +497 -0
  153. package/node_modules/assemblyscript/std/assembly/util/error.ts +54 -0
  154. package/node_modules/assemblyscript/std/assembly/util/hash.ts +117 -0
  155. package/node_modules/assemblyscript/std/assembly/util/math.ts +1922 -0
  156. package/node_modules/assemblyscript/std/assembly/util/memory.ts +290 -0
  157. package/node_modules/assemblyscript/std/assembly/util/number.ts +873 -0
  158. package/node_modules/assemblyscript/std/assembly/util/sort.ts +313 -0
  159. package/node_modules/assemblyscript/std/assembly/util/string.ts +1202 -0
  160. package/node_modules/assemblyscript/std/assembly/util/uri.ts +275 -0
  161. package/node_modules/assemblyscript/std/assembly/vector.ts +4 -0
  162. package/node_modules/assemblyscript/std/assembly.json +16 -0
  163. package/node_modules/assemblyscript/std/portable/index.d.ts +462 -0
  164. package/node_modules/assemblyscript/std/portable/index.js +416 -0
  165. package/node_modules/assemblyscript/std/portable.json +11 -0
  166. package/node_modules/assemblyscript/std/types/assembly/index.d.ts +1 -0
  167. package/node_modules/assemblyscript/std/types/assembly/package.json +3 -0
  168. package/node_modules/assemblyscript/std/types/portable/index.d.ts +1 -0
  169. package/node_modules/assemblyscript/std/types/portable/package.json +3 -0
  170. package/node_modules/assemblyscript/tsconfig-base.json +13 -0
  171. package/package.json +112 -0
  172. package/runtime/deps/assemblyscript/LICENSE +201 -0
  173. package/runtime/deps/assemblyscript/NOTICE +93 -0
  174. package/runtime/deps/assemblyscript/bin/asc.js +35 -0
  175. package/runtime/deps/assemblyscript/dist/asc.js +25035 -0
  176. package/runtime/deps/assemblyscript/dist/assemblyscript.js +337 -0
  177. package/runtime/deps/assemblyscript/node_modules/binaryen/LICENSE +201 -0
  178. package/runtime/deps/assemblyscript/node_modules/binaryen/index.js +28905 -0
  179. package/runtime/deps/assemblyscript/node_modules/binaryen/package.json +50 -0
  180. package/runtime/deps/assemblyscript/node_modules/long/LICENSE +202 -0
  181. package/runtime/deps/assemblyscript/node_modules/long/index.js +1581 -0
  182. package/runtime/deps/assemblyscript/node_modules/long/package.json +58 -0
  183. package/runtime/deps/assemblyscript/package.json +114 -0
  184. package/runtime/host/amxts.inc +85 -0
  185. package/runtime/licenses/AMXX-LICENSE.txt +34 -0
  186. package/runtime/licenses/AssemblyScript-LICENSE +201 -0
  187. package/runtime/licenses/AssemblyScript-NOTICE +93 -0
  188. package/runtime/licenses/Binaryen-LICENSE +201 -0
  189. package/runtime/licenses/Bun-LICENSE.md +84 -0
  190. package/runtime/licenses/GPL-3.0.txt +674 -0
  191. package/runtime/licenses/LLVM-LICENSE.TXT +279 -0
  192. package/runtime/licenses/README.md +25 -0
  193. package/runtime/licenses/WAMR-LICENSE +219 -0
  194. package/runtime/natives.txt +1095 -0
  195. package/runtime/patches/README.md +59 -0
  196. package/runtime/patches/assemblyscript-0.28.20-amxts.patch +14174 -0
  197. package/runtime/patches/wamr-2.4.5-amxts.patch +364 -0
  198. package/scripts/apply-docs.ts +508 -0
  199. package/scripts/asc.ts +27 -0
  200. package/scripts/auto-imports.ts +258 -0
  201. package/scripts/build-wasm.ts +595 -0
  202. package/scripts/check.ts +93 -0
  203. package/scripts/compile-cache.ts +179 -0
  204. package/scripts/compile.ts +401 -0
  205. package/scripts/docker-server.ts +73 -0
  206. package/scripts/docs/as/amxts.ts +210 -0
  207. package/scripts/docs/as/effects.ts +1684 -0
  208. package/scripts/docs/as/facade.ts +3302 -0
  209. package/scripts/docs/as/fs.ts +173 -0
  210. package/scripts/docs/as/lib/check.ts +68 -0
  211. package/scripts/docs/as/modules/http.ts +66 -0
  212. package/scripts/docs/as/os.ts +16 -0
  213. package/scripts/docs/as/promise.ts +132 -0
  214. package/scripts/docs/as/promise.types.ts +63 -0
  215. package/scripts/docs/as/vector.ts +48 -0
  216. package/scripts/docs/entities.ts +2338 -0
  217. package/scripts/docs/events.ts +245 -0
  218. package/scripts/docs/game.ts +497 -0
  219. package/scripts/docs/messages.ts +148 -0
  220. package/scripts/file-contents.ts +74 -0
  221. package/scripts/includes.ts +134 -0
  222. package/scripts/player-fields.ts +866 -0
  223. package/scripts/plugin-cache.ts +92 -0
  224. package/scripts/plugin-natives.ts +1157 -0
  225. package/scripts/prebuilt.ts +268 -0
  226. package/scripts/prepare.ts +134 -0
  227. package/scripts/project.ts +973 -0
  228. package/scripts/run.ts +28 -0
  229. package/scripts/shared-modules.ts +906 -0
  230. package/scripts/system.ts +33 -0
  231. package/scripts/tracked-fs.ts +115 -0
  232. package/scripts/typed-configs.ts +788 -0
  233. package/scripts/ui.ts +77 -0
  234. package/src/cli-api.mjs +175 -0
  235. package/src/parser/include-parser.ts +506 -0
  236. package/src/system.mjs +155 -0
  237. package/src/testing/compile-cache.ts +31 -0
  238. package/src/testing/compile.ts +222 -0
  239. package/src/testing/coroutines.ts +191 -0
  240. package/src/testing/index.ts +39 -0
  241. package/src/testing/kits.ts +55 -0
  242. package/src/testing/memory.ts +125 -0
  243. package/src/testing/natives.ts +925 -0
  244. package/src/testing/server.ts +1874 -0
  245. package/src/testing/setup.ts +63 -0
  246. package/src/testing/tables.ts +139 -0
  247. package/src/types.ts +51 -0
@@ -0,0 +1,521 @@
1
+ // vim: set ts=4 sw=4 tw=99 noet:
2
+ //
3
+ // AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO").
4
+ // Copyright (C) The AMX Mod X Development Team.
5
+ //
6
+ // This software is licensed under the GNU General Public License, version 3 or higher.
7
+ // Additional exceptions apply. For full license details, see LICENSE.txt or visit:
8
+ // https://alliedmods.net/amxmodx-license
9
+
10
+ //
11
+ // Counter-Strike Functions
12
+ //
13
+
14
+ #if defined _cstrike_const_included
15
+ #endinput
16
+ #endif
17
+ #define _cstrike_const_included
18
+
19
+ /**
20
+ * IDs of weapons in CS
21
+ */
22
+ #define CSW_NONE 0
23
+ #define CSW_P228 1
24
+ #define CSW_GLOCK 2 // Unused by game, See CSW_GLOCK18.
25
+ #define CSW_SCOUT 3
26
+ #define CSW_HEGRENADE 4
27
+ #define CSW_XM1014 5
28
+ #define CSW_C4 6
29
+ #define CSW_MAC10 7
30
+ #define CSW_AUG 8
31
+ #define CSW_SMOKEGRENADE 9
32
+ #define CSW_ELITE 10
33
+ #define CSW_FIVESEVEN 11
34
+ #define CSW_UMP45 12
35
+ #define CSW_SG550 13
36
+ #define CSW_GALI 14
37
+ #define CSW_GALIL 14
38
+ #define CSW_FAMAS 15
39
+ #define CSW_USP 16
40
+ #define CSW_GLOCK18 17
41
+ #define CSW_AWP 18
42
+ #define CSW_MP5NAVY 19
43
+ #define CSW_M249 20
44
+ #define CSW_M3 21
45
+ #define CSW_M4A1 22
46
+ #define CSW_TMP 23
47
+ #define CSW_G3SG1 24
48
+ #define CSW_FLASHBANG 25
49
+ #define CSW_DEAGLE 26
50
+ #define CSW_SG552 27
51
+ #define CSW_AK47 28
52
+ #define CSW_KNIFE 29
53
+ #define CSW_P90 30
54
+ #define CSW_VEST 31 // Custom
55
+ #define CSW_VESTHELM 32 // Custom
56
+ #define CSW_SHIELDGUN 99
57
+ #define CSW_LAST_WEAPON CSW_P90
58
+
59
+ const CSW_ALL_WEAPONS = (~(1<<CSW_VEST));
60
+ const CSW_ALL_PISTOLS = (1<<CSW_P228 | 1<<CSW_ELITE | 1<<CSW_FIVESEVEN | 1<<CSW_USP | 1<<CSW_GLOCK18 | 1<<CSW_DEAGLE);
61
+ const CSW_ALL_SHOTGUNS = (1<<CSW_M3 | 1<<CSW_XM1014);
62
+ const CSW_ALL_SMGS = (1<<CSW_MAC10 | 1<<CSW_UMP45 | 1<<CSW_MP5NAVY | 1<<CSW_TMP | 1<<CSW_P90);
63
+ const CSW_ALL_RIFLES = (1<<CSW_AUG | 1<<CSW_GALIL | 1<<CSW_FAMAS | 1<<CSW_M4A1 | 1<<CSW_AK47 | 1<<CSW_SG552);
64
+ const CSW_ALL_SNIPERRIFLES = (1<<CSW_SCOUT | 1<<CSW_AWP | 1<<CSW_G3SG1 | 1<<CSW_SG550);
65
+ const CSW_ALL_MACHINEGUNS = (1<<CSW_M249);
66
+ const CSW_ALL_GRENADES = (1<<CSW_HEGRENADE | 1<<CSW_SMOKEGRENADE | 1<<CSW_FLASHBANG);
67
+ const CSW_ALL_ARMORS = (1<<CSW_VEST | 1<<CSW_VESTHELM);
68
+ const CSW_ALL_GUNS = (CSW_ALL_PISTOLS | CSW_ALL_SHOTGUNS | CSW_ALL_SMGS | CSW_ALL_RIFLES | CSW_ALL_SNIPERRIFLES | CSW_ALL_MACHINEGUNS);
69
+
70
+ /**
71
+ * @section Team and team model constants, used by cs_[get|set]_user_team().
72
+ */
73
+
74
+ /**
75
+ * Internal Counter-Strike model id constants.
76
+ *
77
+ * @note Model ids starting with CZ_ are only valid in Condition Zero.
78
+ */
79
+ enum CsInternalModel
80
+ {
81
+ CS_NORESET = -1,
82
+ CS_DONTCHANGE = 0,
83
+ CS_UNASSIGNED = 0,
84
+ CS_CT_URBAN = 1,
85
+ CS_T_TERROR = 2,
86
+ CS_T_LEET = 3,
87
+ CS_T_ARCTIC = 4,
88
+ CS_CT_GSG9 = 5,
89
+ CS_CT_GIGN = 6,
90
+ CS_CT_SAS = 7,
91
+ CS_T_GUERILLA = 8,
92
+ CS_CT_VIP = 9,
93
+ CZ_T_MILITIA = 10,
94
+ CZ_CT_SPETSNAZ = 11,
95
+ };
96
+
97
+ /**
98
+ * Counter-Strike team id constants.
99
+ */
100
+ enum CsTeams
101
+ {
102
+ CS_TEAM_UNASSIGNED = 0,
103
+ CS_TEAM_T = 1,
104
+ CS_TEAM_CT = 2,
105
+ CS_TEAM_SPECTATOR = 3,
106
+ };
107
+
108
+ /**
109
+ * @endsection
110
+ */
111
+
112
+ /**
113
+ * Counter-Strike armor types for use with cs_[get|set]_user_armor().
114
+ */
115
+ enum CsArmorType
116
+ {
117
+ CS_ARMOR_NONE = 0, // no armor
118
+ CS_ARMOR_KEVLAR = 1, // body vest only
119
+ CS_ARMOR_VESTHELM = 2, // vest and helmet
120
+ };
121
+
122
+ /**
123
+ * Map zone flags returned by cs_get_user_mapzones().
124
+ */
125
+ #define CS_MAPZONE_BUY (1<<0) // Buyzone
126
+ #define CS_MAPZONE_BOMBTARGET (1<<1) // Bomb target zone
127
+ #define CS_MAPZONE_HOSTAGE_RESCUE (1<<2) // Hostage rescue zone
128
+ #define CS_MAPZONE_ESCAPE (1<<3) // Terrorist escape zone
129
+ #define CS_MAPZONE_VIP_SAFETY (1<<4) // VIP escape zone
130
+
131
+ /**
132
+ * Constants used for cs_[get|set]_user_zoom().
133
+ */
134
+ enum
135
+ {
136
+ CS_RESET_ZOOM = 0, // Reset any zoom blocking (mode has no effect)
137
+ CS_SET_NO_ZOOM, // Disable any sort of zoom
138
+ CS_SET_FIRST_ZOOM, // Set first zoom level (AWP style)
139
+ CS_SET_SECOND_ZOOM, // Set second zoom level (AWP style)
140
+ CS_SET_AUGSG552_ZOOM, // Set AUG/SG552 zoom style
141
+ };
142
+
143
+ /**
144
+ * Constants used for the CS_OnBuy() and CS_OnBuyAttempt() forwards.
145
+ *
146
+ * @note While these mostly overlap with the CSW_* constants the CSI_* constants
147
+ * contain custom AMXX values that do not correspond to any real value in
148
+ * the game. The CSI_* constants should therefore be used for consistency.
149
+ */
150
+ #define CSI_NONE CSW_NONE
151
+ #define CSI_P228 CSW_P228
152
+ #define CSI_GLOCK CSW_GLOCK // Unused by game, See CSI_GLOCK18.
153
+ #define CSI_SCOUT CSW_SCOUT
154
+ #define CSI_HEGRENADE CSW_HEGRENADE
155
+ #define CSI_XM1014 CSW_XM1014
156
+ #define CSI_C4 CSW_C4
157
+ #define CSI_MAC10 CSW_MAC10
158
+ #define CSI_AUG CSW_AUG
159
+ #define CSI_SMOKEGRENADE CSW_SMOKEGRENADE
160
+ #define CSI_ELITE CSW_ELITE
161
+ #define CSI_FIVESEVEN CSW_FIVESEVEN
162
+ #define CSI_UMP45 CSW_UMP45
163
+ #define CSI_SG550 CSW_SG550
164
+ #define CSI_GALIL CSW_GALIL
165
+ #define CSI_FAMAS CSW_FAMAS
166
+ #define CSI_USP CSW_USP
167
+ #define CSI_GLOCK18 CSW_GLOCK18
168
+ #define CSI_AWP CSW_AWP
169
+ #define CSI_MP5NAVY CSW_MP5NAVY
170
+ #define CSI_M249 CSW_M249
171
+ #define CSI_M3 CSW_M3
172
+ #define CSI_M4A1 CSW_M4A1
173
+ #define CSI_TMP CSW_TMP
174
+ #define CSI_G3SG1 CSW_G3SG1
175
+ #define CSI_FLASHBANG CSW_FLASHBANG
176
+ #define CSI_DEAGLE CSW_DEAGLE
177
+ #define CSI_SG552 CSW_SG552
178
+ #define CSI_AK47 CSW_AK47
179
+ #define CSI_KNIFE CSW_KNIFE
180
+ #define CSI_P90 CSW_P90
181
+ #define CSI_SHIELDGUN CSW_SHIELDGUN // The real CS value, use CSI_SHELD instead.
182
+ #define CSI_VEST CSW_VEST // Custom
183
+ #define CSI_VESTHELM CSW_VESTHELM // Custom
184
+ #define CSI_DEFUSER 33 // Custom
185
+ #define CSI_NVGS 34 // Custom
186
+ #define CSI_SHIELD 35 // Custom - The value passed by the forward, more convenient for plugins.
187
+ #define CSI_PRIAMMO 36 // Custom
188
+ #define CSI_SECAMMO 37 // Custom
189
+ #define CSI_MAX_COUNT 38
190
+ #define CSI_LAST_WEAPON CSW_LAST_WEAPON
191
+
192
+ #define CSI_ALL_WEAPONS CSW_ALL_WEAPONS
193
+ #define CSI_ALL_PISTOLS CSW_ALL_PISTOLS
194
+ #define CSI_ALL_SHOTGUNS CSW_ALL_SHOTGUNS
195
+ #define CSI_ALL_SMGS CSW_ALL_SMGS
196
+ #define CSI_ALL_RIFLES CSW_ALL_RIFLES
197
+ #define CSI_ALL_SNIPERRIFLES CSW_ALL_SNIPERRIFLES
198
+ #define CSI_ALL_MACHINEGUNS CSW_ALL_MACHINEGUNS
199
+ #define CSI_ALL_GRENADES CSW_ALL_GRENADES
200
+ #define CSI_ALL_ARMORS CSW_ALL_ARMORS
201
+ #define CSI_ALL_GUNS CSW_ALL_GUNS
202
+
203
+ /**
204
+ * Player's movements constants.
205
+ */
206
+ #define CS_PLAYER_FATAL_FALL_SPEED 1100.0
207
+ #define CS_PLAYER_MAX_SAFE_FALL_SPEED 500.0
208
+ #define CS_DAMAGE_FOR_FALL_SPEED 100.0 / (CS_PLAYER_FATAL_FALL_SPEED - CS_PLAYER_MAX_SAFE_FALL_SPEED)
209
+ #define CS_PLAYER_MIN_BOUNCE_SPEED 350
210
+ #define CS_PLAYER_FALL_PUNCH_THRESHHOLD 250.0
211
+
212
+ /**
213
+ * Hint message flags for use with m_flDisplayHistory.
214
+ */
215
+ #define CS_HINT_ROUND_STARTED (1<<1)
216
+ #define CS_HINT_HOSTAGE_SEEN_FAR (1<<2)
217
+ #define CS_HINT_HOSTAGE_SEEN_NEAR (1<<3)
218
+ #define CS_HINT_HOSTAGE_USED (1<<4)
219
+ #define CS_HINT_HOSTAGE_INJURED (1<<5)
220
+ #define CS_HINT_HOSTAGE_KILLED (1<<6)
221
+ #define CS_HINT_FRIEND_SEEN (1<<7)
222
+ #define CS_HINT_ENEMY_SEEN (1<<8)
223
+ #define CS_HINT_FRIEND_INJURED (1<<9)
224
+ #define CS_HINT_FRIEND_KILLED (1<<10)
225
+ #define CS_HINT_ENEMY_KILLED (1<<11)
226
+ #define CS_HINT_BOMB_RETRIEVED (1<<12)
227
+ #define CS_HINT_AMMO_EXHAUSTED (1<<15)
228
+ #define CS_HINT_IN_TARGET_ZONE (1<<16)
229
+ #define CS_HINT_IN_RESCUE_ZONE (1<<17)
230
+ #define CS_HINT_IN_ESCAPE_ZONE (1<<18)
231
+ #define CS_HINT_IN_VIPSAFETY_ZONE (1<<19)
232
+ #define CS_HINT_NIGHTVISION (1<<20)
233
+ #define CS_HINT_HOSTAGE_CTMOVE (1<<21)
234
+ #define CS_HINT_SPEC_DUCK (1<<22)
235
+
236
+ /**
237
+ * Constants for use with m_iIgnoreGlobalChat (ignoremsg client's command)
238
+ */
239
+ #define CS_IGNOREMSG_NONE 0
240
+ #define CS_IGNOREMSG_ENEMY 1
241
+ #define CS_IGNOREMSG_TEAM 2
242
+
243
+ /**
244
+ * Player's gait animation constants.
245
+ */
246
+ enum CsPlayerAnim
247
+ {
248
+ CS_PLAYER_IDLE = 0,
249
+ CS_PLAYER_WALK = 1,
250
+ CS_PLAYER_JUMP = 2,
251
+ CS_PLAYER_SUPERJUMP = 3,
252
+ CS_PLAYER_DIE = 4,
253
+ CS_PLAYER_ATTACK1 = 5,
254
+ CS_PLAYER_ATTACK2 = 6,
255
+ CS_PLAYER_FLINCH = 7,
256
+ CS_PLAYER_LARGE_FLINCH = 8,
257
+ CS_PLAYER_RELOAD = 9,
258
+ CS_PLAYER_HOLDBOMB = 10,
259
+ };
260
+
261
+ /**
262
+ * Player's menu states for use with m_iMenu.
263
+ */
264
+ enum CsMenu
265
+ {
266
+ CS_Menu_OFF = 0,
267
+ CS_Menu_ChooseTeam = 1,
268
+ CS_Menu_IGChooseTeam = 2,
269
+ CS_Menu_ChooseAppearance = 3,
270
+ CS_Menu_Buy = 4,
271
+ CS_Menu_BuyPistol = 5,
272
+ CS_Menu_BuyRifle = 6,
273
+ CS_Menu_BuyMachineGun = 7,
274
+ CS_Menu_BuyShotgun = 8,
275
+ CS_Menu_BuySubMachineGun = 9,
276
+ CS_Menu_BuyItem = 10,
277
+ CS_Menu_Radio1 = 11,
278
+ CS_Menu_Radio2 = 12,
279
+ CS_Menu_Radio3 = 13,
280
+ CS_Menu_ClientBuy = 14,
281
+ };
282
+
283
+ /**
284
+ * Player's join states for use with m_iJoiningState.
285
+ */
286
+ enum CsJoinState
287
+ {
288
+ CS_STATE_JOINED = 0,
289
+ CS_STATE_SHOW_LTEXT = 1,
290
+ CS_STATE_READING_LTEXT = 2,
291
+ CS_STATE_SHOW_TEAM_SELECT = 3,
292
+ CS_STATE_PICKING_TEAM = 4,
293
+ CS_STATE_GET_INTO_GAME = 5,
294
+ };
295
+
296
+ /**
297
+ * Player's throw direction on killed for use with m_iThrowDirection.
298
+ */
299
+ enum CsThrowDirection
300
+ {
301
+ CS_THROW_NONE = 0,
302
+ CS_THROW_FORWARD = 1,
303
+ CS_THROW_BACKWARD = 2,
304
+ CS_THROW_HITVEL = 3,
305
+ CS_THROW_BOMB = 4,
306
+ CS_THROW_GRENADE = 5,
307
+ CS_THROW_HITVEL_MINUS_AIRVEL = 6,
308
+ };
309
+
310
+ /**
311
+ * @section Player's status bar constants.
312
+ */
313
+
314
+ /**
315
+ * Constants associated with mp_playerid server cvar.
316
+ */
317
+ #define CS_PLAYERID_EVERYONE 0
318
+ #define CS_PLAYERID_TEAMONLY 1
319
+ #define CS_PLAYERID_OFF 2
320
+
321
+ /**
322
+ * Maximum range a status bar can be displayed.
323
+ */
324
+ #define CS_MAX_ID_RANGE 2048
325
+ #define CS_MAX_SPECTATOR_ID_RANGE 8192
326
+
327
+ /**
328
+ * Maximum buffer length of a status bar message.
329
+ */
330
+ #define CS_SBAR_STRING_SIZE 128
331
+
332
+ /**
333
+ * Constants associated to CS_SBAR_ID_TARGETTYPE.
334
+ */
335
+ #define CS_SBAR_TARGETTYPE_TEAMMATE 1
336
+ #define CS_SBAR_TARGETTYPE_ENEMY 2
337
+ #define CS_SBAR_TARGETTYPE_HOSTAGE 3
338
+
339
+ /**
340
+ * Status bar states.
341
+ */
342
+ enum CsStatusBar
343
+ {
344
+ CS_SBAR_ID_TARGETTYPE = 1,
345
+ CS_SBAR_ID_TARGETNAME = 2,
346
+ CS_SBAR_ID_TARGETHEALTH = 3,
347
+ };
348
+
349
+ /**
350
+ * @endsection
351
+ */
352
+
353
+ /**
354
+ * Weapon slot types.
355
+ */
356
+ #define CS_WEAPONSLOT_PRIMARY 1
357
+ #define CS_WEAPONSLOT_SECONDARY 2
358
+ #define CS_WEAPONSLOT_KNIFE 3
359
+ #define CS_WEAPONSLOT_GRENADE 4
360
+ #define CS_WEAPONSLOT_C4 5
361
+
362
+ /**
363
+ * Weapon class types.
364
+ */
365
+ enum CsWeaponClassType
366
+ {
367
+ CS_WEAPONCLASS_NONE = 0,
368
+ CS_WEAPONCLASS_KNIFE = 1,
369
+ CS_WEAPONCLASS_PISTOL = 2,
370
+ CS_WEAPONCLASS_GRENADE = 3,
371
+ CS_WEAPONCLASS_SUBMACHINEGUN = 4,
372
+ CS_WEAPONCLASS_SHOTGUN = 5,
373
+ CS_WEAPONCLASS_MACHINEGUN = 6,
374
+ CS_WEAPONCLASS_RIFLE = 7,
375
+ CS_WEAPONCLASS_SNIPERRIFLE = 8,
376
+ };
377
+
378
+ /**
379
+ * Weapon autobuy class types.
380
+ */
381
+ enum CsAutoBuyClassType
382
+ {
383
+ CS_AUTOBUYCLASS_PRIMARY = (1<<0),
384
+ CS_AUTOBUYCLASS_SECONDARY = (1<<1),
385
+ CS_AUTOBUYCLASS_AMMO = (1<<2),
386
+ CS_AUTOBUYCLASS_ARMOR = (1<<3),
387
+ CS_AUTOBUYCLASS_DEFUSER = (1<<4),
388
+ CS_AUTOBUYCLASS_PISTOL = (1<<5),
389
+ CS_AUTOBUYCLASS_SMG = (1<<6),
390
+ CS_AUTOBUYCLASS_RIFLE = (1<<7),
391
+ CS_AUTOBUYCLASS_SNIPERRIFLE = (1<<8),
392
+ CS_AUTOBUYCLASS_SHOTGUN = (1<<9),
393
+ CS_AUTOBUYCLASS_MACHINEGUN = (1<<10),
394
+ CS_AUTOBUYCLASS_GRENADE = (1<<11),
395
+ CS_AUTOBUYCLASS_NIGHTVISION = (1<<12),
396
+ CS_AUTOBUYCLASS_SHIELD = (1<<13),
397
+ };
398
+
399
+ /**
400
+ * Ammo types for use with cs_get_weapon_info().
401
+ */
402
+ enum CsAmmoType
403
+ {
404
+ CS_AMMO_BUCKSHOT = 0,
405
+ CS_AMMO_9MM = 1,
406
+ CS_AMMO_556NATO = 2,
407
+ CS_AMMO_556NATOBOX = 3,
408
+ CS_AMMO_762NATO = 4,
409
+ CS_AMMO_45ACP = 5,
410
+ CS_AMMO_50AE = 6,
411
+ CS_AMMO_338MAGNUM = 7,
412
+ CS_AMMO_57MM = 8,
413
+ CS_AMMO_357SIG = 9,
414
+ };
415
+
416
+ /**
417
+ * Weapon info types for use with cs_get_weapon_info().
418
+ */
419
+ enum CsWeaponInfo
420
+ {
421
+ CS_WEAPONINFO_COST = 0,
422
+ CS_WEAPONINFO_CLIP_COST = 1,
423
+ CS_WEAPONINFO_BUY_CLIP_SIZE = 2,
424
+ CS_WEAPONINFO_GUN_CLIP_SIZE = 3,
425
+ CS_WEAPONINFO_MAX_ROUNDS = 4,
426
+ CS_WEAPONINFO_AMMO_TYPE = 5,
427
+ };
428
+
429
+ /**
430
+ * Weapon default cost.
431
+ */
432
+ enum CsWeaponCostType
433
+ {
434
+ CS_AK47_PRICE = 2500,
435
+ CS_AWP_PRICE = 4750,
436
+ CS_DEAGLE_PRICE = 650,
437
+ CS_G3SG1_PRICE = 5000,
438
+ CS_SG550_PRICE = 4200,
439
+ CS_GLOCK18_PRICE = 400,
440
+ CS_M249_PRICE = 5750,
441
+ CS_M3_PRICE = 1700,
442
+ CS_M4A1_PRICE = 3100,
443
+ CS_AUG_PRICE = 3500,
444
+ CS_MP5NAVY_PRICE = 1500,
445
+ CS_P228_PRICE = 600,
446
+ CS_P90_PRICE = 2350,
447
+ CS_UMP45_PRICE = 1700,
448
+ CS_MAC10_PRICE = 1400,
449
+ CS_SCOUT_PRICE = 2750,
450
+ CS_SG552_PRICE = 3500,
451
+ CS_TMP_PRICE = 1250,
452
+ CS_USP_PRICE = 500,
453
+ CS_ELITE_PRICE = 800,
454
+ CS_FIVESEVEN_PRICE = 750,
455
+ CS_XM1014_PRICE = 3000,
456
+ CS_GALIL_PRICE = 2000,
457
+ CS_FAMAS_PRICE = 2250,
458
+ CS_SHIELDGUN_PRICE = 2200
459
+ };
460
+
461
+ /**
462
+ * Equipment default cost.
463
+ */
464
+ enum CsItemCostType
465
+ {
466
+ CS_ASSAULTSUIT_PRICE = 1000,
467
+ CS_FLASHBANG_PRICE = 200,
468
+ CS_HEGRENADE_PRICE = 300,
469
+ CS_SMOKEGRENADE_PRICE = 300,
470
+ CS_KEVLAR_PRICE = 650,
471
+ CS_HELMET_PRICE = 350,
472
+ CS_NVG_PRICE = 1250,
473
+ CS_DEFUSEKIT_PRICE = 200
474
+ };
475
+
476
+ /**
477
+ * Ammo default cost.
478
+ */
479
+ enum CsAmmoCostType
480
+ {
481
+ CS_AMMO_338MAG_PRICE = 125,
482
+ CS_AMMO_357SIG_PRICE = 50,
483
+ CS_AMMO_45ACP_PRICE = 25,
484
+ CS_AMMO_50AE_PRICE = 40,
485
+ CS_AMMO_556NATO_PRICE = 60,
486
+ CS_AMMO_57MM_PRICE = 50,
487
+ CS_AMMO_762NATO_PRICE = 80,
488
+ CS_AMMO_9MM_PRICE = 20,
489
+ CS_AMMO_BUCKSHOT_PRICE = 65
490
+ };
491
+
492
+ /**
493
+ * Weapon state for use with m_iWeaponState.
494
+ */
495
+ #define CS_WPNSTATE_USP_SILENCED (1<<0)
496
+ #define CS_WPNSTATE_GLOCK18_BURST_MODE (1<<1)
497
+ #define CS_WPNSTATE_M4A1_SILENCED (1<<2)
498
+ #define CS_WPNSTATE_ELITE_LEFT (1<<3)
499
+ #define CS_WPNSTATE_FAMAS_BURST_MODE (1<<4)
500
+ #define CS_WPNSTATE_SHIELD_DRAWN (1<<5)
501
+
502
+ /**
503
+ * Internal commands, for use with m_flLastCommandTime.
504
+ */
505
+ #define CS_CMD_SAY 0
506
+ #define CS_CMD_SAYTEAM 1
507
+ #define CS_CMD_FULLUPDATE 2
508
+ #define CS_CMD_VOTE 3
509
+ #define CS_CMD_VOTEMAP 4
510
+ #define CS_CMD_LISTMAPS 5
511
+ #define CS_CMD_LISTPLAYERS 6
512
+ #define CS_CMD_NIGHTVISION 7
513
+
514
+ /**
515
+ * Signal state for use with m_signals.
516
+ */
517
+ #define CS_SIGNAL_BUY (1<<0)
518
+ #define CS_SIGNAL_BOMB (1<<1)
519
+ #define CS_SIGNAL_RESCUE (1<<2)
520
+ #define CS_SIGNAL_ESCAPE (1<<3)
521
+ #define CS_SIGNAL_VIPSAFETY (1<<4)