@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
|
+
//
|
|
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
|
+
// SQL Database API
|
|
12
|
+
//
|
|
13
|
+
|
|
14
|
+
//
|
|
15
|
+
// Notes - Read the comments! Make sure your plugins use
|
|
16
|
+
// nice ANSI SQL and don't use database column names like "key"
|
|
17
|
+
// otherwise this API will be a nightmare
|
|
18
|
+
//
|
|
19
|
+
// Never do error checking with the not operator! This is bad:
|
|
20
|
+
// if (!dbi_query())
|
|
21
|
+
// You should do:
|
|
22
|
+
// ret = dbi_query()
|
|
23
|
+
// if (ret < 0)
|
|
24
|
+
// This is because DBI functions can and will return negative numbers
|
|
25
|
+
// Negative numbers evaluate to "true" in AMX.
|
|
26
|
+
//
|
|
27
|
+
|
|
28
|
+
#if defined _dbi_included
|
|
29
|
+
#endinput
|
|
30
|
+
#endif
|
|
31
|
+
#define _dbi_included
|
|
32
|
+
|
|
33
|
+
// You can't include SQLX first!
|
|
34
|
+
// there's really no reason to anyway.
|
|
35
|
+
#assert !defined _sqlx_included
|
|
36
|
+
|
|
37
|
+
#pragma reqclass dbi
|
|
38
|
+
|
|
39
|
+
enum Sql
|
|
40
|
+
{
|
|
41
|
+
SQL_FAILED=0,
|
|
42
|
+
SQL_OK
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
enum Result
|
|
46
|
+
{
|
|
47
|
+
RESULT_FAILED=-1,
|
|
48
|
+
RESULT_NONE,
|
|
49
|
+
RESULT_OK
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
/* This will return a number equal to or below 0 on failure.
|
|
53
|
+
* If it does fail, the error will be mirrored in dbi_error()
|
|
54
|
+
* The return value will otherwise be a resource handle, not an
|
|
55
|
+
* OK code or cell pointer.
|
|
56
|
+
*/
|
|
57
|
+
native Sql:dbi_connect(_host[], _user[], _pass[], _dbname[], _error[]="", _maxlength=0);
|
|
58
|
+
|
|
59
|
+
/* This will do a simple query execution on the SQL server.
|
|
60
|
+
* If it fails, it will return a number BELOW ZERO (0)
|
|
61
|
+
* If zero, it succeeded with NO RETURN RESULT.
|
|
62
|
+
* If greater than zero, make sure to call dbi_free_result() on it!
|
|
63
|
+
* The return is a handle to the result set
|
|
64
|
+
*/
|
|
65
|
+
native Result:dbi_query(Sql:_sql, _query[], any:...);
|
|
66
|
+
|
|
67
|
+
/* Has the same usage as dbi_query, but this native returns by
|
|
68
|
+
* reference the number of rows affected in the query. If the
|
|
69
|
+
* query fails rows will be equal to -1.
|
|
70
|
+
*/
|
|
71
|
+
native Result:dbi_query2(Sql:_sql, &rows, _query[], any:...);
|
|
72
|
+
|
|
73
|
+
/* Returns 0 on failure or End of Results.
|
|
74
|
+
* Advances result pointer by one row.
|
|
75
|
+
*/
|
|
76
|
+
native dbi_nextrow(Result:_result);
|
|
77
|
+
|
|
78
|
+
/* Gets a field by number. Returns 0 on failure.
|
|
79
|
+
* Although internally fields always start from 0,
|
|
80
|
+
* This function takes fieldnum starting from 1.
|
|
81
|
+
* No extra params: returns int
|
|
82
|
+
* One extra param: returns Float: byref
|
|
83
|
+
* Two extra param: Stores string with length
|
|
84
|
+
*/
|
|
85
|
+
native dbi_field(Result:_result, _fieldnum, any:... );
|
|
86
|
+
|
|
87
|
+
/* Gets a field by name. Returns 0 on failure.
|
|
88
|
+
* One extra param: returns Float: byref
|
|
89
|
+
* Two extra param: Stores string with length
|
|
90
|
+
*/
|
|
91
|
+
native dbi_result(Result:_result, _field[], any:... );
|
|
92
|
+
|
|
93
|
+
/* Returns the number of rows returned from a query
|
|
94
|
+
*/
|
|
95
|
+
native dbi_num_rows(Result:_result);
|
|
96
|
+
|
|
97
|
+
/* Frees memory used by a result handle. Do this or get memory leaks.
|
|
98
|
+
*/
|
|
99
|
+
native dbi_free_result(&Result:result);
|
|
100
|
+
|
|
101
|
+
/* Closes a database handle. Internally, it will also
|
|
102
|
+
* mark the handle as free, so this particular handle may
|
|
103
|
+
* be re-used in the future to save time.
|
|
104
|
+
*/
|
|
105
|
+
native dbi_close(&Sql:_sql);
|
|
106
|
+
|
|
107
|
+
/* Returns an error message set. For PGSQL and MySQL,
|
|
108
|
+
* this is a direct error return from the database handle/API.
|
|
109
|
+
* For MSSQL, it returns the last error message found from a
|
|
110
|
+
* thrown exception.
|
|
111
|
+
*/
|
|
112
|
+
native dbi_error(Sql:_sql, _error[], _len);
|
|
113
|
+
|
|
114
|
+
/* Returns the type of database being used. So far:
|
|
115
|
+
* "mysql", "pgsql", "mssql", "sqlite"
|
|
116
|
+
*/
|
|
117
|
+
native dbi_type(_type[], _len);
|
|
118
|
+
|
|
119
|
+
/* Returns the number of fields/colums in a result set.
|
|
120
|
+
* Unlike dbi_nextrow, you must pass a valid result handle.
|
|
121
|
+
*/
|
|
122
|
+
native dbi_num_fields(Result:result);
|
|
123
|
+
|
|
124
|
+
/* Retrieves the name of a field/column in a result set.
|
|
125
|
+
* Requires a valid result handle, and columns are numbered 1 to n.
|
|
126
|
+
*/
|
|
127
|
+
native dbi_field_name(Result:result, field, name[], maxLength);
|
|
128
|
+
|
|
129
|
+
/* This function can be used to find out if a table in a Sqlite database exists.
|
|
130
|
+
*/
|
|
131
|
+
stock bool:sqlite_table_exists(Sql:sql, table[])
|
|
132
|
+
{
|
|
133
|
+
new bool:exists;
|
|
134
|
+
new query[128];
|
|
135
|
+
format(query, 127, "SELECT name FROM sqlite_master WHERE type='table' AND name='%s' LIMIT 1;", table);
|
|
136
|
+
|
|
137
|
+
new Result:result = dbi_query(sql, query);
|
|
138
|
+
|
|
139
|
+
if (dbi_nextrow(result))
|
|
140
|
+
{
|
|
141
|
+
exists = true;
|
|
142
|
+
}
|
|
143
|
+
else
|
|
144
|
+
{
|
|
145
|
+
exists = false;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
if (result > RESULT_NONE)
|
|
149
|
+
{
|
|
150
|
+
dbi_free_result(result);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
return exists;
|
|
154
|
+
}
|
|
@@ -0,0 +1,152 @@
|
|
|
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
|
+
#if defined _dodconst_included
|
|
11
|
+
#endinput
|
|
12
|
+
#endif
|
|
13
|
+
#define _dodconst_included
|
|
14
|
+
|
|
15
|
+
/* DoD teams */
|
|
16
|
+
#define ALLIES 1
|
|
17
|
+
#define AXIS 2
|
|
18
|
+
|
|
19
|
+
#define FT_NEW 1<<0
|
|
20
|
+
#define FT_OLD 1<<1
|
|
21
|
+
|
|
22
|
+
#define STAMINA_SET 0
|
|
23
|
+
#define STAMINA_RESET 1
|
|
24
|
+
|
|
25
|
+
#define FUSE_SET 0
|
|
26
|
+
#define FUSE_RESET 1
|
|
27
|
+
|
|
28
|
+
#define DODMAX_WEAPONS 46 // 5 slots for custom weapons
|
|
29
|
+
|
|
30
|
+
// DoD Weapon Types
|
|
31
|
+
enum
|
|
32
|
+
{
|
|
33
|
+
DODWT_PRIMARY = 0,
|
|
34
|
+
DODWT_SECONDARY,
|
|
35
|
+
DODWT_MELEE,
|
|
36
|
+
DODWT_GRENADE,
|
|
37
|
+
DODWT_OTHER
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
// Ammo Channels
|
|
41
|
+
#define AMMO_SMG 1 // thompson, greasegun, sten, mp40
|
|
42
|
+
#define AMMO_ALTRIFLE 2 // carbine, k43, mg34
|
|
43
|
+
#define AMMO_RIFLE 3 // garand, enfield, scoped enfield, k98, scoped k98
|
|
44
|
+
#define AMMO_PISTOL 4 // colt, webley, luger
|
|
45
|
+
#define AMMO_SPRING 5 // springfield
|
|
46
|
+
#define AMMO_HEAVY 6 // bar, bren, stg44, fg42, scoped fg42
|
|
47
|
+
#define AMMO_MG42 7 // mg42
|
|
48
|
+
#define AMMO_30CAL 8 // 30cal
|
|
49
|
+
#define AMMO_GREN 9 // grenades (should be all 3 types)
|
|
50
|
+
#define AMMO_ROCKET 13 // bazooka, piat, panzerschreck
|
|
51
|
+
enum {
|
|
52
|
+
PS_NOPRONE =0,
|
|
53
|
+
PS_PRONE,
|
|
54
|
+
PS_PRONEDEPLOY,
|
|
55
|
+
PS_DEPLOY,
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
/* info types for dod_get_map_info native */
|
|
59
|
+
enum {
|
|
60
|
+
MI_ALLIES_TEAM = 0,
|
|
61
|
+
MI_ALLIES_PARAS,
|
|
62
|
+
MI_AXIS_PARAS,
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
/* DoD weapons */
|
|
66
|
+
enum {
|
|
67
|
+
DODW_AMERKNIFE = 1,
|
|
68
|
+
DODW_GERKNIFE,
|
|
69
|
+
DODW_COLT,
|
|
70
|
+
DODW_LUGER,
|
|
71
|
+
DODW_GARAND,
|
|
72
|
+
DODW_SCOPED_KAR,
|
|
73
|
+
DODW_THOMPSON,
|
|
74
|
+
DODW_STG44,
|
|
75
|
+
DODW_SPRINGFIELD,
|
|
76
|
+
DODW_KAR,
|
|
77
|
+
DODW_BAR,
|
|
78
|
+
DODW_MP40,
|
|
79
|
+
DODW_HANDGRENADE,
|
|
80
|
+
DODW_STICKGRENADE,
|
|
81
|
+
DODW_STICKGRENADE_EX,
|
|
82
|
+
DODW_HANDGRENADE_EX,
|
|
83
|
+
DODW_MG42,
|
|
84
|
+
DODW_30_CAL,
|
|
85
|
+
DODW_SPADE,
|
|
86
|
+
DODW_M1_CARBINE,
|
|
87
|
+
DODW_MG34,
|
|
88
|
+
DODW_GREASEGUN,
|
|
89
|
+
DODW_FG42,
|
|
90
|
+
DODW_K43,
|
|
91
|
+
DODW_ENFIELD,
|
|
92
|
+
DODW_STEN,
|
|
93
|
+
DODW_BREN,
|
|
94
|
+
DODW_WEBLEY,
|
|
95
|
+
DODW_BAZOOKA,
|
|
96
|
+
DODW_PANZERSCHRECK,
|
|
97
|
+
DODW_PIAT,
|
|
98
|
+
DODW_SCOPED_FG42,
|
|
99
|
+
DODW_FOLDING_CARBINE,
|
|
100
|
+
DODW_KAR_BAYONET,
|
|
101
|
+
DODW_SCOPED_ENFIELD,
|
|
102
|
+
DODW_MILLS_BOMB,
|
|
103
|
+
DODW_BRITKNIFE,
|
|
104
|
+
DODW_GARAND_BUTT,
|
|
105
|
+
DODW_ENFIELD_BAYONET,
|
|
106
|
+
DODW_MORTAR,
|
|
107
|
+
DODW_K43_BUTT,
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
/* DoD Classes */
|
|
111
|
+
enum {
|
|
112
|
+
DODC_GARAND = 1,
|
|
113
|
+
DODC_CARBINE,
|
|
114
|
+
DODC_THOMPSON,
|
|
115
|
+
DODC_GREASE,
|
|
116
|
+
DODC_SNIPER,
|
|
117
|
+
DODC_BAR,
|
|
118
|
+
DODC_30CAL,
|
|
119
|
+
DODC_BAZOOKA,
|
|
120
|
+
//DODC_ALLIES_MORTAR,
|
|
121
|
+
DODC_KAR = 10,
|
|
122
|
+
DODC_K43,
|
|
123
|
+
DODC_MP40,
|
|
124
|
+
DODC_MP44,
|
|
125
|
+
DODC_SCHARFSCHUTZE,
|
|
126
|
+
DODC_FG42,
|
|
127
|
+
DODC_SCOPED_FG42,
|
|
128
|
+
DODC_MG34,
|
|
129
|
+
DODC_MG42,
|
|
130
|
+
DODC_PANZERJAGER,
|
|
131
|
+
//DODC_AXIS_MORTAR,
|
|
132
|
+
DODC_ENFIELD = 21,
|
|
133
|
+
DODC_STEN,
|
|
134
|
+
DODC_MARKSMAN,
|
|
135
|
+
DODC_BREN,
|
|
136
|
+
DODC_PIAT,
|
|
137
|
+
//DODC_BRIT_MORTAR,
|
|
138
|
+
};
|
|
139
|
+
|
|
140
|
+
/* DoD stats constants */
|
|
141
|
+
enum {
|
|
142
|
+
DODX_KILLS = 0,
|
|
143
|
+
DODX_DEATHS,
|
|
144
|
+
DODX_HEADSHOTS,
|
|
145
|
+
DODX_TEAMKILLS,
|
|
146
|
+
DODX_SHOTS,
|
|
147
|
+
DODX_HITS,
|
|
148
|
+
DODX_DAMAGE,
|
|
149
|
+
DODX_POINTS,
|
|
150
|
+
DODX_RANK,
|
|
151
|
+
DODX_MAX_STATS
|
|
152
|
+
}
|
|
@@ -0,0 +1,152 @@
|
|
|
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
|
+
// DoD Fun Functions
|
|
12
|
+
//
|
|
13
|
+
|
|
14
|
+
#if defined _dodfun_included
|
|
15
|
+
#endinput
|
|
16
|
+
#endif
|
|
17
|
+
#define _dodfun_included
|
|
18
|
+
|
|
19
|
+
#include <dodconst>
|
|
20
|
+
|
|
21
|
+
#pragma reqlib dodfun
|
|
22
|
+
#if !defined AMXMODX_NOAUTOLOAD
|
|
23
|
+
#pragma loadlib dodfun
|
|
24
|
+
#endif
|
|
25
|
+
|
|
26
|
+
/* Function is called after grenade throw */
|
|
27
|
+
forward grenade_throw(index,greindex,wId);
|
|
28
|
+
|
|
29
|
+
/* Function is called after a rocket is shot */
|
|
30
|
+
forward rocket_shoot(index,rocketindex,wId);
|
|
31
|
+
|
|
32
|
+
/* Example: for full stamina use dod_player_stamina(1,STAMINA_SET,100,100) */
|
|
33
|
+
/* value is from 0 - 100 */
|
|
34
|
+
native dod_set_stamina(index,set=STAMINA_SET,minvalue=0,maxvalue=100);
|
|
35
|
+
|
|
36
|
+
/* Sets fuse for grenades. Valid number is from 0.1-20.0 */
|
|
37
|
+
/* types : new or preprimed */
|
|
38
|
+
native dod_set_fuse(index,set=FUSE_SET,Float:newFuse=5.0, Type=FT_NEW);
|
|
39
|
+
|
|
40
|
+
/* Sets player class */
|
|
41
|
+
native dod_set_user_class(index,classId);
|
|
42
|
+
|
|
43
|
+
/* Sets player team and random class. Don't work for spectators. */
|
|
44
|
+
native dod_set_user_team(index,teamId,refresh=1);
|
|
45
|
+
|
|
46
|
+
/* Returns next player class. Usefull is player is using random class */
|
|
47
|
+
native dod_get_next_class(index);
|
|
48
|
+
|
|
49
|
+
/* Returns 1 if player choose random class */
|
|
50
|
+
native dod_is_randomclass(index);
|
|
51
|
+
|
|
52
|
+
/* Returns player deaths */
|
|
53
|
+
native dod_get_pl_deaths(index);
|
|
54
|
+
|
|
55
|
+
/* Sets player deaths.
|
|
56
|
+
* Note if you opt to refresh the scoreboard, it
|
|
57
|
+
* will make the player appear as "DEAD" in the scoreboard.
|
|
58
|
+
*/
|
|
59
|
+
native dod_set_pl_deaths(index,value,refresh=1);
|
|
60
|
+
|
|
61
|
+
/* Returns player deaths. */
|
|
62
|
+
native dod_get_user_kills(index);
|
|
63
|
+
|
|
64
|
+
/* Sets player kills. */
|
|
65
|
+
native dod_set_user_kills(index,value,refresh=1);
|
|
66
|
+
|
|
67
|
+
/* Sets player score. */
|
|
68
|
+
native dod_set_user_score(index,value,refresh=1);
|
|
69
|
+
|
|
70
|
+
/* Sets new team name for this player */
|
|
71
|
+
native dod_set_pl_teamname(index,const szName[]);
|
|
72
|
+
|
|
73
|
+
/* Gets player team name */
|
|
74
|
+
native dod_get_pl_teamname(index,szName[],len);
|
|
75
|
+
|
|
76
|
+
/* Returns 1 is player weapon is deployed (bar,mg..) */
|
|
77
|
+
native dod_is_deployed(index);
|
|
78
|
+
|
|
79
|
+
/*Sets the ammo of the specified weapon entity id */
|
|
80
|
+
native dod_set_user_ammo(index,wid,value);
|
|
81
|
+
|
|
82
|
+
/*Gets the ammo of the specified weapon entity id */
|
|
83
|
+
native dod_get_user_ammo(index,wid);
|
|
84
|
+
|
|
85
|
+
/* called after first InitObj */
|
|
86
|
+
forward controlpoints_init();
|
|
87
|
+
|
|
88
|
+
enum CP_VALUE {
|
|
89
|
+
CP_edict = 1, // read only
|
|
90
|
+
CP_area, // read only
|
|
91
|
+
CP_index, // read only
|
|
92
|
+
CP_owner,
|
|
93
|
+
CP_default_owner,
|
|
94
|
+
CP_visible, // reinit after change
|
|
95
|
+
CP_icon_neutral, // reinit after change
|
|
96
|
+
CP_icon_allies, // reinit after change
|
|
97
|
+
CP_icon_axis, // reinit after change
|
|
98
|
+
CP_origin_x, // reinit after change
|
|
99
|
+
CP_origin_y, // reinit after change
|
|
100
|
+
|
|
101
|
+
CP_can_touch,
|
|
102
|
+
CP_pointvalue,
|
|
103
|
+
|
|
104
|
+
CP_points_for_cap,
|
|
105
|
+
CP_team_points,
|
|
106
|
+
|
|
107
|
+
CP_model_body_neutral,
|
|
108
|
+
CP_model_body_allies,
|
|
109
|
+
CP_model_body_axis,
|
|
110
|
+
|
|
111
|
+
// strings
|
|
112
|
+
CP_name,
|
|
113
|
+
CP_reset_capsound,
|
|
114
|
+
CP_allies_capsound,
|
|
115
|
+
CP_axis_capsound,
|
|
116
|
+
CP_targetname,
|
|
117
|
+
|
|
118
|
+
CP_model_neutral,
|
|
119
|
+
CP_model_allies,
|
|
120
|
+
CP_model_axis,
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
/* returns number of objectives */
|
|
124
|
+
native objectives_get_num();
|
|
125
|
+
|
|
126
|
+
/* use this function to update client(s) hud. You need to do this sometimes. Check CP_VALUE comments.
|
|
127
|
+
if player is 0 , all clients will get this message */
|
|
128
|
+
native objectives_reinit( player=0 );
|
|
129
|
+
|
|
130
|
+
/* use this function to get info about specified control point */
|
|
131
|
+
native objective_get_data( index, CP_VALUE:key, szValue[]="", len=0 );
|
|
132
|
+
|
|
133
|
+
/* use this function to change control point's data */
|
|
134
|
+
native objective_set_data( index, CP_VALUE:key , iValue=-1, const szValue[]="" );
|
|
135
|
+
|
|
136
|
+
enum CA_VALUE {
|
|
137
|
+
CA_edict = 1,
|
|
138
|
+
CA_allies_numcap,
|
|
139
|
+
CA_axis_numcap,
|
|
140
|
+
CA_timetocap,
|
|
141
|
+
CA_can_cap,
|
|
142
|
+
|
|
143
|
+
// strings
|
|
144
|
+
CA_target,
|
|
145
|
+
CA_sprite,
|
|
146
|
+
};
|
|
147
|
+
|
|
148
|
+
/* use this function to get info about specified control point's area */
|
|
149
|
+
native area_get_data( index, CA_VALUE:key, szValue[]="", len=0 );
|
|
150
|
+
|
|
151
|
+
/* use this function to change control point's area data */
|
|
152
|
+
native area_set_data( index, CA_VALUE:key , iValue=-1, const szValue[]="" );
|
|
@@ -0,0 +1,69 @@
|
|
|
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
|
+
// DODX Stats Functions
|
|
12
|
+
//
|
|
13
|
+
|
|
14
|
+
#if defined _dodstats_included
|
|
15
|
+
#endinput
|
|
16
|
+
#endif
|
|
17
|
+
#define _dodstats_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
|
+
* 7 - score
|
|
30
|
+
* For body hits fields see amxconst.inc. */
|
|
31
|
+
native get_user_wstats(index,wpnindex,stats[DODX_MAX_STATS],bodyhits[MAX_BODYHITS]);
|
|
32
|
+
|
|
33
|
+
/* Gets round stats from given weapon index.*/
|
|
34
|
+
native get_user_wrstats(index,wpnindex,stats[DODX_MAX_STATS],bodyhits[MAX_BODYHITS]);
|
|
35
|
+
|
|
36
|
+
/* Gets life (from spawn to spawn) stats from given weapon index.*/
|
|
37
|
+
native get_user_wlstats(index,wpnindex,stats[DODX_MAX_STATS],bodyhits[MAX_BODYHITS]);
|
|
38
|
+
|
|
39
|
+
/* Gets overall stats which are stored in file on server
|
|
40
|
+
* and updated on every respawn or user disconnect.
|
|
41
|
+
* Function returns the position in stats by diff. kills to deaths. */
|
|
42
|
+
native get_user_stats(index,stats[DODX_MAX_STATS],bodyhits[MAX_BODYHITS]);
|
|
43
|
+
|
|
44
|
+
/* Gets round stats of player. */
|
|
45
|
+
native get_user_rstats(index,stats[DODX_MAX_STATS],bodyhits[MAX_BODYHITS]);
|
|
46
|
+
|
|
47
|
+
/* Gets life (from spawn to spawn) stats of player. */
|
|
48
|
+
native get_user_lstats(index,stats[DODX_MAX_STATS],bodyhits[MAX_BODYHITS]);
|
|
49
|
+
|
|
50
|
+
/* Gets stats with which user have killed/hurt his victim. If victim is 0
|
|
51
|
+
* then stats are from all victims. If victim has not been hurt, function
|
|
52
|
+
* returns 0 in other case 1. User stats are reset on his respawn. */
|
|
53
|
+
native get_user_vstats(index,victim,stats[DODX_MAX_STATS],bodyhits[MAX_BODYHITS],wpnname[]="",len=0);
|
|
54
|
+
|
|
55
|
+
/* Gets stats with which user have been killed/hurt. If killer is 0
|
|
56
|
+
* then stats are from all attacks. If killer has not hurt user, function
|
|
57
|
+
* returns 0 in other case 1. User stats are reset on his respawn. */
|
|
58
|
+
native get_user_astats(index,wpnindex,stats[DODX_MAX_STATS],bodyhits[MAX_BODYHITS],wpnname[]="",len=0);
|
|
59
|
+
|
|
60
|
+
/* Resets life, weapon, victims and attackers user stats. */
|
|
61
|
+
native reset_user_wstats(index);
|
|
62
|
+
|
|
63
|
+
/* Gets overall stats which stored in stats.dat file in amx folder
|
|
64
|
+
* and updated on every mapchange or user disconnect.
|
|
65
|
+
* Function returns next index of stats entry or 0 if no more exists. */
|
|
66
|
+
native get_stats(index,stats[DODX_MAX_STATS],bodyhits[MAX_BODYHITS],name[],len);
|
|
67
|
+
|
|
68
|
+
/* Returns number of all entries in stats. */
|
|
69
|
+
native get_statsnum();
|
|
@@ -0,0 +1,161 @@
|
|
|
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
|
+
// DODX Functions
|
|
12
|
+
//
|
|
13
|
+
|
|
14
|
+
#if defined _dodx_included
|
|
15
|
+
#endinput
|
|
16
|
+
#endif
|
|
17
|
+
#define _dodx_included
|
|
18
|
+
|
|
19
|
+
#include <dodconst>
|
|
20
|
+
#include <dodstats>
|
|
21
|
+
|
|
22
|
+
#pragma reqclass xstats
|
|
23
|
+
#if !defined AMXMODX_NOAUTOLOAD
|
|
24
|
+
#pragma defclasslib xstats dodx
|
|
25
|
+
#endif
|
|
26
|
+
|
|
27
|
+
/************* Shared Natives Start ********************************/
|
|
28
|
+
|
|
29
|
+
/* Forward types */
|
|
30
|
+
enum {
|
|
31
|
+
XMF_DAMAGE = 0,
|
|
32
|
+
XMF_DEATH,
|
|
33
|
+
XMF_SCORE,
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
/* Use this function to register forwards */
|
|
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
|
+
/* Function is called if player scored */
|
|
48
|
+
forward client_score(id, score, total);
|
|
49
|
+
|
|
50
|
+
/* This Forward is called when a player changes team */
|
|
51
|
+
forward dod_client_changeteam(id, team, oldteam);
|
|
52
|
+
|
|
53
|
+
/* This Forward is called if a player changes class, but just after spawn */
|
|
54
|
+
forward dod_client_changeclass(id, class, oldclass);
|
|
55
|
+
|
|
56
|
+
/* This Forward is called when a player spawns */
|
|
57
|
+
forward dod_client_spawn(id);
|
|
58
|
+
|
|
59
|
+
/* This will be called whenever a player scopes or unscopes
|
|
60
|
+
value = 1 scope up
|
|
61
|
+
value = 0 scope down */
|
|
62
|
+
forward dod_client_scope(id, value);
|
|
63
|
+
|
|
64
|
+
/* This will be called whenever a player drops a weapon
|
|
65
|
+
weapon is weapon dropped or picked up
|
|
66
|
+
value = 1 picked up
|
|
67
|
+
value = 0 dropped */
|
|
68
|
+
forward dod_client_weaponpickup(id, weapon, value);
|
|
69
|
+
|
|
70
|
+
/* Called whenever the the player goes to or comes from prone position
|
|
71
|
+
value = 1 going down
|
|
72
|
+
value = 0 getting up */
|
|
73
|
+
forward dod_client_prone(id, value);
|
|
74
|
+
|
|
75
|
+
/* This will be called whenever a player switches a weapon */
|
|
76
|
+
forward dod_client_weaponswitch(id, wpnew, wpnold);
|
|
77
|
+
|
|
78
|
+
/* Forward for when a grenade explodes and its location */
|
|
79
|
+
forward dod_grenade_explosion(id, Float:pos[3], wpnid);
|
|
80
|
+
|
|
81
|
+
/* Forward for when a rocket explodes and its location */
|
|
82
|
+
forward dod_rocket_explosion(id, Float:pos[3], wpnid);
|
|
83
|
+
|
|
84
|
+
/* Forward for when a player picks up a object */
|
|
85
|
+
forward dod_client_objectpickup(id, objid, Float:pos[3], value);
|
|
86
|
+
|
|
87
|
+
/* Forward for when a users stamina decreases */
|
|
88
|
+
forward dod_client_stamina(id, stamina);
|
|
89
|
+
|
|
90
|
+
/* We want to get just the weapon of whichever type that the player is on him
|
|
91
|
+
Use DODWT_* in dodconst.inc for type */
|
|
92
|
+
native dod_weapon_type(id, type);
|
|
93
|
+
|
|
94
|
+
/* This native will change the position of a weapon within the users slots and its ammo ammount */
|
|
95
|
+
native dod_set_weaponlist(id, wpnID, slot, dropslot, totalrds);
|
|
96
|
+
|
|
97
|
+
/* Sets the model for a player */
|
|
98
|
+
native dod_set_model(id, const model[]);
|
|
99
|
+
|
|
100
|
+
/* Sets the model for a player */
|
|
101
|
+
native dod_set_body_number(id, bodynumber);
|
|
102
|
+
|
|
103
|
+
/* Un-Sets the model for a player */
|
|
104
|
+
native dod_clear_model(id);
|
|
105
|
+
|
|
106
|
+
/* Custom Weapon Support */
|
|
107
|
+
/* function will return index of new weapon */
|
|
108
|
+
native custom_weapon_add( const wpnname[], melee = 0, const logname[]="" );
|
|
109
|
+
|
|
110
|
+
/* Function will pass damage done by this custom weapon to stats module and other plugins */
|
|
111
|
+
native custom_weapon_dmg( weapon, att, vic, damage, hitplace=0 );
|
|
112
|
+
|
|
113
|
+
/* Function will pass info about custom weapon shot to stats module */
|
|
114
|
+
native custom_weapon_shot( weapon, index ); // weapon id , player id
|
|
115
|
+
|
|
116
|
+
/* function will return 1 if true */
|
|
117
|
+
native xmod_is_melee_wpn(wpnindex);
|
|
118
|
+
|
|
119
|
+
/* Returns weapon name. */
|
|
120
|
+
native xmod_get_wpnname(wpnindex, name[], len);
|
|
121
|
+
|
|
122
|
+
/* Returns weapon logname. */
|
|
123
|
+
native xmod_get_wpnlogname(wpnindex, name[], len);
|
|
124
|
+
|
|
125
|
+
/* Returns weapons array size */
|
|
126
|
+
native xmod_get_maxweapons();
|
|
127
|
+
|
|
128
|
+
/* Returns stats array size ex. 8 in TS , 9 in DoD */
|
|
129
|
+
native xmod_get_stats_size();
|
|
130
|
+
|
|
131
|
+
/* Returns 1 if true */
|
|
132
|
+
native xmod_is_custom_wpn(wpnindex);
|
|
133
|
+
|
|
134
|
+
/************* Shared Natives End ********************************/
|
|
135
|
+
|
|
136
|
+
/* weapon logname to weapon name convertion */
|
|
137
|
+
native dod_wpnlog_to_name(const logname[],name[],len);
|
|
138
|
+
|
|
139
|
+
/* weapon logname to weapon index convertion */
|
|
140
|
+
native dod_wpnlog_to_id(const logname[]);
|
|
141
|
+
|
|
142
|
+
native dod_get_map_info( info );
|
|
143
|
+
|
|
144
|
+
/* Returns id of currently carried weapon. Gets also
|
|
145
|
+
* ammount of ammo in clip and backpack. */
|
|
146
|
+
native dod_get_user_weapon(index,&clip=0,&ammo=0);
|
|
147
|
+
|
|
148
|
+
/* Returns team score */
|
|
149
|
+
native dod_get_team_score(teamId);
|
|
150
|
+
|
|
151
|
+
/* Returns player class id */
|
|
152
|
+
native dod_get_user_class(index);
|
|
153
|
+
|
|
154
|
+
/* Returns player score */
|
|
155
|
+
native dod_get_user_score(index);
|
|
156
|
+
|
|
157
|
+
/* values are: 0-no prone, 1-prone, 2-prone + w_deploy */
|
|
158
|
+
native dod_get_pronestate(index);
|
|
159
|
+
|
|
160
|
+
/* It is not as safe as original but player deaths will not be increased */
|
|
161
|
+
native dod_user_kill(index);
|