@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.
- package/LICENSE +21 -0
- package/README.md +162 -0
- package/README.ru.md +162 -0
- package/amxmodx/base/include/amxconst.inc +594 -0
- package/amxmodx/base/include/amxmisc.inc +902 -0
- package/amxmodx/base/include/amxmodx.inc +3447 -0
- package/amxmodx/base/include/amxmodx_version.inc +20 -0
- package/amxmodx/base/include/cellarray.inc +525 -0
- package/amxmodx/base/include/cellstack.inc +166 -0
- package/amxmodx/base/include/celltrie.inc +412 -0
- package/amxmodx/base/include/core.inc +202 -0
- package/amxmodx/base/include/csstats.inc +298 -0
- package/amxmodx/base/include/csstats_const.inc +29 -0
- package/amxmodx/base/include/cstrike.inc +1287 -0
- package/amxmodx/base/include/cstrike_const.inc +521 -0
- package/amxmodx/base/include/csx.inc +259 -0
- package/amxmodx/base/include/cvars.inc +547 -0
- package/amxmodx/base/include/datapack.inc +161 -0
- package/amxmodx/base/include/dbi.inc +154 -0
- package/amxmodx/base/include/dodconst.inc +152 -0
- package/amxmodx/base/include/dodfun.inc +152 -0
- package/amxmodx/base/include/dodstats.inc +69 -0
- package/amxmodx/base/include/dodx.inc +161 -0
- package/amxmodx/base/include/engine.inc +1343 -0
- package/amxmodx/base/include/engine_const.inc +310 -0
- package/amxmodx/base/include/engine_stocks.inc +248 -0
- package/amxmodx/base/include/esf.inc +70 -0
- package/amxmodx/base/include/esf_const.inc +74 -0
- package/amxmodx/base/include/fakemeta.inc +1127 -0
- package/amxmodx/base/include/fakemeta_const.inc +793 -0
- package/amxmodx/base/include/fakemeta_stocks.inc +395 -0
- package/amxmodx/base/include/fakemeta_util.inc +882 -0
- package/amxmodx/base/include/file.inc +666 -0
- package/amxmodx/base/include/float.inc +422 -0
- package/amxmodx/base/include/fun.inc +333 -0
- package/amxmodx/base/include/gameconfig.inc +93 -0
- package/amxmodx/base/include/geoip.inc +264 -0
- package/amxmodx/base/include/ham_const.inc +4352 -0
- package/amxmodx/base/include/hamsandwich.inc +439 -0
- package/amxmodx/base/include/hlsdk_const.inc +808 -0
- package/amxmodx/base/include/json.inc +777 -0
- package/amxmodx/base/include/lang.inc +119 -0
- package/amxmodx/base/include/message_const.inc +1130 -0
- package/amxmodx/base/include/message_stocks.inc +161 -0
- package/amxmodx/base/include/messages.inc +604 -0
- package/amxmodx/base/include/newmenus.inc +387 -0
- package/amxmodx/base/include/ns.inc +754 -0
- package/amxmodx/base/include/ns_const.inc +196 -0
- package/amxmodx/base/include/nvault.inc +154 -0
- package/amxmodx/base/include/regex.inc +348 -0
- package/amxmodx/base/include/sockets.inc +183 -0
- package/amxmodx/base/include/sorting.inc +107 -0
- package/amxmodx/base/include/sqlx.inc +582 -0
- package/amxmodx/base/include/string.inc +786 -0
- package/amxmodx/base/include/string_const.inc +156 -0
- package/amxmodx/base/include/string_stocks.inc +325 -0
- package/amxmodx/base/include/textparse_ini.inc +214 -0
- package/amxmodx/base/include/textparse_smc.inc +261 -0
- package/amxmodx/base/include/tfcconst.inc +84 -0
- package/amxmodx/base/include/tfcstats.inc +62 -0
- package/amxmodx/base/include/tfcx.inc +148 -0
- package/amxmodx/base/include/time.inc +118 -0
- package/amxmodx/base/include/tsconst.inc +154 -0
- package/amxmodx/base/include/tsfun.inc +198 -0
- package/amxmodx/base/include/tsstats.inc +65 -0
- package/amxmodx/base/include/tsx.inc +88 -0
- package/amxmodx/base/include/vault.inc +60 -0
- package/amxmodx/base/include/vector.inc +131 -0
- package/amxmodx/base/include/xs.inc +1570 -0
- package/as/amxts.d.ts +153 -0
- package/as/constants.ts +4730 -0
- package/as/effects.ts +1449 -0
- package/as/entities.ts +5482 -0
- package/as/events.ts +3054 -0
- package/as/facade.ts +4639 -0
- package/as/flags.ts +299 -0
- package/as/fs.ts +287 -0
- package/as/hooks.ts +18536 -0
- package/as/kit.ts +25 -0
- package/as/lib/check.ts +86 -0
- package/as/modules/http.ts +184 -0
- package/as/natives.ts +11845 -0
- package/as/os.ts +30 -0
- package/as/promise.ts +1392 -0
- package/as/promise.types.d.ts +82 -0
- package/as/remote.ts +288 -0
- package/as/tsconfig.json +22 -0
- package/as/vector.ts +65 -0
- package/bin/amxts.mjs +10 -0
- package/includes/menu_core.inc +355 -0
- package/includes/order.txt +54 -0
- package/includes/sources.json +27 -0
- package/includes/universal_config.inc +355 -0
- package/lint/oxlint-plugin.mjs +77 -0
- package/node_modules/assemblyscript/LICENSE +201 -0
- package/node_modules/assemblyscript/NOTICE +93 -0
- package/node_modules/assemblyscript/package.json +63 -0
- package/node_modules/assemblyscript/std/README.md +6 -0
- package/node_modules/assemblyscript/std/assembly/array.ts +526 -0
- package/node_modules/assemblyscript/std/assembly/arraybuffer.ts +77 -0
- package/node_modules/assemblyscript/std/assembly/atomics.ts +127 -0
- package/node_modules/assemblyscript/std/assembly/bindings/asyncify.ts +16 -0
- package/node_modules/assemblyscript/std/assembly/bindings/dom.ts +291 -0
- package/node_modules/assemblyscript/std/assembly/bindings/node.ts +6 -0
- package/node_modules/assemblyscript/std/assembly/builtins.ts +2631 -0
- package/node_modules/assemblyscript/std/assembly/compat.ts +2 -0
- package/node_modules/assemblyscript/std/assembly/console.ts +42 -0
- package/node_modules/assemblyscript/std/assembly/crypto.ts +9 -0
- package/node_modules/assemblyscript/std/assembly/dataview.ts +181 -0
- package/node_modules/assemblyscript/std/assembly/date.ts +373 -0
- package/node_modules/assemblyscript/std/assembly/diagnostics.ts +11 -0
- package/node_modules/assemblyscript/std/assembly/error.ts +44 -0
- package/node_modules/assemblyscript/std/assembly/function.ts +38 -0
- package/node_modules/assemblyscript/std/assembly/index.d.ts +2822 -0
- package/node_modules/assemblyscript/std/assembly/iterator.ts +35 -0
- package/node_modules/assemblyscript/std/assembly/map.ts +260 -0
- package/node_modules/assemblyscript/std/assembly/math.ts +3289 -0
- package/node_modules/assemblyscript/std/assembly/memory.ts +123 -0
- package/node_modules/assemblyscript/std/assembly/number.ts +388 -0
- package/node_modules/assemblyscript/std/assembly/object.ts +36 -0
- package/node_modules/assemblyscript/std/assembly/performance.ts +9 -0
- package/node_modules/assemblyscript/std/assembly/polyfills.ts +27 -0
- package/node_modules/assemblyscript/std/assembly/process.ts +50 -0
- package/node_modules/assemblyscript/std/assembly/reference.ts +48 -0
- package/node_modules/assemblyscript/std/assembly/regexp.ts +12 -0
- package/node_modules/assemblyscript/std/assembly/rt/README.md +83 -0
- package/node_modules/assemblyscript/std/assembly/rt/common.ts +81 -0
- package/node_modules/assemblyscript/std/assembly/rt/index-incremental.ts +2 -0
- package/node_modules/assemblyscript/std/assembly/rt/index-minimal.ts +2 -0
- package/node_modules/assemblyscript/std/assembly/rt/index-stub.ts +1 -0
- package/node_modules/assemblyscript/std/assembly/rt/index.d.ts +37 -0
- package/node_modules/assemblyscript/std/assembly/rt/itcms.ts +419 -0
- package/node_modules/assemblyscript/std/assembly/rt/rtrace.ts +15 -0
- package/node_modules/assemblyscript/std/assembly/rt/stub.ts +133 -0
- package/node_modules/assemblyscript/std/assembly/rt/tcms.ts +254 -0
- package/node_modules/assemblyscript/std/assembly/rt/tlsf.ts +592 -0
- package/node_modules/assemblyscript/std/assembly/rt.ts +87 -0
- package/node_modules/assemblyscript/std/assembly/set.ts +220 -0
- package/node_modules/assemblyscript/std/assembly/shared/feature.ts +65 -0
- package/node_modules/assemblyscript/std/assembly/shared/runtime.ts +11 -0
- package/node_modules/assemblyscript/std/assembly/shared/target.ts +11 -0
- package/node_modules/assemblyscript/std/assembly/shared/tsconfig.json +11 -0
- package/node_modules/assemblyscript/std/assembly/shared/typeinfo.ts +72 -0
- package/node_modules/assemblyscript/std/assembly/staticarray.ts +401 -0
- package/node_modules/assemblyscript/std/assembly/string.ts +847 -0
- package/node_modules/assemblyscript/std/assembly/symbol.ts +114 -0
- package/node_modules/assemblyscript/std/assembly/table.ts +16 -0
- package/node_modules/assemblyscript/std/assembly/tsconfig.json +6 -0
- package/node_modules/assemblyscript/std/assembly/typedarray.ts +1945 -0
- package/node_modules/assemblyscript/std/assembly/uri.ts +17 -0
- package/node_modules/assemblyscript/std/assembly/util/bytes.ts +107 -0
- package/node_modules/assemblyscript/std/assembly/util/casemap.ts +497 -0
- package/node_modules/assemblyscript/std/assembly/util/error.ts +54 -0
- package/node_modules/assemblyscript/std/assembly/util/hash.ts +117 -0
- package/node_modules/assemblyscript/std/assembly/util/math.ts +1922 -0
- package/node_modules/assemblyscript/std/assembly/util/memory.ts +290 -0
- package/node_modules/assemblyscript/std/assembly/util/number.ts +873 -0
- package/node_modules/assemblyscript/std/assembly/util/sort.ts +313 -0
- package/node_modules/assemblyscript/std/assembly/util/string.ts +1202 -0
- package/node_modules/assemblyscript/std/assembly/util/uri.ts +275 -0
- package/node_modules/assemblyscript/std/assembly/vector.ts +4 -0
- package/node_modules/assemblyscript/std/assembly.json +16 -0
- package/node_modules/assemblyscript/std/portable/index.d.ts +462 -0
- package/node_modules/assemblyscript/std/portable/index.js +416 -0
- package/node_modules/assemblyscript/std/portable.json +11 -0
- package/node_modules/assemblyscript/std/types/assembly/index.d.ts +1 -0
- package/node_modules/assemblyscript/std/types/assembly/package.json +3 -0
- package/node_modules/assemblyscript/std/types/portable/index.d.ts +1 -0
- package/node_modules/assemblyscript/std/types/portable/package.json +3 -0
- package/node_modules/assemblyscript/tsconfig-base.json +13 -0
- package/package.json +112 -0
- package/runtime/deps/assemblyscript/LICENSE +201 -0
- package/runtime/deps/assemblyscript/NOTICE +93 -0
- package/runtime/deps/assemblyscript/bin/asc.js +35 -0
- package/runtime/deps/assemblyscript/dist/asc.js +25035 -0
- package/runtime/deps/assemblyscript/dist/assemblyscript.js +337 -0
- package/runtime/deps/assemblyscript/node_modules/binaryen/LICENSE +201 -0
- package/runtime/deps/assemblyscript/node_modules/binaryen/index.js +28905 -0
- package/runtime/deps/assemblyscript/node_modules/binaryen/package.json +50 -0
- package/runtime/deps/assemblyscript/node_modules/long/LICENSE +202 -0
- package/runtime/deps/assemblyscript/node_modules/long/index.js +1581 -0
- package/runtime/deps/assemblyscript/node_modules/long/package.json +58 -0
- package/runtime/deps/assemblyscript/package.json +114 -0
- package/runtime/host/amxts.inc +85 -0
- package/runtime/licenses/AMXX-LICENSE.txt +34 -0
- package/runtime/licenses/AssemblyScript-LICENSE +201 -0
- package/runtime/licenses/AssemblyScript-NOTICE +93 -0
- package/runtime/licenses/Binaryen-LICENSE +201 -0
- package/runtime/licenses/Bun-LICENSE.md +84 -0
- package/runtime/licenses/GPL-3.0.txt +674 -0
- package/runtime/licenses/LLVM-LICENSE.TXT +279 -0
- package/runtime/licenses/README.md +25 -0
- package/runtime/licenses/WAMR-LICENSE +219 -0
- package/runtime/natives.txt +1095 -0
- package/runtime/patches/README.md +59 -0
- package/runtime/patches/assemblyscript-0.28.20-amxts.patch +14174 -0
- package/runtime/patches/wamr-2.4.5-amxts.patch +364 -0
- package/scripts/apply-docs.ts +508 -0
- package/scripts/asc.ts +27 -0
- package/scripts/auto-imports.ts +258 -0
- package/scripts/build-wasm.ts +595 -0
- package/scripts/check.ts +93 -0
- package/scripts/compile-cache.ts +179 -0
- package/scripts/compile.ts +401 -0
- package/scripts/docker-server.ts +73 -0
- package/scripts/docs/as/amxts.ts +210 -0
- package/scripts/docs/as/effects.ts +1684 -0
- package/scripts/docs/as/facade.ts +3302 -0
- package/scripts/docs/as/fs.ts +173 -0
- package/scripts/docs/as/lib/check.ts +68 -0
- package/scripts/docs/as/modules/http.ts +66 -0
- package/scripts/docs/as/os.ts +16 -0
- package/scripts/docs/as/promise.ts +132 -0
- package/scripts/docs/as/promise.types.ts +63 -0
- package/scripts/docs/as/vector.ts +48 -0
- package/scripts/docs/entities.ts +2338 -0
- package/scripts/docs/events.ts +245 -0
- package/scripts/docs/game.ts +497 -0
- package/scripts/docs/messages.ts +148 -0
- package/scripts/file-contents.ts +74 -0
- package/scripts/includes.ts +134 -0
- package/scripts/player-fields.ts +866 -0
- package/scripts/plugin-cache.ts +92 -0
- package/scripts/plugin-natives.ts +1157 -0
- package/scripts/prebuilt.ts +268 -0
- package/scripts/prepare.ts +134 -0
- package/scripts/project.ts +973 -0
- package/scripts/run.ts +28 -0
- package/scripts/shared-modules.ts +906 -0
- package/scripts/system.ts +33 -0
- package/scripts/tracked-fs.ts +115 -0
- package/scripts/typed-configs.ts +788 -0
- package/scripts/ui.ts +77 -0
- package/src/cli-api.mjs +175 -0
- package/src/parser/include-parser.ts +506 -0
- package/src/system.mjs +155 -0
- package/src/testing/compile-cache.ts +31 -0
- package/src/testing/compile.ts +222 -0
- package/src/testing/coroutines.ts +191 -0
- package/src/testing/index.ts +39 -0
- package/src/testing/kits.ts +55 -0
- package/src/testing/memory.ts +125 -0
- package/src/testing/natives.ts +925 -0
- package/src/testing/server.ts +1874 -0
- package/src/testing/setup.ts +63 -0
- package/src/testing/tables.ts +139 -0
- package/src/types.ts +51 -0
|
@@ -0,0 +1,154 @@
|
|
|
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
|
+
// Copyright (C) 2005 Suzuka.
|
|
6
|
+
//
|
|
7
|
+
// This software is licensed under the GNU General Public License, version 3 or higher.
|
|
8
|
+
// Additional exceptions apply. For full license details, see LICENSE.txt or visit:
|
|
9
|
+
// https://alliedmods.net/amxmodx-license
|
|
10
|
+
|
|
11
|
+
//
|
|
12
|
+
// TSFUN Constants
|
|
13
|
+
//
|
|
14
|
+
|
|
15
|
+
#if defined _tsconst_included
|
|
16
|
+
#endinput
|
|
17
|
+
#endif
|
|
18
|
+
#define _tsconst_included
|
|
19
|
+
|
|
20
|
+
#define TSMAX_WEAPONS 44 // 37 + throwing knife + brekable + 5 custom weapon slots
|
|
21
|
+
|
|
22
|
+
#define TSPWUP_NONE 0
|
|
23
|
+
#define TSPWUP_RANDOM 0
|
|
24
|
+
#define TSPWUP_SLOWMO 1
|
|
25
|
+
#define TSPWUP_INFAMMO 2
|
|
26
|
+
#define TSPWUP_KUNGFU 4
|
|
27
|
+
#define TSPWUP_SLOWPAUSE 8
|
|
28
|
+
#define TSPWUP_DFIRERATE 16
|
|
29
|
+
#define TSPWUP_GRENADE 32
|
|
30
|
+
#define TSPWUP_HEALTH 64
|
|
31
|
+
#define TSPWUP_ARMOR 128
|
|
32
|
+
#define TSPWUP_SUPERJUMP 256
|
|
33
|
+
|
|
34
|
+
#define TSITEM_KUNGFU 1<<0
|
|
35
|
+
#define TSITEM_SUPERJUMP 1<<1
|
|
36
|
+
|
|
37
|
+
#define TSKF_STUNTKILL 1<<0
|
|
38
|
+
#define TSKF_SLIDINGKILL 1<<1
|
|
39
|
+
#define TSKF_DOUBLEKILL 1<<2
|
|
40
|
+
#define TSKF_ISSPEC 1<<3
|
|
41
|
+
#define TSKF_KILLEDSPEC 1<<4
|
|
42
|
+
|
|
43
|
+
#define TSA_SILENCER 1
|
|
44
|
+
#define TSA_LASERSIGHT 2
|
|
45
|
+
#define TSA_FLASHLIGHT 4
|
|
46
|
+
#define TSA_SCOPE 8
|
|
47
|
+
|
|
48
|
+
#define TSMSG_NORMAL 6
|
|
49
|
+
#define TSMSG_WAITING 11
|
|
50
|
+
#define TSMSG_DEAD 1
|
|
51
|
+
#define TSMSG_KILLER 2
|
|
52
|
+
#define TSMSG_DEMOLITION 3
|
|
53
|
+
#define TSMSG_SPECIALIST 4
|
|
54
|
+
#define TSMSG_UNSTOPPABLE 5
|
|
55
|
+
#define TSMSG_THEONE 10
|
|
56
|
+
|
|
57
|
+
#define STUNT_NONE 0
|
|
58
|
+
#define STUNT_DUCK 1
|
|
59
|
+
#define STUNT_ROLL 2
|
|
60
|
+
#define STUNT_DIVE 3
|
|
61
|
+
#define STUNT_GETUP 4
|
|
62
|
+
#define STUNT_FLIP 5
|
|
63
|
+
|
|
64
|
+
enum {
|
|
65
|
+
TSW_GLOCK18 = 1,
|
|
66
|
+
TSW_UNK1,
|
|
67
|
+
TSW_UZI,
|
|
68
|
+
TSW_M3,
|
|
69
|
+
TSW_M4A1,
|
|
70
|
+
TSW_MP5SD,
|
|
71
|
+
TSW_MP5K,
|
|
72
|
+
TSW_ABERETTAS,
|
|
73
|
+
TSW_MK23,
|
|
74
|
+
TSW_AMK23,
|
|
75
|
+
TSW_USAS,
|
|
76
|
+
TSW_DEAGLE,
|
|
77
|
+
TSW_AK47,
|
|
78
|
+
TSW_57,
|
|
79
|
+
TSW_AUG,
|
|
80
|
+
TSW_AUZI,
|
|
81
|
+
TSW_TMP,
|
|
82
|
+
TSW_M82A1,
|
|
83
|
+
TSW_MP7,
|
|
84
|
+
TSW_SPAS,
|
|
85
|
+
TSW_GCOLTS,
|
|
86
|
+
TSW_GLOCK20,
|
|
87
|
+
TSW_UMP,
|
|
88
|
+
TSW_M61GRENADE,
|
|
89
|
+
TSW_CKNIFE,
|
|
90
|
+
TSW_MOSSBERG,
|
|
91
|
+
TSW_M16A4,
|
|
92
|
+
TSW_MK1,
|
|
93
|
+
TSW_C4,
|
|
94
|
+
TSW_A57,
|
|
95
|
+
TSW_RBULL,
|
|
96
|
+
TSW_M60E3,
|
|
97
|
+
TSW_SAWED_OFF,
|
|
98
|
+
TSW_KATANA,
|
|
99
|
+
TSW_SKNIFE,
|
|
100
|
+
TSW_KUNG_FU,
|
|
101
|
+
TSW_TKNIFE,
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
/*
|
|
105
|
+
valid tsweaponid in TS_GiveWeapon
|
|
106
|
+
|
|
107
|
+
1: "Glock 18"
|
|
108
|
+
3: "Mini Uzi"
|
|
109
|
+
4: "Benelli M3"
|
|
110
|
+
5: "M4A1"
|
|
111
|
+
6: "MP5SD"
|
|
112
|
+
7: "MP5K"
|
|
113
|
+
8: "Akimbo Berettas"
|
|
114
|
+
9: "Socom Mk23"
|
|
115
|
+
11: "Usas12"
|
|
116
|
+
12: "Desert Eagle"
|
|
117
|
+
13: "Ak47"
|
|
118
|
+
14: "FiveSeven"
|
|
119
|
+
15: "Steyr Aug"
|
|
120
|
+
17: "Steyr Tmp"
|
|
121
|
+
18: "Barrett M82"
|
|
122
|
+
19: "HK Pdw"
|
|
123
|
+
20: "Spas12"
|
|
124
|
+
21: "Akimbo colts"
|
|
125
|
+
22: "Glock 20"
|
|
126
|
+
23: "Mac10"
|
|
127
|
+
25: "Combat Knife"
|
|
128
|
+
26: "Mossberg 500"
|
|
129
|
+
27: "M16A4"
|
|
130
|
+
28: "Ruger Mk1"
|
|
131
|
+
24: "M61 Grenade"
|
|
132
|
+
29: "C4"
|
|
133
|
+
31: "Raging Bull"
|
|
134
|
+
32: "M60"
|
|
135
|
+
33: "Sawed off"
|
|
136
|
+
34: "Katana"
|
|
137
|
+
35: "Seal Knife"
|
|
138
|
+
|
|
139
|
+
valid pwuptype in TS_GivePwUp
|
|
140
|
+
|
|
141
|
+
0: "Random"
|
|
142
|
+
1: "Slow Motion"
|
|
143
|
+
2: "Infinite Clip"
|
|
144
|
+
4: "Kung Fu"
|
|
145
|
+
8: "Slow Pause"
|
|
146
|
+
16: "Double Firerate"
|
|
147
|
+
32: "Grenade"
|
|
148
|
+
64: "Health"
|
|
149
|
+
128: "Armor"
|
|
150
|
+
256: "Superjump"
|
|
151
|
+
|
|
152
|
+
*/
|
|
153
|
+
|
|
154
|
+
|
|
@@ -0,0 +1,198 @@
|
|
|
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
|
+
// TSFUN Functions
|
|
12
|
+
//
|
|
13
|
+
|
|
14
|
+
#if defined _tsxfun_included
|
|
15
|
+
#endinput
|
|
16
|
+
#endif
|
|
17
|
+
#define _tsxfun_included
|
|
18
|
+
|
|
19
|
+
#include <tsx>
|
|
20
|
+
#include <tsconst>
|
|
21
|
+
|
|
22
|
+
/************* Shared Natives Start ********************************/
|
|
23
|
+
|
|
24
|
+
/* Forward types */
|
|
25
|
+
enum {
|
|
26
|
+
XMF_DAMAGE = 0,
|
|
27
|
+
XMF_DEATH,
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
#pragma reqlib tsfun
|
|
31
|
+
#if !defined AMXMODX_NOAUTOLOAD
|
|
32
|
+
#pragma loadlib tsfun
|
|
33
|
+
#endif
|
|
34
|
+
|
|
35
|
+
/************* Shared Natives End ********************************/
|
|
36
|
+
|
|
37
|
+
/* Function is called just before a kung foo attack is done,
|
|
38
|
+
* damage and time length may be altered with natives.
|
|
39
|
+
* Return PLUGIN_HANDLED to stop attack.
|
|
40
|
+
* UNAVAILABLE IN 1.70
|
|
41
|
+
*/
|
|
42
|
+
forward Melee_Attack(id,Float:time,Float:damage,UNAVAILABLE);
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
// Returns when someone stunts, after they do it.
|
|
46
|
+
//UNAVAILABLE IN 1.70
|
|
47
|
+
forward client_stunt(id,stunttype,UNAVAILABLE);
|
|
48
|
+
|
|
49
|
+
/* Function is called when powerups are ran,
|
|
50
|
+
* Returns value of powerup. Use TSPWUP_*'s
|
|
51
|
+
* to find exactly which one it is.
|
|
52
|
+
* UNAVAILABLE IN 1.70
|
|
53
|
+
*/
|
|
54
|
+
forward client_powerup(id,powerup,UNAVAILABLE);
|
|
55
|
+
|
|
56
|
+
/* weapon logname to weapon name convertion */
|
|
57
|
+
native ts_wpnlogtoname(const logname[],name[],len);
|
|
58
|
+
|
|
59
|
+
/* weapon logname to weapon index convertion */
|
|
60
|
+
native ts_wpnlogtoid(const logname[]);
|
|
61
|
+
|
|
62
|
+
//UNAVAILABLE IN 1.70
|
|
63
|
+
//native Float:ts_getusertime( index ); //!
|
|
64
|
+
//native ts_setusertime( index, Float:time ); //!
|
|
65
|
+
|
|
66
|
+
native ts_getusercash( index );
|
|
67
|
+
native ts_setusercash( index, money );
|
|
68
|
+
|
|
69
|
+
native ts_getuserslots( index );
|
|
70
|
+
native ts_setuserslots( index, slots );
|
|
71
|
+
|
|
72
|
+
native ts_getuserstate( index );
|
|
73
|
+
native ts_getuserwpn( index,&clip=0,&ammo=0,&mode=0,&extra=0 );
|
|
74
|
+
native ts_getuserspace( index );
|
|
75
|
+
|
|
76
|
+
native ts_getuserkillflags(killer);
|
|
77
|
+
native ts_getkillingstreak( index );
|
|
78
|
+
native ts_getuserlastfrag( index );
|
|
79
|
+
|
|
80
|
+
native ts_giveweapon( index,weapon,clips,extra );
|
|
81
|
+
|
|
82
|
+
native ts_getuserpwup( index );
|
|
83
|
+
|
|
84
|
+
stock ts_has_slowmo(id) {
|
|
85
|
+
return (ts_getuserpwup(id) &TSPWUP_SLOWMO);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
stock ts_has_infammo(id) {
|
|
89
|
+
return (ts_getuserpwup(id) &TSPWUP_INFAMMO);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
stock ts_has_slowpause(id) {
|
|
93
|
+
return (ts_getuserpwup(id) &TSPWUP_SLOWPAUSE);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
stock ts_has_dfirerate(id) {
|
|
97
|
+
return (ts_getuserpwup(id) &TSPWUP_DFIRERATE);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
stock ts_has_grenade(id) {
|
|
101
|
+
return (ts_getuserpwup(id) &TSPWUP_GRENADE);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
stock ts_has_health(id) {
|
|
105
|
+
return (ts_getuserpwup(id) &TSPWUP_HEALTH);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
stock ts_has_armor(id) {
|
|
109
|
+
return (ts_getuserpwup(id) &TSPWUP_ARMOR);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/* Function will create pwup entity and return its index (pwupent) */
|
|
113
|
+
native ts_createpwup( pwup );
|
|
114
|
+
|
|
115
|
+
native ts_givepwup( index,pwupent );
|
|
116
|
+
|
|
117
|
+
native ts_setpddata( knifeoffset );
|
|
118
|
+
|
|
119
|
+
// Alters a fu attack. Use with fu forward
|
|
120
|
+
// UNAVAILABLE IN 1.70
|
|
121
|
+
// native ts_set_fuattack(id,Float:time,Float:damage); //!
|
|
122
|
+
|
|
123
|
+
// Changes board message
|
|
124
|
+
native ts_set_message(id,message);
|
|
125
|
+
|
|
126
|
+
// Gets the message board message
|
|
127
|
+
native ts_get_message(id);
|
|
128
|
+
|
|
129
|
+
stock ts_is_normal(id)
|
|
130
|
+
{
|
|
131
|
+
new msg = ts_get_message(id);
|
|
132
|
+
if( (msg > 11) || (msg > 6 && msg < 10) ) return 1;
|
|
133
|
+
return 0;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
stock ts_is_waiting(id) {
|
|
137
|
+
return (ts_get_message(id) == TSMSG_WAITING);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
stock ts_is_dead(id) {
|
|
141
|
+
return (ts_get_message(id) == TSMSG_DEAD);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
stock ts_is_killer(id) {
|
|
145
|
+
return (ts_get_message(id) == TSMSG_KILLER);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
stock ts_is_demolition(id) {
|
|
149
|
+
return (ts_get_message(id) == TSMSG_DEMOLITION);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
stock ts_is_specialist(id) {
|
|
153
|
+
return (ts_get_message(id) == TSMSG_SPECIALIST);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
stock ts_is_unstoppable(id) {
|
|
157
|
+
return (ts_get_message(id) == TSMSG_UNSTOPPABLE);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
stock ts_is_theone(id) {
|
|
161
|
+
return (ts_get_message(id) == TSMSG_THEONE);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
// Return one on true, 0 on false
|
|
165
|
+
// UNAVAILABLE IN 1.70
|
|
166
|
+
native ts_has_superjump(id); //!
|
|
167
|
+
native ts_has_fupowerup(id); //!
|
|
168
|
+
native ts_is_in_slowmo(id);
|
|
169
|
+
|
|
170
|
+
// Get and set consecutive frags
|
|
171
|
+
//UNAVAILABLE IN 1.70
|
|
172
|
+
//native ts_get_cons_frags(id);
|
|
173
|
+
//native ts_set_cons_frags(id,num);
|
|
174
|
+
|
|
175
|
+
// Set to see cool bullet trails. Only id will see them.
|
|
176
|
+
native ts_set_bullettrail(id,yesorno);
|
|
177
|
+
|
|
178
|
+
// Sets fake versions of slow mo and slow pause. Use ts_set_speed for more options.
|
|
179
|
+
native ts_set_fakeslowmo(id,Float:time);
|
|
180
|
+
native ts_set_fakeslowpause(id,Float:time);
|
|
181
|
+
|
|
182
|
+
/* Sets speed artificially. 1.0 is default, Go into fractions and decimals for slower
|
|
183
|
+
* and put in higher numbers for higher speeds. Aura is how far things around you are effected
|
|
184
|
+
* Time is the time until it wears off. 0.0 for speed will freeze people. Do not use negatives. */
|
|
185
|
+
|
|
186
|
+
native ts_set_speed(id,Float:speed,Float:auradist,Float:time);
|
|
187
|
+
|
|
188
|
+
/* Sets physics speed artificially. Things like sparks and sounds will be effected.
|
|
189
|
+
* Any negative number will render all physics paused. */
|
|
190
|
+
native ts_set_physics_speed(id,Float:speed);
|
|
191
|
+
|
|
192
|
+
// Returns 0 if no powerup is running. Returns the powerup type otherwise.
|
|
193
|
+
native ts_is_running_powerup(id);
|
|
194
|
+
|
|
195
|
+
// Highly experimental command which overrides powerup types.
|
|
196
|
+
// Use if a powerup is already running, or if a powerup is not running.
|
|
197
|
+
// Safe to use in powerup forward.
|
|
198
|
+
native ts_force_run_powerup(id,PWUP_TYPE);
|
|
@@ -0,0 +1,65 @@
|
|
|
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
|
+
// TSX Stats Functions
|
|
12
|
+
//
|
|
13
|
+
|
|
14
|
+
#if defined _tsstats_included
|
|
15
|
+
#endinput
|
|
16
|
+
#endif
|
|
17
|
+
#define _tsstats_included
|
|
18
|
+
|
|
19
|
+
/* Gets stats from given weapon index. If wpnindex is 0
|
|
20
|
+
* then the stats are from all weapons. If weapon has not been used function
|
|
21
|
+
* returns 0 in other case 1. Fields in stats are:
|
|
22
|
+
* 0 - kills
|
|
23
|
+
* 1 - deaths
|
|
24
|
+
* 2 - headshots
|
|
25
|
+
* 3 - teamkilling
|
|
26
|
+
* 4 - shots
|
|
27
|
+
* 5 - hits
|
|
28
|
+
* 6 - damage
|
|
29
|
+
* For body hits fields see amxconst.inc. */
|
|
30
|
+
native get_user_wstats(index,wpnindex,stats[STATSX_MAX_STATS],bodyhits[MAX_BODYHITS]);
|
|
31
|
+
|
|
32
|
+
/* Gets round stats from given weapon index.*/
|
|
33
|
+
native get_user_wrstats(index,wpnindex,stats[STATSX_MAX_STATS],bodyhits[MAX_BODYHITS]);
|
|
34
|
+
|
|
35
|
+
/* Gets life (from spawn to spawn) stats from given weapon index.*/
|
|
36
|
+
native get_user_wlstats(index,wpnindex,stats[STATSX_MAX_STATS],bodyhits[MAX_BODYHITS]);
|
|
37
|
+
|
|
38
|
+
/* Gets overall stats which are stored in file on server
|
|
39
|
+
* and updated on every respawn or user disconnect.
|
|
40
|
+
* Function returns the position in stats by diff. kills to deaths. */
|
|
41
|
+
native get_user_stats(index,stats[STATSX_MAX_STATS],bodyhits[MAX_BODYHITS]);
|
|
42
|
+
|
|
43
|
+
/* Gets round stats of player. */
|
|
44
|
+
native get_user_rstats(index,stats[STATSX_MAX_STATS],bodyhits[MAX_BODYHITS]);
|
|
45
|
+
|
|
46
|
+
/* Gets stats with which user have killed/hurt his victim. If victim is 0
|
|
47
|
+
* then stats are from all victims. If victim has not been hurt, function
|
|
48
|
+
* returns 0 in other case 1. User stats are reset on his respawn. */
|
|
49
|
+
native get_user_vstats(index,victim,stats[STATSX_MAX_STATS],bodyhits[MAX_BODYHITS],wpnname[]="",len=0);
|
|
50
|
+
|
|
51
|
+
/* Gets stats with which user have been killed/hurt. If killer is 0
|
|
52
|
+
* then stats are from all attacks. If killer has not hurt user, function
|
|
53
|
+
* returns 0 in other case 1. User stats are reset on his respawn. */
|
|
54
|
+
native get_user_astats(index,wpnindex,stats[STATSX_MAX_STATS],bodyhits[MAX_BODYHITS],wpnname[]="",len=0);
|
|
55
|
+
|
|
56
|
+
/* Resets life, weapon, victims and attackers user stats. */
|
|
57
|
+
native reset_user_wstats(index);
|
|
58
|
+
|
|
59
|
+
/* Gets overall stats which stored in stats.dat file in amx folder
|
|
60
|
+
* and updated on every mapchange or user disconnect.
|
|
61
|
+
* Function returns next index of stats entry or 0 if no more exists. */
|
|
62
|
+
native get_stats(index,stats[STATSX_MAX_STATS],bodyhits[MAX_BODYHITS],name[],len);
|
|
63
|
+
|
|
64
|
+
/* Returns number of all entries in stats. */
|
|
65
|
+
native get_statsnum();
|
|
@@ -0,0 +1,88 @@
|
|
|
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
|
+
// TSX Functions
|
|
12
|
+
//
|
|
13
|
+
|
|
14
|
+
#if defined _tsx_included
|
|
15
|
+
#endinput
|
|
16
|
+
#endif
|
|
17
|
+
#define _tsx_included
|
|
18
|
+
|
|
19
|
+
#include <tsstats>
|
|
20
|
+
|
|
21
|
+
#pragma reqclass xstats
|
|
22
|
+
#if !defined AMXMODX_NOAUTOLOAD
|
|
23
|
+
#pragma defclasslib xstats tsx
|
|
24
|
+
#endif
|
|
25
|
+
|
|
26
|
+
/************* Shared Natives Start ********************************/
|
|
27
|
+
|
|
28
|
+
/* Forward types */
|
|
29
|
+
enum {
|
|
30
|
+
XMF_DAMAGE = 0,
|
|
31
|
+
XMF_DEATH,
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
/* Use this function to register forwards
|
|
35
|
+
* DEPRECATED
|
|
36
|
+
*/
|
|
37
|
+
native register_statsfwd( ftype );
|
|
38
|
+
|
|
39
|
+
/* Function is called after player to player attacks ,
|
|
40
|
+
* if players were damaged by teammate TA is set to 1 */
|
|
41
|
+
forward client_damage(attacker,victim,damage,wpnindex,hitplace,TA);
|
|
42
|
+
|
|
43
|
+
/* Function is called after player death ,
|
|
44
|
+
* if player was killed by teammate TK is set to 1 */
|
|
45
|
+
forward client_death(killer,victim,wpnindex,hitplace,TK);
|
|
46
|
+
|
|
47
|
+
/* Custom Weapon Support */
|
|
48
|
+
/* function will return index of new weapon */
|
|
49
|
+
native custom_weapon_add( const wpnname[],melee = 0,const logname[]="" );
|
|
50
|
+
/* Function will pass damage done by this custom weapon to stats module and other plugins */
|
|
51
|
+
native custom_weapon_dmg( weapon, att, vic, damage, hitplace=0 );
|
|
52
|
+
/* Function will pass info about custom weapon shot to stats module */
|
|
53
|
+
native custom_weapon_shot( weapon,index ); // weapon id , player id
|
|
54
|
+
|
|
55
|
+
/* function will return 1 if true */
|
|
56
|
+
native xmod_is_melee_wpn(wpnindex);
|
|
57
|
+
|
|
58
|
+
/* Returns weapon name. */
|
|
59
|
+
native xmod_get_wpnname(wpnindex,name[],len);
|
|
60
|
+
|
|
61
|
+
/* Returns weapon logname. */
|
|
62
|
+
native xmod_get_wpnlogname(wpnindex,name[],len);
|
|
63
|
+
|
|
64
|
+
/* Returns weapons array size */
|
|
65
|
+
native xmod_get_maxweapons();
|
|
66
|
+
|
|
67
|
+
/* Returns stats array size ex. 8 in TS , 9 in DoD */
|
|
68
|
+
native xmod_get_stats_size();
|
|
69
|
+
|
|
70
|
+
/* Returns 1 if true */
|
|
71
|
+
native xmod_is_custom_wpn(wpnindex);
|
|
72
|
+
|
|
73
|
+
/************* Shared Natives End ********************************/
|
|
74
|
+
|
|
75
|
+
/* Spawns a Weapon */
|
|
76
|
+
stock ts_weaponspawn(const weaponid[], const duration[], const extraclip[], const spawnflags[], const Float:Origin[3])
|
|
77
|
+
{
|
|
78
|
+
new ent = create_entity("ts_groundweapon");
|
|
79
|
+
|
|
80
|
+
DispatchKeyValue(ent, "tsweaponid", weaponid);
|
|
81
|
+
DispatchKeyValue(ent, "wduration", duration);
|
|
82
|
+
DispatchKeyValue(ent, "wextraclip", extraclip);
|
|
83
|
+
DispatchKeyValue(ent, "spawnflags", spawnflags);
|
|
84
|
+
DispatchSpawn(ent);
|
|
85
|
+
|
|
86
|
+
entity_set_origin(ent, Origin);
|
|
87
|
+
return PLUGIN_HANDLED;
|
|
88
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
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
|
+
// Vault Functions
|
|
12
|
+
//
|
|
13
|
+
|
|
14
|
+
#if defined _vault_included
|
|
15
|
+
#endinput
|
|
16
|
+
#endif
|
|
17
|
+
#define _vault_included
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Reads data from a given key.
|
|
21
|
+
*
|
|
22
|
+
*
|
|
23
|
+
* @param key Key to get the value from
|
|
24
|
+
* @param data Buffer to copy the value to
|
|
25
|
+
* @param len Buffer size. If len is set to 0 then the function will
|
|
26
|
+
* return the value as a number
|
|
27
|
+
*
|
|
28
|
+
* @return If len is not 0 the function will return the number of characters written.
|
|
29
|
+
If len is 0 the function will return the numerical value associated with the key.
|
|
30
|
+
*/
|
|
31
|
+
native get_vaultdata(const key[], data[] = "", len = 0);
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Sets data for a given key.
|
|
36
|
+
*
|
|
37
|
+
* @param key Key to set the value for
|
|
38
|
+
* @param data Data to set for the given key
|
|
39
|
+
*
|
|
40
|
+
* @noreturn
|
|
41
|
+
*/
|
|
42
|
+
native set_vaultdata(const key[], const data[] = "");
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Removes a key and its data from the vault.
|
|
46
|
+
*
|
|
47
|
+
* @param key Key to remove
|
|
48
|
+
*
|
|
49
|
+
* @noreturn
|
|
50
|
+
*/
|
|
51
|
+
native remove_vaultdata(const key[]);
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Checks if a key exists in the vault.
|
|
55
|
+
*
|
|
56
|
+
* @param key Key to check
|
|
57
|
+
*
|
|
58
|
+
* @return 1 if an entry was found, 0 otherwise.
|
|
59
|
+
*/
|
|
60
|
+
native vaultdata_exists(const key[]);
|
|
@@ -0,0 +1,131 @@
|
|
|
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
|
+
// Vector Functions
|
|
12
|
+
//
|
|
13
|
+
|
|
14
|
+
#if defined _corevector_included
|
|
15
|
+
#endinput
|
|
16
|
+
#endif
|
|
17
|
+
#define _corevector_included
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Used for angle_vector()
|
|
21
|
+
*/
|
|
22
|
+
#define ANGLEVECTOR_FORWARD 1
|
|
23
|
+
#define ANGLEVECTOR_RIGHT 2
|
|
24
|
+
#define ANGLEVECTOR_UP 3
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Calculates the distance between two input vectors.
|
|
28
|
+
*
|
|
29
|
+
* @param origin1 The first vector
|
|
30
|
+
* @param origin2 The second vector
|
|
31
|
+
*
|
|
32
|
+
* @return The distance between two input vectors
|
|
33
|
+
*/
|
|
34
|
+
native get_distance(const origin1[3], const origin2[3]);
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Calculates the distance between two input float vectors.
|
|
38
|
+
*
|
|
39
|
+
* @param origin1 The first vector
|
|
40
|
+
* @param origin2 The second vector
|
|
41
|
+
*
|
|
42
|
+
* @return The distance between two input vectors
|
|
43
|
+
*/
|
|
44
|
+
native Float:get_distance_f(const Float:Origin1[3], const Float:Origin2[3]);
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Calculates velocity in the direction player is looking.
|
|
48
|
+
*
|
|
49
|
+
* @param iIndex Client index
|
|
50
|
+
* @param iVelocity Multiply vRetValue length by this much
|
|
51
|
+
* @param vRetValue Store the calculated velocity in this vector.
|
|
52
|
+
*
|
|
53
|
+
* @noreturn
|
|
54
|
+
* @error If client is not connected or client index is not
|
|
55
|
+
* within the range of 1 to MaxClients.
|
|
56
|
+
*/
|
|
57
|
+
native velocity_by_aim(iIndex, iVelocity, Float:vRetValue[3]);
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Changes a vector into an angle vector.
|
|
61
|
+
*
|
|
62
|
+
* @param fVector Input vector
|
|
63
|
+
* @param vReturn Output angle vector
|
|
64
|
+
*
|
|
65
|
+
* @noreturn
|
|
66
|
+
*/
|
|
67
|
+
native vector_to_angle(const Float:fVector[3], Float:vReturn[3]);
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Changes an angle vector into a vector.
|
|
71
|
+
*
|
|
72
|
+
* @param vector Input angle vector
|
|
73
|
+
* @param FRU One of the ANGLEVECTOR_* constants
|
|
74
|
+
* @param ret Output vector
|
|
75
|
+
*
|
|
76
|
+
* @noreturn
|
|
77
|
+
*/
|
|
78
|
+
native angle_vector(const Float:vector[3], FRU, Float:ret[3]);
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Calculates the length of a vector.
|
|
82
|
+
*
|
|
83
|
+
* @param vVector Input vector
|
|
84
|
+
*
|
|
85
|
+
* @return Length of the input vector
|
|
86
|
+
*/
|
|
87
|
+
native Float:vector_length(const Float:vVector[3]);
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Calculates the distance between two vectors.
|
|
91
|
+
*
|
|
92
|
+
* @param vVector The first vector
|
|
93
|
+
* @param vVector2 The second vector
|
|
94
|
+
*
|
|
95
|
+
* @return Distance between two input vectors
|
|
96
|
+
*/
|
|
97
|
+
native Float:vector_distance(const Float:vVector[3], const Float:vVector2[3]);
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Converts an integer vector to a floating point vector.
|
|
101
|
+
*
|
|
102
|
+
* @param IVec Input integer vector
|
|
103
|
+
* @param FVec Output float vector
|
|
104
|
+
*
|
|
105
|
+
* @noreturn
|
|
106
|
+
*/
|
|
107
|
+
stock IVecFVec(const IVec[3], Float:FVec[3])
|
|
108
|
+
{
|
|
109
|
+
FVec[0] = float(IVec[0]);
|
|
110
|
+
FVec[1] = float(IVec[1]);
|
|
111
|
+
FVec[2] = float(IVec[2]);
|
|
112
|
+
|
|
113
|
+
return 1;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* Converts a floating point vector into an integer vector.
|
|
118
|
+
*
|
|
119
|
+
* @param FVec Input float vector
|
|
120
|
+
* @param IVec Output integer vector
|
|
121
|
+
*
|
|
122
|
+
* @noreturn
|
|
123
|
+
*/
|
|
124
|
+
stock FVecIVec(const Float:FVec[3], IVec[3])
|
|
125
|
+
{
|
|
126
|
+
IVec[0] = floatround(FVec[0]);
|
|
127
|
+
IVec[1] = floatround(FVec[1]);
|
|
128
|
+
IVec[2] = floatround(FVec[2]);
|
|
129
|
+
|
|
130
|
+
return 1;
|
|
131
|
+
}
|