From 2dc8c88379648c396262ceef94aba66cee2f1012 Mon Sep 17 00:00:00 2001 From: Emanuel Date: Fri, 11 Oct 2024 21:36:23 -0300 Subject: [PATCH] v4.4 (4410) New: AMXX-Uncompress; Rewritten in Python and improved. New: Default Profile, now includes a compiler to allow having a default profile. New: New color-scheme and popup css. Improved: Style selection. Improved: Profile selection. Improved: About command. Improved: Changelog. --- AMXX-ASM.sublime-syntax | 121 + AMXX-Cmd.sublime-commands | 3 +- AMXX-Editor.sublime-settings | 53 +- AMXX-Pawn.sublime-syntax | 84 +- AMXXEditor.py | 533 +- AMXXUncompress.py | 160 + AMXXcore/core.py | 69 +- AMXXcore/pawn_parse.py | 66 +- AMXXcore/rollbar_api.py | 2 + AMXXcore/tooltip.py | 16 +- Default.sublime-keymap | 3 + Main.sublime-menu | 91 +- amxx_changelog.py | 134 + amxx_uncompress.py | 1103 +++ bin/amxxdump/amxxdump | Bin 0 -> 184196 bytes bin/amxxdump/amxxdump.exe | Bin 0 -> 163328 bytes bin/amxxdump/includes/amxmodx/amxconst.inc | 584 ++ bin/amxxdump/includes/amxmodx/amxmisc.inc | 899 +++ bin/amxxdump/includes/amxmodx/amxmodx.inc | 3422 +++++++++ .../includes/amxmodx/amxmodx.inc.temp | 258 + .../includes/amxmodx/amxmodx_version.inc | 20 + bin/amxxdump/includes/amxmodx/cellarray.inc | 527 ++ bin/amxxdump/includes/amxmodx/cellstack.inc | 166 + bin/amxxdump/includes/amxmodx/celltrie.inc | 412 ++ bin/amxxdump/includes/amxmodx/core.inc | 202 + bin/amxxdump/includes/amxmodx/core.inc.temp | 25 + bin/amxxdump/includes/amxmodx/crxranks.inc | 309 + .../includes/amxmodx/crxranks_const.inc | 56 + bin/amxxdump/includes/amxmodx/crypto.inc | 1153 +++ bin/amxxdump/includes/amxmodx/cssdk_const.inc | 1585 ++++ bin/amxxdump/includes/amxmodx/csstats.inc | 298 + .../includes/amxmodx/csstats.inc.temp | 16 + .../includes/amxmodx/csstats_const.inc | 29 + bin/amxxdump/includes/amxmodx/cstrike.inc | 1287 ++++ .../includes/amxmodx/cstrike.inc.temp | 150 + .../includes/amxmodx/cstrike_const.inc | 521 ++ bin/amxxdump/includes/amxmodx/csx.inc | 259 + bin/amxxdump/includes/amxmodx/csx.inc.temp | 33 + bin/amxxdump/includes/amxmodx/cvars.inc | 547 ++ bin/amxxdump/includes/amxmodx/datapack.inc | 161 + bin/amxxdump/includes/amxmodx/dbi.inc | 154 + bin/amxxdump/includes/amxmodx/dbi.inc.temp | 50 + bin/amxxdump/includes/amxmodx/debug.inc | 299 + bin/amxxdump/includes/amxmodx/dodconst.inc | 152 + bin/amxxdump/includes/amxmodx/dodfun.inc | 152 + bin/amxxdump/includes/amxmodx/dodfun.inc.temp | 62 + bin/amxxdump/includes/amxmodx/dodstats.inc | 69 + .../includes/amxmodx/dodstats.inc.temp | 15 + bin/amxxdump/includes/amxmodx/dodx.inc | 161 + bin/amxxdump/includes/amxmodx/dodx.inc.temp | 52 + bin/amxxdump/includes/amxmodx/engine.inc | 1343 ++++ bin/amxxdump/includes/amxmodx/engine.inc.temp | 93 + .../includes/amxmodx/engine_const.inc | 310 + .../includes/amxmodx/engine_stocks.inc | 248 + bin/amxxdump/includes/amxmodx/esf.inc | 70 + bin/amxxdump/includes/amxmodx/esf.inc.temp | 45 + bin/amxxdump/includes/amxmodx/esf_const.inc | 74 + bin/amxxdump/includes/amxmodx/fakemeta.inc | 1127 +++ .../includes/amxmodx/fakemeta.inc.temp | 131 + .../includes/amxmodx/fakemeta_const.inc | 793 ++ .../includes/amxmodx/fakemeta_stocks.inc | 395 + .../includes/amxmodx/fakemeta_util.inc | 882 +++ bin/amxxdump/includes/amxmodx/file.inc | 666 ++ bin/amxxdump/includes/amxmodx/file.inc.temp | 84 + bin/amxxdump/includes/amxmodx/float.inc | 422 ++ bin/amxxdump/includes/amxmodx/float.inc.temp | 124 + bin/amxxdump/includes/amxmodx/fun.inc | 333 + bin/amxxdump/includes/amxmodx/fun.inc.temp | 32 + bin/amxxdump/includes/amxmodx/gameconfig.inc | 93 + bin/amxxdump/includes/amxmodx/geoip.inc | 264 + bin/amxxdump/includes/amxmodx/geoip.inc.temp | 37 + bin/amxxdump/includes/amxmodx/ham_const.inc | 4354 +++++++++++ bin/amxxdump/includes/amxmodx/hamsandwich.inc | 439 ++ bin/amxxdump/includes/amxmodx/hlsdk_const.inc | 808 +++ bin/amxxdump/includes/amxmodx/json.inc | 777 ++ bin/amxxdump/includes/amxmodx/lang.inc | 119 + bin/amxxdump/includes/amxmodx/lang.inc.temp | 17 + .../includes/amxmodx/message_const.inc | 1130 +++ .../includes/amxmodx/message_stocks.inc | 161 + bin/amxxdump/includes/amxmodx/messages.inc | 604 ++ .../includes/amxmodx/messages.inc.temp | 44 + bin/amxxdump/includes/amxmodx/mysqlt.inc | 243 + bin/amxxdump/includes/amxmodx/newmenus.inc | 379 + bin/amxxdump/includes/amxmodx/ns.inc | 754 ++ bin/amxxdump/includes/amxmodx/ns.inc.temp | 114 + bin/amxxdump/includes/amxmodx/ns_const.inc | 196 + bin/amxxdump/includes/amxmodx/nvault.inc | 154 + bin/amxxdump/includes/amxmodx/nvault.inc.temp | 17 + bin/amxxdump/includes/amxmodx/oldmenu.inc | 205 + bin/amxxdump/includes/amxmodx/orpheu.inc | 220 + .../includes/amxmodx/orpheu_advanced.inc | 77 + .../includes/amxmodx/orpheu_const.inc | 49 + .../includes/amxmodx/orpheu_memory.inc | 98 + .../includes/amxmodx/orpheu_stocks.inc | 75 + bin/amxxdump/includes/amxmodx/reapi.inc | 328 + .../includes/amxmodx/reapi_engine.inc | 459 ++ .../includes/amxmodx/reapi_engine_const.inc | 1538 ++++ .../includes/amxmodx/reapi_gamedll.inc | 1223 ++++ .../includes/amxmodx/reapi_gamedll_const.inc | 6401 +++++++++++++++++ .../includes/amxmodx/reapi_rechecker.inc | 58 + .../includes/amxmodx/reapi_reunion.inc | 61 + .../includes/amxmodx/reapi_version.inc | 9 + bin/amxxdump/includes/amxmodx/reapi_vtc.inc | 71 + bin/amxxdump/includes/amxmodx/regex.inc | 348 + bin/amxxdump/includes/amxmodx/regex.inc.temp | 93 + bin/amxxdump/includes/amxmodx/sockets.inc | 183 + .../includes/amxmodx/sockets.inc.temp | 25 + .../includes/amxmodx/sockets_async.inc | 49 + bin/amxxdump/includes/amxmodx/sorting.inc | 107 + .../includes/amxmodx/sorting.inc.temp | 22 + bin/amxxdump/includes/amxmodx/sqlx.inc | 582 ++ bin/amxxdump/includes/amxmodx/sqlx.inc.temp | 122 + bin/amxxdump/includes/amxmodx/string.inc | 786 ++ bin/amxxdump/includes/amxmodx/string.inc.temp | 56 + .../includes/amxmodx/string_const.inc | 156 + .../includes/amxmodx/string_stocks.inc | 325 + .../includes/amxmodx/textparse_ini.inc | 214 + .../includes/amxmodx/textparse_smc.inc | 261 + bin/amxxdump/includes/amxmodx/tfcconst.inc | 84 + bin/amxxdump/includes/amxmodx/tfcstats.inc | 62 + bin/amxxdump/includes/amxmodx/tfcx.inc | 148 + bin/amxxdump/includes/amxmodx/tfcx.inc.temp | 54 + bin/amxxdump/includes/amxmodx/time.inc | 100 + bin/amxxdump/includes/amxmodx/time.inc.temp | 59 + bin/amxxdump/includes/amxmodx/tsconst.inc | 154 + bin/amxxdump/includes/amxmodx/tsfun.inc | 198 + bin/amxxdump/includes/amxmodx/tsfun.inc.temp | 92 + bin/amxxdump/includes/amxmodx/tsstats.inc | 65 + .../includes/amxmodx/tsstats.inc.temp | 14 + bin/amxxdump/includes/amxmodx/tsx.inc | 88 + bin/amxxdump/includes/amxmodx/tsx.inc.temp | 35 + bin/amxxdump/includes/amxmodx/unixtime.inc | 258 + bin/amxxdump/includes/amxmodx/vault.inc | 60 + bin/amxxdump/includes/amxmodx/vault.inc.temp | 8 + bin/amxxdump/includes/amxmodx/vector.inc | 131 + bin/amxxdump/includes/amxmodx/vector.inc.temp | 28 + bin/amxxdump/includes/amxmodx/xs.inc | 1539 ++++ .../includes/amxmodx/zombieplague43.inc | 505 ++ bin/compiler/amxxpc.exe | Bin 0 -> 171008 bytes bin/compiler/amxxpc32.dll | Bin 0 -> 327680 bytes bin/compiler/include/amxconst.inc | 584 ++ bin/compiler/include/amxmisc.inc | 899 +++ bin/compiler/include/amxmodx.inc | 3422 +++++++++ bin/compiler/include/amxmodx_version.inc | 20 + bin/compiler/include/cellarray.inc | 527 ++ bin/compiler/include/cellstack.inc | 166 + bin/compiler/include/celltrie.inc | 412 ++ bin/compiler/include/core.inc | 202 + bin/compiler/include/crxranks.inc | 309 + bin/compiler/include/crxranks_const.inc | 56 + bin/compiler/include/crypto.inc | 1153 +++ bin/compiler/include/cssdk_const.inc | 1585 ++++ bin/compiler/include/csstats.inc | 298 + bin/compiler/include/csstats_const.inc | 29 + bin/compiler/include/cstrike.inc | 1287 ++++ bin/compiler/include/cstrike_const.inc | 521 ++ bin/compiler/include/csx.inc | 259 + bin/compiler/include/cvars.inc | 547 ++ bin/compiler/include/datapack.inc | 161 + bin/compiler/include/dbi.inc | 154 + bin/compiler/include/debug.inc | 299 + bin/compiler/include/dodconst.inc | 152 + bin/compiler/include/dodfun.inc | 152 + bin/compiler/include/dodstats.inc | 69 + bin/compiler/include/dodx.inc | 161 + bin/compiler/include/engine.inc | 1343 ++++ bin/compiler/include/engine_const.inc | 310 + bin/compiler/include/engine_stocks.inc | 248 + bin/compiler/include/esf.inc | 70 + bin/compiler/include/esf_const.inc | 74 + bin/compiler/include/fakemeta.inc | 1127 +++ bin/compiler/include/fakemeta_const.inc | 793 ++ bin/compiler/include/fakemeta_stocks.inc | 395 + bin/compiler/include/fakemeta_util.inc | 882 +++ bin/compiler/include/file.inc | 666 ++ bin/compiler/include/float.inc | 422 ++ bin/compiler/include/fun.inc | 333 + bin/compiler/include/gameconfig.inc | 93 + bin/compiler/include/geoip.inc | 264 + bin/compiler/include/ham_const.inc | 4354 +++++++++++ bin/compiler/include/hamsandwich.inc | 439 ++ bin/compiler/include/hlsdk_const.inc | 808 +++ bin/compiler/include/json.inc | 777 ++ bin/compiler/include/lang.inc | 119 + bin/compiler/include/message_const.inc | 1130 +++ bin/compiler/include/message_stocks.inc | 161 + bin/compiler/include/messages.inc | 604 ++ bin/compiler/include/mysqlt.inc | 243 + bin/compiler/include/newmenus.inc | 379 + bin/compiler/include/ns.inc | 754 ++ bin/compiler/include/ns_const.inc | 196 + bin/compiler/include/nvault.inc | 154 + bin/compiler/include/oldmenu.inc | 205 + bin/compiler/include/orpheu.inc | 220 + bin/compiler/include/orpheu_advanced.inc | 77 + bin/compiler/include/orpheu_const.inc | 49 + bin/compiler/include/orpheu_memory.inc | 98 + bin/compiler/include/orpheu_stocks.inc | 75 + bin/compiler/include/reapi.inc | 328 + bin/compiler/include/reapi_engine.inc | 459 ++ bin/compiler/include/reapi_engine_const.inc | 1538 ++++ bin/compiler/include/reapi_gamedll.inc | 1223 ++++ bin/compiler/include/reapi_gamedll_const.inc | 6401 +++++++++++++++++ bin/compiler/include/reapi_rechecker.inc | 58 + bin/compiler/include/reapi_reunion.inc | 61 + bin/compiler/include/reapi_version.inc | 9 + bin/compiler/include/reapi_vtc.inc | 71 + bin/compiler/include/regex.inc | 348 + bin/compiler/include/sockets.inc | 183 + bin/compiler/include/sockets_async.inc | 49 + bin/compiler/include/sorting.inc | 107 + bin/compiler/include/sqlx.inc | 582 ++ bin/compiler/include/string.inc | 786 ++ bin/compiler/include/string_const.inc | 156 + bin/compiler/include/string_stocks.inc | 325 + bin/compiler/include/textparse_ini.inc | 214 + bin/compiler/include/textparse_smc.inc | 261 + bin/compiler/include/tfcconst.inc | 84 + bin/compiler/include/tfcstats.inc | 62 + bin/compiler/include/tfcx.inc | 148 + bin/compiler/include/time.inc | 100 + bin/compiler/include/tsconst.inc | 154 + bin/compiler/include/tsfun.inc | 198 + bin/compiler/include/tsstats.inc | 65 + bin/compiler/include/tsx.inc | 88 + bin/compiler/include/unixtime.inc | 258 + bin/compiler/include/vault.inc | 60 + bin/compiler/include/vector.inc | 131 + bin/compiler/include/xs.inc | 1539 ++++ bin/compiler/include/zombieplague43.inc | 505 ++ changelog.txt | 53 +- changelog_es.txt | 51 +- check_version.txt | 8 +- debug.log | 0 default.inc | 2 +- default.sma | 2 +- ...MXXStudio.pawn-editor.sublime-color-scheme | 17 +- ... (mirage).pawn-editor.sublime-color-scheme | 180 + .../Dracula.pawn-editor.sublime-color-scheme | 171 + ...nokai Pro.pawn-editor.sublime-color-scheme | 173 + .../Nord.pawn-editor.sublime-color-scheme | 180 + ...Notepad++.pawn-editor.sublime-color-scheme | 22 +- .../One Dark.pawn-editor.sublime-color-scheme | 169 + ... Material.pawn-editor.sublime-color-scheme | 175 + .../atomic.pawn-editor.sublime-color-scheme | 64 +- .../dark.pawn-editor.sublime-color-scheme | 30 +- .../twlight.pawn-editor.sublime-color-scheme | 125 +- styles/popup/AMXXStudio.pawn-popup.css | 116 +- styles/popup/BasicBlack.pawn-popup.css | 111 +- styles/popup/GreenNotepad++.pawn-popup.css | 114 +- styles/popup/Notepad++.pawn-popup.css | 22 +- styles/popup/default.pawn-popup.css | 131 + 252 files changed, 101337 insertions(+), 698 deletions(-) create mode 100644 AMXX-ASM.sublime-syntax create mode 100644 AMXXUncompress.py create mode 100644 amxx_changelog.py create mode 100644 amxx_uncompress.py create mode 100644 bin/amxxdump/amxxdump create mode 100644 bin/amxxdump/amxxdump.exe create mode 100644 bin/amxxdump/includes/amxmodx/amxconst.inc create mode 100644 bin/amxxdump/includes/amxmodx/amxmisc.inc create mode 100644 bin/amxxdump/includes/amxmodx/amxmodx.inc create mode 100644 bin/amxxdump/includes/amxmodx/amxmodx.inc.temp create mode 100644 bin/amxxdump/includes/amxmodx/amxmodx_version.inc create mode 100644 bin/amxxdump/includes/amxmodx/cellarray.inc create mode 100644 bin/amxxdump/includes/amxmodx/cellstack.inc create mode 100644 bin/amxxdump/includes/amxmodx/celltrie.inc create mode 100644 bin/amxxdump/includes/amxmodx/core.inc create mode 100644 bin/amxxdump/includes/amxmodx/core.inc.temp create mode 100644 bin/amxxdump/includes/amxmodx/crxranks.inc create mode 100644 bin/amxxdump/includes/amxmodx/crxranks_const.inc create mode 100644 bin/amxxdump/includes/amxmodx/crypto.inc create mode 100644 bin/amxxdump/includes/amxmodx/cssdk_const.inc create mode 100644 bin/amxxdump/includes/amxmodx/csstats.inc create mode 100644 bin/amxxdump/includes/amxmodx/csstats.inc.temp create mode 100644 bin/amxxdump/includes/amxmodx/csstats_const.inc create mode 100644 bin/amxxdump/includes/amxmodx/cstrike.inc create mode 100644 bin/amxxdump/includes/amxmodx/cstrike.inc.temp create mode 100644 bin/amxxdump/includes/amxmodx/cstrike_const.inc create mode 100644 bin/amxxdump/includes/amxmodx/csx.inc create mode 100644 bin/amxxdump/includes/amxmodx/csx.inc.temp create mode 100644 bin/amxxdump/includes/amxmodx/cvars.inc create mode 100644 bin/amxxdump/includes/amxmodx/datapack.inc create mode 100644 bin/amxxdump/includes/amxmodx/dbi.inc create mode 100644 bin/amxxdump/includes/amxmodx/dbi.inc.temp create mode 100644 bin/amxxdump/includes/amxmodx/debug.inc create mode 100644 bin/amxxdump/includes/amxmodx/dodconst.inc create mode 100644 bin/amxxdump/includes/amxmodx/dodfun.inc create mode 100644 bin/amxxdump/includes/amxmodx/dodfun.inc.temp create mode 100644 bin/amxxdump/includes/amxmodx/dodstats.inc create mode 100644 bin/amxxdump/includes/amxmodx/dodstats.inc.temp create mode 100644 bin/amxxdump/includes/amxmodx/dodx.inc create mode 100644 bin/amxxdump/includes/amxmodx/dodx.inc.temp create mode 100644 bin/amxxdump/includes/amxmodx/engine.inc create mode 100644 bin/amxxdump/includes/amxmodx/engine.inc.temp create mode 100644 bin/amxxdump/includes/amxmodx/engine_const.inc create mode 100644 bin/amxxdump/includes/amxmodx/engine_stocks.inc create mode 100644 bin/amxxdump/includes/amxmodx/esf.inc create mode 100644 bin/amxxdump/includes/amxmodx/esf.inc.temp create mode 100644 bin/amxxdump/includes/amxmodx/esf_const.inc create mode 100644 bin/amxxdump/includes/amxmodx/fakemeta.inc create mode 100644 bin/amxxdump/includes/amxmodx/fakemeta.inc.temp create mode 100644 bin/amxxdump/includes/amxmodx/fakemeta_const.inc create mode 100644 bin/amxxdump/includes/amxmodx/fakemeta_stocks.inc create mode 100644 bin/amxxdump/includes/amxmodx/fakemeta_util.inc create mode 100644 bin/amxxdump/includes/amxmodx/file.inc create mode 100644 bin/amxxdump/includes/amxmodx/file.inc.temp create mode 100644 bin/amxxdump/includes/amxmodx/float.inc create mode 100644 bin/amxxdump/includes/amxmodx/float.inc.temp create mode 100644 bin/amxxdump/includes/amxmodx/fun.inc create mode 100644 bin/amxxdump/includes/amxmodx/fun.inc.temp create mode 100644 bin/amxxdump/includes/amxmodx/gameconfig.inc create mode 100644 bin/amxxdump/includes/amxmodx/geoip.inc create mode 100644 bin/amxxdump/includes/amxmodx/geoip.inc.temp create mode 100644 bin/amxxdump/includes/amxmodx/ham_const.inc create mode 100644 bin/amxxdump/includes/amxmodx/hamsandwich.inc create mode 100644 bin/amxxdump/includes/amxmodx/hlsdk_const.inc create mode 100644 bin/amxxdump/includes/amxmodx/json.inc create mode 100644 bin/amxxdump/includes/amxmodx/lang.inc create mode 100644 bin/amxxdump/includes/amxmodx/lang.inc.temp create mode 100644 bin/amxxdump/includes/amxmodx/message_const.inc create mode 100644 bin/amxxdump/includes/amxmodx/message_stocks.inc create mode 100644 bin/amxxdump/includes/amxmodx/messages.inc create mode 100644 bin/amxxdump/includes/amxmodx/messages.inc.temp create mode 100644 bin/amxxdump/includes/amxmodx/mysqlt.inc create mode 100644 bin/amxxdump/includes/amxmodx/newmenus.inc create mode 100644 bin/amxxdump/includes/amxmodx/ns.inc create mode 100644 bin/amxxdump/includes/amxmodx/ns.inc.temp create mode 100644 bin/amxxdump/includes/amxmodx/ns_const.inc create mode 100644 bin/amxxdump/includes/amxmodx/nvault.inc create mode 100644 bin/amxxdump/includes/amxmodx/nvault.inc.temp create mode 100644 bin/amxxdump/includes/amxmodx/oldmenu.inc create mode 100644 bin/amxxdump/includes/amxmodx/orpheu.inc create mode 100644 bin/amxxdump/includes/amxmodx/orpheu_advanced.inc create mode 100644 bin/amxxdump/includes/amxmodx/orpheu_const.inc create mode 100644 bin/amxxdump/includes/amxmodx/orpheu_memory.inc create mode 100644 bin/amxxdump/includes/amxmodx/orpheu_stocks.inc create mode 100644 bin/amxxdump/includes/amxmodx/reapi.inc create mode 100644 bin/amxxdump/includes/amxmodx/reapi_engine.inc create mode 100644 bin/amxxdump/includes/amxmodx/reapi_engine_const.inc create mode 100644 bin/amxxdump/includes/amxmodx/reapi_gamedll.inc create mode 100644 bin/amxxdump/includes/amxmodx/reapi_gamedll_const.inc create mode 100644 bin/amxxdump/includes/amxmodx/reapi_rechecker.inc create mode 100644 bin/amxxdump/includes/amxmodx/reapi_reunion.inc create mode 100644 bin/amxxdump/includes/amxmodx/reapi_version.inc create mode 100644 bin/amxxdump/includes/amxmodx/reapi_vtc.inc create mode 100644 bin/amxxdump/includes/amxmodx/regex.inc create mode 100644 bin/amxxdump/includes/amxmodx/regex.inc.temp create mode 100644 bin/amxxdump/includes/amxmodx/sockets.inc create mode 100644 bin/amxxdump/includes/amxmodx/sockets.inc.temp create mode 100644 bin/amxxdump/includes/amxmodx/sockets_async.inc create mode 100644 bin/amxxdump/includes/amxmodx/sorting.inc create mode 100644 bin/amxxdump/includes/amxmodx/sorting.inc.temp create mode 100644 bin/amxxdump/includes/amxmodx/sqlx.inc create mode 100644 bin/amxxdump/includes/amxmodx/sqlx.inc.temp create mode 100644 bin/amxxdump/includes/amxmodx/string.inc create mode 100644 bin/amxxdump/includes/amxmodx/string.inc.temp create mode 100644 bin/amxxdump/includes/amxmodx/string_const.inc create mode 100644 bin/amxxdump/includes/amxmodx/string_stocks.inc create mode 100644 bin/amxxdump/includes/amxmodx/textparse_ini.inc create mode 100644 bin/amxxdump/includes/amxmodx/textparse_smc.inc create mode 100644 bin/amxxdump/includes/amxmodx/tfcconst.inc create mode 100644 bin/amxxdump/includes/amxmodx/tfcstats.inc create mode 100644 bin/amxxdump/includes/amxmodx/tfcx.inc create mode 100644 bin/amxxdump/includes/amxmodx/tfcx.inc.temp create mode 100644 bin/amxxdump/includes/amxmodx/time.inc create mode 100644 bin/amxxdump/includes/amxmodx/time.inc.temp create mode 100644 bin/amxxdump/includes/amxmodx/tsconst.inc create mode 100644 bin/amxxdump/includes/amxmodx/tsfun.inc create mode 100644 bin/amxxdump/includes/amxmodx/tsfun.inc.temp create mode 100644 bin/amxxdump/includes/amxmodx/tsstats.inc create mode 100644 bin/amxxdump/includes/amxmodx/tsstats.inc.temp create mode 100644 bin/amxxdump/includes/amxmodx/tsx.inc create mode 100644 bin/amxxdump/includes/amxmodx/tsx.inc.temp create mode 100644 bin/amxxdump/includes/amxmodx/unixtime.inc create mode 100644 bin/amxxdump/includes/amxmodx/vault.inc create mode 100644 bin/amxxdump/includes/amxmodx/vault.inc.temp create mode 100644 bin/amxxdump/includes/amxmodx/vector.inc create mode 100644 bin/amxxdump/includes/amxmodx/vector.inc.temp create mode 100644 bin/amxxdump/includes/amxmodx/xs.inc create mode 100644 bin/amxxdump/includes/amxmodx/zombieplague43.inc create mode 100644 bin/compiler/amxxpc.exe create mode 100644 bin/compiler/amxxpc32.dll create mode 100644 bin/compiler/include/amxconst.inc create mode 100644 bin/compiler/include/amxmisc.inc create mode 100644 bin/compiler/include/amxmodx.inc create mode 100644 bin/compiler/include/amxmodx_version.inc create mode 100644 bin/compiler/include/cellarray.inc create mode 100644 bin/compiler/include/cellstack.inc create mode 100644 bin/compiler/include/celltrie.inc create mode 100644 bin/compiler/include/core.inc create mode 100644 bin/compiler/include/crxranks.inc create mode 100644 bin/compiler/include/crxranks_const.inc create mode 100644 bin/compiler/include/crypto.inc create mode 100644 bin/compiler/include/cssdk_const.inc create mode 100644 bin/compiler/include/csstats.inc create mode 100644 bin/compiler/include/csstats_const.inc create mode 100644 bin/compiler/include/cstrike.inc create mode 100644 bin/compiler/include/cstrike_const.inc create mode 100644 bin/compiler/include/csx.inc create mode 100644 bin/compiler/include/cvars.inc create mode 100644 bin/compiler/include/datapack.inc create mode 100644 bin/compiler/include/dbi.inc create mode 100644 bin/compiler/include/debug.inc create mode 100644 bin/compiler/include/dodconst.inc create mode 100644 bin/compiler/include/dodfun.inc create mode 100644 bin/compiler/include/dodstats.inc create mode 100644 bin/compiler/include/dodx.inc create mode 100644 bin/compiler/include/engine.inc create mode 100644 bin/compiler/include/engine_const.inc create mode 100644 bin/compiler/include/engine_stocks.inc create mode 100644 bin/compiler/include/esf.inc create mode 100644 bin/compiler/include/esf_const.inc create mode 100644 bin/compiler/include/fakemeta.inc create mode 100644 bin/compiler/include/fakemeta_const.inc create mode 100644 bin/compiler/include/fakemeta_stocks.inc create mode 100644 bin/compiler/include/fakemeta_util.inc create mode 100644 bin/compiler/include/file.inc create mode 100644 bin/compiler/include/float.inc create mode 100644 bin/compiler/include/fun.inc create mode 100644 bin/compiler/include/gameconfig.inc create mode 100644 bin/compiler/include/geoip.inc create mode 100644 bin/compiler/include/ham_const.inc create mode 100644 bin/compiler/include/hamsandwich.inc create mode 100644 bin/compiler/include/hlsdk_const.inc create mode 100644 bin/compiler/include/json.inc create mode 100644 bin/compiler/include/lang.inc create mode 100644 bin/compiler/include/message_const.inc create mode 100644 bin/compiler/include/message_stocks.inc create mode 100644 bin/compiler/include/messages.inc create mode 100644 bin/compiler/include/mysqlt.inc create mode 100644 bin/compiler/include/newmenus.inc create mode 100644 bin/compiler/include/ns.inc create mode 100644 bin/compiler/include/ns_const.inc create mode 100644 bin/compiler/include/nvault.inc create mode 100644 bin/compiler/include/oldmenu.inc create mode 100644 bin/compiler/include/orpheu.inc create mode 100644 bin/compiler/include/orpheu_advanced.inc create mode 100644 bin/compiler/include/orpheu_const.inc create mode 100644 bin/compiler/include/orpheu_memory.inc create mode 100644 bin/compiler/include/orpheu_stocks.inc create mode 100644 bin/compiler/include/reapi.inc create mode 100644 bin/compiler/include/reapi_engine.inc create mode 100644 bin/compiler/include/reapi_engine_const.inc create mode 100644 bin/compiler/include/reapi_gamedll.inc create mode 100644 bin/compiler/include/reapi_gamedll_const.inc create mode 100644 bin/compiler/include/reapi_rechecker.inc create mode 100644 bin/compiler/include/reapi_reunion.inc create mode 100644 bin/compiler/include/reapi_version.inc create mode 100644 bin/compiler/include/reapi_vtc.inc create mode 100644 bin/compiler/include/regex.inc create mode 100644 bin/compiler/include/sockets.inc create mode 100644 bin/compiler/include/sockets_async.inc create mode 100644 bin/compiler/include/sorting.inc create mode 100644 bin/compiler/include/sqlx.inc create mode 100644 bin/compiler/include/string.inc create mode 100644 bin/compiler/include/string_const.inc create mode 100644 bin/compiler/include/string_stocks.inc create mode 100644 bin/compiler/include/textparse_ini.inc create mode 100644 bin/compiler/include/textparse_smc.inc create mode 100644 bin/compiler/include/tfcconst.inc create mode 100644 bin/compiler/include/tfcstats.inc create mode 100644 bin/compiler/include/tfcx.inc create mode 100644 bin/compiler/include/time.inc create mode 100644 bin/compiler/include/tsconst.inc create mode 100644 bin/compiler/include/tsfun.inc create mode 100644 bin/compiler/include/tsstats.inc create mode 100644 bin/compiler/include/tsx.inc create mode 100644 bin/compiler/include/unixtime.inc create mode 100644 bin/compiler/include/vault.inc create mode 100644 bin/compiler/include/vector.inc create mode 100644 bin/compiler/include/xs.inc create mode 100644 bin/compiler/include/zombieplague43.inc create mode 100644 debug.log create mode 100644 styles/editor/Ayu (mirage).pawn-editor.sublime-color-scheme create mode 100644 styles/editor/Dracula.pawn-editor.sublime-color-scheme create mode 100644 styles/editor/Monokai Pro.pawn-editor.sublime-color-scheme create mode 100644 styles/editor/Nord.pawn-editor.sublime-color-scheme create mode 100644 styles/editor/One Dark.pawn-editor.sublime-color-scheme create mode 100644 styles/editor/VS Material.pawn-editor.sublime-color-scheme create mode 100644 styles/popup/default.pawn-popup.css diff --git a/AMXX-ASM.sublime-syntax b/AMXX-ASM.sublime-syntax new file mode 100644 index 0000000..3782855 --- /dev/null +++ b/AMXX-ASM.sublime-syntax @@ -0,0 +1,121 @@ +%YAML 1.2 +--- +name: AMXX-ASM +file_extensions: [ amxxdump, amxxmemory ] +scope: source.amxx +contexts: + + + main: + - include: amxxmemory + - include: amxxdump + + + - include: pawn_string + - include: pawn_coment + - include: pawn_numbers + - include: pawn_function + + # Constants + - match: \b(public|native|stock|local|global)\b + scope: storage.modifier.function + + - match: \b(new|val|ref)\b + scope: keyword.control + + # Tag + - match: '\b[A-Za-z_]\w*\:' + scope: storage.modifier.tag + + amxxdump: + - match: '0x.*?PROC.*?; .*' + scope: keyword.control.memory + + amxxmemory: + - match: '^\b(data|code)\b:((0x[0-9A-Fa-f]{8})=?|(.*))' + captures: + 1: keyword.control.memory + 3: constant.numeric.hex.memory + 4: invalid.illegal + push: + - match: '\[(([[0-9A-Fa-f]{8}\s]+)|(.*))\](.*)' + captures: + 2: constant.numeric.hex.memory + 3: invalid.illegal + 4: invalid.illegal + pop: true + - include: pawn_string + - match: '(f)?(.*)' + captures: + 1: keyword.control.memory + 2: invalid.illegal + pop: true + + # String + pawn_string: + - match: '"' + scope: punctuation.definition.string.begin.pawn + push: + - meta_scope: string.quoted.double.pawn + - match: '(")|(?<=^|[^\\])\s*(\n)' + captures: + 1: punctuation.definition.string.end.pawn + 2: invalid.illegal.unexpected-end-of-line.pawn + pop: true + - include: string_escaped_char + - include: string_placeholder + + string_escaped_char: + - match: \^(\^|[abefnprtv\'"?]|[0-3]\d{,2}|[4-7]\d?|x[a-fA-F0-9]{,2}|u[a-fA-F0-9]{,4}|U[a-fA-F0-9]{,8}) + scope: constant.character.escape.pawn + - match: '\\[drywR]' + scope: constant.character.escape.pawn + - match: \^. + scope: invalid.illegal.unknown-escape.pawn + + string_placeholder: + - match: |- + (?x)% + ((-?\d+)|\*(-?\d+\$)?)? # minimum field width + (\.((-?\d+)|\*(-?\d+\$)?)?)? # precision + [cbdiufXxasLNn%] # conversion type + scope: constant.other.placeholder.pawn + + # Comment + pawn_coment: + - match: ';' + scope: punctuation.definition.comment + push: + - meta_scope: comment.line + - match: $ + pop: true + + # Function + pawn_function: + - match: \s*([A-Za-z_][\w_]*)[\s\<\>\+\-\=]*(\() + captures: + 1: variable.function + 2: punctuation.section.group.begin function.parens + push: + #- meta_content_scope: meta.function.params + - match: \) + scope: punctuation.section.group.end function.parens + pop: true + - include: main + + # Number + pawn_numbers: + - match: '(\d+)(\.{2})(\d+)' + captures: + 1: constant.numeric.int + 2: keyword.operator.switch-range + 3: constant.numeric.int + + - match: ([-]?0x[\da-fA-F]{1,8}) + scope: constant.numeric.hex + + - match: \b(\d+\.\d+)\b + scope: constant.numeric.float + + - match: \b(\d+)\b + scope: constant.numeric.int diff --git a/AMXX-Cmd.sublime-commands b/AMXX-Cmd.sublime-commands index 9d6e5e4..d87df4a 100644 --- a/AMXX-Cmd.sublime-commands +++ b/AMXX-Cmd.sublime-commands @@ -3,6 +3,7 @@ { "caption": "AMXX: Functions List", "command": "amxx_func_list" }, { "caption": "AMXX: Includes Tree", "command": "amxx_tree" }, { "caption": "AMXX: Search All", "command": "amxx_search_all" }, - { "caption": "AMXX: New Header-Inc", "command": "amxx_new_include" }, + { "caption": "AMXX: New Include", "command": "amxx_new_include" }, { "caption": "AMXX: New Plug-In", "command": "amxx_new_plugin" }, + { "caption": "AMXX: Uncompress", "command": "amxx_uncompress" }, ] \ No newline at end of file diff --git a/AMXX-Editor.sublime-settings b/AMXX-Editor.sublime-settings index 6bdd3eb..b11206d 100644 --- a/AMXX-Editor.sublime-settings +++ b/AMXX-Editor.sublime-settings @@ -1,53 +1,60 @@ { - // Example: AMXXEditor 4.2 by Destro + // Example: AMXX-Editor v4.4 by Destro + "active_profile": "default (AMXX 1.9)", "build_profiles": { - /*"AMXX-1.8.2": + /* Example: + "AMXX-1.8.2": { "amxxpc_debug": 2, - "amxxpc_path": "D:\\archivos\\amxx_mm_hlsdk\\compiler\\1.8.2\\amxxpc.exe", - "include_dir": "D:\\archivos\\amxx_mm_hlsdk\\compiler\\1.8.2\\include", - "output_dir": "D:\\archivos\\plugins" + "amxxpc_path": "D:\\amxmodx\\compiler\\1.8.2\\amxxpc.exe", + "include_dir": "D:\\amxmodx\\compiler\\1.8.2\\include", + "output_dir": "D:\\amxmodx\\plugins" }, "AMXX-1.9": { "amxxpc_debug": 2, - "amxxpc_path": "D:\\archivos\\amxx_mm_hlsdk\\compiler\\1.9\\amxxpc.exe", - "include_dir": "D:\\archivos\\amxx_mm_hlsdk\\compiler\\1.9\\include", - "output_dir": "D:\\archivos\\plugins" - }*/ + "amxxpc_path": "D:\\amxmodx\\compiler\\1.9\\amxxpc.exe", + "include_dir": "D:\\amxmodx\\compiler\\1.9\\include", + "output_dir": "D:\\amxmodx\\plugins" + } + + Valid variables in path: + - ${package} + - ${file_path} + + */ }, - - /* EDITOR */ + /* Editor features */ "enable_tooltip": true, // ( true / false ) "enable_buildversion": true, // ( true / false ) "enable_check_invalid": true, // ( true / false ) "enable_dynamic_highlight": true, // ( true / false ) + /* Autocomplete */ "ac_enable": true, // ( true / false ) - "ac_keywords": 2, // ( 0 disable, 1 normal, 2 insert parents ) + "ac_keywords": 2, // ( 0: Disable, 1: Normal, 2: Insert parents ) "ac_snippets": true, // ( true / false ) "ac_preprocessor": true, // ( true / false ) "ac_emit_info": true, // ( true / false ) "ac_local_var": true, // ( true / false ) "ac_extra_sorted": true, // ( true / false ) - "live_refresh_delay": 1.5, // ( 0.5 ~ 5.0 ) Delay before regenerating Auto-Completion + "live_refresh_delay": 1.5, // ( 0.5 ~ 5.0 ) Delay before reparsing code. - "tooltip_style_mode": 0, // 0: Using CSS style file, 1: Using Editor color-scheme file. - "tooltip_font_size": 1, // editor font_size + tooltip_font_size + "tooltip_style_mode": 1, // 0: Using CSS style file, 1: Generate from color-scheme. + "tooltip_font_size": 1, // Tooltip font size offset (font_size + tooltip_font_size) - "style_editor": "AMXXStudio", // ( stylename / "default" ) - "style_console": "AMXXStudio", // ( stylename / "default" ) - "style_popup": "AMXXStudio", // ( stylename ) - + "style_editor": "default", // ( stylename ) + "style_console": "default", // ( stylename ) + "style_popup": "default", // ( stylename ) /*********************************************** - * Debug message/log flags: + * Debug flags: * "" - Set default: "a". * "a" - Errors messages. * "b" - Warnings messages. @@ -57,8 +64,8 @@ * "f" - Info Analyzer. * "s" - Sublime EventListener (dev). * "z" - Enable ViewDebugMode (colorize code sections). - * "*" - All debugging flags at the same time. + * "*" - All debugging flags. ***********************************************/ - "debug_flags": "abcd", - "debug_flags_log": "abcd", + "debug_flags": "abe", // Console message + "debug_flags_log": "abcde", // Log file } diff --git a/AMXX-Pawn.sublime-syntax b/AMXX-Pawn.sublime-syntax index af9fce4..5fcf624 100644 --- a/AMXX-Pawn.sublime-syntax +++ b/AMXX-Pawn.sublime-syntax @@ -7,10 +7,15 @@ contexts: # "AMXX-Pawn Syntax v4.4" main: + - include: pawn_directives + - include: main2 + + + main2: - include: pawn_string - include: pawn_character - include: pawn_coment - - include: pawn_directives + - include: pawn_numbers - include: pawn_keywords - include: pawn_function @@ -55,30 +60,31 @@ contexts: # "Pawn Directives" pawn_directives: - match: ^\s*?# - scope: meta.preprocessor + scope: keyword.control.import meta.preprocessor push: - - include: directive_others - include: directive_include - include: directive_define - - include: pawn_coment - - include: main + - include: directive_others + - include: directive_invalid directive_include: - match: (include|tryinclude)\s+((["][\t ]*[\w\-\/]*\.(inc|sma|inl)?[\t ]*["])|([<][\t ]*[\w\-\/]*[\t ]*[>])|([^\s]*)) captures: - 1: meta.preprocessor.include.pawn - 3: meta.preprocessor.include.path.pawn - 4: meta.preprocessor.include.path.pawn - 5: meta.preprocessor.include.path.pawn + 1: keyword.control.import meta.preprocessor.include.pawn + 3: keyword.control.import meta.preprocessor.include.path.pawn + 4: keyword.control.import meta.preprocessor.include.path.pawn + 5: keyword.control.import meta.preprocessor.include.path.pawn 6: invalid.illegal.preprocessor.pawn directive_define: - - match: define\s+[a-zA-Z_]\w* - scope: meta.preprocessor.define.pawn + - match: define + scope: keyword.control.import meta.preprocessor.define.pawn + - match: \s+[a-zA-Z_][^\s]* + scope: keyword.control.import meta.preprocessor.define.pawn push: - #- meta_scope: meta.preprocessor.define.multiline.pawn - - include: main + - include: main2 - include: define-multiline + pop: true define-multiline: @@ -87,7 +93,7 @@ contexts: scope: punctuation.separator.continuation.line.pawn meta.preprocessor.define.pawn set: - meta_scope: meta.preprocessor.define.multiline.pawn - - include: main + - include: main2 - include: define-multiline - match: $\n pop: true @@ -99,17 +105,22 @@ contexts: 1: meta.preprocessor.others.pawn 2: entity.name.constant.preprocessor.pawn + directive_invalid: + - match: '[^\n]*' + scope: invalid.illegal.preprocessor.pawn + pop: true + ######################################################## # "PAWN String" pawn_string: - match: '"' - scope: punctuation.definition.string.begin.pawn + scope: string.quoted.double.begin push: - meta_scope: string.quoted.double.pawn - match: '(")|(?<=^|[^\\])\s*(\n)' captures: - 1: punctuation.definition.string.end.pawn + 1: string.quoted.double.end 2: invalid.illegal.unexpected-end-of-line.pawn pop: true - include: string_escaped_char @@ -149,48 +160,48 @@ contexts: 1: storage.modifier.function.pawn 2: storage.modifier.tag 3: support.function.pawn - 4: punctuation.section.group.begin function.parens.pawn + 4: punctuation.section.group.begin push: - match: \) - scope: punctuation.section.group.end function.parens.pawn + scope: punctuation.section.group.end pop: true - - include: main + - include: main2 - match: ^(([A-Za-z_]\w*)\s+)?([A-Za-z_]\w*:\s*)?([A-Za-z_][\w_]*)[\s]*(\() captures: 2: storage.modifier.function.pawn 3: storage.modifier.tag 4: support.function.pawn - 5: punctuation.section.group.begin function.parens.pawn + 5: punctuation.section.group.begin push: - match: \) - scope: punctuation.section.group.end function.parens.pawn + scope: punctuation.section.group.end pop: true - - include: main + - include: main2 - match: ^(native|stock)\s+([A-Za-z_]\w*:)?\[\w*\]\s*?([A-Za-z_][\w_]*)[\s]*(\() captures: 1: storage.modifier.function.pawn 2: storage.modifier.tag 3: support.function.pawn - 4: punctuation.section.group.begin function.parens.pawn + 4: punctuation.section.group.begin push: - match: \) - scope: punctuation.section.group.end function.parens.pawn + scope: punctuation.section.group.end pop: true - - include: main + - include: main2 function_call: - match: \s*([A-Za-z_][\w_]*)[\s]*(\() captures: 1: variable.function.pawn - 2: punctuation.section.group.begin function.parens.pawn + 2: punctuation.section.group.begin push: #- meta_content_scope: meta.function.params - match: \) - scope: punctuation.section.group.end function.parens.pawn + scope: punctuation.section.group.end pop: true - - include: main + - include: main2 ######################################################## @@ -224,7 +235,7 @@ contexts: scope: storage.modifier.function.pawn - match: (\[|\]|) - scope: meta.brackets + scope: meta.brackets punctuation.section.brackets pawn_keywords: - match: \s*(case)\s*(\d*)(\.\.)(\d*)\s*(:)\s* @@ -245,10 +256,13 @@ contexts: 1: keyword.control.pawn 2: storage.modifier.tag + - match: (%\d) # define positional group + scope: storage.modifier meta.preprocessor.group + - match: \s*\b(sizeof|tagof|charsmax|break|case|continue|default|do|else|for|goto|if|return|state|switch|while|assert|sleep)\b scope: keyword.control.pawn - - match: \s*\b(Float|new|enum|char|const|static)\b + - match: \s*\b(new|enum|char|const|static)\b scope: storage.type.vars.pawn - match: (any\:\.\.\.) @@ -275,13 +289,13 @@ contexts: - match: (~|&|\||\^|<<|>>) scope: keyword.operator.bitwise.pawn - - match: (\,|;) + - match: (\,|;|\.) scope: punctuation.separator.pawn - match: ({) scope: punctuation.section.block.begin - match: (}) - scope: punctuation.section.block.begin + scope: punctuation.section.block.end ######################################################## @@ -289,12 +303,12 @@ contexts: # "Check Brackets Closed" parens: - match: \( - scope: parens.pawn + scope: punctuation.section.group.begin push: - match: \) - scope: parens.pawn + scope: punctuation.section.group.end pop: true - - include: main + - include: main2 check_brackets: - match: \) diff --git a/AMXXEditor.py b/AMXXEditor.py index 8beb709..ebe4aae 100644 --- a/AMXXEditor.py +++ b/AMXXEditor.py @@ -1,4 +1,4 @@ -# Sublime AMXXPawn-Editor 4.4 by Destro +# Sublime AMXX-Editor v4.4 by Destro import os import re @@ -10,6 +10,7 @@ import threading import platform import subprocess +import zipfile BASE_PATH = os.path.dirname(__file__) @@ -38,7 +39,8 @@ # Global VARs & Initialize #:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: globalvar.EDITOR_VERSION = "4.4" -globalvar.EDITOR_BUILD = "4401" +globalvar.EDITOR_BUILD = "4410" +globalvar.EDITOR_DATE = "11 Oct 2024" globalvar.PACKAGE_NAME = "AMXXEditorV4" globalvar.ROLLBAR_API_TOKEN = "abe32dcc89f647398b096cd63aa964a9" @@ -54,21 +56,18 @@ ( 12, "N", "" ) ] -globalvar.nodes = dict() -globalvar.include_dirs = list() -globalvar.profiles_list = list() -globalvar.rollbar = None +globalvar.nodes = dict() +globalvar.profiles_list = list() +globalvar.rollbar = None - -globalvar.style_popup = { "list": [ ], "path": { }, "active": "" } -globalvar.style_editor = { "list": [ ], "path": { }, "active": "" } -globalvar.style_console = { "list": [ ], "path": { }, "active": "" } - -globalvar.invalid_settings = False -globalvar.edit_settings = False globalvar.search_fix_view = False +globalvar.checking_update = False - +globalvar.style_popup = Style("style_popup", ".pawn-popup.css") +globalvar.style_editor = Style("style_editor", ".pawn-editor.sublime-color-scheme") +globalvar.style_console = Style("style_console", ".pawn-console.sublime-color-scheme") + + # Default configuration values cfg.rollbar_report = True cfg.lang = "en" @@ -102,7 +101,7 @@ def global_exception_handler(exctype, value, tb): def is_package_related_exception(tb) : while tb is not None : filename = tb.tb_frame.f_code.co_filename - + if globalvar.PACKAGE_NAME in filename : return True @@ -122,7 +121,7 @@ def is_package_related_exception(tb) : e.__traceback__ = tb # Report the exception using Rollbar - #globalvar.rollbar.report_exception(e) + globalvar.rollbar.report_exception(e) # Hook exception handler sys.excepthook = global_exception_handler @@ -161,6 +160,10 @@ def createIfNotExists(path): ) #################################################################################################### + # Extract bin tools + if is_installed_package() : + extract_package_directory(globalvar.PACKAGE_NAME, "bin") + # MultiThreads start globalvar.analyzerQueue = AnalyzerQueueThread() @@ -183,13 +186,10 @@ def createIfNotExists(path): try: import locale lang = locale.getdefaultlocale()[0].split("_")[0] - if lang == "es" or lang == "en" : - cfg.lang = lang + if lang == "es" : + cfg.lang = "es" except: pass - - print("LANG:", cfg.lang) - def plugin_unloaded() : @@ -203,44 +203,88 @@ def plugin_unloaded() : # RollbarAPI globalvar.rollbar.close() + +def is_installed_package(): + return __file__.startswith( sublime.installed_packages_path() ) + +def extract_package_directory(package_name, target_directory): + + installed_package_path = os.path.join(sublime.installed_packages_path(), f"{package_name}.sublime-package") + extracted_path = os.path.join(sublime.packages_path(), package_name) + if os.path.exists( os.path.join(extracted_path, target_directory) ): + return False + + if not os.path.isfile(installed_package_path): + debug.error(f"El paquete {package_name} no existe en installed_packages") + return False + + try: + os.makedirs(extracted_path, exist_ok=True) + + with zipfile.ZipFile(installed_package_path, 'r') as zip_ref: + for file in zip_ref.namelist(): + if file.startswith(target_directory): + zip_ref.extract(file, extracted_path) + + return True + except Exception as e: + debug.error(f"Error al extraer el paquete: {e}") + return False + + def on_config_change() : # Debug cfg.debug_flags = debug.check_flags(cfg.get("debug_flags", "a")) cfg.debug_log_flags = debug.check_flags(cfg.get("debug_log_flags", "abcd")) - # Profiles - cfg.active_profile = cfg.get("active_profile", "") - cfg.profiles = cfg.get("build_profiles", None) - if not cfg.profiles : - validate_profile("", None) - debug.error("on_config_change() -> `cfg.profiles` is not defined") - return - - globalvar.profiles_list = list(cfg.profiles.keys()) - globalvar.include_dirs.clear() - - for profile_name in globalvar.profiles_list : - profile = cfg.profiles[profile_name] + # Default Profile + default_profile = "default (AMXX 1.9)" + default_compiler = os.path.join(sublime.packages_path(), globalvar.PACKAGE_NAME, "bin", "compiler") + cfg.profiles = { + default_profile: { + "amxxpc_debug": 2, + "amxxpc_path": os.path.join(default_compiler, "amxxpc.exe" if os.name == 'nt' else "amxxpc"), + "include_dir": os.path.join(default_compiler, "include"), + "output_dir": "${file_path}" + } + } + + def profile_normpath(_dict, key) : + path = _dict.get(key, "") + if not path or path == "${file_path}" : + return path + path = path.replace("${packages}", sublime.packages_path()) + return os.path.normpath(path) - # Fix values - profile['output_dir'] = util.cfg_get_path(profile, 'output_dir') - profile['include_dir'] = util.cfg_get_path(profile, 'include_dir') - profile['amxxpc_path'] = util.cfg_get_path(profile, 'amxxpc_path') + # List Profiles and Validate + profiles = cfg.get("build_profiles", None) + if isinstance(profiles, dict) : + for profile_name, profile in profiles.items() : - if not validate_profile(profile_name, profile) : - return + if not profile or not isinstance(profile, dict) : + continue - if 'amxxpc_debug' in profile : - profile['amxxpc_debug'] = util.clamp(int(profile['amxxpc_debug']), 0, 2) - else : - profile['amxxpc_debug'] = 2 + # Fix values + profile['output_dir'] = profile_normpath(profile, 'output_dir') + profile['include_dir'] = profile_normpath(profile, 'include_dir') + profile['amxxpc_path'] = profile_normpath(profile, 'amxxpc_path') - globalvar.include_dirs.append(profile['include_dir']) - + if 'amxxpc_debug' in profile and isinstance(profile['amxxpc_debug'], int) : + profile['amxxpc_debug'] = util.clamp(profile['amxxpc_debug'], 0, 2) + else : + profile['amxxpc_debug'] = 2 + + if validate_profile(profile_name, profile) : + cfg.profiles.setdefault(profile_name, profile) + + globalvar.profiles_list = list(cfg.profiles.keys()) + + cfg.active_profile = cfg.get("active_profile", default_profile) if not cfg.active_profile in globalvar.profiles_list : - cfg.active_profile = globalvar.profiles_list[0] + cfg.active_profile = default_profile + # Cache settings @@ -266,35 +310,16 @@ def on_config_change() : # Update Live reflesh delay. globalvar.analyzerQueue.delay = util.clamp(float(cfg.get('live_refresh_delay', 1.5)), 0.5, 5.0) - # Generate list of styles - globalvar.style_popup['list'].clear() - globalvar.style_editor['list'].clear() - globalvar.style_console['list'].clear() - - globalvar.style_editor['list'].append("default") - globalvar.style_console['list'].append("default") - - list_styles(globalvar.style_popup, ".pawn-popup.css") - list_styles(globalvar.style_editor, ".pawn-editor.sublime-color-scheme") - list_styles(globalvar.style_console, ".pawn-console.sublime-color-scheme") - - validate_active_style(globalvar.style_popup, "style_popup") - validate_active_style(globalvar.style_editor, "style_editor") - validate_active_style(globalvar.style_console, "style_console") + globalvar.style_popup.initialize() + globalvar.style_editor.initialize() + globalvar.style_console.initialize() # Update style update_editor_style() update_console_style() update_popup_style() - - if cfg.tooltip_style_mode == 1: - globalvar.cacheSyntaxCSS = self.generate_highlightCSS(view) - else : - globalvar.cacheSyntaxCSS = "" - - globalvar.watchDog.unschedule_all() for profile_name in globalvar.profiles_list : @@ -329,36 +354,34 @@ def list_includes(profile): return True def update_editor_style(): - if "default" == globalvar.style_editor['active'] : - newValue = None - else : - newValue = globalvar.style_editor['path'][globalvar.style_editor['active']] + + color_scheme = None + if "default" != globalvar.style_editor.get_active() : + color_scheme = globalvar.style_editor.get_path() s = CustomSettings("AMXX-Pawn.sublime-settings") - s.set("color_scheme", newValue) + s.set("color_scheme", color_scheme) s.set("show_errors_inline", False) s.set("word_separators", "./\\()\"'-:,.;<>~!$%^&*|+=[]{}`~?") s.set("extensions", [ "sma", "inc" ]) + s.save() - if newValue : - data = util.safe_json_load(newValue).get("amxxeditor") - if data : - extra_settings = data.get('syntax_settings') - for key in extra_settings : - s.set(key, extra_settings[key]) + # AMXX Uncompress + s = CustomSettings("AMXX-ASM.sublime-settings") + s.set("color_scheme", color_scheme) s.save() def update_console_style(): - if "default" == globalvar.style_console['active'] : - newValue = None - else : - newValue = globalvar.style_console['path'][globalvar.style_console['active']] + + color_scheme = None + if "default" != globalvar.style_console.get_active() : + color_scheme = globalvar.style_console.get_path() s = CustomSettings("AMXX-Console.sublime-settings", True) - s.set('color_scheme', newValue) + s.set('color_scheme', color_scheme) - if newValue : - data = util.safe_json_load(newValue).get("amxxeditor") + if color_scheme : + data = util.safe_json_load(color_scheme).get("amxxeditor") if data : extra_settings = data.get('syntax_settings') for key in extra_settings : @@ -366,7 +389,9 @@ def update_console_style(): s.save() def update_popup_style(): - globalvar.cachePopupCSS = sublime.load_resource(globalvar.style_popup['path'][globalvar.style_popup['active']]) + globalvar.cacheSyntaxCSS = "" + + globalvar.cachePopupCSS = sublime.load_resource(globalvar.style_popup.get_path()) globalvar.cachePopupCSS = globalvar.cachePopupCSS.replace('\r', '') # Fix # Remove comments @@ -374,47 +399,38 @@ def update_popup_style(): globalvar.cachePopupCSS = globalvar.cachePopupCSS.replace('\n\n', '\n') -def list_styles(style, endext): - for file in sublime.find_resources("*" + endext) : - name = os.path.basename(file).replace(endext, "") - - if not name in style['list'] : - style['list'].append(name) - - style['path'][name] = file - -def validate_active_style(style, key): - style['active'] = cfg.get(key) - if not style['active'] in style['list'] : - style['active'] = style['list'][0] - def validate_profile(profile_name, profile) : - error = "Invalid profile configuration : %s\n\n" % profile_name - - if not profile or not isinstance(profile, dict) or profile.get('amxxpc_path') == None or profile.get('include_dir') == None or profile.get('output_dir') == None : - error += "Empty Value\n" - elif not os.path.isfile(util.cfg_get_path(profile, 'amxxpc_path')) : - error += "amxxpc_directory : File does not exist.\n\"%s\"" % util.cfg_get_path(profile, 'amxxpc_path') - elif not os.path.isdir(util.cfg_get_path(profile, 'include_dir')) : - error += "include_directory : Directory does not exist.\n\"%s\"" % util.cfg_get_path(profile, 'include_dir') - elif profile.get('output_dir') != "${file_path}" and not os.path.isdir(util.cfg_get_path(profile, 'output_dir')) : - error += "output_dir : Directory does not exist.\n\"%s\"" % util.cfg_get_path(profile, 'output_dir') - else : + error = f"Invalid profile configuration \"{profile_name}\"\n\n" + + # Check required fields + if not profile['amxxpc_path'] or not profile['include_dir'] or not profile['output_dir'] : + error += "Missing required fields. All of these must be set:\n" + error += "- 'amxxpc_path'\n" + error += "- 'include_dir'\n" + error += "- 'output_dir'" + + # Validate amxxpc path + elif not os.path.isfile(profile['amxxpc_path']) : + error += f"amxxpc_path: File does not exist\n- amxxpc_path : \"{profile['amxxpc_path']}\"" + + # Validate include directory + elif not os.path.isdir(profile['include_dir']) : + error += f"Directory does not exist\n- include_dir : \"{profile['include_dir']}\"" + + # Validate output directory + elif profile['output_dir'] != "${file_path}" and not os.path.isdir(profile['output_dir']) : + error += f"Directory does not exist:\n- output_dir : \"{profile['output_dir']}\"" + + # All Ok! + else: return True - - globalvar.invalid_settings = True - - sublime.message_dialog("AMXX-Editor:\n\n" + error) - - if globalvar.edit_settings : + if not sublime.ok_cancel_dialog(error, "Edit Settings", "ERROR: AMXX-Editor") : return False - globalvar.edit_settings = True - + file_path = f"{sublime.packages_path()}/User/AMXX-Editor.sublime-settings" - if not os.path.isfile(file_path): default = sublime.load_resource(f"Packages/{globalvar.PACKAGE_NAME}/AMXX-Editor.sublime-settings") default = default.replace("Example:", "User Settings:") @@ -426,8 +442,10 @@ def validate_profile(profile_name, profile) : return False def run_edit_settings() : - sublime.active_window().run_command("edit_settings", {"base_file": f"${{packages}}/{globalvar.PACKAGE_NAME}/AMXX-Editor.sublime-settings", "default": "{\n\t$0\n}\n"}) - + sublime.active_window().run_command("edit_settings", { + "base_file": f"${{packages}}/{globalvar.PACKAGE_NAME}/AMXX-Editor.sublime-settings", + "default": "{\n\t$0\n}\n" + }) class AmxxProfileCommand(sublime_plugin.ApplicationCommand): @@ -454,87 +472,83 @@ def description(self, index) : class AmxxEditorStyleCommand(sublime_plugin.ApplicationCommand): def run(self, index) : - if index >= len(globalvar.style_editor['list']) : + if index >= globalvar.style_editor.count() : return - globalvar.style_editor['active'] = globalvar.style_editor['list'][index] - - cfg.set("style_editor", globalvar.style_editor['active']) + globalvar.style_editor.set_active(index) + + cfg.set("style_editor", globalvar.style_editor.get_active()) if not index : cfg.save(False) return - path = globalvar.style_editor['path'][globalvar.style_editor['active']] - + path = globalvar.style_editor.get_path() data = util.safe_json_load(path).get("amxxeditor") if data : - - if data.get('default_popup', 'default') in globalvar.style_popup['list'] : - cfg.set("style_popup", data['default_popup']) - if data.get('default_console', 'default') in globalvar.style_console['list'] : - cfg.set("style_console", data['default_console']) + cfg.set("style_popup", data.get('default_popup', 'default')) + cfg.set("style_console", data.get('default_console', 'default')) cfg.save(False) def is_visible(self, index) : - return (index < len(globalvar.style_editor['list'])) + return index < globalvar.style_editor.count() def is_checked(self, index) : - return (index < len(globalvar.style_editor['list']) and globalvar.style_editor['list'][index] == globalvar.style_editor['active']) + return globalvar.style_editor.is_active(index) def description(self, index) : - if index < len(globalvar.style_editor['list']) : - return globalvar.style_editor['list'][index] + if index < globalvar.style_editor.count() : + return globalvar.style_editor.list[index] return "" -class AmxxEditorStyleConsoleCommand(sublime_plugin.ApplicationCommand): +class AmxxConsoleStyleCommand(sublime_plugin.ApplicationCommand): def run(self, index) : - if index >= len(globalvar.style_console['list']) : + if index >= globalvar.style_console.count() : return - globalvar.style_console['active'] = globalvar.style_console['list'][index] - - cfg.set("style_console", globalvar.style_console['active']) + globalvar.style_console.set_active(index) + + cfg.set("style_console", globalvar.style_console.get_active()) cfg.save() update_console_style() def is_visible(self, index) : - return (index < len(globalvar.style_console['list'])) + return index < globalvar.style_console.count() def is_checked(self, index) : - return (index < len(globalvar.style_console['list']) and globalvar.style_console['list'][index] == globalvar.style_console['active']) + return globalvar.style_console.is_active(index) def description(self, index) : - if index < len(globalvar.style_console['list']) : - return globalvar.style_console['list'][index] + if index < globalvar.style_console.count() : + return globalvar.style_console.list[index] return "" -class AmxxEditorStylePopupCommand(sublime_plugin.ApplicationCommand): +class AmxxPopupStyleCommand(sublime_plugin.ApplicationCommand): def run(self, index) : - if index >= len(globalvar.style_popup['list']) : + if index >= globalvar.style_popup.count() : return - globalvar.style_popup['active'] = globalvar.style_popup['list'][index] + globalvar.style_popup.set_active(index) - cfg.set("style_popup", globalvar.style_popup['active']) + cfg.set("style_popup", globalvar.style_popup.get_active()) cfg.save() update_popup_style() #} def is_visible(self, index) : - return (index < len(globalvar.style_popup['list'])) + return index < globalvar.style_popup.count() def is_checked(self, index) : - return (index < len(globalvar.style_popup['list']) and globalvar.style_popup['list'][index] == globalvar.style_popup['active']) + return globalvar.style_popup.is_active(index) def description(self, index) : - if index < len(globalvar.style_popup['list']) : - return globalvar.style_popup['list'][index] + if index < globalvar.style_popup.count() : + return globalvar.style_popup.list[index] return "" class AmxxNewIncludeCommand(sublime_plugin.WindowCommand): @@ -551,32 +565,37 @@ def new_file(extension): view.set_syntax_file("AMXX-Pawn.sublime-syntax") view.set_name(f"untitled.{extension}") - plugin_template = sublime.load_resource(f"Packages/{globalvar.PACKAGE_NAME}/default.{extension}") - plugin_template = plugin_template.replace("\r", "") - + plugin_template = sublime.load_resource(f"Packages/{globalvar.PACKAGE_NAME}/default.{extension}").replace("\r", "") + view.run_command("insert_snippet", {"contents": plugin_template}) -def check_update(bycommand=0) : + +def check_update(bycommand=False) : #{ + globalvar.checking_update = True + + sublime.active_window().status_message("AMXX-Editor: Checking update...") + data = None try: - with urllib.request.urlopen("https://amxmodx-es.com/st.php") as response: + with urllib.request.urlopen("https://raw.githubusercontent.com/Destro-/AMXXEditorV4/main/check_version.txt") as response: data = response.read() except Exception as e: if bycommand : sublime.error_message(f"ERROR: urlopen()' in check_update() -> {e}") debug.warning(f"'urlopen()' in check_update() -> {e}") - sublime.active_window().status_message("AMXX-Editor: Check update failed!") + sublime.active_window().status_message("AMXX-Editor: Check update failed") if not data : + globalvar.checking_update = False return data = data.decode("utf-8", "replace") if data : #{ - sublime.active_window().status_message("AMXX-Editor: Check update successful!") + sublime.active_window().status_message("AMXX-Editor: Check update successful") version, news = data.split("\n", 1) version, build = version.split("-") @@ -584,9 +603,10 @@ def check_update(bycommand=0) : build = int(build) current_build = int(globalvar.EDITOR_BUILD) + title = f"AMXX-Editor: v{globalvar.EDITOR_VERSION} (build: {globalvar.EDITOR_BUILD})" - if current_build == build and bycommand: - sublime.ok_cancel_dialog(f"AMXX-Editor: You are already using the latest version: v{globalvar.EDITOR_VERSION} (build: {globalvar.EDITOR_BUILD})", "OK") + if current_build >= build and bycommand: + sublime.ok_cancel_dialog(f"You are already using the latest version!", "OK", title) if current_build < build : @@ -594,14 +614,21 @@ def check_update(bycommand=0) : msg = f"A new {updateType} is available: v{version} (build: {build})\n\n{news}" - ok = sublime.ok_cancel_dialog(msg, "Download Update", f"AMXX-Editor: v{globalvar.EDITOR_VERSION} (build: {globalvar.EDITOR_BUILD})") + ok = sublime.ok_cancel_dialog(msg, "Download Update", title) if ok : - webbrowser.open_new_tab("https://amxmodx-es.com/showthread.php?tid=12316") + webbrowser.open_new_tab("https://github.com/Destro-/AMXXEditorV4/") #} + + globalvar.checking_update = False #} +class AmxxCheckUpdateCommand(sublime_plugin.WindowCommand): + def run(self): + if not globalvar.checking_update : + globalvar.checking_update = True + sublime.set_timeout_async(lambda: check_update(True), 50) class SearchAllInputHandler(sublime_plugin.TextInputHandler): @@ -906,41 +933,72 @@ def run(self, edit): self.view.replace(edit, region, result.group(1) + str(build) + beta + '\"') -class AboutInputHandler(sublime_plugin.ListInputHandler): +class AboutInputHandler(sublime_plugin.TextInputHandler): def preview(self, text): + + body = f'Sublime AMXX-Editor v{globalvar.EDITOR_VERSION}' + body += ' By Destro' + body += '
' + body += f'Build: {globalvar.EDITOR_BUILD}
' + body += f'Release Date: {globalvar.EDITOR_DATE}' + body += '

AMXXEditorV4 on GitHub' + body += '
' + + body += "

" + + body += 'Check Update ' + body += 'Changelog ' % ( "_es" if cfg.lang == "es" else "" ) + body += 'Donate' + content = """ +%s + + +""" % body -

Sublime AMXX-Editor v""" + globalvar.EDITOR_VERSION + """ by Destro

+ """ +

Sublime AMXX-Editor v Destro

CREDITs:
ppalex7 (SourcePawn Completions)

@@ -950,29 +1008,12 @@ def preview(self, text): KliPPy (build version)
Mistrick (mistrick color scheme)
- - - - - -""" + + """ return sublime.Html(content) - def list_items(self): - return [ ( "Exit", 0 ), ( "Donate", 1 ), ( "Visit Web", 2 ), ( "Check Updates", 3 ) ] - def confirm(self, value): - if not value : - return - - if value == 1 : - webbrowser.open_new_tab("https://amxmodx-es.com/donaciones.php") - elif value == 2 : - webbrowser.open_new_tab("https://amxmodx-es.com/showthread.php?tid=12316") - else : - sublime.set_timeout_async( lambda:check_update(True), 10) - class AmxxAboutCommand(sublime_plugin.WindowCommand): def run(self, about): @@ -989,7 +1030,7 @@ def run(self, *args, **kwargs): super().run(*args, **kwargs) view = self.output_view - view.erase_phantoms("mytest2") + view.erase_phantoms("button") self.outfile = "" for s in kwargs['cmd'] : @@ -1062,15 +1103,13 @@ def on_finished(self, proc): """ - view.erase_phantoms("mytest2") - view.add_phantom("mytest2", sublime.Region(view.size(), view.size()), contents, sublime.LAYOUT_BLOCK, on_navigate=self.on_navigate) + view.erase_phantoms("button") + view.add_phantom("button", sublime.Region(view.size(), view.size()), contents, sublime.LAYOUT_BLOCK, on_navigate=self.on_navigate) def on_navigate(self, src): view = self.output_view - #self.write("on_navigate: %s" % src) - if src == "#open" : subprocess.Popen(f'explorer /select,"{os.path.normpath(self.outfile)}"') elif src == "#copy" : @@ -1089,9 +1128,6 @@ def copy_file_to_clipboard(file_path): elif src == "#upload" : pass - #view.window().status_message("Copy to Clipboard!") - - #::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: #:: END Cmd / START Sublime EventListener :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: @@ -1125,13 +1161,15 @@ def scope_to_css(scope, classCSS): css += " font-weight: bold;" if style['italic'] : css += " font-style: italic;" + + css += " text-decoration: none;" return css + " }\n" highlightCSS = scope_to_css("", "pawnDefaultColor") highlightCSS += scope_to_css("variable.function", "pawnFunction") highlightCSS += scope_to_css("string", "pawnString") - highlightCSS += scope_to_css("keyword", "pawnKeyword") - highlightCSS += scope_to_css("storage.type.vars", "pawnConstant") + highlightCSS += scope_to_css("keyword.operator", "pawnOperator") + highlightCSS += scope_to_css("storage.type.vars", "pawnType") highlightCSS += scope_to_css("constant.numeric", "pawnNumber") highlightCSS += scope_to_css("storage.modifier.tag", "pawnTag") @@ -1157,7 +1195,7 @@ def on_activated(self, view): if not is_amxmodx_view(view): return - + node = get_view_node(view) if node : node.organize_and_cache() @@ -1245,6 +1283,10 @@ def on_window_command(self, window, cmd, args): if cmd != "build" : return + view = window.active_view() + if not is_amxmodx_view(view) : + return + profile = cfg.profiles[cfg.active_profile] build = SublimeSettings("AMXX-Compiler.sublime-build") @@ -1265,11 +1307,6 @@ def on_window_command(self, window, cmd, args): build.set("target", "amxx_exec") # Hook default build command "exec" build.save() - - view = window.active_view() - if not is_amxmodx_view(view) : - return - if not view.file_name() : view.run_command("save") @@ -1340,6 +1377,9 @@ def on_hover(self, view, point, hover_zone): if not is_amxmodx_view(view) or not cfg.enable_tooltip or hover_zone != sublime.HOVER_TEXT: return + if cfg.tooltip_style_mode == 1 and not globalvar.cacheSyntaxCSS : + globalvar.cacheSyntaxCSS = self.generate_highlightCSS(view) + if "meta.preprocessor.include.path" in scope : self.tooltip_include(view, point) elif "storage.modifier.tag" in scope : @@ -1375,8 +1415,8 @@ def tooltip_include(self, view, point): top += f'WebAPI|' top += f'{include}' - content = 'Location:
' - content += f'{file_path}' + content = 'Location:
' + content += f'{file_path}' self.tooltip_show_popup(view, point + 1, "tooltip-include", top, content) @@ -1402,10 +1442,10 @@ def tooltip_tag(self, view, point, search_tag=None): location_data = enumtag.file_path + '#' + search_tag + '#' + str(enumtag.line) top += f'|Go to Enum' - if enumtag.doct2 : - content += tooltip.format_doct(enumtag.doct2, "doct2") - if enumtag.doct1 : - content += tooltip.format_doct(enumtag.doct1, "doct1") + if enumtag.doc2 : + content += tooltip.format_doct(enumtag.doc2, "doc2") + if enumtag.doc1 : + content += tooltip.format_doct(enumtag.doc1, "doc1") includes = sorted(references) for inc in includes : @@ -1453,10 +1493,10 @@ def tooltip_constant(self, view, point): else : content = f'{search}:' - if const.doct2 : - content += tooltip.format_doct(const.doct2, "doct2") - if const.doct1 : - content += tooltip.format_doct(const.doct1, "doct1") + if const.doc2 : + content += tooltip.format_doct(const.doc2, "doc2") + if const.doc1 : + content += tooltip.format_doct(const.doc1, "doc1") self.tooltip_show_popup(view, point + 1, "tooltip-constant", top, content) @@ -1494,9 +1534,8 @@ def tooltip_function(self, view, point, funcCall): top += f'|WebAPI' top += f'|{filename}' - content = tooltip.func_to_html(found) - content += '
' - + content = f"
{tooltip.func_to_html(found)}
" + if funcCall and found.param_list : region = view.find(r'\((?:[^()]+|(?R))*\)', point) @@ -1511,9 +1550,8 @@ def tooltip_function(self, view, point, funcCall): is_get_user_msgid = found.name == "get_user_msgid" # Add wiki button if len(arguments) >= 1 : - content += '
' - content += 'Params-Inspector:' - content += '
' + content += '
Params-Inspector:
' + content += '' i = 0 for value in arguments : @@ -1743,8 +1781,6 @@ def on_query_completions(self, view, prefix, locations): if not is_amxmodx_view(view) or not cfg.ac_enable or len(locations) > 1: return None - print("prefix: [%s]" % prefix) - in_string = view.match_selector(locations[0], 'source.sma string') word_location = view.word(locations[0]) word = view.substr(word_location).strip() @@ -1752,8 +1788,6 @@ def on_query_completions(self, view, prefix, locations): if not word : return None - print("word: [%s]" % word) - if in_string and word[0] != '@' : return ([ ], sublime.INHIBIT_WORD_COMPLETIONS | sublime.INHIBIT_EXPLICIT_COMPLETIONS) @@ -1842,7 +1876,7 @@ def __init__(self): watchdog.events.FileSystemEventHandler.__init__(self) def on_modified(self, event): - if os.path.basename(event.src_path) == os.path.basename(globalvar.style_popup['path'][globalvar.style_popup['active']]) : + if os.path.basename(event.src_path) == os.path.basename(globalvar.style_popup.get_path()) : update_popup_style() @@ -2122,8 +2156,8 @@ def process_parse(self, view, buffer, pFile, node, error_regions=[]): tagA.line_offset = tagB.line_offset tagA.line = tagB.line - tagA.doct1 = tagB.doct1 - tagA.doct2 = tagB.doct2 + tagA.doc1 = tagB.doc1 + tagA.doc2 = tagB.doc2 # Mark error lines @@ -2269,15 +2303,15 @@ def get_include_path(self, parent_file_path, include): exists = False if self.Regex_LOCAL_INCLUDE.search(include) : - file_path = os.path.join(os.path.dirname(parent_file_path), include) - exists = os.path.exists(file_path) + file_path = os.path.join(os.path.dirname(parent_file_path), include) + exists = os.path.exists(file_path) if not exists : if '.' in include : - file_path = os.path.join(cfg.profile_include_dir, include) + file_path = os.path.join(cfg.profile_include_dir, include) else : - file_path = os.path.join(cfg.profile_include_dir, include + ".inc") - exists = os.path.exists(file_path) + file_path = os.path.join(cfg.profile_include_dir, include + ".inc") + exists = os.path.exists(file_path) return (file_path, exists) @@ -2453,18 +2487,9 @@ def organize_tags_data(key, curnode, outObj, valueObj): @staticmethod def get_or_add(file_path): - node = globalvar.nodes.get(file_path) - if node is None : - - readonly = False - for d in globalvar.include_dirs : - if d in file_path : - readonly = True - break - - node = NodeBase(file_path, readonly) + node = NodeBase(file_path) globalvar.nodes[file_path] = node return (node, True) @@ -2552,7 +2577,7 @@ def check_scope(scope, funcname): generate_highlight(view, "invalidfunc", r"\b[A-Za-z_][\w_]*\b", "invalid.illegal", sublime.DRAW_NO_OUTLINE|sublime.DRAW_NO_FILL|sublime.DRAW_SQUIGGLY_UNDERLINE, check_scope, clear) def is_amxmodx_view(view) : - return view.match_selector(0, 'source.sma') and not globalvar.invalid_settings + return view.match_selector(0, 'source.sma') def marking_error_lines(view, regions): view.add_regions("pawnerror", regions, "invalid.illegal", "dot", sublime.DRAW_NO_OUTLINE|sublime.DRAW_NO_FILL|sublime.DRAW_SQUIGGLY_UNDERLINE) diff --git a/AMXXUncompress.py b/AMXXUncompress.py new file mode 100644 index 0000000..c93c0af --- /dev/null +++ b/AMXXUncompress.py @@ -0,0 +1,160 @@ +import sublime +import sublime_plugin +import subprocess +import io +import sys +import os +import time + +BASE_PATH = os.path.dirname(__file__) +sys.path.append(BASE_PATH) + +class AmxxUncompressCommand(sublime_plugin.WindowCommand): + def run(self): + sublime.open_dialog(self.on_file_selected, [( "AMX Mod X", [ "amxx" ] )], "%HOMEPATH%") + + def on_file_selected(self, file_path): + + if not file_path: + return + + if not file_path.endswith(".amxx"): + sublime.message_dialog("Error: Invalid file extension, only .amxx") + return + + process_file(file_path) + +class EventListener(sublime_plugin.EventListener): + view1 = None + view2 = None + layout = None + + @classmethod + def register_views(cls, v1, v2, layout): + cls.view1 = v1 + cls.view2 = v2 + + if not cls.layout : + cls.layout + + def on_close(self, view): + + + if view == self.__class__.view1 or view == self.__class__.view2: + remaining_view = self.__class__.view2 if view == self.__class__.view1 else self.__class__.view1 + window = remaining_view.window() + + if window: + + # Restore layout + window.run_command("set_layout", self.__class__.layout) + + # Move the remaining view to the single pane + window.set_view_index(remaining_view, 0, -1) + + # Clear the references + self.__class__.view1 = None + self.__class__.view2 = None + self.__class__.layout = None + + def on_post_window_command(self, window, cmd, args): + + if cmd != "build" : + return + + view = window.active_view() + + if not view.match_selector(0, 'source.amxx') : + print("no match") + return + + file_name = view.file_name() + if not file_name : + return + + base = os.path.splitext(file_name)[0] + process_file(f"{base}.raw") + + print("BUILD!") + + +def process_file(file_path): + + try: + import amxx_uncompress + except ImportError: + sublime.error_message("Failed to import: amxx_uncompress.py ") + return + + # Preparar para capturar stdout + old_stdout = sys.stdout + sys.stdout = io.StringIO() + + try: + # Llamar a la función process + amxx_uncompress.process(file_path) + except Exception as e: + sublime.error_message(f"Error durante el procesamiento: {e}") + finally: + # Restaurar stdout y capturar la salida + output = sys.stdout.getvalue() + sys.stdout = old_stdout + + output += f'[{time.strftime("%H:%M:%S")}]' + + if file_path.endswith(".raw") : + show_output(sublime.active_window(), output) + return + + # New window + sublime.run_command("new_window") + window = sublime.active_window() + + # Hide Minimap + window.set_minimap_visible(False) + + # Mostrar la salida en la consola de Sublime Text + show_output(window, output) + + # Abrir los archivos .dump y .memory + open_files(window, file_path) + +def show_output(window, output): + # Crear un nuevo panel y mostrar la salida + panel = window.create_output_panel("amxx_uncompress_output") + panel.set_read_only(False) + panel.run_command("append", {"characters": output}) + panel.settings().set('gutter', False) + panel.set_syntax_file("AMXX-Console.sublime-syntax") + panel.set_read_only(True) + window.run_command("show_panel", {"panel": "output.amxx_uncompress_output"}) + +def open_files(window, file_path): + # Crear los nombres de los archivos .dump y .memory + base, _ = os.path.splitext(file_path) + dump_file = base + ".amxxdump" + memory_file = base + ".amxxmemory" + + # Abrir los archivos en dos paneles divididos + if os.path.exists(dump_file) and os.path.exists(memory_file): + window.run_command("set_layout", { + "cols": [0.0, 0.5, 1.0], + "rows": [0.0, 1.0], + "cells": [[0, 0, 1, 1], [1, 0, 2, 1]] + }) + + view1 = window.open_file(dump_file) + window.set_view_index(view1, 0, -1) + + view1.settings().set('gutter', False) + view1.set_read_only(True) + + view2 = window.open_file(memory_file) + window.set_view_index(view2, 1, 0) + + layout = window.get_layout() + + # Register on the event listener + EventListener.register_views(view1, view2, layout) + else: + sublime.error_message("Unable to find the generated .amxxdump and .amxxmemory files.") diff --git a/AMXXcore/core.py b/AMXXcore/core.py index 00e7df2..ecb288a 100644 --- a/AMXXcore/core.py +++ b/AMXXcore/core.py @@ -83,22 +83,7 @@ def hash_sha1(value): def clamp(value, minv, maxv): return max(min(value, maxv), minv) - - def cfg_set_key(filename, key, value): - s = SublimeSettings(filename) - s.set(key, value) - s.save() - - def cfg_get_path(_dict, key) : - path = _dict.get(key, None) - if not path or path == "${file_path}" : - return path - - path = path.replace("${packages}", sublime.packages_path()) - - return os.path.normpath(path) - def unix_normpath(path): return os.path.normpath(path).replace('\\', '/') @@ -281,3 +266,57 @@ def run(self): self.event.clear() self.function(*self.args, **self.kwargs) + +# Style +class Style: + def __init__(self, setting, endext): + self.setting = setting + self.endext = endext + self.list = [] + self.paths = {} + self.active = "default" + + def initialize(self): + self.clear() + self.search_styles() + self.set_active( cfg.get(self.setting) ) + + def search_styles(self): + for file in sublime.find_resources("*" + self.endext) : + name = os.path.basename(file).replace(self.endext, "") + if not name in self.list : + self.list.append(name) + self.paths[name] = file + + def clear(self): + self.list.clear() + self.paths.clear() + self.list.append("default") + + def count(self): + return len(self.list) + + def get_path(self): + return self.paths.get(self.active) + + def get_active(self): + return self.active + + def is_active(self, index): + if index >= self.count() : + return False + + return self.list[index] == self.active + + def set_active(self, style): + if isinstance(style, str): + if style in self.list: + self.active = style + return True + elif isinstance(style, int): + if 0 <= style < self.count(): + self.active = self.list[style] + return True + + self.active = "default" + return False \ No newline at end of file diff --git a/AMXXcore/pawn_parse.py b/AMXXcore/pawn_parse.py index d60bc0f..56708c9 100644 --- a/AMXXcore/pawn_parse.py +++ b/AMXXcore/pawn_parse.py @@ -34,12 +34,12 @@ def get_counter(cls): return cls.counter class ConstDataStruct: - def __init__(self, _type, file_path, offset_line, doct1="", doct2=""): + def __init__(self, _type, file_path, offset_line, doc1="", doc2=""): self.type = _type self.file_path = file_path self.offset_line = offset_line - self.doct1 = doct1 - self.doct2 = doct2 + self.doc1 = doc1 + self.doc2 = doc2 self.update_line(0) @@ -60,8 +60,8 @@ def __init__(self, name, line_offset, file_path): self.isenum = False self.funclist = set() - self.doct1 = None - self.doct2 = None + self.doc1 = None + self.doc2 = None self.update_line(0) @@ -165,8 +165,8 @@ def process(self, pFile, node, offset_line=0): self.raw_parse_code = "" self.backup_string = "" - self.comment_doct1 = "" - self.comment_doct2 = "" + self.comment_doc1 = "" + self.comment_doc2 = "" self.start_parse() @@ -286,7 +286,7 @@ def read_clean_line(self, recursive=False): if not recursive : self.backup_string = "" - self.comment_doct1 = "" + self.comment_doc1 = "" cleanbuff = "" start_valid = 0 @@ -319,12 +319,12 @@ def read_clean_line(self, recursive=False): if pos == -1: start_skip = 0 if start_skip == -1 else start_skip + 2 - self.comment_doct1 += (buffer[start_skip:] + "\n") + self.comment_doc1 += (buffer[start_skip:] + "\n") break start_skip = 0 if start_skip == -1 else start_skip + 2 - self.comment_doct1 += buffer[max(start_skip, 0):pos] + self.comment_doc1 += buffer[max(start_skip, 0):pos] start_skip = start_valid = pos + 2 @@ -338,7 +338,7 @@ def read_clean_line(self, recursive=False): if string == -1 or ( -1 < comment < string ) : start_skip = comment self.found_comment = True - self.comment_doct1 = "" + self.comment_doc1 = "" cleanbuff += buffer[start_valid:start_skip] elif comment == -1 or ( -1 < string < comment ) : start_skip = string @@ -352,10 +352,10 @@ def read_clean_line(self, recursive=False): if cleanbuff : pos = cleanbuff.find("//") if pos != -1 : - self.comment_doct2 = cleanbuff[pos + 2:].strip() + self.comment_doc2 = cleanbuff[pos + 2:].strip() cleanbuff = cleanbuff[0:pos] else : - self.comment_doct2 = "" + self.comment_doc2 = "" cleanbuff = cleanbuff.replace('\t', ' ') cleanbuff = ' '.join(cleanbuff.split()) @@ -474,15 +474,15 @@ def add_constant(self, name, _type): if fixname : name = fixname.group(2) - doct1 = self.comment_doct1 - doct2 = self.comment_doct2 + doc1 = self.comment_doc1 + doc2 = self.comment_doc2 - if doct1 : - doct1 = self.clear_doct(doct1) - if doct2 : - doct2 = self.clear_doct(doct2) + if doc1 : + doc1 = self.clear_doct(doc1) + if doc2 : + doc2 = self.clear_doct(doc2) - self.data.constants[name] = ConstDataStruct(_type, self.node.file_path, self.start_position - self.offset_line, doct1, doct2) + self.data.constants[name] = ConstDataStruct(_type, self.node.file_path, self.start_position - self.offset_line, doc1, doc2) #} def add_enumtag(self, tagname): @@ -510,10 +510,10 @@ def add_tag(self, tagname, func=None): tag.file_path = self.node.file_path tag.isenum = True - if self.comment_doct1 : - tag.doct1 = self.clear_doct(self.comment_doct1) - if self.comment_doct2 : - tag.doct2 = self.clear_doct(self.comment_doct2) + if self.comment_doc1 : + tag.doc1 = self.clear_doct(self.comment_doc1) + if self.comment_doc2 : + tag.doc2 = self.clear_doct(self.comment_doc2) def add_enum(self, buffer, line): #{ @@ -936,10 +936,10 @@ def parse_enum(self, buffer): ignore = True enums = 0 - doct1 = self.comment_doct1 - doct2 = [ ] + doc1 = self.comment_doc1 + doc2 = [ ] - self.comment_doct1 = "" + self.comment_doc1 = "" while buffer : #{ @@ -958,7 +958,7 @@ def parse_enum(self, buffer): content = "%s\n%s" % (content, buffer) buffer = self.read_clean_line() if len(buffer) > 1 : - doct2 += [ self.comment_doct2 if self.comment_doct2 else self.comment_doct1 ] + doc2 += [ self.comment_doc2 if self.comment_doc2 else self.comment_doc1 ] else : content = "%s\n%s" % (content, buffer[0:pos]) self.restore_buffer = buffer[pos+1:].strip("; ") @@ -970,11 +970,11 @@ def parse_enum(self, buffer): content = content[pos + 1:] # Cut head comment - pos = doct1.find("\n", 64) + pos = doc1.find("\n", 64) if pos != -1 : - doct1 = doct1[:pos] + "..." + doc1 = doc1[:pos] + "..." - self.comment_doct1 = doct1 + self.comment_doc1 = doc1 for c in content : #{ @@ -987,7 +987,7 @@ def parse_enum(self, buffer): enum = "" continue elif c == ',' : - self.comment_doct2 = doct2[enums] if enums < len(doct2) else "" + self.comment_doc2 = doc2[enums] if enums < len(doc2) else "" enums += 1 self.add_enum(enum, line) @@ -1001,7 +1001,7 @@ def parse_enum(self, buffer): enum += c #} - self.comment_doct2 = doct2[enums] if enums < len(doct2) else "" + self.comment_doc2 = doc2[enums] if enums < len(doc2) else "" self.add_enum(enum, line-1) debug.performance.pause("enum") diff --git a/AMXXcore/rollbar_api.py b/AMXXcore/rollbar_api.py index 00f4b0d..fc911f7 100644 --- a/AMXXcore/rollbar_api.py +++ b/AMXXcore/rollbar_api.py @@ -132,10 +132,12 @@ def report_exception(self, exc, extra_data=None): if extra_data : payload["data"].update(extra_data) + """ import pprint print("send:") pprint.pprint(payload) print("") + """ self._send_payload(payload) diff --git a/AMXXcore/tooltip.py b/AMXXcore/tooltip.py index 3d99493..7eb7965 100644 --- a/AMXXcore/tooltip.py +++ b/AMXXcore/tooltip.py @@ -133,7 +133,7 @@ def func_to_html(func, skipType=False) : content = "" if func.type and not skipType: - content += f'{globalvar.FUNC_TYPES[func.type]}  ' + content += f'{globalvar.FUNC_TYPES[func.type]}  ' if func.return_tag : content += f'{func.return_tag}:' if func.return_array : @@ -141,7 +141,7 @@ def func_to_html(func, skipType=False) : content += f'{func.name}' + pawn_highlight(f'({func.parameters})') - return content + return f'{content}' def pawn_highlight(code): @@ -159,13 +159,13 @@ def get_string(m): code = re.sub(r',(\w)', r', \1', code) code = re.sub(r'([A-Za-z_][\w_]*)\(', r'\1(', code) code = re.sub(r'([a-zA-Z_]\w*):', r'\1:', code) - code = re.sub(r'([\(\)\[\]&]|\.\.\.)', r'\1', code) + code = re.sub(r'([\(\)\[\]\{\}&]|\.\.\.)', r'\1', code) code = re.sub(r'\b(\d+(.\d+)?)\b', r'\1', code) - code = code.replace('const ', 'const ') - code = code.replace('sizeof ', 'sizeof ') - code = code.replace('charsmax', 'charsmax') - code = code.replace('', '=') + code = code.replace('const ', 'const ') + code = code.replace('sizeof ', 'sizeof ') + code = code.replace('charsmax', 'charsmax') + code = code.replace('', '=') for s in slist : code = code.replace('', f'{s}', 1) @@ -183,7 +183,7 @@ def get_tags(m): code = code.replace('&', '&') - return f'{code}' + return code diff --git a/Default.sublime-keymap b/Default.sublime-keymap index a2cbea5..df340df 100644 --- a/Default.sublime-keymap +++ b/Default.sublime-keymap @@ -2,6 +2,9 @@ { "keys": ["f9"], "command": "build", "context": [ { "key": "selector", "operator": "equal", "operand": "source.sma", "match_all": true } ] }, + { "keys": ["f9"], "command": "build", "context": + [ { "key": "selector", "operator": "equal", "operand": "source.amxx", "match_all": true } ] + }, { "keys": ["ctrl+r"], "command": "amxx_func_list", "context": [ { "key": "selector", "operator": "equal", "operand": "source.sma", "match_all": true } ] }, diff --git a/Main.sublime-menu b/Main.sublime-menu index a7828a7..69334cf 100644 --- a/Main.sublime-menu +++ b/Main.sublime-menu @@ -52,54 +52,54 @@ "caption": "Console", "children": [ - { "command": "amxx_editor_style_console", "args": {"index": 0} }, - { "command": "amxx_editor_style_console", "args": {"index": 1} }, - { "command": "amxx_editor_style_console", "args": {"index": 2} }, - { "command": "amxx_editor_style_console", "args": {"index": 3} }, - { "command": "amxx_editor_style_console", "args": {"index": 4} }, - { "command": "amxx_editor_style_console", "args": {"index": 5} }, - { "command": "amxx_editor_style_console", "args": {"index": 6} }, - { "command": "amxx_editor_style_console", "args": {"index": 7} }, - { "command": "amxx_editor_style_console", "args": {"index": 8} }, - { "command": "amxx_editor_style_console", "args": {"index": 9} }, - { "command": "amxx_editor_style_console", "args": {"index": 10} }, - { "command": "amxx_editor_style_console", "args": {"index": 11} }, - { "command": "amxx_editor_style_console", "args": {"index": 12} }, - { "command": "amxx_editor_style_console", "args": {"index": 13} }, - { "command": "amxx_editor_style_console", "args": {"index": 14} }, - { "command": "amxx_editor_style_console", "args": {"index": 15} }, - { "command": "amxx_editor_style_console", "args": {"index": 16} }, - { "command": "amxx_editor_style_console", "args": {"index": 17} }, - { "command": "amxx_editor_style_console", "args": {"index": 18} }, - { "command": "amxx_editor_style_console", "args": {"index": 19} }, - { "command": "amxx_editor_style_console", "args": {"index": 20} } + { "command": "amxx_console_style", "args": {"index": 0} }, + { "command": "amxx_console_style", "args": {"index": 1} }, + { "command": "amxx_console_style", "args": {"index": 2} }, + { "command": "amxx_console_style", "args": {"index": 3} }, + { "command": "amxx_console_style", "args": {"index": 4} }, + { "command": "amxx_console_style", "args": {"index": 5} }, + { "command": "amxx_console_style", "args": {"index": 6} }, + { "command": "amxx_console_style", "args": {"index": 7} }, + { "command": "amxx_console_style", "args": {"index": 8} }, + { "command": "amxx_console_style", "args": {"index": 9} }, + { "command": "amxx_console_style", "args": {"index": 10} }, + { "command": "amxx_console_style", "args": {"index": 11} }, + { "command": "amxx_console_style", "args": {"index": 12} }, + { "command": "amxx_console_style", "args": {"index": 13} }, + { "command": "amxx_console_style", "args": {"index": 14} }, + { "command": "amxx_console_style", "args": {"index": 15} }, + { "command": "amxx_console_style", "args": {"index": 16} }, + { "command": "amxx_console_style", "args": {"index": 17} }, + { "command": "amxx_console_style", "args": {"index": 18} }, + { "command": "amxx_console_style", "args": {"index": 19} }, + { "command": "amxx_console_style", "args": {"index": 20} } ] }, { "caption": "Popup", "children": [ - { "command": "amxx_editor_style_popup", "args": {"index": 0} }, - { "command": "amxx_editor_style_popup", "args": {"index": 1} }, - { "command": "amxx_editor_style_popup", "args": {"index": 2} }, - { "command": "amxx_editor_style_popup", "args": {"index": 3} }, - { "command": "amxx_editor_style_popup", "args": {"index": 4} }, - { "command": "amxx_editor_style_popup", "args": {"index": 5} }, - { "command": "amxx_editor_style_popup", "args": {"index": 6} }, - { "command": "amxx_editor_style_popup", "args": {"index": 7} }, - { "command": "amxx_editor_style_popup", "args": {"index": 8} }, - { "command": "amxx_editor_style_popup", "args": {"index": 9} }, - { "command": "amxx_editor_style_popup", "args": {"index": 10} }, - { "command": "amxx_editor_style_popup", "args": {"index": 11} }, - { "command": "amxx_editor_style_popup", "args": {"index": 12} }, - { "command": "amxx_editor_style_popup", "args": {"index": 13} }, - { "command": "amxx_editor_style_popup", "args": {"index": 14} }, - { "command": "amxx_editor_style_popup", "args": {"index": 15} }, - { "command": "amxx_editor_style_popup", "args": {"index": 16} }, - { "command": "amxx_editor_style_popup", "args": {"index": 17} }, - { "command": "amxx_editor_style_popup", "args": {"index": 18} }, - { "command": "amxx_editor_style_popup", "args": {"index": 19} }, - { "command": "amxx_editor_style_popup", "args": {"index": 20} } + { "command": "amxx_popup_style", "args": {"index": 0} }, + { "command": "amxx_popup_style", "args": {"index": 1} }, + { "command": "amxx_popup_style", "args": {"index": 2} }, + { "command": "amxx_popup_style", "args": {"index": 3} }, + { "command": "amxx_popup_style", "args": {"index": 4} }, + { "command": "amxx_popup_style", "args": {"index": 5} }, + { "command": "amxx_popup_style", "args": {"index": 6} }, + { "command": "amxx_popup_style", "args": {"index": 7} }, + { "command": "amxx_popup_style", "args": {"index": 8} }, + { "command": "amxx_popup_style", "args": {"index": 9} }, + { "command": "amxx_popup_style", "args": {"index": 10} }, + { "command": "amxx_popup_style", "args": {"index": 11} }, + { "command": "amxx_popup_style", "args": {"index": 12} }, + { "command": "amxx_popup_style", "args": {"index": 13} }, + { "command": "amxx_popup_style", "args": {"index": 14} }, + { "command": "amxx_popup_style", "args": {"index": 15} }, + { "command": "amxx_popup_style", "args": {"index": 16} }, + { "command": "amxx_popup_style", "args": {"index": 17} }, + { "command": "amxx_popup_style", "args": {"index": 18} }, + { "command": "amxx_popup_style", "args": {"index": 19} }, + { "command": "amxx_popup_style", "args": {"index": 20} } ] }, ] @@ -135,9 +135,14 @@ "caption": "Search All" }, { "caption": "-" }, + { + "command": "amxx_uncompress", + "caption": "AMXX Uncompress" + }, + { "caption": "-" }, { "command": "amxx_new_include", - "caption": "New Header-Inc" + "caption": "New Include" }, { "command": "amxx_new_plugin", diff --git a/amxx_changelog.py b/amxx_changelog.py new file mode 100644 index 0000000..12e84e8 --- /dev/null +++ b/amxx_changelog.py @@ -0,0 +1,134 @@ +import sublime +import sublime_plugin +import os +import shutil +import re + + +base_html = """\ + + +

Changelog

+""" + +def show_changelog(resource_path): + + # Asegurarnos de que el resource_path comience con "Packages/" + if not resource_path.startswith("Packages/"): + print(f"Error: El resource_path debe comenzar con 'Packages/', recibido: {resource_path}") + return + + try: + # Cargar el contenido del changelog personalizado + #custom_content = sublime.load_binary_resource(resource_path) + custom_content = sublime.load_resource(resource_path) + except Exception as e: + print(f"Error al cargar el recurso {resource_path}: {str(e)}") + return + + # Format html + custom_content = re.sub(r'^(\w+:)', r'\1', custom_content, flags=re.MULTILINE) + custom_content = re.sub(r"`([^`]*)`", r"`\1`", custom_content) + + html_content = "" + tag_open = False + for line in custom_content.splitlines() : + if not line : + if tag_open : + html_content += "\n\n\n" + tag_open = False + elif line.startswith("v") : + html_content += f"
\n

{line}

\n
    \n" + tag_open = True + else : + html_content += f"
  • {line}
  • \n" + + if tag_open : + html_content += "
" + + + html_content = base_html + html_content + + # Definir la ruta del changelog original de Sublime + original_changelog = os.path.join(os.path.dirname(sublime.executable_path()), "changelog.txt") + backup_changelog = original_changelog + '.backup' + + try: + # Hacer backup del changelog original si existe + if os.path.exists(original_changelog): + shutil.copy2(original_changelog, backup_changelog) + + # Escribir el nuevo contenido al archivo changelog.txt + with open(original_changelog, "w", encoding="utf-8", errors="replace") as f: + f.write(html_content) + + # Mostrar el changelog + sublime.active_window().run_command('show_changelog') + + finally: + # Restaurar el changelog original + if os.path.exists(backup_changelog): + shutil.move(backup_changelog, original_changelog) + + +class ShowAmxxChangelogCommand(sublime_plugin.WindowCommand): + def run(self, file): + show_changelog(file) + + # sublime.active_window().run_command("show_amxx_changelog", { "file": "Packages/AMXXEditorV4/changelog.txt"}) + # sublime.active_window().run_command("show_amxx_changelog", { "file": "Packages/AMXXEditorV4/changelog_es.txt"}) + \ No newline at end of file diff --git a/amxx_uncompress.py b/amxx_uncompress.py new file mode 100644 index 0000000..40b71d0 --- /dev/null +++ b/amxx_uncompress.py @@ -0,0 +1,1103 @@ +import struct +import zlib +import os +import string +import time + + +class AMX_HEADER: + def __init__(self): + self.size = 0 + self.magic = 0 + self.file_version = 0 + self.amx_version = 0 + self.flags = 0 + self.defsize = 0 + self.cod = 0 + self.dat = 0 + self.hea = 0 + self.stp = 0 + self.cip = 0 + self.publics = 0 + self.natives = 0 + self.libraries = 0 + self.pubvars = 0 + self.tags = 0 + self.nametable = 0 + +class AMX_DBG_HDR: + def __init__(self, size=None, magic=None, file_version=None, amx_version=None, flags=None, files=None, lines=None, symbols=None, tags=None, automatons=None, states=None): + self.size = size + self.magic = magic + self.file_version = file_version + self.amx_version = amx_version + self.flags = flags + self.files = files + self.lines = lines + self.symbols = symbols + self.tags = tags + self.automatons = automatons + self.states = states + + +class Plugin: + def __init__(self): + self.magic = 0 + self.version = 0 + self.sections = 0 + self.cellsize = 0 + self.disksize = 0 + self.imagesize = 0 + self.memsize = 0 + self.offs = 0 + self.data = None + self.amx_header = None + self.dbg = None + + self.isCOMPACT = None + + +plugin = Plugin() + +MAX_PLUGIN_STRING = 250 +AMX_COMPACTMARGIN = 64 + +g_filename_amxx = None +g_filename_raw = None +g_filename_dump = None +g_filename_memory = None + + +def read_header(fp): + global plugin + plugin = Plugin() + + plugin.magic = struct.unpack('I', fp.read(4))[0] + if plugin.magic != 0x414d5858: + return False + plugin.version = struct.unpack('H', fp.read(2))[0] + plugin.sections = struct.unpack('B', fp.read(1))[0] + plugin.cellsize = struct.unpack('B', fp.read(1))[0] + plugin.disksize = struct.unpack('I', fp.read(4))[0] + plugin.imagesize = struct.unpack('I', fp.read(4))[0] + plugin.memsize = struct.unpack('I', fp.read(4))[0] + plugin.offs = struct.unpack('I', fp.read(4))[0] + + return True + +def write_header(fp): + global plugin + + fp.write(struct.pack('I', plugin.magic)) + fp.write(struct.pack('H', plugin.version)) + fp.write(struct.pack('B', plugin.sections)) + fp.write(struct.pack('B', plugin.cellsize)) + fp.write(struct.pack('I', plugin.disksize)) + fp.write(struct.pack('I', plugin.imagesize)) + fp.write(struct.pack('I', plugin.memsize)) + fp.write(struct.pack('I', plugin.offs)) + +def load_uncompress(fp): + global plugin + + uncompressed_size = plugin.imagesize + uncompressed_data = fp.read(uncompressed_size) + + if len(uncompressed_data) != uncompressed_size: + print(f"ERROR: Read size mismatch. Expected {uncompressed_size}, got {len(uncompressed_data)}") + return False + + plugin.data = bytearray(uncompressed_data) + + return True + +def amxx_uncompress(fp): + global plugin + + def adjust_bytes_size(byte_obj, desired_size): + return byte_obj.ljust(desired_size, b'\x00')[:desired_size] + + compressed_size = plugin.disksize + uncompressed_size = plugin.imagesize + + fp.seek(plugin.offs) + compressed_data = fp.read(compressed_size) + + try: + uncompressed_data = zlib.decompress(compressed_data) + except zlib.error as e: + print(f"ERROR: Decompression failed - {str(e)}") + return False + + if len(uncompressed_data) != uncompressed_size : + print(f"ERROR: Uncompressed size mismatch. Expected {uncompressed_size}, got {len(uncompressed_data)}") + return False + + finalsize = plugin.memsize + if plugin.imagesize > plugin.memsize : + finalsize = plugin.imagesize + + plugin.sections = 1 + plugin.offs = 24 # Why 24 ?, amxxpc.cpp -> search kEntrySize + plugin.data = bytearray(adjust_bytes_size(uncompressed_data, finalsize)) + + return True + +def amxx_compress(): + global plugin + + try: + compressed = zlib.compress(plugin.data) + except zlib.error as e: + print(f"ERROR: Compression failed - {str(e)}") + return False + + plugin.disksize = len(compressed) + + try: + with open(g_filename_amxx, "wb") as file: + write_header(file) + file.write(compressed) + except IOError as e: + print(f"ERROR: Failed to write file - {str(e)}") + return False + + return True + +def get_amx_header(): + global plugin + + if not plugin.data: + return False + + plugin.amx_header = AMX_HEADER() + + header_data = plugin.data[:struct.calcsize('I'*12 + 'H'*3 + 'BB')] + + (plugin.amx_header.size, plugin.amx_header.magic, + plugin.amx_header.file_version, plugin.amx_header.amx_version, + plugin.amx_header.flags, plugin.amx_header.defsize, + plugin.amx_header.cod, plugin.amx_header.dat, + plugin.amx_header.hea, plugin.amx_header.stp, + plugin.amx_header.cip, plugin.amx_header.publics, + plugin.amx_header.natives, plugin.amx_header.libraries, + plugin.amx_header.pubvars, plugin.amx_header.tags, + plugin.amx_header.nametable) = struct.unpack('IHBBHHIIIIIIIIIII', header_data) + + if plugin.amx_header.magic != 0xf1e0: + return False + + if plugin.amx_header.flags & 0x02: # AMX_FLAG_DEBUG + + dbg_hdr_size = plugin.amx_header.size + struct.calcsize('IHBBHHHHHHH') + dbg_data = plugin.data[plugin.amx_header.size:dbg_hdr_size] + + dbg = AMX_DBG_HDR() + (dbg.size, dbg.magic, dbg.file_version, dbg.amx_version, + dbg.flags, dbg.files, dbg.lines, dbg.symbols, + dbg.tags, dbg.automatons, dbg.states) = struct.unpack('IHBBHHHHHHH', dbg_data) + + plugin.dbg = dbg + + if dbg.magic != 0xf1ef: + return False + + + return True + +def update_amx_header(): + global plugin + + header_size = struct.calcsize('IHBBHHIIIIIIIIIII') + + header_data = struct.pack( + 'IHBBHHIIIIIIIIIII', + plugin.amx_header.size, + plugin.amx_header.magic, + plugin.amx_header.file_version, + plugin.amx_header.amx_version, + plugin.amx_header.flags, + plugin.amx_header.defsize, + plugin.amx_header.cod, + plugin.amx_header.dat, + plugin.amx_header.hea, + plugin.amx_header.stp, + plugin.amx_header.cip, + plugin.amx_header.publics, + plugin.amx_header.natives, + plugin.amx_header.libraries, + plugin.amx_header.pubvars, + plugin.amx_header.tags, + plugin.amx_header.nametable + ) + + plugin.data = header_data + plugin.data[header_size:] + +def expand(code, codesize, memsize): + spare = [(None, None)] * AMX_COMPACTMARGIN + sh, st, sc = 0, 0, 0 + shift = 0 + c = 0 + + assert memsize % 4 == 0 # sizeof(cell) == 4 + + while codesize > 0: + c = 0 + shift = 0 + + codesize -= 1 + c |= ((code[codesize] & 0x7f) << shift) & 0xFFFFFFFF + shift += 7 + + while codesize > 0 and (code[codesize - 1] & 0x80) != 0: + + assert shift < 32 # no input byte should be shifted out completely + + codesize -= 1 + c |= ((code[codesize] & 0x7f) << shift) & 0xFFFFFFFF + shift += 7 + + # sign expand + if code[codesize] & 0x40 != 0: + while shift < 32: + c |= (0xff << shift) & 0xFFFFFFFF + shift += 8 + + # store + while sc and spare[sh][0] > codesize: + memloc, value = spare[sh] + struct.pack_into("I", code, memloc, value) + + sh = (sh + 1) % AMX_COMPACTMARGIN + sc -= 1 + + memsize -= 4 + assert memsize >= 0 + if memsize > codesize or (memsize == codesize and memsize == 0): + struct.pack_into("I", code, memsize, c) + else: + assert sc < AMX_COMPACTMARGIN + spare[st] = (memsize, c) + st = (st + 1) % AMX_COMPACTMARGIN + sc += 1 + + assert memsize == 0 + + return code + + +VALID_CHARACTERS = set(string.ascii_letters + string.digits + string.whitespace + string.punctuation) +def valid_char(value, prev_value=None): + + if not (0 <= value <= 255) : + return False + + char = chr(value) + if char in VALID_CHARACTERS or value in {1, 2, 3, 4} : + return True + + if prev_value is None : + if 194 <= value <= 244 : + return True + elif 194 <= prev_value <= 244 : + return 128 <= value <= 191 + + return False + +def is_string(addr): + dat = struct.unpack('I', plugin.data[addr:addr+4])[0] + + if valid_char(dat) : + next_dat = struct.unpack('I', plugin.data[addr+4:addr+8])[0] + + if valid_char(next_dat, prev_value=dat) or next_dat == 0 : + return True + + return False + + +def string_to_raw(string): + buffer = [] + ctrl_char = False + i = 0 + while i < len(string): + if string[i] == '^': + if not ctrl_char: + ctrl_char = True + else: + buffer.append('^') + ctrl_char = False + elif ctrl_char: + ctrl_char = False + if string[i] == 't': + buffer.append('\t') + elif string[i] == 'n': + buffer.append('\n') + elif string[i] == '"': + buffer.append('"') + elif string[i] == 'x': + hex_val = string[i+1:i+3] + buffer.append(chr(int(hex_val, 16))) + i += 2 + else: + buffer.append(string[i]) + else: + buffer.append(string[i]) + i += 1 + return ''.join(buffer) + + +def string_to_format(string): + buffer = [] + for char in string: + if char == '\n': + buffer.extend(['^', 'n']) + elif char == '\t': + buffer.extend(['^', 't']) + elif char == '"': + buffer.extend(['^', '"']) + elif char == '^': + buffer.extend(['^', '^']) + elif 0 < ord(char) < 32: + buffer.extend(['^', 'x', f'{ord(char):02x}']) + else: + buffer.append(char) + return ''.join(buffer) + +def get_amx_string(buff, offset): + + output = bytearray() + writed = 0 + while(True): + cell = struct.unpack('I', buff[offset+writed : offset+writed+4])[0] + if cell == 0: + break + writed += 4 + output.append(cell & 0xFF) + + return ( output.decode('utf-8', 'replace'), writed ) + + +def set_amx_string(buff, offset, string, forced): + + data = string.encode('utf-8', 'replace') + writed = 0 + + while (forced or buff[offset] != 0) and writed < len(data): + buff[offset] = data[writed] + offset += 4 + writed += 1 + + buff[offset] = 0 + + return writed * 4 + + +def set_amx_memory(buff, offset, hex_str): + + cell_written = 0 + hex_list = hex_str.split() + + for hex_value in hex_list: + value = int(hex_value, 16) + + buff[offset] = value & 0xFF + buff[offset + 1] = (value >> 8) & 0xFF + buff[offset + 2] = (value >> 16) & 0xFF + buff[offset + 3] = (value >> 24) & 0xFF + + offset += 4 + cell_written += 1 + + return cell_written + + +def generate_memory_file(): + global plugin + + with open(g_filename_memory, "w", encoding="utf-8", errors="replace") as fp: + + fp.write("; Guide: https://forums.alliedmods.net/showthread.php?t=250748\n\n") + + base_addr = plugin.amx_header.dat + end_addr = plugin.amx_header.hea + current_addr = base_addr + count = 0 + + while current_addr < end_addr: + if is_string(current_addr): + + string_buff, string_size = get_amx_string(plugin.data, current_addr) + formatted_string = string_to_format(string_buff) + + write_buff = f";data:0x{current_addr-base_addr:08X}=\"{formatted_string}\"\n" + fp.write(write_buff) + + current_addr += string_size + count += 1 + else: + current_addr += 4 + + return count + + +def load_memory_file(): + global plugin + + try: + with open(g_filename_memory, "r", encoding="utf-8", errors="replace") as fp : + + data_base_addr = plugin.amx_header.dat + data_end_addr = data_base_addr + (plugin.amx_header.hea - plugin.amx_header.dat) + + code_base_addr = plugin.amx_header.cod + code_end_addr = code_base_addr + (plugin.amx_header.dat - plugin.amx_header.cod) + count = 0 + + def print_bad(line): + print(f"ERROR Memory File: Parse error, invalid format at line: [{line}]") + + for line in fp : + line = line.strip() + if not line or line[0] == ';' : + continue + + if line.startswith("data:"): + section = 1 + elif line.startswith("code:"): + section = 2 + else: + print_bad(line) + continue + + memory_buff = line[7:15] + offset_addr = int(memory_buff, 16) + + if line[16] not in ( '"', '[' ) : + print_bad(line) + continue + + memory_buff = line[17:] + memory_len = len(memory_buff) + + if count < 15: + time.sleep(0.1) + + if section == 1: # DATA + offset_addr += data_base_addr + if offset_addr > data_end_addr: + print(f"ERROR: Bad Addr: 0x{offset_addr - data_base_addr:08X}") + continue + + if line[16] == '"': # String + forced = 0 + if memory_buff[-1] == 'f' : + memory_len -= 1 + forced = 1 + + if memory_buff[-1 - forced] != '"' : + print_bad(line) + continue + + new_string = string_to_raw(memory_buff[:-1 - forced]) + new_len = len(new_string) + new_size = len(new_string.encode('utf-8', 'replace')) + + if ( offset_addr + new_size ) > len(plugin.data): + print(f"ERROR: Address out of bounds: 0x{offset_addr:08X} + {new_size}") + continue + + old_string, old_size = get_amx_string(plugin.data, offset_addr) + old_len = len(old_string) + + new_size = set_amx_string(plugin.data, offset_addr, new_string, forced) + + f = " forced" if forced else "" + print(f"Replace{f}: [{string_to_format(old_string)}] (len {old_len}, read {old_size} bytes) with [{string_to_format(new_string)}] (len {new_len}, write {new_size} bytes)") + + else: # HEX + if memory_buff[-1] != ']' : + print_bad(line) + continue + + hex_str = memory_buff[:-1] + writed = set_amx_memory(plugin.data, offset_addr, hex_str) + + print(f"Write memory: DATA addr:[0x{offset_addr:08X}] - hex:[{hex_str}] - len:[{writed}] - size:[{writed*4} bytes]") + + else: # CODE + offset_addr += code_base_addr + if offset_addr > code_end_addr : + print(f"ERROR: Bad Addr: 0x{offset_addr - code_base_addr:08X}") + continue + + if line[16] != '[' or memory_buff[-1] != ']' : + print_bad(line) + continue + + hex_str = memory_buff[:-1] + writed = set_amx_memory(plugin.data, offset_addr, hex_str) + + print(f"Write memory: CODE addr:[0x{offset_addr:08X}] - hex:[{hex_str}] - len:[{writed}] - size:[{writed*4} bytes]") + + count += 1 + + except FileNotFoundError: + return 0 + + return count + + +class AMX_FUNCSTUB: + def __init__(self, address, name): + self.address = address + self.name = name + + def __repr__(self): + return f'<{type(self).__name__}: name="{self.name}", address={self.address}>' + +class Native(AMX_FUNCSTUB): + pass + +class Public(AMX_FUNCSTUB): + pass + +def generate_function_list(plugin, hdr): + def read_uint32(offset): + return int.from_bytes(plugin.data[offset:offset+4], byteorder='little') + + def read_string(offset): + end = plugin.data.find(b'\0', offset) + return plugin.data[offset:end].decode('ascii') + + def get_functions(start_offset, end_offset, func_class): + functions = [] + num_entries = (end_offset - start_offset) // hdr.defsize + for i in range(num_entries): + entry_offset = start_offset + i * hdr.defsize + address = read_uint32(entry_offset) + + if hdr.defsize == 8: # Using name table + name_offset = read_uint32(entry_offset + 4) + name = read_string(name_offset) + else: + name = read_string(entry_offset + 4) + + functions.append(func_class(address, name)) + return functions + + natives = get_functions(hdr.natives, hdr.libraries, Native) + publics = get_functions(hdr.publics, hdr.natives, Public) + + return ( natives, publics ) + +# Diccionario que mapea los opcodes a sus correspondientes nombres y operandos +opcodes = { + 0x00: ("NONE", False), + 0x01: ("LOAD.pri", True), + 0x02: ("LOAD.alt", True), + 0x03: ("LOAD.S.pri", True), + 0x04: ("LOAD.S.alt", True), + 0x05: ("LREF.pri", True), + 0x06: ("LREF.alt", True), + 0x07: ("LREF.S.pri", True), + 0x08: ("LREF.S.alt", True), + 0x09: ("LOAD.I", False), + 0x0A: ("LODB.I", True), + 0x0B: ("CONST.pri", True), + 0x0C: ("CONST.alt", True), + 0x0D: ("ADDR.pri", True), + 0x0E: ("ADDR.alt", True), + 0x0F: ("STOR.pri", True), + 0x10: ("STOR.alt", True), + 0x11: ("STOR.S.pri", True), + 0x12: ("STOR.S.alt", True), + 0x13: ("SREF.pri", True), + 0x14: ("SREF.alt", True), + 0x15: ("SREF.S.pri", True), + 0x16: ("SREF.S.alt", True), + 0x17: ("STOR.I", False), + 0x18: ("STRB.I", True), + 0x19: ("LIDX", False), + 0x1A: ("LIDX.B", True), + 0x1B: ("IDXADDR", False), + 0x1C: ("IDXADDR.B", True), + 0x1D: ("ALIGN.pri", True), + 0x1E: ("ALIGN.alt", True), + 0x1F: ("LCTRL", True), + 0x20: ("SCTRL", True), + 0x21: ("MOVE.pri", False), + 0x22: ("MOVE.alt", False), + 0x23: ("XCHG", False), + 0x24: ("PUSH.pri", False), + 0x25: ("PUSH.alt", False), + 0x26: ("PUSH.R", True), + 0x27: ("PUSH.C", True), + 0x28: ("PUSH", True), + 0x29: ("PUSH.S", True), + 0x2A: ("POP.pri", False), + 0x2B: ("POP.alt", False), + 0x2C: ("STACK", True), + 0x2D: ("HEAP", True), + 0x2E: ("PROC", False), + 0x2F: ("RET", False), + 0x30: ("RETN", False), + 0x31: ("CALL", True), + 0x32: ("CALL.pri", False), + 0x33: ("JUMP", True), + 0x34: ("JREL", True), + 0x35: ("JZER", True), + 0x36: ("JNZ", True), + 0x37: ("JEQ", True), + 0x38: ("JNEQ", True), + 0x39: ("JLESS", True), + 0x3A: ("JLEQ", True), + 0x3B: ("JGRTR", True), + 0x3C: ("JGEQ", True), + 0x3D: ("JSLESS", True), + 0x3E: ("JSLEQ", True), + 0x3F: ("JSGRTR", True), + 0x40: ("JSGEQ", True), + 0x41: ("SHL", False), + 0x42: ("SHR", False), + 0x43: ("SSHR", False), + 0x44: ("SHL.C.pri", True), + 0x45: ("SHL.C.alt", True), + 0x46: ("SHR.C.pri", True), + 0x47: ("SHR.C.alt", True), + 0x48: ("SMUL", False), + 0x49: ("SDIV", False), + 0x4A: ("SDIV.alt", False), + 0x4B: ("UMUL", False), + 0x4C: ("UDIV", False), + 0x4D: ("UDIV.alt", False), + 0x4E: ("ADD", False), + 0x4F: ("SUB", False), + 0x50: ("SUB.alt", False), + 0x51: ("AND", False), + 0x52: ("OR", False), + 0x53: ("XOR", False), + 0x54: ("NOT", False), + 0x55: ("NEG", False), + 0x56: ("INVERT", False), + 0x57: ("ADD.C", True), + 0x58: ("SMUL.C", True), + 0x59: ("ZERO.pri", False), + 0x5A: ("ZERO.alt", False), + 0x5B: ("ZERO", True), + 0x5C: ("ZERO.S", True), + 0x5D: ("SIGN.pri", False), + 0x5E: ("SIGN.alt", False), + 0x5F: ("EQ", False), + 0x60: ("NEQ", False), + 0x61: ("LESS", False), + 0x62: ("LEQ", False), + 0x63: ("GRTR", False), + 0x64: ("GEQ", False), + 0x65: ("SLESS", False), + 0x66: ("SLEQ", False), + 0x67: ("SGRTR", False), + 0x68: ("SGEQ", False), + 0x69: ("EQ.C.pri", True), + 0x6A: ("EQ.C.alt", True), + 0x6B: ("INC.pri", False), + 0x6C: ("INC.alt", False), + 0x6D: ("INC", True), + 0x6E: ("INC.S", True), + 0x6F: ("INC.I", False), + 0x70: ("DEC.pri", False), + 0x71: ("DEC.alt", False), + 0x72: ("DEC", True), + 0x73: ("DEC.S", True), + 0x74: ("DEC.I", False), + 0x75: ("MOVS", True), + 0x76: ("CMPS", True), + 0x77: ("FILL", True), + 0x78: ("HALT", True), + 0x79: ("BOUNDS", True), + 0x7A: ("SYSREQ.pri", False), + 0x7B: ("SYSREQ.C", True), + 0x7C: ("FILE", True), + 0x7D: ("LINE", True), + # 0x7E: "SYMBOL" obsolete + 0x7F: ("SRANGE", True), + 0x80: ("JUMP.pri", False), + 0x81: ("SWITCH", True), + 0x82: ("CASETBL", False), + 0x83: ("SWAP.pri", False), + 0x84: ("SWAP.alt", False), + 0x85: ("PUSH.ADR", True), + 0x86: ("NOP", False), + 0x87: ("SYSREQ.D", True), + 0x88: ("SYMTAG", True), + 0x89: ("BREAK", False) +} + +def simple_disassemble(plugin): + + bytecode = plugin.data[plugin.amx_header.cod:plugin.amx_header.dat] # code + natives, publics = generate_function_list(plugin, plugin.amx_header) + + def find_public(addr): + for public in publics : + if public.address == addr : + return public.name + return None + + def find_native(addr): + if addr < len(natives) : + return natives[addr].name + return "" + + def get_string(offset): + addr = plugin.amx_header.dat + offset + try : + if is_string(addr): + string_buff, string_size = get_amx_string(plugin.data, addr) + return f'"{string_to_format(string_buff)}"' + except : + pass + + v = int.from_bytes(plugin.data[addr:addr+4], byteorder='little', signed=True) + return v if v else "" + + index = 0 + asm_code = [] + + for native in natives : + asm_code.append(f"native: {native.name}()") + + for public in publics : + asm_code.append(f"0x{public.address:08X} public {public.name}()") + + asm_code.append("") + + while index < len(bytecode): + + opcode = bytecode[index] + index += 4 + + if not opcode : + continue + + op_hex = f"0x{(index - 4) & 0xFFFFFFFF:X}" + + if opcode in opcodes: + + op_name, has_param = opcodes[opcode] + operand_values = [] + + if has_param : + # Leer un entero de 4 bytes como un operando + operand_value = int.from_bytes(bytecode[index:index+4], byteorder='little', signed=True) + + hexa = f"0x{operand_value & 0xFFFFFFFF:X}" + + if opcode == 0x7b : # OP_SYSREQ_C + operand_values.append(f"{hexa:<11} ; {find_native(operand_value)}()") + elif opcode == 0x27 : # PUSH.C + operand_values.append(f"{hexa:<11} ; {get_string(operand_value)}") + else : + operand_values.append(f"{hexa:<11} ; ") + + index += 4 + + if op_name == "CASETBL": + # Manejo especial para CASETBL + if index + 7 < len(bytecode): + num_cases = int.from_bytes(bytecode[index:index+4], byteorder='little', signed=True) + index += 4 + default_addr = int.from_bytes(bytecode[index:index+4], byteorder='little', signed=True) + index += 4 + operand_values = [f"cases:{num_cases}", f"default:{default_addr}"] + for _ in range(num_cases): + if index + 7 < len(bytecode): + case_value = int.from_bytes(bytecode[index:index+4], byteorder='little', signed=True) + index += 4 + case_addr = int.from_bytes(bytecode[index:index+4], byteorder='little', signed=True) + index += 4 + operand_values.append(f"{case_value}:{case_addr}") + else: + operand_values.append("INVALID_CASE") + break + else: + operand_values = ["INVALID_CASETBL"] + + + if opcode == 0x2E :# OP_PROC + asm_code.append("") # add new line + + name = find_public(index - 4) + if name : + asm_code.append(f"public {name}():") + + + asm_code.append(f"{op_hex:<9} {op_name:>21} {' '.join(map(str, operand_values))}") + + else: + asm_code.append(f"UNKNOWN_OPCODE 0x{opcode:02X}") + + return "\n".join(asm_code) + + +def run_amxxdump(): + + def execute_with_timeout(command, timeout): + import subprocess + + try: + result = subprocess.run(command, + stdout=subprocess.PIPE, + stderr=subprocess.PIPE, + timeout=timeout + ) + return result.stdout, None + except subprocess.TimeoutExpired: + return None, "Error timeout." + except Exception as e: + return None, f"Error executing: {str(e)}" + + def get_absolute_path(path): + if os.path.isabs(path) : + return path + script_dir = os.path.dirname(os.path.abspath(__file__)) + return os.path.abspath(os.path.join(script_dir, path)) + + + + # Run AMXXDUMP + old_cwd = os.getcwd() + #new_cwd = os.path.join(os.path.dirname(__file__), "amxxdump") + + import sublime + new_cwd = os.path.join(sublime.packages_path(), "AMXXEditorV4", "bin", "amxxdump") + + os.chdir(new_cwd) + + print("amxxdump path:", new_cwd) + + command = [ + "amxxdump", + "-x", "-n", "-d", "-s", "-m", "-f", "-l", "-j", "-e", "-g", "-E", + get_absolute_path(g_filename_amxx) + ] + + print("run amxxdump...") + + asm, err = execute_with_timeout(command, 5) + if err : + print("ERROR AMXXBUMP:", err) + + os.chdir(old_cwd) + + + # Check is valid ASM + if not asm or asm.find(b" PROC ") == -1 : + print("ERROR AMXXBUMP: Invalid ASM") + # AmxxDump failed, use a basic disassemble + print("run simple disassemble...") + asm = simple_disassemble(plugin).encode("utf-8") + else : + asm = asm.replace(b"RETN ", b"RETN \n") + + + # Write dump file + if asm : + with open(get_absolute_path(g_filename_dump), "wb") as file: + file.write(asm) + + print("save .amxxdump file!") + +def process(file_path): + + global plugin, g_filename_amxx, g_filename_raw, g_filename_memory, g_filename_dump + + + print(f"AMXXUncompress v2.0 By Destro\n") + + amxx_extension = ".amxx" + raw_extension = ".raw" + memory_extension = ".amxxmemory" + + # Get the directory, base name, and extension + dir_name, filename = os.path.split(file_path) + base_name, ext = os.path.splitext(filename) + + isAMXX = False + + if ext.lower() == amxx_extension: + g_filename_amxx = file_path + g_filename_raw = os.path.join(dir_name, base_name + raw_extension) + g_filename_memory = os.path.join(dir_name, base_name + memory_extension) + g_filename_dump = os.path.join(dir_name, base_name + ".amxxdump") + isAMXX = True + elif ext.lower() == raw_extension: + + g_filename_raw = file_path + g_filename_amxx = os.path.join(dir_name, base_name + amxx_extension) + g_filename_memory = os.path.join(dir_name, base_name + memory_extension) + else : + print(f"Invalid file extension: {filename}") + return False + + + if True : + with open(file_path, 'rb') as fp: + print(f"Process FILE: '{file_path}'") + + if not read_header(fp): + print(f"Failed to load header from: {filename}") + return False + + if isAMXX : # Uncompress AMXX + if not amxx_uncompress(fp): + print(f"[Failed to uncompress amxx") + return False + + print(f"Successfully uncompressed amxx") + else : # Load uncompress RAW file + load_uncompress(fp); + print(f"Successfully load raw") + + # Get AMX header + if not get_amx_header(): + print(f"Failed to get AMX header from uncompressed amxx") + return False + + assert (plugin.amx_header.flags & 0x04) != 0 or plugin.amx_header.hea == plugin.amx_header.size, "Invalid plugin format" + + + if (plugin.amx_header.flags & 0x04) != 0 : + print(f"The code is compressed! Expand the bytes...") + + # clear flag + plugin.amx_header.flags &= ~0x04 + plugin.isCOMPACT = True # Only for Print Flags + + # expand(code, codesize, memsize) + newdata = expand(bytearray(plugin.data[plugin.amx_header.cod:]), + plugin.amx_header.size - plugin.amx_header.cod, + plugin.amx_header.hea - plugin.amx_header.cod) + + # backup debug data + debugdata = None + if plugin.dbg : + debugdata = plugin.data[plugin.amx_header.size : plugin.amx_header.size+plugin.dbg.size] + + # Rstore expanded bytes + plugin.data[plugin.amx_header.cod:plugin.amx_header.hea] = newdata + + # Recalculate image size + plugin.imagesize = plugin.amx_header.size = plugin.amx_header.hea + if plugin.dbg : + plugin.imagesize += plugin.dbg.size + plugin.data[plugin.amx_header.hea:plugin.imagesize] = debugdata + + print(f"Code bytes successfully expanded.") + + + if isAMXX : + # Cut bytearray unused memsize + plugin.data = plugin.data[:plugin.imagesize] + + # Update amx header + update_amx_header() + + with open(g_filename_raw, "wb") as raw_file: + write_header(raw_file) + raw_file.write(plugin.data) + + # Update .amxx witout AMX_FLAG_COMPACT (fix for amxxbump) + if plugin.isCOMPACT : + amxx_compress() + + print_plugin() + + print("Searching for strings...") + string_count = generate_memory_file() + print(f"found {string_count} strings!\n") + + run_amxxdump() + + print("save .amxxmemory file!") + + else : + + print(f"Loading .amxxmemory file") + + count = load_memory_file() + if count : + if count==1 : + print(f"A memory address has been modified") + else: + print(f"{count} memory addresses have been modified") + else : + print(f"No changes in memory") + + if not amxx_compress() : + print(f"Error while compressing") + return False + + print(f"Successfully compressed: '{g_filename_amxx}'") + + return True + + + +def print_plugin(): + global plugin + + print("") + print("---------------------------------") + + print(f"AMXXPacket Header:") + print(f"magic: 0x{plugin.magic:x}") + print(f"version: 0x{plugin.version:x}") + print(f"sections: {plugin.sections}") + print(f"cellsize: {plugin.cellsize} Bytes") + print(f"disksize: {plugin.disksize} Bytes") + print(f"imagesize: {plugin.imagesize} Bytes") + print(f"memsize: {plugin.memsize} Bytes") + print(f"offs: {plugin.offs} Bytes") + + print("") + + print(f"AMXCode Header:") + print(f"code size: {plugin.amx_header.dat - plugin.amx_header.cod} Bytes") + print(f"data size: {plugin.amx_header.hea - plugin.amx_header.dat} Bytes") + print(f"heap size: {plugin.amx_header.stp - plugin.amx_header.hea} Bytes") + print(f"public: {(plugin.amx_header.natives - plugin.amx_header.publics) // plugin.amx_header.defsize }") + print(f"native: {(plugin.amx_header.libraries - plugin.amx_header.natives) // plugin.amx_header.defsize }") + + print("Frags:") + if plugin.amx_header.flags & 0x02: + print("- AMX_FLAG_DEBUG") + if plugin.isCOMPACT: #plugin.amx_header.flags & 0x04: + print("- AMX_FLAG_COMPACT (removed)") + if plugin.amx_header.flags & 0x08: + print("- AMX_FLAG_BYTEOPC") + if plugin.amx_header.flags & 0x10: + print("- AMX_FLAG_NOCHECKS") + if plugin.amx_header.flags & 0x1000: + print("- AMX_FLAG_NTVREG") + if plugin.amx_header.flags & 0x2000: + print("- AMX_FLAG_JITC") + if plugin.amx_header.flags & 0x4000: + print("- AMX_FLAG_BROWSE") + if plugin.amx_header.flags & 0x8000: + print("- AMX_FLAG_RELOC") + + if plugin.dbg : + print("") + print("DEBUG Header:") + print(f"size: {plugin.dbg.size} Bytes") + print(f"magic: 0x{plugin.dbg.magic:x}") + + print("---------------------------------\n") + + +if __name__ == "__main__": + #process("ask_redirect.amxx") + #process("ask_redirect.raw") + print("MAIN()!") + #process("test.amxx") \ No newline at end of file diff --git a/bin/amxxdump/amxxdump b/bin/amxxdump/amxxdump new file mode 100644 index 0000000000000000000000000000000000000000..3432382d70fb6ad00fe707de4ee2b5aa18949461 GIT binary patch literal 184196 zcmd?Sdwdne`9HoV9KsPJ8!*-QF>16&4H`AUR1-l=Vn~n%2pTR{6p)L65dxfWE5^h< zL5{;}Y^b%>TCc4(sAwpHK?w#3cm?YHidJ#gAmWW%fqdWZnK`!rmcIJ>{q+m4!|XH9 zGtcwPGtWG8+1cIO29y?iJRT$bmtb@;2-V!<_2nQfeKkR%a*TANn~`ChYW$y(h#cZ_ zYCwbEHeB=96+bV2UGPf*layMokG~TE^G6(c^C$mM*1*rdI>F$N<&9*GZ-LzWZa)6f zQ7~|vA>|TJjU3<|;P~4Jm_O=88T@5HNCsr{mkyY}FmBkFfe8Q)`wN%9sA9^E7gbES zpkm6js<{`=ntov)RTiS9?j=Kp%d*siJXxPB@f(WY8Tj$cfL+9MOuR2c^WR(>FGM{g|tXtcSm|Te!s@=3jEUW^Wk?He*DW+ z$$#~~^0cEDIpGK>=`+Y@8~maZ{{K3`1kb{cZN|SO{7iWj{qL0MW#o!}aXfxmIwxJH zOj7i99?~B8(MNuT-yne(WFoD^y9`{{sN^jLT7gKn2HM+07S} z_>+zM0Ou5S^RX^HjZ|ZmE;AV^+v!~muhcO0BDXFoQA&v{l=K`VPDv<@q2+EeO0u+1%UaNfgkx@ zrs1s`{sAff-a|g|2ay)R9?JeF8w)l4Z5ls8QX9rw8a^I&9~&dDC*W<+PuVZkI1O-a zO#MF9u6 zMJN1V;Ej@S`BdW~;$!UjCP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@c{j2-;>dU&5u}ig zjprx!l&%fS9HRFA@O57iFd#jNB_WywR2(r|HiM!M;`Y->HnP(_#Z?z54QjS literal 0 HcmV?d00001 diff --git a/bin/amxxdump/includes/amxmodx/amxconst.inc b/bin/amxxdump/includes/amxmodx/amxconst.inc new file mode 100644 index 0000000..23fc592 --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/amxconst.inc @@ -0,0 +1,584 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +#if defined _amxconst_included + #endinput +#endif +#define _amxconst_included + +#include + +/** + * Internal AMXX buffer size for string retrieval. + * + * @note This is the buffer size AMX Mod X uses internally to retrieve strings + * from plugins. Most natives that take strings as arguments will + * implicitly truncate them to this maximum length. This has been raised + * to the current value with AMXX 1.8.3. Previously the limit was 3072. + * @note This is here mainly for documentation purposes. By default plugins + * don't have enough memory available to allocate an array of this size. + * You probably should not use this to actually declare a buffer unless + * you *absolutely* have to. Look at #pragma dynamic to increase a plugins + * available memory. + */ +#define MAX_STRING_LENGTH 16384 + +/** + * Defines and constants related to the maximum number of clients. + * + * @note MAX_PLAYERS is not the same as MaxClients. MAX_PLAYERS is a hardcoded + * value as an upper limit, used mainly to declare arrays big enough for + * all possible server situations. MaxClients changes based on the + * server the plugin is deployed on.. + */ +#define MAX_PLAYERS 32 /* Maximum number of players AMX Mod X supports */ + +/** + * Maximum number of players the server supports + */ +public stock const MaxClients; + +/** + * Pass this into certain functions to act as a C++ NULL + */ +public stock const NULL_STRING[1]; + +/** + * Pass this into certain functions to act as a C++ NULL + */ +public stock const Float:NULL_VECTOR[3]; + +/** + * The maximum buffer size required to store a client's name. + */ +#define MAX_NAME_LENGTH 32 + +/** + * The maximum buffer size required to store a client's IP address without a port. + */ +#define MAX_IP_LENGTH 16 + +/** + * The maximum buffer size required to store a client's IP address with a port. + */ +#define MAX_IP_WITH_PORT_LENGTH 22 + +/** + * The maximum buffer size required to store a client's AuthID. + */ +#define MAX_AUTHID_LENGTH 64 + +/** + * The maximum buffer size required to store a resource path. + */ +#define MAX_RESOURCE_PATH_LENGTH 64 + +/** + * The maximum buffer size that can be displayed in a MOTD. + */ +#define MAX_MOTD_LENGTH 1536 + +/** + * The maximum size accepted by the user info buffer. + */ +#define MAX_USER_INFO_LENGTH 256 + +/** + * The maximum buffer size that can be displayed in a menu. + */ +#define MAX_MENU_LENGTH 512 + +/** + * π + */ +#define M_PI 3.1415926535 + +/** + * @section Admin privilege and authentication constants + */ + +/** + * Admin level constants + */ +#define ADMIN_ALL 0 /* everyone */ +#define ADMIN_IMMUNITY (1<<0) /* flag "a" */ +#define ADMIN_RESERVATION (1<<1) /* flag "b" */ +#define ADMIN_KICK (1<<2) /* flag "c" */ +#define ADMIN_BAN (1<<3) /* flag "d" */ +#define ADMIN_SLAY (1<<4) /* flag "e" */ +#define ADMIN_MAP (1<<5) /* flag "f" */ +#define ADMIN_CVAR (1<<6) /* flag "g" */ +#define ADMIN_CFG (1<<7) /* flag "h" */ +#define ADMIN_CHAT (1<<8) /* flag "i" */ +#define ADMIN_VOTE (1<<9) /* flag "j" */ +#define ADMIN_PASSWORD (1<<10) /* flag "k" */ +#define ADMIN_RCON (1<<11) /* flag "l" */ +#define ADMIN_LEVEL_A (1<<12) /* flag "m" */ +#define ADMIN_LEVEL_B (1<<13) /* flag "n" */ +#define ADMIN_LEVEL_C (1<<14) /* flag "o" */ +#define ADMIN_LEVEL_D (1<<15) /* flag "p" */ +#define ADMIN_LEVEL_E (1<<16) /* flag "q" */ +#define ADMIN_LEVEL_F (1<<17) /* flag "r" */ +#define ADMIN_LEVEL_G (1<<18) /* flag "s" */ +#define ADMIN_LEVEL_H (1<<19) /* flag "t" */ +#define ADMIN_MENU (1<<20) /* flag "u" */ +#define ADMIN_BAN_TEMP (1<<21) /* flag "v" */ +#define ADMIN_ADMIN (1<<24) /* flag "y" */ +#define ADMIN_USER (1<<25) /* flag "z" */ + +/** + * Admin authentication behavior flags + */ +#define FLAG_KICK (1<<0) /* flag "a" */ +#define FLAG_TAG (1<<1) /* flag "b" */ +#define FLAG_AUTHID (1<<2) /* flag "c" */ +#define FLAG_IP (1<<3) /* flag "d" */ +#define FLAG_NOPASS (1<<4) /* flag "e" */ +#define FLAG_CASE_SENSITIVE (1<<10) /* flag "k" */ + +/** + * @endsection + */ + +/** + * Return codes + */ +#define PLUGIN_CONTINUE 0 /* Results returned by public functions */ +#define PLUGIN_HANDLED 1 /* stop other plugins */ +#define PLUGIN_HANDLED_MAIN 2 /* to use in client_command(), continue all plugins but stop the command */ + +/** + * HI weapon constants + */ +#define HIW_BERETTA 1 +#define HIW_SPAS12 2 +#define HIW_M4A1 3 +#define HIW_MP5A4 4 +#define HIW_MP5SD5 5 +#define HIW_AK47 6 +#define HIW_AKS74U 7 +#define HIW_GLOCK 8 +#define HIW_M11 9 +#define HIW_M11SD 10 +#define HIW_PSG1 11 +#define HIW_ZASTAVA 12 +#define HIW_M16A2 13 +#define HIW_REMINGTON 14 +#define HIW_NATOGREN 15 +#define HIW_TANGOGREN 16 +#define HIW_FLASHBANG 17 + +/** + * Parts of body for hits + */ +#define HIT_GENERIC 0 /* none */ +#define HIT_HEAD 1 +#define HIT_CHEST 2 +#define HIT_STOMACH 3 +#define HIT_LEFTARM 4 +#define HIT_RIGHTARM 5 +#define HIT_LEFTLEG 6 +#define HIT_RIGHTLEG 7 +#define HIT_SHIELD 8 // CS only +#define MAX_BODYHITS 8 + +/** + * @section emit_sound() constants + */ + +/** + * Channels + */ +#define CHAN_AUTO 0 +#define CHAN_WEAPON 1 +#define CHAN_VOICE 2 +#define CHAN_ITEM 3 +#define CHAN_BODY 4 +#define CHAN_STREAM 5 /* allocate stream channel from the static or dynamic area */ +#define CHAN_STATIC 6 /* allocate channel from the static area */ +#define CHAN_NETWORKVOICE_BASE 7 /* voice data coming across the network */ +#define CHAN_NETWORKVOICE_END 500 /* network voice data reserves slots (CHAN_NETWORKVOICE_BASE through CHAN_NETWORKVOICE_END). */ + +/** + *Attenuation values + */ +#define ATTN_NONE 0.00 +#define ATTN_NORM 0.80 +#define ATTN_IDLE 2.00 +#define ATTN_STATIC 1.25 + +/** + * Pitch values + */ +#define PITCH_NORM 100 /* non-pitch shifted */ +#define PITCH_LOW 95 /* other values are possible - 0-255, where 255 is very high */ +#define PITCH_HIGH 120 + +/** + * Volume values + */ +#define VOL_NORM 1.0 + +/** + * Sound behavior constants + */ +#define SND_SPAWNING (1<<8) // we're spawing, used in some cases for ambients +#define SND_STOP (1<<5) // stop sound +#define SND_CHANGE_VOL (1<<6) // change sound vol +#define SND_CHANGE_PITCH (1<<7) // change sound pitch + +/** + * @endsection + */ + +/** + * Menu keys + */ +#define MENU_KEY_1 (1<<0) +#define MENU_KEY_2 (1<<1) +#define MENU_KEY_3 (1<<2) +#define MENU_KEY_4 (1<<3) +#define MENU_KEY_5 (1<<4) +#define MENU_KEY_6 (1<<5) +#define MENU_KEY_7 (1<<6) +#define MENU_KEY_8 (1<<7) +#define MENU_KEY_9 (1<<8) +#define MENU_KEY_0 (1<<9) + +/** + * Language constants + */ +#define LANG_SERVER 0 +#define LANG_PLAYER -1 + +/** + * @section Client print native constants + */ + +/** + * Destination types for client_print() + */ +enum +{ + print_notify = 1, + print_console, + print_chat, + print_center, + print_radio /* Counter-Strike only */ +}; + +/** + * Color types for client_print_color() + */ +enum +{ + print_team_default = 0, + print_team_grey = -1, + print_team_red = -2, + print_team_blue = -3, +}; + +/** + * Destination types for engclient_print() + */ +enum +{ + engprint_console = 0, + engprint_center, + engprint_chat, +}; + +/** + * @endsection + */ + +/** + * @section Entity rendering constants + */ + +/** + * Rendering modes (i.e. for set_user_rendering()) + */ +enum +{ + kRenderNormal = 0, /* src */ + kRenderTransColor, /* c*a+dest*(1-a) */ + kRenderTransTexture, /* src*a+dest*(1-a) */ + kRenderGlow, /* src*a+dest -- No Z buffer checks */ + kRenderTransAlpha, /* src*srca+dest*(1-srca) */ + kRenderTransAdd, /* src*a+dest */ +}; + +/** + * Rendering fx (i.e. for set_user_rendering()) + */ +enum +{ + kRenderFxNone = 0, + kRenderFxPulseSlow, + kRenderFxPulseFast, + kRenderFxPulseSlowWide, + kRenderFxPulseFastWide, + kRenderFxFadeSlow, + kRenderFxFadeFast, + kRenderFxSolidSlow, + kRenderFxSolidFast, + kRenderFxStrobeSlow, + kRenderFxStrobeFast, + kRenderFxStrobeFaster, + kRenderFxFlickerSlow, + kRenderFxFlickerFast, + kRenderFxNoDissipation, + kRenderFxDistort, /* Distort/scale/translate flicker */ + kRenderFxHologram, /* kRenderFxDistort + distance fade */ + kRenderFxDeadPlayer, /* kRenderAmt is the player index */ + kRenderFxExplode, /* Scale up really big! */ + kRenderFxGlowShell, /* Glowing Shell */ + kRenderFxClampMinScale, /* Keep this sprite from getting very small (SPRITES only!) */ + kRenderFxLightMultiplier, /* CTM !!!CZERO added to tell the studiorender that the value in iuser2 is a lightmultiplier */ +}; + +/** + * @endsection + */ + +/** + * Type for force_unmodified() + */ +enum +{ + force_exactfile = 0, /* File on client must exactly match server's file */ + force_model_samebounds, /* For model files only, the geometry must fit in the same bbox */ + force_model_specifybounds, /* For model files only, the geometry must fit in the specified bbox */ +}; + +/** + * Status for get_module() + */ +enum +{ + module_none = 0, + module_query, + module_badload, + module_loaded, + module_noinfo, + module_noquery, + module_noattach, + module_old, +}; + +/** + * AMX flag constants + */ +#define AMX_FLAG_DEBUG 0x02 /* symbolic info. available */ +#define AMX_FLAG_COMPACT 0x04 /* compact encoding */ +#define AMX_FLAG_BYTEOPC 0x08 /* opcode is a byte (not a cell) */ +#define AMX_FLAG_NOCHECKS 0x10 /* no array bounds checking; no STMT opcode */ +#define AMX_FLAG_NTVREG 0x1000 /* all native functions are registered */ +#define AMX_FLAG_JITC 0x2000 /* abstract machine is JIT compiled */ +#define AMX_FLAG_BROWSE 0x4000 /* busy browsing */ +#define AMX_FLAG_RELOC 0x8000 /* jump/call addresses relocated */ + +/** + * Invalid plugin id + */ +#define INVALID_PLUGIN_ID -1 + +/** + * Menu and menu item status codes + */ +#define MENU_TIMEOUT -4 +#define MENU_EXIT -3 +#define MENU_BACK -2 +#define MENU_MORE -1 +#define ITEM_IGNORE 0 +#define ITEM_ENABLED 1 +#define ITEM_DISABLED 2 + +/** + * AMX error codes + */ +#define AMX_ERR_NATIVE 10 +#define AMX_ERR_MEMACCESS 5 +#define AMX_ERR_NONE 0 +#define AMX_ERR_BOUNDS 4 +#define AMX_ERR_STACKERR 3 +#define AMX_ERR_STACKLOW 7 +#define AMX_ERR_HEAPLOW 8 +#define AMX_ERR_DIVIDE 11 +#define AMX_ERR_NOTFOUND 19 +#define AMX_ERR_PARAMS 25 +#define AMX_ERR_GENERAL 27 + +/** + * Generic invalid handle value + */ +#define INVALID_HANDLE -1 + +/** + * @section Plugin forward related constants + */ + +/** + * Stop types for plugin forwards + */ +#define ET_IGNORE 0 //ignore return val +#define ET_STOP 1 //stop on PLUGIN_HANDLED +#define ET_STOP2 2 //same, except return biggest +#define ET_CONTINUE 3 //no stop, return biggest + +/** + * Parameter types for plugin forwards + */ +#define FP_CELL 0 +#define FP_FLOAT 1 +#define FP_STRING 2 +#define FP_ARRAY 4 +#define FP_VAL_BYREF 5 //cell & float are handled in the same way + +/** + * @endsection + */ + +/** + * LibType constants + */ +enum LibType +{ + LibType_Library, + LibType_Class +}; + +/** + * AdminProp constants + */ +enum AdminProp +{ + AdminProp_Auth = 0, + AdminProp_Password, + AdminProp_Access, + AdminProp_Flags +}; + +/** + * HashType constants + * To be used on hash_file() and hash_string() + */ +enum HashType +{ + Hash_Crc32 = 0, // Provides CRC32 hashing + Hash_Md5, // Provides MD5 hashing + Hash_Sha1, // Provides SHA1 hashing + Hash_Sha256, // Provides SHA256 hashing + + Hash_Sha3_224, // Provides SHA3 224 bit hashing + Hash_Sha3_256, // Provides SHA3 256 bit hashing + Hash_Sha3_384, // Provides SHA3 384 bit hashing + Hash_Sha3_512, // Provides SHA3 512 bit hashing + + Hash_Keccak_224, // Provides Keccak 224 bit hashing + Hash_Keccak_256, // Provides Keccak 256 bit hashing + Hash_Keccak_384, // Provides Keccak 384 bit hashing + Hash_Keccak_512 // Provides Keccak 512 bit hashing +}; + +/** + * SetTaskFlags constants for set_task_ex() + */ +enum SetTaskFlags (<<= 1) +{ + SetTask_Once = 0, // None; execute callback after the specified amount of time (Default) + SetTask_RepeatTimes = 1, // Repeat timer a set amount of times + SetTask_Repeat, // Loop indefinitely until timer is stopped + SetTask_AfterMapStart, // Time interval is treated as absolute time after map start + SetTask_BeforeMapChange // Time interval is treated as absolute time before map change +}; + +/** + * RegisterEventFlags constants for register_event_ex() + */ +enum RegisterEventFlags (<<= 1) +{ + RegisterEvent_None = 0, // None + RegisterEvent_Global = 1, // Global event (sent to every client) + RegisterEvent_Single, // Event sent to single client + RegisterEvent_OnceForMultiple, // Call only once when repeated to multiple clients + RegisterEvent_OnlyDead, // Call only if sent to dead client + RegisterEvent_OnlyAlive, // Call only if sent to alive client + RegisterEvent_OnlyHuman, // Call only if sent to human client (RegisterEvent_Single required) + RegisterEvent_OnlyBots // Call only if sent to bot (RegisterEvent_Single required) +}; + +/** + * GetPlayerFlags constants for get_players_ex() + */ +enum GetPlayersFlags (<<= 1) +{ + GetPlayers_None = 0, // No filter (Default) + GetPlayers_ExcludeDead = 1, // Do not include dead clients + GetPlayers_ExcludeAlive, // Do not include alive clients + GetPlayers_ExcludeBots, // Do not include bots + GetPlayers_ExcludeHuman, // Do not include human clients + GetPlayers_MatchTeam, // Match with team + GetPlayers_MatchNameSubstring, // Match with part of name + GetPlayers_CaseInsensitive, // Match case insensitive + GetPlayers_ExcludeHLTV, // Do not include HLTV proxies + GetPlayers_IncludeConnecting // Include connecting clients +}; + +/** + * FindPlayerFlags constants for find_player_ex() + */ +enum FindPlayerFlags (<<= 1) +{ + FindPlayer_None = 0, // None + FindPlayer_MatchName = 1, // Match with name + FindPlayer_MatchNameSubstring, // Match with name substring + FindPlayer_MatchAuthId, // Match with authid + FindPlayer_MatchIP, // Match with ip + FindPlayer_MatchTeam, // Match with team name + FindPlayer_ExcludeDead, // Do not include dead clients + FindPlayer_ExcludeAlive, // Do not include alive clients + FindPlayer_ExcludeBots, // Do not include bots + FindPlayer_ExcludeHuman, // Do not include human clients + FindPlayer_LastMatched, // Return last matched client instead of the first + FindPlayer_MatchUserId, // Match with userid + FindPlayer_CaseInsensitive, // Match case insensitively + FindPlayer_IncludeConnecting // Include connecting clients +} + +/** + * Constants for client statistics + */ +enum +{ + STATSX_KILLS = 0, + STATSX_DEATHS, + STATSX_HEADSHOTS, + STATSX_TEAMKILLS, + STATSX_SHOTS, + STATSX_HITS, + STATSX_DAMAGE, + STATSX_RANK, + STATSX_MAX_STATS +} + +/** + * Constants for get_user_origin() + */ +enum +{ + Origin_Client = 0, // Client's Origin + Origin_Eyes, // Eyes (and Weapon) Origin + Origin_AimEndClient, // Aim End Origin from Client's Position + Origin_AimEndEyes, // Aim End Origin from Eyes Position + Origin_CS_LastBullet // Last Bullet's Origin (Counter-Strike) +} + +#include // To keep backward compatibility diff --git a/bin/amxxdump/includes/amxmodx/amxmisc.inc b/bin/amxxdump/includes/amxmodx/amxmisc.inc new file mode 100644 index 0000000..96fb92a --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/amxmisc.inc @@ -0,0 +1,899 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +#if defined _amxmisc_included + #endinput +#endif +#define _amxmisc_included + +#if !defined _amxmodx_included + #include +#endif + +/** + * Returns if the client has any admin flags set + * + * @param id Client index + * + * @return 1 if client has any admin flags, 0 otherwise + */ +stock is_user_admin(id) +{ + new __flags = get_user_flags(id); + return (__flags > 0 && !(__flags & ADMIN_USER)); +} + +/** + * Returns if the user can execute the current command by checking the necessary + * admin flags and parameter count. Displays a denied access message to the user + * if missing privileges or a usage example if too few parameters are provided. + * + * @note This should be used inside of a command forward as it uses read_argc() + * to check the parameter count. + * + * @param id Client index + * @param level Required admin flags + * @param cid Command id + * @param num Required number of parameters + * @param acesssilent If true no denied access message will be printed + * + * @return 1 if access granted and parameters provided, 0 otherwise + */ +stock cmd_access(id, level, cid, num, bool:accesssilent = false) +{ + new has_access = 0; + if (id == (is_dedicated_server() ? 0 : 1)) + { + has_access = 1; + } + else if (level == ADMIN_ADMIN) + { + if (is_user_admin(id)) + { + has_access = 1; + } + } + else if (get_user_flags(id) & level) + { + has_access = 1; + } + else if (level == ADMIN_ALL) + { + has_access = 1; + } + + if (has_access == 0) + { + if (!accesssilent) + { + console_print(id, "%L", id, "NO_ACC_COM"); + } + return 0; + } + if (read_argc() < num) + { + new hcmd[32], hinfo[128], hflag, bool:info_ml; + get_concmd(cid, hcmd, charsmax(hcmd), hflag, hinfo, charsmax(hinfo), level, _, info_ml); + + if (info_ml) + { + LookupLangKey(hinfo, charsmax(hinfo), hinfo, id); + } + + console_print(id, "%L: %s %s", id, "USAGE", hcmd, hinfo); + return 0; + } + + return 1; +} + +/** + * Returns if the client has the specified admin flags. + * + * @param id Client index + * @param level Required admin flags + * + * @return 1 if client has the admin flags, 0 otherwise + */ +stock access(id, level) +{ + if (level == ADMIN_ADMIN) + { + return is_user_admin(id); + } + else if (level == ADMIN_ALL) + { + return 1; + } + + return (get_user_flags(id) & level); +} + +/** + * cmd_target flags + */ +#define CMDTARGET_OBEY_IMMUNITY (1<<0) // Obey immunity +#define CMDTARGET_ALLOW_SELF (1<<1) // Allow self targeting +#define CMDTARGET_ONLY_ALIVE (1<<2) // Target must be alive +#define CMDTARGET_NO_BOTS (1<<3) // Target can't be a bot + +/** + * Processes a generic target pattern and tries to match it to a client based + * on filtering flags. If no unique target is found an appropriate message is + * displayed to the admin. + * + * @note The pattern is first matched case insensitively against client names. + * If no match is found it is matched against client authids. If still no + * match is found and the pattern starts with '#' it is finally matched + * against client userids. + * @note Since client names are matched by substring the pattern can potentially + * match multiple targets. In that case the function will return 0 and ask + * the admin to provide a unique pattern. + * @note The filtering flags are applied after the pattern matching has + * finished. That means the pattern has to be unique against all clients + * on the server even if some of them are not eligible. + * + * @param id Client index of admin performing an action + * @param arg Target pattern + * @param flags Filtering flags, see CMDTARGET_* constants above + * + * @return Client index, or 0 if no or multiple clients matched + */ +stock cmd_target(id, const arg[], flags = CMDTARGET_OBEY_IMMUNITY) +{ + new player = find_player("bl", arg); + if (player) + { + if (player != find_player("blj", arg)) + { + console_print(id, "%L", id, "MORE_CL_MATCHT"); + return 0; + } + } + else if ((player = find_player("c", arg)) == 0 && arg[0] == '#' && arg[1]) + { + player = find_player("k", str_to_num(arg[1])); + } + if (!player) + { + console_print(id, "%L", id, "CL_NOT_FOUND"); + return 0; + } + if (flags & CMDTARGET_OBEY_IMMUNITY) + { + if ((get_user_flags(player) & ADMIN_IMMUNITY) && ((flags & CMDTARGET_ALLOW_SELF) ? (id != player) : true)) + { + new imname[MAX_NAME_LENGTH]; + get_user_name(player, imname, charsmax(imname)); + console_print(id, "%L", id, "CLIENT_IMM", imname); + return 0; + } + } + if (flags & CMDTARGET_ONLY_ALIVE) + { + if (!is_user_alive(player)) + { + new imname[MAX_NAME_LENGTH]; + get_user_name(player, imname, charsmax(imname)); + console_print(id, "%L", id, "CANT_PERF_DEAD", imname); + return 0; + } + } + if (flags & CMDTARGET_NO_BOTS) + { + if (is_user_bot(player)) + { + new imname[MAX_NAME_LENGTH]; + get_user_name(player, imname, charsmax(imname)); + console_print(id, "%L", id, "CANT_PERF_BOT", imname); + return 0; + } + } + + return player; +} + +/** + * Standard method to show admin activity to clients connected to the server. + * This depends on the amx_show_activity cvar. See documentation for more details. + * + * @param id Client index performing the action + * @param name Name of client performing the action + * @param fmt Formatting rules + * @param ... Variable number of formatting parameters + * + * @noreturn + */ +stock show_activity(id, const name[], const fmt[], any:...) +{ + static __amx_show_activity; + if (__amx_show_activity == 0) + { + __amx_show_activity = get_cvar_pointer("amx_show_activity"); + + // if still not found, then register the cvar as a dummy + if (__amx_show_activity == 0) + { + __amx_show_activity = register_cvar("amx_show_activity", "2", FCVAR_PROTECTED); + } + } + + new prefix[10]; + if (is_user_admin(id)) + { + copy(prefix, charsmax(prefix), "ADMIN"); + } + else + { + copy(prefix, charsmax(prefix), "PLAYER"); + } + new buffer[512]; + vformat(buffer, charsmax(buffer), fmt, 4); + + switch (get_pcvar_num(__amx_show_activity)) + { + case 5: // hide name only to admins, show nothing to normal users + { + for (new i = 1; i <= MaxClients; i++) + { + if (is_user_connected(i)) + { + if (is_user_admin(i)) + { + client_print(i, print_chat, "%L: %s", i, prefix, buffer); + } + } + } + } + case 4: // show name only to admins, show nothing to normal users + { + for (new i = 1; i <= MaxClients; i++) + { + if (is_user_connected(i)) + { + if (is_user_admin(i)) + { + client_print(i, print_chat, "%L %s: %s", i, prefix, name, buffer); + } + } + } + } + case 3: // show name only to admins, hide name from normal users + { + for (new i = 1; i <= MaxClients; i++) + { + if (is_user_connected(i)) + { + if (is_user_admin(i)) + { + client_print(i, print_chat, "%L %s: %s", i, prefix, name, buffer); + } + else + { + client_print(i, print_chat, "%L: %s", i, prefix, buffer); + } + } + } + } + case 2: // show name to all + { + client_print(0, print_chat, "%L %s: %s", LANG_PLAYER, prefix , name , buffer); + } + case 1: // hide name to all + { + client_print(0, print_chat, "%L: %s", LANG_PLAYER, prefix, buffer); + } + } +} + +/** + * Standard method to show admin activity to a single client. + * This depends on the amx_show_activity cvar. See documentation for more details. + * + * @param idtarget Client index to display message to + * @param id Client index performing the action + * @param name Name of client performing the action + * @param fmt Formatting rules + * @param ... Variable number of formatting parameters + * + * @noreturn + */ +stock show_activity_id(idtarget, idadmin, const name[], const fmt[], any:...) +{ + if (idtarget == 0 || !is_user_connected(idtarget)) + { + return; + } + + static __amx_show_activity; + if (__amx_show_activity == 0) + { + __amx_show_activity = get_cvar_pointer("amx_show_activity"); + + // if still not found, then register the cvar as a dummy + if (__amx_show_activity == 0) + { + __amx_show_activity = register_cvar("amx_show_activity", "2", FCVAR_PROTECTED); + } + } + + static prefix[10]; + if (is_user_admin(idadmin)) + { + copy(prefix, charsmax(prefix), "ADMIN"); + } + else + { + copy(prefix, charsmax(prefix), "PLAYER"); + } + + static buffer[512]; + vformat(buffer, charsmax(buffer), fmt, 5); + + switch (get_pcvar_num(__amx_show_activity)) + { + case 5: // hide name only to admins, show nothing to normal users + { + if (is_user_admin(idtarget)) + { + client_print(idtarget, print_chat, "%L: %s", idtarget, prefix, buffer); + } + } + case 4: // show name only to admins, show nothing to normal users + { + if (is_user_admin(idtarget)) + { + client_print(idtarget, print_chat, "%L %s: %s", idtarget, prefix, name, buffer); + } + } + case 3: // show name only to admins, hide name from normal users + { + if (is_user_admin(idtarget)) + { + client_print(idtarget, print_chat, "%L %s: %s", idtarget, prefix, name, buffer); + } + else + { + client_print(idtarget, print_chat, "%L: %s", idtarget, prefix, buffer); + } + } + case 2: // show name to all + { + client_print(idtarget, print_chat, "%L %s: %s", idtarget, prefix, name, buffer); + } + case 1: // hide name to all + { + client_print(idtarget, print_chat, "%L: %s", idtarget, prefix, buffer); + } + } +} + +/** + * Standard method to show activity to one single client with normal language keys. + * These keys need to be in the format of standard AMXX keys: + * eg: ADMIN_KICK_1 = ADMIN: kick %s + * ADMIN_KICK_2 = ADMIN %s: kick %s + * This depends on the amx_show_activity cvar. See documentation for more details. + * + * @param KeyWithoutName The language key that does not have the name field. + * @param KeyWithName The language key that does have the name field. + * @param __AdminName The name of the person doing the action. + * @extra Pass any extra format arguments for the language key in the variable arguments list. + * + * @noreturn + */ +stock show_activity_key(const KeyWithoutName[], const KeyWithName[], const ___AdminName[], any:...) +{ +// The variable gets used via vformat, but the compiler doesn't know that, so it still cries. +#pragma unused ___AdminName + static __amx_show_activity; + if (__amx_show_activity == 0) + { + __amx_show_activity = get_cvar_pointer("amx_show_activity"); + + // if still not found, then register the cvar as a dummy + if (__amx_show_activity == 0) + { + __amx_show_activity = register_cvar("amx_show_activity", "2", FCVAR_PROTECTED); + } + } + + new buffer[512]; + new keyfmt[256]; + new i; + + switch (get_pcvar_num(__amx_show_activity)) + { + case 5: // hide name to admins, display nothing to normal players + { + while (i++ < MaxClients) + { + if (is_user_connected(i)) + { + if (is_user_admin(i)) + { + LookupLangKey(keyfmt, charsmax(keyfmt), KeyWithoutName, i); + + // skip the "adminname" argument if not showing name + vformat(buffer, charsmax(buffer), keyfmt, 4); + client_print(i, print_chat, "%s", buffer); + } + } + } + } + case 4: // show name only to admins, display nothing to normal players + { + while (i++ < MaxClients) + { + if (is_user_connected(i)) + { + if (is_user_admin(i)) + { + LookupLangKey(keyfmt, charsmax(keyfmt), KeyWithName, i); + vformat(buffer, charsmax(buffer), keyfmt, 3); + client_print(i, print_chat, "%s", buffer); + } + } + } + } + case 3: // show name only to admins, hide name from normal users + { + while (i++ < MaxClients) + { + if (is_user_connected(i)) + { + if (is_user_admin(i)) + { + LookupLangKey(keyfmt, charsmax(keyfmt), KeyWithName, i); + vformat(buffer, charsmax(buffer), keyfmt, 3); + } + else + { + LookupLangKey(keyfmt, charsmax(keyfmt), KeyWithoutName, i); + + // skip the "adminname" argument if not showing name + vformat(buffer, charsmax(buffer), keyfmt, 4); + } + client_print(i, print_chat, "%s", buffer); + } + } + } + case 2: // show name to all users + { + while (i++ < MaxClients) + { + if (is_user_connected(i)) + { + LookupLangKey(keyfmt, charsmax(keyfmt), KeyWithName, i); + vformat(buffer, charsmax(buffer), keyfmt, 3); + client_print(i, print_chat, "%s", buffer); + } + } + } + case 1: // hide name from all users + { + while (i++ < MaxClients) + { + if (is_user_connected(i)) + { + LookupLangKey(keyfmt, charsmax(keyfmt), KeyWithoutName, i); + + // skip the "adminname" argument if not showing name + vformat(buffer, charsmax(buffer), keyfmt, 4); + client_print(i, print_chat, "%s", buffer); + } + } + } + } +} + +/** + * Returns if the mod running on the server supports colored menus. + * + * @note The full list of mods supporting colored menus: + * Counter-Strike, Counter-Strike: Condition Zero, Deathmatch Classic, + * Day of Defeat, Team Fortress Classic and Half-Life: Deathmatch. + * @note Since this is a stock and compiled into the plugin, the list of + * supported mods will not update and require recompilation of the plugin + * if the list ever changed. + * + * @return 1 if colored menus are supported, 0 otherwise + */ +stock colored_menus() +{ + static ColoredMenus = -1; + + if (ColoredMenus == -1) + { + new const ModNames[][] = { "cstrike", "czero", "dmc", "dod", "tfc", "valve" }; + new ModName[32]; + + get_modname(ModName, charsmax(ModName)); + + for (new Iterator = 0; Iterator < sizeof(ModNames); Iterator++) + { + if (equal(ModName, ModNames[Iterator])) + { + ColoredMenus = 1; + + break; + } + } + + if (ColoredMenus == -1) + ColoredMenus = 0; + } + + return ColoredMenus; +} + +/** + * Returns if the mod running on the server is a version of Counter-Strike. + * + * @return 1 if mod is Counter-Strike, 0 otherwise + */ +stock cstrike_running() +{ + new mod_name[32]; + get_modname(mod_name, charsmax(mod_name)); + + return (equal(mod_name, "cstrike") || equal(mod_name, "czero") || equal(mod_name, "csv15") || equal(mod_name, "cs13")); +} + +/** + * Returns if the server is running a specific mod. + * + * @param mod Mod name to check for + * + * @return 1 if mod name matches, 0 otherwise + */ +stock is_running(const mod[]) +{ + new mod_name[32]; + get_modname(mod_name, charsmax(mod_name)); + + return equal(mod_name, mod); +} + +/** + * Retrieves the path to the AMXX base directory. + * + * @param name Buffer to copy path to + * @param len Maximum buffer size + * + * @return Number of cells written to buffer + */ +stock get_basedir(name[], len) +{ + return get_localinfo("amxx_basedir", name, len); +} + +/** + * Retrieves the path to the AMXX configs directory. + * + * @param name Buffer to copy path to + * @param len Maximum buffer size + * + * @return Number of cells written to buffer + */ +stock get_configsdir(name[], len) +{ + return get_localinfo("amxx_configsdir", name, len); +} + +/** + * Retrieves the path to the AMXX data directory. + * + * @param name Buffer to copy path to + * @param len Maximum buffer size + * + * @return Number of cells written to buffer + */ +stock get_datadir(name[], len) +{ + return get_localinfo("amxx_datadir", name, len); +} + +/** + * Provides a shorthand to register a working menu. + * + * @note Combines the necessary calls to register_menuid() and + * register_menucmd() into a single function. + * + * @param title Menu name + * @param keys Key flags + * @param function Callback function + * @param outside Catch menus outside the calling plugin + * + * @noreturn + * @error If an invalid callback function is specified, an error will + * be thrown. + */ +stock register_menu(const title[], keys, const function[], outside = 0) +{ + register_menucmd(register_menuid(title, outside), keys, function); +} + +/** + * Alias to get_configsdir provided for backwards compatibility. Originally + * intended to retrieve the AMXX custom directory. + * + * @deprecated Should not be used as the concept of a custom directory does no + * longer exists in AMXX. + * + * @param name Buffer to copy path to + * @param len Maximum buffer size + * + * @return Number of cells written to buffer + */ +#pragma deprecated The concept of a custom directory no longer exists in AMXX. Do not use. +stock get_customdir(name[], len) +{ + return get_configsdir(name, len); +} + +/** + * Adds a menu item/command to the admin menu (amxmodmenu) handled by the + * "Menus Front-End" plugin, if it is loaded. + * + * @param MENU_TEXT Item text that will be displayed in the menu + * @param MENU_CMD Command that will be executed on the client + * @param MENU_ACCESS Admin access required for menu command + * @param MENU_PLUGIN Case-insensitive name or filename of plugin providing + * the menu command + * + * @noreturn + */ +stock AddMenuItem(const MENU_TEXT[], const MENU_CMD[], const MENU_ACCESS, const MENU_PLUGIN[]) +{ + AddMenuItem_call(MENU_TEXT, MENU_CMD, MENU_ACCESS, MENU_PLUGIN, false); +} + +/** + * Adds a menu item/command to the client menu (amx_menu) handled by the + * "Menus Front-End" plugin, if it is loaded. Items should be accessible by + * non-admins. + * + * @param MENU_TEXT Item text that will be displayed in the menu + * @param MENU_CMD Command that will be executed on the client + * @param MENU_ACCESS Admin access required for menu command + * @param MENU_PLUGIN Case-insensitive name or filename of plugin providing + * the menu command + * + * @noreturn + */ +stock AddClientMenuItem(const MENU_TEXT[], const MENU_CMD[], const MENU_ACCESS, const MENU_PLUGIN[]) +{ + AddMenuItem_call(MENU_TEXT, MENU_CMD, MENU_ACCESS, MENU_PLUGIN, true); +} + +/** + * Helper function used by AddMenuItem() and AddClientMenuItem() + * + * @param MENU_TEXT Item text that will be displayed in the menu + * @param MENU_CMD Command that will be executed on the client + * @param MENU_ACCESS Admin access required for menu command + * @param MENU_PLUGIN Case-insensitive name or filename of plugin + * providing the menu command + * @param ADD_TO_CLIENT_MENU If true adds command to client menu, false adds + * to admin menu + * + * @noreturn + */ +stock AddMenuItem_call(const MENU_TEXT[], const MENU_CMD[], const MENU_ACCESS, const MENU_PLUGIN[], const bool:ADD_TO_CLIENT_MENU) +{ + new pluginid = is_plugin_loaded("Menus Front-End"); + if (pluginid == -1) + { + log_amx("Can't add menu item ^"%s^" from plugin ^"%s^" to menu set because the Menus Front-End plugin itself is not loaded!", MENU_TEXT, MENU_PLUGIN); + return; // Menus Front-End doesn't exist, return. + } + + new filename[64], b[1]; + get_plugin(pluginid, filename, charsmax(filename), b, charsmax(b), b, charsmax(b), b, charsmax(b), b, charsmax(b)); + + new status = callfunc_begin(ADD_TO_CLIENT_MENU ? "AddClientMenu" : "AddMenu", filename); + new bool:failed = true; + switch (status) + { + case 1: + { + failed = false; + } + case 0: + { + log_amx("Run time error! (AddMenuItem_call failed)"); + } + case -2: + { + log_amx("Function not found! (AddMenuItem_call failed)"); + } + case -1: + { + log_amx("Plugin not found! (AddMenuItem_call failed)"); + } + } + if (failed) + { + return; + } + // Item text + callfunc_push_str(MENU_TEXT); + // Cmd + callfunc_push_str(MENU_CMD); + // Access + callfunc_push_int(MENU_ACCESS); + // Menu exists in this plugin + callfunc_push_str(MENU_PLUGIN); + + callfunc_end(); +} + +/** + * Computes an offset from a given value while constraining it between the + * specified bounds, rolling over if necessary. + * + * @note Example: The range is 1-5 and the base value (seed) is 3, the offset + * that the value should be moved by is also 3. Offsetting the value by 3 + * would result in 6, but it is to be constrained between 1 and 5. With + * clamp() this would result in 5, but this function rolls the value over + * and returns 1 instead. + * + * @param low Lower bound + * @param high Higher bound + * @param seed Base value + * @param offset Offset to move + * + * @return Computed offset value between specified bounds + */ +stock constraint_offset(low, high, seed, offset) +{ + new numElements = high - low + 1; + offset += seed - low; + + if (offset >= 0) + { + return low + (offset % numElements); + } + else + { + return high - (abs(offset) % numElements) + 1; + } + + return 0; // Makes the compiler happy -_- +} + +/** + * Returns if the client has any of the specified admin flags. + * + * @param id Client index + * @param flags Flag string + * + * @return 1 if the user has any of the specified flags, 0 otherwise + */ +stock has_flag(id, const flags[]) +{ + return (get_user_flags(id) & read_flags(flags)); +} + +/** + * Returns if the client has all of the specified admin flags. + * + * @param id Client index + * @param flags Flag string + * + * @return 1 if the user has all of the specified flags, 0 otherwise + */ +stock has_all_flags(id, const flags[]) +{ + new FlagsNumber = read_flags(flags); + return ((get_user_flags(id) & FlagsNumber) == FlagsNumber); +} + +/** + * Resets the client's menu. + * + * @note This is a wrapper around show_menu() for the sake of readability. + * + * @param index Client to reset menu of, 0 to reset all clients + * + * @noreturn + */ +stock reset_menu(index) +{ + show_menu(index, 0, "", 0); +} + +/** + * Calls a function after a specified time has elapsed. + * + * @param time Time interval to assign + * @param function Function to execute + * @param id Task id to assign + * @param parameter Data to pass through to callback + * @param len Size of data + * @param flags Optional flags (enum SetTaskFlags); valid flags are: + * SetTask_Once - Execute callback once (Default) + * SetTask_RepeatTimes - repeat timer a set amount of times + * SetTask_Repeat - loop indefinitely until timer is stopped + * SetTask_AfterMapStart - time interval is treated as absolute + * time after map start + * SetTask_BeforeMapChange - time interval is treated as absolute + * time before map change + * @param repeat If the SetTask_RepeatTimes flag is set, the task will be repeated this + * many times + * + * @noreturn + * @error If an invalid callback function is provided, an error is + * thrown. + */ +stock set_task_ex(Float:time, const function[], id = 0, const any:parameter[] = "", len = 0, SetTaskFlags:flags = SetTask_Once, repeat = 0) +{ + new strFlags[2]; // There should never be a need to set more than 1 flag + get_flags(_:flags, strFlags, charsmax(strFlags)); + set_task(time, function, id, parameter, len, strFlags, repeat); +} + +/** + * Stores a filtered list of client indexes to an array. + * + * @note Example retrieving all alive CTs: + * get_players_ex(players, num, GetPlayers_ExcludeDead | GetPlayers_MatchTeam, "CT") + * + * @param players Array to store indexes to + * @param num Variable to store number of indexes to + * @param flags Optional filtering flags (enum GetPlayersFlags); valid flags are: + * GetPlayers_None - No filter (Default) + * GetPlayers_ExcludeDead - do not include dead clients + * GetPlayers_ExcludeAlive - do not include alive clients + * GetPlayers_ExcludeBots - do not include bots + * GetPlayers_ExcludeHuman - do not include human clients + * GetPlayers_MatchTeam - match with team + * GetPlayers_MatchNameSubstring - match with part of name + * GetPlayers_CaseInsensitive - match case insensitive + * GetPlayers_ExcludeHLTV - do not include HLTV proxies + * GetPlayers_IncludeConnecting - include connecting clients + * @param team String to match against if the "e" or "f" flag is specified + * + * @noreturn + */ +stock get_players_ex(players[MAX_PLAYERS] = {}, &num, GetPlayersFlags:flags = GetPlayers_None, const team[] = "") +{ + new strFlags[10]; + get_flags(_:flags, strFlags, charsmax(strFlags)); + get_players(players, num, strFlags, team); +} + +/** + * Returns the number of clients on the server that match the specified flags. + * + * @note Example retrieving all alive CTs: + * new AliveCt = get_playersnum_ex(GetPlayers_ExcludeDead | GetPlayers_MatchTeam, "CT") + * + * @param flags Optional filtering flags (enum GetPlayersFlags); valid flags are: + * GetPlayers_None - No filter (Default) + * GetPlayers_ExcludeDead - do not include dead clients + * GetPlayers_ExcludeAlive - do not include alive clients + * GetPlayers_ExcludeBots - do not include bots + * GetPlayers_ExcludeHuman - do not include human clients + * GetPlayers_MatchTeam - match with team + * GetPlayers_MatchNameSubstring - match with part of name + * GetPlayers_CaseInsensitive - match case insensitive + * GetPlayers_ExcludeHLTV - do not include HLTV proxies + * GetPlayers_IncludeConnecting - include connecting clients + * @param team String to match against if the GetPlayers_MatchTeam or GetPlayers_MatchNameSubstring flag is specified + * + * @return Number of clients on the server that match the specified flags + */ +stock get_playersnum_ex(GetPlayersFlags:flags = GetPlayers_None, const team[] = "") +{ + new PlayersNum; + get_players_ex(_, PlayersNum, flags, team); + return PlayersNum; +} diff --git a/bin/amxxdump/includes/amxmodx/amxmodx.inc b/bin/amxxdump/includes/amxmodx/amxmodx.inc new file mode 100644 index 0000000..551eac8 --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/amxmodx.inc @@ -0,0 +1,3422 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +#if defined _amxmodx_included + #endinput +#endif +#define _amxmodx_included + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/** + * Called just after server activation. + * + * @note Good place to initialize most of the plugin, such as registering + * cvars, commands or forwards, creating data structures for later use, or + * generating and loading other required configurations. + * + * @noreturn + */ +forward plugin_init(); + +/** + * Called just before the plugin is paused from execution. + * + * @noreturn + */ +forward plugin_pause(); + +/** + * Called just after the plugin is unpaused. + * + * @noreturn + */ +forward plugin_unpause(); + +/** + * Called when the mod tries to change the map. + * + * @note This is *only* called if the mod itself handles the map change. The + * server command "changelevel", which is used by many plugins, will not + * trigger this forward. Unfortunately, this means that in practice this + * forward can be unreliable and will not be called in many situations. + * @note AMXX 1.8.3 has added the engine_changelevel() function, which will utilize + * the correct engine function to change the map, and therefore trigger + * this forward. + * + * @param map Map that the mod tries to change to + * + * @return PLUGIN_CONTINUE to let the mod change the map + * PLUGIN_HANDLED or higher to prevent the map change + */ +forward server_changelevel(map[]); + +/** + * Called when all plugins went through plugin_init() + * + * @note When this forward is called, most plugins should have registered their + * cvars and commands already. + * + * @noreturn + */ +forward plugin_cfg(); + +/** + * Called just before server deactivation and subsequent unloading of the + * plugin. + * + * @note The plugin is required to manually free Handles it has acquired, such + * as those from dynamic data structures. Failing to do that will result + * in the plugin and AMXX leaking memory. + * + * @noreturn + */ +forward plugin_end(); + +/** + * Called when a message is about to be logged. + * + * @note Message data and information can be retrieved using the read_log* set + * of functions. + * + * @return PLUGIN_CONTINUE to let the log message through + * PLUGIN_HANDLED or higher to stop the log message + */ +forward plugin_log(); + +/** + * This forward allows plugins to add models, sounds and generic files to the + * precache tables using the precache_* set of functions. + * + * @note Adding files to the precaching tables will trigger the client to + * download them to its local filesystem. + * @note There is a hard upper limit of entries in the precaching tables for + * every game, this limit is 512 in most cases. The entries will be filled + * and indexed incrementally. Going over this limit will crash the server. + * + * @noreturn + */ +forward plugin_precache(); + +/** + * Called when a clients info has changed. + * + * @param id Client index + * + * @noreturn + */ +forward client_infochanged(id); + +/** + * Called when a client is connecting. + * + * @note This forward is called too early to do anything that directly affects + * the client. + * + * @param id Client index + * + * @noreturn + */ +forward client_connect(id); + +/** + * Called when a client is connecting. + * + * @note This forward is called too early to do anything that directly affects + * the client. + * + * @param id Client index + * @param name Client name + * @param ip Client ip address with port + * @param reason A reason that will be displayed when player gets rejected (can be overwritten) + * + * @return PLUGIN_CONTINUE to let a client join to the server + * PLUGIN_HANDLED or higher to prevent a client to join + */ +forward client_connectex(id, const name[], const ip[], reason[128]); + +/** + * Called when the client gets a valid SteamID. + * + * @note This may occur before or after client_putinserver has been called. + * @note This is called for bots, and the SteamID will be "BOT". + * + * @param id Client index + * @param authid Client auth + * + * @noreturn + */ +forward client_authorized(id, const authid[]); + +/** + * @deprecated This function does not catch all cases. + */ +#pragma deprecated Use client_disconnected() instead. +forward client_disconnect(id); + +/** + * Called when a client is disconnected from the server. + * + * @note This will be called in some additional cases that client_disconnect doesn't cover, + * most notably when a client aborts the connection process. It is guaranteed to pair + * with the client_connect() forward. + * @note When this fires the player entity is still valid (e.g. is_user_connected(id) will + * return true), but no networked commands will reach the client. + * + * @param id Client index + * @param drop If true, the game has explicitly dropped the client + * @param message If drop is true, a writable buffer containing the disconnect info message + * @param maxlen Maximum size of buffer + * + * @noreturn + */ +forward client_disconnected(id, bool:drop, message[], maxlen); + +/** + * Called when a client entity has been removed from the server. + * + * @note This fires after the client_disconnected() forward, when the player entity has been + * removed (e.g. is_user_connected(id) will return false). + * + * @param id Client index + * @param drop If true, the game has explicitly dropped the client + * @param message If drop is true, contains the disconnect info message + * + * @noreturn + */ +forward client_remove(id, bool:drop, const message[]); + + +/** + * Called when a client attempts to execute a command. + * + * @note The command and its arguments can be read using the read_arg* set of + * functions. + * + * @param id Client index + * + * @return PLUGIN_CONTINUE to let the client execute the command + * PLUGIN_HANDLED or higher to stop the command + */ +forward client_command(id); + +/** + * Called when a client is entering the game. + * + * @note It is not defined whether the client already has a SteamID when this + * forward is called. client_authorized may occur either before or after + * this. + * + * @param id Client index + * + * @noreturn + */ +forward client_putinserver(id); + +/** + * Sets informations about the calling plugin. + * + * @param plugin_name Name of the plugin + * @param version Version of the plugin + * @param author Author of the plugin + * + * @return Plugin id of the calling plugin + */ +native register_plugin(const plugin_name[], const version[], const author[]); + +/** + * Precaches a model file. + * + * @note Can only be used inside of the plugin_precache() forward. + * + * @param name Path to the model file + * + * @return Unique cache id of the model + * @error If called outside of the plugin_precache() forward, an error is + * thrown. + */ +native precache_model(const name[]); + +/** + * Precaches a sound file. + * + * @note Can only be used inside of the plugin_precache() forward. + * @note The filepath is always relative to the "sound" folder, and the file has + * to be a wav file. Precaching a file with this will add it to the engine + * sound table, making it available for usage in emit_sound() for example. + * @note Precaching other filetypes (such as mp3 music), optionally in different + * locations, has to be done with precache_generic() + * + * @param name Path to the sound file + * + * @return Unique cache id of the sound + * @error If called outside of the plugin_precache() forward, an error is + * thrown. + */ +native precache_sound(const name[]); + +/** + * Precaches a generic file. + * + * @note Can only be used inside of the plugin_precache() forward. + * @note Precaching sounds with this will not add them to the engine sound table. + * + * @param szFile Path to the file + * + * @return Unique cache id of the file + * @error If called outside of the plugin_precache() forward, an error + * is thrown. + */ +native precache_generic(const szFile[]); + +/** + * Precaches an event file. + * + * @note The event type should always be 1. + * @note Contrary to the other precache_* natives, this can be used outside of + * the plugin_precache() forward, e.g. in plugin_init() or plugin_cfg(). + * A bug in some clients makes this necessary, as plugin_precache() is + * called before the mod has precached its own, default event files. This + * can cause the event table to be misaligned on the client, leading to + * visual and audio bugs that are hard to diagnose. + * + * @param type Event type + * @param Name Formatting rules, path to the event file + * @param ... Variable number of formatting parameters + * + * @return Unique cache id of the event + */ +native precache_event(type, const Name[], any:...); + +/** + * Changes the map. + * + * @note This calls the pfnChangelLevel engine function. + * @note This has the same behavior as using the "changelevel" server command, + * but will also trigger the server_changelevel() forward in AMXX + * plugins. It will also notify any Metamod plugins that are hooking + * the pfnChangeLevel function. + * + * @param map Map name to change to + * + * @noreturn + */ +native engine_changelevel(const map[]); + +/** + * Sets info on the client. + * + * @param index Client index + * @param info Info key + * @param value New value + * + * @noreturn + * @error If the index is not within the range of 1 to MaxClients or + * the client is not connected, an error will be thrown. + */ +native set_user_info(index, const info[], const value[]); + +/** + * Gets info from the client. + * + * @param index Client index + * @param info Info key + * @param output Buffer to copy value to + * @param len Maximum size of the buffer + * + * @return Number of cells written to buffer + * @error If the index is not within the range of 1 to MaxClients or + * the client is not connected, an error will be thrown. + */ +native get_user_info(index, const info[], output[], len); + +/** + * Sets info on the server. + * + * @param info Info key + * @param value New value + * + * @noreturn + */ +native set_localinfo(const info[], const value[]); + +/** + * Gets info from the server. + * + * @param info Info key + * @param output Buffer to copy value to + * @param len Maximum size of the buffer + * + * @return Number of cells written to buffer + */ +native get_localinfo(const info[], output[], len); + +/** + * Shows text or a file in MOTD window. + * + * @param player Client index, use 0 to display to all clients + * @param message Message to display inside the MOTD window, if this is a + * filename the contents of this file will be displayed + * @param header Text for the MOTD header, if empty the servers hostname will + * be displayed instead + * + * @noreturn + */ +native show_motd(player, const message[], const header[] = ""); + +/** + * Sends a message to the client. + * + * @note This functions return value behaves differently depending on what is + * used as the client index: If 0 is specified, then the function will + * return 0 if nothing has been sent (no client connected). If either a + * single client is specified or there is at least one client connected, + * the number of printed characters will refer to the message that is sent + * last, to the client with the highest index. + * + * @param index Client index, use 0 to display to all clients + * @param type Message type, see print_* destination constants in + * amxconst.inc + * @param message Formatting rules + * @param ... Variable number of formatting parameters + * + * @return Number of printed characters + * @error If a single client is specified and the index is not within + * the range of 1 to MaxClients, an error will be thrown. + */ +native client_print(index, type, const message[], any:...); + +/** + * Sends colored chat messages to clients. + * + * @note This only works in Counter-Strike 1.6 and Condition Zero. + * @note The colors can be modified inside of the format string using special + * characters. These characters can be included using the escape character + * green x04 ; use location color from this point forward + * red/blue/grey x03 ; use team color from this point forward + * red/blue/grey x02 ; use team color to the end of the client name + * ; This only works at the start of the string, + * ; and precludes using other control characters + * default x01 ; use default color from this point forward + * @note The team color is defined by the sender's index. Alternatively, a + * specific team color can be enforced using the print_team_* constants in + * amxconst.inc + * @note Usage examples: + * client_print_color(id, print_team_red, "^4Green ^3Red ^1Default") + * client_print_color(id, id2, "^4Green ^3id2's team color, ^1Default") + * @note Including colors in ML can be done using the same escaping method: + * EXAMPLE_ML_KEY = ^4Green ^3Team color ^1Default + * @note This functions return value behaves differently depending on what is + * used as the client index: If 0 is specified, then the function will + * return 0 if nothing has been sent (no client connected). If either a + * single client is specified, or there is at least one client connected, + * the number of printed characters will refer to the message that is sent + * last, to the client with the highest index. + * + * @param index Client index, use 0 to display to all clients + * @param sender Client index used as the message sender + * @param fmt Formatting rules + * @param ... Variable number of formatting parameters + * + * @return Number of printed characters + * @error If a single client is specified and the index is not within + * the range of 1 to MaxClients, an error will be thrown. + */ +native client_print_color(index, sender, const message[], any:...); + +/** + * Sends a message to the client via the engine. + * + * @note This functions return value behaves differently depending on what is + * used as the client index: If 0 is specified, then the function will + * return 0 if nothing has been sent (no client connected). If either a + * single client is specified, or there is at least one client connected, + * the number of printed characters will refer to the message that is sent + * last, to the client with the highest index. + * + * @param player Client index, use 0 to display to all clients + * @param type Message type, see engprint_* destination constants in + * amxconst.inc + * @param message Formatting rules + * @param ... Variable number of formatting parameters + * + * @return Number of printed characters + * @error If a single client is specified and the index is not within + * the range of 1 to MaxClients, an error will be thrown. + */ +native engclient_print(player, type, const message[], any:...); + +/** + * Sends a message to the console of a client or the server. + * + * @param index Client index, or 0 to print to the server console + * @param message Formatting rules + * @param ... Variable number of formatting parameters + * + * @return Number of printed characters + * @error If a single client is specified and the index is not within + * the range of 1 to MaxClients, an error will be thrown. + */ +native console_print(id, const message[], any:...); + +/** + * Executes a command from the specified client or the server console. + * + * @param id Client index, or 0 to execute from the server console + * @param cmd Formatting rules + * @param ... Variable number of formatting parameters + * + * @return Length of the formatted command + */ +native console_cmd(id, const cmd[], any:...); + +/** + * Registers a function to be called on a given game event. + * + * @note Please consider using register_event_ex() instead which allows you to + * use named constants for flags instead of letters. + * @note Examples for event conditions: + * "2=c4" - Second parameter of message must be the string "c4" + * "3>10" - Third parameter of message must be greater than 10 + * "3!4" - Third parameter of message must not be equal to 4 + * "2&Buy" - Second parameter of message must contain "Buy" substring + * "2!Buy" - Second parameter of message must not equal "Buy" + * @note Due to a long-standing bug that would break compatibility with older + * plugins, the client id should be checked for alive/dead state if using + * flags "d" or "e". + * @note If multiple conditions are specified for a single parameter, only one + * of them has to hold true for the event function to be called. + * + * @param event Name of event that should be hooked + * @param function Name of callback function + * @param flags Flags used for filtering events, the valid flags are: + * "a" - Global event (sent to every client) + * "b" - Event sent to single client + * "c" - Call only once when repeated to multiple clients + * "d" - Call only if sent to dead client + * "e" - Call only if sent to alive client + * "f" - Call only if sent to human client ("b" flag required) + * "g" - Call only if sent to bot ("b" flag required) + * @param cond Condition string used for filtering events, built as: + * "" + * Argument number is the argument position to be filtered + * The comparison operator may be: + * - "=" for equality comparison (all argument types) + * - "!" for inequality comparison (all argument types) + * - "&" for bitwise and (int argument) or substring + * comparison (string argument) + * - "<" for less than comparison (int/float arguments) + * - ">" for greater than comparison (int/float arguments) + * The argument is compared to the specified value accordingly + * @param ... Any number of additional conditions + * + * @return Event handle + * @error If an invalid event name or callback function is provided, + * an error will be thrown. + */ +native register_event(const event[], const function[], const flags[], const cond[] = "", ...); + +/** + * Registers a function to be called on a given game event. + * + * @note Examples for event conditions: + * "2=c4" - Second parameter of message must be the string "c4" + * "3>10" - Third parameter of message must be greater than 10 + * "3!4" - Third parameter of message must not be equal to 4 + * "2&Buy" - Second parameter of message must contain "Buy" substring + * "2!Buy" - Second parameter of message must not equal "Buy" + * @note Due to a long-standing bug that would break compatibility with older + * plugins, the client id should be checked for alive/dead state if using + * flags "d" or "e". + * @note If multiple conditions are specified for a single parameter, only one + * of them has to hold true for the event function to be called. + * + * @param event Name of event that should be hooked + * @param function Name of callback function + * @param flags Flags used for filtering events (enum RegisterEventFlags); the valid flags are: + * RegisterEvent_Global - Global event (sent to every client) + * RegisterEvent_Single - Event sent to single client + * RegisterEvent_OnceForMultiple - Call only once when repeated to multiple clients + * RegisterEvent_OnlyDead - Call only if sent to dead client + * RegisterEvent_OnlyAlive - Call only if sent to alive client + * RegisterEvent_OnlyHuman - Call only if sent to human client (RegisterEvent_Single required) + * RegisterEvent_OnlyBots - Call only if sent to bot (RegisterEvent_Single required) + * @param cond Condition string used for filtering events, built as: + * "" + * Argument number is the argument position to be filtered + * The comparison operator may be: + * "=" for equality comparison (all argument types) + * "!" for inequality comparison (all argument types) + * "&" for bitwise and (int argument) or substring + * comparison (string argument) + * "<" for less than comparison (int/float arguments) + * ">" for greater than comparison (int/float arguments) + * The argument is compared to the specified value accordingly + * @param ... Any number of additional conditions + * + * @return Event handle + * @error If an invalid event name or callback function is provided, + * an error will be thrown. + */ +native register_event_ex(const event[], const function[], RegisterEventFlags:flags, const cond[] = "", ...); + +/** + * Enables a function hook of a game event which has been previously registered with register_event_ex(). + * + * @param handle Value returned from register_event() or register_event_ex() + * + * @noreturn + * @error If an invalid handle is provided, an error will be thrown. + */ +native enable_event(handle); + +/** + * Disables a function hook of a game event which has been previously registered with register_event_ex(). + * + * @param handle Value returned from register_event() or register_event_ex() + * + * @noreturn + * @error If an invalid handle is provided, an error will be thrown. + */ +native disable_event(handle); + +/** + * Registers a function to be called on a given log event. + * + * @note Examples for log conditions: + * "0 = World triggered" "1 = Game_Commencing" + * "1 = say" + * "3 = Terrorists_Win" + * "1 = entered the game" + * "0 = Server cvar" + * + * @param function Name of callback function + * @param argsnum Number of arguments of the log event + * @param ... Any number of conditions used for filtering events + * A condition string is built as: + * "" + * Argument number is the argument position to be filtered + * The comparison operator may be: + * - "=" for equality comparison + * - "&" for substring comparison + * The argument is compared to the specified string accordingly + * + * @return Log event handle + * @error If an invalid callback function is provided, an error will + * be thrown. + */ +native register_logevent(const function[], argsnum, ...); + +/** + * Enables a function hook of a game log event which has been previously registered with register_logevent(). + * + * @param handle Value returned from register_logevent() + * + * @noreturn + * @error If an invalid handle is provided, an error will be thrown. + */ +native enable_logevent(handle); + +/** + * Disables a function hook of a game log event which has been previously registered with register_logevent(). + * + * @param handle Value returned from register_logevent() + * + * @noreturn + * @error If an invalid handle is provided, an error will be thrown. + */ +native disable_logevent(handle); + +/** + * Sets display parameters for hudmessages. + * + * @note As of AMXX 1.61, setting the channel to -1 will automatically choose + * the next available HUD channel for the client. + * @note There are four different HUD channels available on the client (1-4). + * Sending a hudmessage to a channel will overwrite any existing messages + * already displaying on that channel. + * @note If you plan to create a permanent message, don't forget to specify a + * specific channel to avoid possible flickering due to auto-channeling. + * @note For the hudmessage coordinates x and y, -1.0 will center the message + * on the respective axis. + * @note These parameters stay until the next call to set_hudmessage overwrites + * them. Multiple calls to show_hudmessage will therefore re-use the same + * parameters. The parameters are not stored per-plugin, so other plugins + * can overwrite them. + * + * @param red Red component of hudmessage color + * @param green Green component of hudmessage color + * @param blue Blue component of hudmessage color + * @param x Location of the message on the x axis in percent + * @param y Location of the message on the y axis in percent + * @param effects Display effect + * @param fxtime Duration of the effect + * @param holdtime Time the message stays on screen + * @param fadeintime Time it takes the message to fully appear (fade-in) + * @param fadeouttime Time it takes the message to fully disappear (fade-out) + * @param channel Channel to use on the client + * @param alpha1 Alpha component of hudmessage color + * @param color2[4] Color 2 array {r,g,b,a} + * + * @noreturn + */ +native set_hudmessage(red = 200, green = 100, blue = 0, Float:x = -1.0, Float:y = 0.35, effects = 0, Float:fxtime = 6.0, Float:holdtime = 12.0, Float:fadeintime = 0.1, Float:fadeouttime = 0.2, channel = -1, alpha1 = 0, color2[4] = {255, 255, 250, 0}); + +/** + * Displays a message on the client HUD. + * + * @note Use set_hudmessage to define how the message should look on screen. + * @note This functions return value behaves differently depending on what is + * used as the client index: If 0 is specified, then the function will + * return 0 if nothing has been sent (no client connected). If either a + * single client is specified, or there is at least one client connected, + * the number of printed characters will refer to the message that is sent + * last, to the client with the highest index. + * + * @param index Client index, use 0 to display to all clients + * @param message Formatting rules + * @param ... Variable number of formatting parameters + * + * @return Number of printed characters + * @error If a single client is specified and the index is not within + * the range of 1 to MaxClients, an error will be thrown. + */ +native show_hudmessage(index, const message[], any:...); + +/** + * Sets display parameters for director hudmessages. + * + * @note For the hudmessage coordinates x and y, -1.0 will center the message + * on the respective axis. + * @note These parameters stay until the next call to set_dhudmessage overwrites + * them. Multiple calls to show_dhudmessage will therefore re-use the same + * parameters. The parameters are not stored per-plugin, so other plugins + * can overwrite them. + * + * @param red Red component of hudmessage color + * @param green Green component of hudmessage color + * @param blue Blue component of hudmessage color + * @param x Location of the message on the x axis in percent + * @param y Location of the message on the y axis in percent + * @param effects Display effect + * @param fxtime Duration of the effect + * @param holdtime Time the message stays on screen + * @param fadeintime Time it takes the message to fully appear (fade-in) + * @param fadeouttime Time it takes the message to fully disappear (fade-out) + * + * @noreturn + */ +native set_dhudmessage(red = 200, green = 100, blue = 0, Float:x = -1.0, Float:y = 0.35, effects = 0, Float:fxtime = 6.0, Float:holdtime = 12.0, Float:fadeintime = 0.1, Float:fadeouttime = 0.2); + +/** + * Displays a director message on the client HUD. + * + * @note Use set_dhudmessage to define how the message should look on screen. + * @note Unlike the classic HUD message, which is channel-based, director + * messages are stack-based. You can have up to 8 messages displaying at + * once. If more are added, they will be overwritten in the order they were + * sent. There is no way to clear a specific message. + * @note The message has a maximum length of 128 characters which this function + * will automatically enforce. + * @note This functions return value behaves differently depending on what is + * used as the client index: If 0 is specified, then the function will + * return 0 if nothing has been sent (no client connected). If either a + * single client is specified, or there is at least one client connected, + * the number of printed characters will refer to the message that is sent + * last, to the client with the highest index. + * + * @param index Client index, use 0 to display to all clients + * @param message Formatting rules + * @param ... Variable number of formatting parameters + * + * @return Number of printed characters + * @error If a single client is specified and the index is not within + * the range of 1 to MaxClients, an error will be thrown. + */ +native show_dhudmessage(index, const message[], any:...); + +/** + * Displays a menu to the client. + * + * @note Keys is a bitflag value that represents which keys the user can press + * on the menu. If you want to display disabled menu options, or skip + * certain number slots, you should exclude that key from the bitflag. + * amxconst.inc provides MENU_KEY_* constants for convenience. + * @note The title parameter is not displayed to the client and is only used for + * identifying menus internally and assigning them to their callbacks. + * The title corresponds to the menu name that you register with + * register_menuid() + * + * @param index Client to display menu to, use 0 to display to all clients + * @param keys Enabled keys + * @param menu Menu body + * @param time Menu timeout in seconds, -1 to disable + * @param title Name of the menu for internal tracking purposes + * + * @return 1 on success, 0 if menu could not be displayed (client not + * connected) + * @error If a single client is specified and the index is not within + * the range of 1 to MaxClients, an error will be thrown. + */ +native show_menu(index, keys, const menu[], time = -1, const title[] = ""); + +/** + * Retrieves values from a client message. + * + * @note For use within callbacks registered with register_event_ex() + * @note Usage examples: + * value = read_data(1); + * read_data(2, floatvalue); + * written = read_data(3, buffer, buffersize); + * + * @param value Argument number to retrieve value from + * @param ... Changes the native's behavior depending on how many + * additional parameters are provided: + * 0 - Return the argument integer value directly + * 1 - Store the argument float value in the variable passed + * as the second parameter + * 2 - Copy the argument string value to the buffer provided + * in the second parameter, using the third as the + * maximum buffer size + * + * @return Changes depending on how many additional parameters are + * provided: + * 0 - Returns the argument integer value + * 1 - Returns the argument float value, converted + * (truncated) to an integer + * 2 - Returns the number of cells written to the buffer + */ +native read_data(value, any:...); + +/** + * Returns the number of values in the client message. + * + * @note For use within callbacks registered with register_event_ex() + * + * @return Number of values in client message + */ +native read_datanum(); + +/** + * Returns the message id of the client message. + * + * @note For use within callbacks registered with register_event_ex() + * + * @return Message id of the client message + */ +native read_datatype(); + +/** + * Retrieves current log message. + * + * @note Should only be used inside of the plugin_log() forward. + * + * @param output Buffer to copy log message to + * @param len Maximum buffer size + * + * @return Number of cells written to buffer + */ +native read_logdata(output[], len); + +/** + * Returns number of log message arguments. + * + * @note Should only be used inside of the plugin_log() forward. + * + * @return Number of arguments in the log message + */ +native read_logargc(); + +/** + * Retrieves argument of log message. + * + * @note Should only be used inside of the plugin_log() forward. + * + * @param id Argument index, starting from 0 + * @param output Buffer to copy log argument to + * @param len Maximum buffer size + * + * @return Number of cells written to buffer + */ +native read_logargv(id, output[], len); + +/** + * Parse log data about client. + * + * @note When client actions are logged, they appear in the the format + * "Name<#userid>", this native extracts the individual + * pieces of information. + * + * @param text String to process + * @param name Buffer to copy client name to + * @param nlen Maximum name buffer size + * @param userid Variable to store userid in + * @param authid Buffer to copy client authid to + * @param alen Maximum auth buffer size + * @param team Buffer to copy client team to + * @param tlen Maximum team buffer size + * + * @noreturn + * @error If the provided string is not valid client log data, an + * error will be thrown. + */ +native parse_loguser(const text[], name[], nlen, &userid =-2, authid[] = "", alen = 0, team[] = "", tlen = 0); + +/** + * Sends a message to the console of the server. + * + * @param message Formatting rules + * @param ... Variable number of formatting parameters + * + * @return Number of printed characters + */ +native server_print(const message[], any:...); + +/** + * Returns if the given mapname is deemed valid by the engine. + * + * @param mapname Name of the map + * + * @return 1 if the map name is valid, 0 otherwise + */ +native is_map_valid(const mapname[]); + +/** + * Returns if the client is a bot. + * + * @param index Client index + * + * @return 1 if client is a bot, 0 otherwise + */ +native is_user_bot(index); + +/** + * Returns if the client is a HLTV proxy. + * + * @param index Client index + * + * @return 1 if client is a HLTV proxy, 0 otherwise + */ +native is_user_hltv(index); + +/** + * Returns if the client is connected. + * + * @note This does not throw an error if the provided index is out of the + * 1 to MaxClients range. That means you can safely use this native + * without manually verifying that the index is a valid client index. + * + * @param index Client index + * + * @return 1 if client is connected, 0 otherwise + */ +native is_user_connected(index); + +/** + * Returns if the client is connecting. + * + * @param index Client index + * + * @return 1 if client is connecting, 0 otherwise + */ +native is_user_connecting(index); + +/** + * Returns if the client is alive. + * + * @note This will never return true if a client is not connected. If you need + * to know whether a client is alive, an additional call to + * is_user_connected() is unnecessary. + * + * @param index Client index + * + * @return 1 if client is alive, 0 otherwise + */ +native is_user_alive(index); + +/** + * Returns if the server is a dedicated server. + * + * @return 1 if server is a dedicated server, 0 otherwise + */ +native is_dedicated_server(); + +/** + * Returns if the server is running on Linux. + * + * @return 1 if server is running on Linux, 0 otherwise + */ +native is_linux_server(); + +/** + * Returns if the AMXX installation has the JIT enabled. + * + * @return 1 if JIT is enabled, 0 otherwise + */ +native is_jit_enabled(); + +/** + * Retrieves the version string of the AMXX installation. + * + * @param buffer Buffer to copy version to + * @param length Maximum buffer size + * + * @return Number of cells written to the buffer + */ +native get_amxx_verstring(buffer[], length); + +/** + * Returns the last known attacker of a client. + * + * @note As of AMXX 1.75 this can return a non-client entity index if the client + * was attacked by a non-client entity. + * + * @param index Client index + * @param ... If provided, the attacker weapon will be stored in an + * optional second parameter, and the body hit place will be + * stored in an optional third parameter + * + * @return Attacker client index, a non-client entity or 0 if no + * attacker was found + * @error If the client index is not within the range of 1 to + * MaxClients, an error will be thrown. + */ +native get_user_attacker(index, ...); + +/** + * Traces the client's current aim vector to see if it hits something. + * + * @note If the trace does not hit a client, id and body will be set to 0. + * @note If the trace hits nothing within the specified distance, 0 is returned. + * @note For a list of possible body hitplaces see the HIT_* constants in amxconst.inc. + * + * @param index Client index to trace aim from + * @param id Variable to store hit client index (if applicable) + * @param body Variable to store hit client body part (if applicable) + * @param dist Maximum distance of the trace + * + * @return Distance between the trace start and end point + * @error If the client index is not within the range of 1 to + * MaxClients, an error will be thrown. + */ +native Float:get_user_aiming(index, &id, &body = HIT_GENERIC, dist = 9999); + +/** + * Returns the client's frags. + * + * @note While this is mod-independent, the mod may track frag count differently, + * so it can only be retrieved using another native or other methods. + * @note This will actually return the client's overall score, which may or may + * not be equal to their scored frags depending on the mod. + * + * @param index Client index + * + * @return Frags/Score of the client. Also returns 0 if the client is + * not connected or the index is not within the range of + * 1 to MaxClients + */ +native get_user_frags(index); + +/** + * Returns the client's armor value. + * + * @note While this is mod-independent, the mod may track armor data differently, + * so it can only be retrieved using another native or other methods. + * + * @param index Client index + * + * @return Amount of armor the client has. Also returns 0 if the client + * is not connected or the index is not within the range of + * 1 to MaxClients + */ +native get_user_armor(index); + +/** + * Returns the client's death count. + * + * @note While this is mod-independent, the mod may track death count differently, + * so it can only be retrieved using another native or other methods. + * + * @param index Client index + * + * @return Amount of deaths the client has. Also returns 0 if the + * client is not connected or the index is not within the range + * of 1 to MaxClients + */ +native get_user_deaths(index); + +/** + * Returns the client's health points. + * + * @note While this is mod-independent, the mod may track health points + * differently, so it can only be retrieved using another native or other + * methods. + * + * @param index Client index + * + * @return Amount of health points the client has. Also returns 0 if + * the client is not connected or the index is not within the + * range of 1 to MaxClients + */ +native get_user_health(index); + +/** + * Retrieves a client's index by name. + * + * @param name Name to search for + * + * @return Client index on success, 0 otherwise + */ +native get_user_index(const name[]); + +/** + * Retrieves the IP of a client or the server. + * + * @param index Client index, use 0 to retrieve the server IP + * @param ip Buffer to copy IP to + * @param len Maximum buffer size + * @param without_port Remove the port from the IP if nonzero + * + * @return Number of cells written to the buffer + */ +native get_user_ip(index, ip[], len, without_port = 0); + +/** + * Returns if the client has the specified weapon in their inventory. + * + * @param index Client index + * @param weapon Weapon index + * @param setweapon If zero the weapon bit will be removed from the client's + * inventory, if 1 it will be set + * + * @return 1 if the weapon is present, 0 if it is not + * @error If the client index is not within the range of 1 to + * MaxClients, an error will be thrown. + */ +native user_has_weapon(index, weapon, setweapon = -1); + +/** + * Returns weapon index of the currently carried weapon. Also allows retrieval + * of ammo in the clip and backpack. + * + * @param index Client index + * @param clip Optional variable to store clip ammo to + * @param ammo Optional variable to store backpack ammo to + * + * @return Weapon index on success or 0 if the client is not connected + * @error If the client index is not within the range of 1 to + * MaxClients, an error will be thrown. + */ +native get_user_weapon(index, &clip = 0, &ammo = 0); + +/** + * Retrieves ammo in the clip and backpack of the specified weapon. + * + * @param index Client index + * @param weapon Weapon index + * @param clip Variable to store clip ammo to + * @param ammo Variable to store backpack ammo to + * + * @return 1 on success or 0 if the client is not connected + * @error If the client index is not within the range of 1 to + * MaxClients or the weapon index is invalid, an error will + * be thrown. + */ +native get_user_ammo(index, weapon, &clip, &ammo); + +/** + * Converts an integer to a text string. + * + * @note The conversion algorithm is limited to a certain range of numbers, but + * is guaranteed to work correctly for all numbers from 0 to 999. Outside + * of that range, the conversion will result in an incorrect string, but + * will not fail. + * @note The conversion is to english text, there is no way to change this. + * + * @param num Integer to convert + * @param output Buffer to copy string to + * @param len Maximum buffer size + * + * @return Number of cells written to buffer + */ +native num_to_word(num, output[], len); + +/** + * Returns the team id of the client, and optionally retrieves the name of + * the team. + * + * @param index Client index + * @param team Buffer to copy team name to + * @param len Maximum size of buffer + * + * @return Team index on success, -1 if client index is invalid or + * the client is not connected + */ +native get_user_team(index, team[] = "", len = 0); + +/** + * Returns client's playing time in seconds. + * + * @param index Client index + * @param flag If nonzero, the result will not include the time it took + * the client to connect. + * + * @return Connection time in seconds, 0 if client index is invalid or + * client is not connected + */ +native get_user_time(index, flag = 0); + +/** + * Retrieves the ping and loss of a client. + * + * @param index Client index + * @param ping Variable to store ping in + * @param loss Variable to store loss in + * + * @return 1 on success, 0 if client index is invalid or the client + * is not connected + */ +native get_user_ping(index, &ping, &loss); + +/** + * Retrieves an origin related to the client. + * + * @note For a list of possible modes see the Origin_* constants in amxconst.inc. + * + * @param index Client index + * @param origin Array to store origin in + * @param mode What type of origin to retrieve: + * Origin_Client - current position + * Origin_Eyes - position of eyes (and weapon) + * Origin_AimEndClient - aim end position from client position + * Origin_AimEndEyes - aim end position from eyes (hit point for weapon) + * Origin_CS_LastBullet - position of last bullet hit (only for Counter-Strike) + * + * @return 1 on success, 0 if client is not connected + * @error If the client index is not within the range of 1 to + * MaxClients, an error will be thrown. + */ +native get_user_origin(index, origin[3], mode = 0); + +/** + * Retrieves all weapons in the client inventory, stores them in an array, and + * returns the inventory as a bitflag sum. + * + * @note Make sure that num has an initial value of 0 or the native will not + * work correctly. + * + * @param index Client index + * @param weapons Array to store weapon indexes in + * @param num Variable to store number of weapons in the inventory to + * + * @return Bitflag sum of weapon indexes, 0 if client is not connected + * @error If the client index is not within the range of 1 to + * MaxClients, an error will be thrown. + */ +native get_user_weapons(index, weapons[32], &num); + +/** + * Retrieves the full name of a weapon. + * + * @param id Weapon index + * @param weapon Buffer to copy name to + * @param len Maximum buffer size + * + * @return Number of cells written to buffer + */ +native get_weaponname(id, weapon[], len); + +/** + * Retrieves the name of a client or the server. + * + * @param index Client index, or 0 to retrieve the server hostname + * @param name Buffer to copy name to + * @param len Maximum buffer size + * + * @return Number of cells written to buffer + */ +native get_user_name(index, name[], len); + +/** + * Retrieves the SteamID of a client. + * + * @note The SteamID is only available once the client_authorized() forward has + * been called for the client. + * + * @param index Client index + * @param authid Buffer to copy auth to + * @param len Maximum buffer size + * + * @return Number of cells written to buffer + */ +native get_user_authid(index, authid[], len); + +/** + * Returns the userid of a client. + * + * @param index Client index + * + * @return Client userid, 0 if the userid is not available or the + * client index is invalid + */ +native get_user_userid(index); + +/** + * Slaps the client with specified power. Killing the client if applicable. + * + * @note This removes "power" amount of health from the client, performing + * a kill if they have no health left after the slap. + * @note The function will apply a velocity to the client that is independent + * of the slap power. The slap direction can be influenced by the third + * parameter. + * + * @param index Client index + * @param power Power of the slap + * @param rnddir If set to zero the player will be slapped along it's aim + * vector, otherwise the direction will be randomized + * + * @return 1 if user is alive and slap succeeded, 0 otherwise + */ +native user_slap(index, power, rnddir = 1); + +/** + * Kills a client. + * + * @param index Client index + * @param flag If nonzero, the death will not affect the client's score + * + * @return 1 on success, 0 if client index is invalid or the client + * is not connected + */ +native user_kill(index, flag = 0); + +/** + * Logs a message to the current AMXX log file. + * + * @note The message will automatically be tagged with the plugin's name and the + * log will include a timestamp with the message. + * + * @param string Formatting rules + * @param ... Variable number of formatting parameters + * + * @noreturn + */ +native log_amx(const string[], any:...); + +/** + * Logs a message to the current server log file. + * + * @note The log will include a timestamp with the message. + * + * @param string Formatting rules + * @param ... Variable number of formatting parameters + * + * @return Number of printed characters + */ +native log_message(const message[], any:...); + +/** + * Logs a message hookable by plugins to the current server log file. + * + * @note The log will include a timestamp with the message. + * @note The message can be hooked using "register_logevent". + * + * @param string Formatting rules + * @param ... Variable number of formatting parameters + * + * @return Number of printed characters + */ +native elog_message(const message[], any:...); + +/** + * Logs a message to the specified file + * + * @note The log will include a timestamp with the message. + * + * @param string Formatting rules + * @param ... Variable number of formatting parameters + * + * @noreturn + */ +native log_to_file(const file[], const message[], any:...); + +/** + * Returns the number of clients on the server. + * + * @param flag Count clients still in the connecting process if nonzero + * + * @return Number of clients on the server + */ +native get_playersnum(flag = 0); + +/** + * Stores a filtered list of client indexes to an array. + * + * @note Please consider using get_players_ex() instead which allows you to + * use named constants for flags instead of letters. + * @note Example retrieving all alive CTs: get_players(players, num "ae", "CT") + * + * @param players Array to store indexes to + * @param num Variable to store number of indexes to + * @param flags Optional list of filtering flags: + * "a" - do not include dead clients + * "b" - do not include alive clients + * "c" - do not include bots + * "d" - do not include human clients + * "e" - match with team + * "f" - match with part of name + * "g" - match case insensitive + * "h" - do not include HLTV proxies + * "i" - include connecting clients + * @param team String to match against if the "e" or "f" flag is specified + * + * @noreturn + */ +native get_players(players[MAX_PLAYERS], &num, const flags[] = "", const team[] = ""); + +/** + * Retrieves argument of client command as string. + * + * @note Should only be used inside of the client_command() forward. + * + * @param id Argument index starting from 1, 0 returns the command itself + * @param output Buffer to copy command argument to + * @param len Maximum buffer size + * + * @return Number of cells written to buffer + */ +native read_argv(id, output[], len); + +/** + * Retrieves argument of client command as integer value. + * + * @note Should only be used inside of the client_command() forward. + * + * @param id Argument index starting from 1 + * + * @return Integer value + */ +native read_argv_int(id); + +/** + * Retrieves argument of client command as float value. + * + * @note Should only be used inside of the client_command() forward. + * + * @param id Argument index starting from 1 + * + * @return Float value + */ +native Float:read_argv_float(id); + +/** + * Retrieves full client command string. + * + * @note Should only be used inside of the client_command() forward. + * + * @param output Buffer to copy command line to + * @param len Maximum buffer size + * + * @return Number of cells written to buffer + */ +native read_args(output[], len); + +/** + * Returns number of client command arguments. + * + * @note Should only be used inside of the client_command() forward. + * @note This count includes the command itself. I.e. in a command with 4 + * arguments, this will return 5. + * + * @return Number of arguments in the command + */ +native read_argc(); + +/** + * Converts a flag string to a bitflag value. + * + * @note Example: The string "abcd" represents the sum of 1, 2, 4, and 8 - or + * (1<<0)|(1<<1)|(1<<2)|(1<<3). The function will return 15. + * + * @param flags Flag string to convert + * + * @return Bitflag value + */ +native read_flags(const flags[]); + +/** + * Converts a bitflag value to a flag string. + * + * @note Example: The value 3 will yield the string "ab" + * + * @param flags Bitflag value to convert + * @param output Buffer to copy flag string to + * @param len Maximum buffer size + * + * @return Number of cells written to buffer + */ +native get_flags(flags, output[], len); + +/** + * Find a player given a filter. + * + * @note Please consider using find_player_ex() instead which allows you to + * use named constants for flags instead of letters. + * @note If matching by userid, do not also specify the "a", "b" or "c" flags, + * or the function may not return a correct result. + * + * @param flags List of filtering flags: + * "a" - match with name + * "b" - match with name substring + * "c" - match with authid + * "d" - match with ip + * "e" - match with team name + * "f" - do not include dead clients + * "g" - do not include alive clients + * "h" - do not include bots + * "i" - do not include human clients + * "j" - return last matched client instead of the first + * "k" - match with userid + * "l" - match case insensitively + * "m" - include connecting clients + * @param ... String to match against (integer if "k" flag is specified) + * + * @return Client index, or 0 if no client was found + */ +native find_player(const flags[], ...); + +/** + * Find a player given a filter. + * + * @note If matching by userid, do not also specify FindPlayer_MatchName, FindPlayer_MatchNameSubstring + * or FindPlayer_MatchAuthId, or the function may not return a correct result. + * + * @param flags Filtering flags (enum FindPlayerFlags); valid flags are: + * FindPlayer_MatchName - match with name + * FindPlayer_MatchNameSubstring - match with name substring + * FindPlayer_MatchAuthId - match with authid + * FindPlayer_MatchIP - match with ip + * FindPlayer_MatchTeam - match with team name + * FindPlayer_ExcludeDead - do not include dead clients + * FindPlayer_ExcludeAlive - do not include alive clients + * FindPlayer_ExcludeBots - do not include bots + * FindPlayer_ExcludeHuman - do not include human clients + * FindPlayer_LastMatched - return last matched client instead of the first + * FindPlayer_MatchUserId - match with userid + * FindPlayer_CaseInsensitive - match case insensitively + * FindPlayer_IncludeConnecting - include connecting clients + * @param ... String to match against (integer if FindPlayer_MatchUserId is specified) + * + * @return Client index, or 0 if no client was found + */ +native find_player_ex(FindPlayerFlags:flags, ...); + +/** + * Removes double-quotes from the beginning and end of a string. + * + * @note If the string only has a double-quote at either the start *or* the end, + * and not both, the function will do nothing. + * @note The function does not perform any trimming per-se. But if a + * double-quote is found at the beginning of the string, it will remove + * one ^r (carriage return) character at the end of the string if present, + * even if no matching double-quote is found. This is for convenience. + * + * @param text String to remove double-quotes from + * + * @return 1 if matching double-quotes have been removed, 0 otherwise + */ +native remove_quotes(text[]); + +/** + * Executes a command on the client. + * + * @note Executing malicious commands on the client ("slowhacking") is frowned + * upon. + * @note Valve has introduced a command filter to Counter-Strike 1.6. It is not + * possible to execute many commands if the client has opted in to this. + * + * @param index Client index, use 0 to execute on all clients + * @param command Formatting rules + * @param ... Variable number of formatting parameters + * + * @return Length of formatted command string + * @error If a single client is specified and the index is not within + * the range of 1 to MaxClients, an error will be thrown. + */ +native client_cmd(index, const command[], any:...); + +/** + * Execute a command from the client without actually sending it to the client's + * DLL. + * + * @note This emulates a client command on the server side, and is an excellent + * tool to force a client to do certain actions related to the game. + * @note The command has to stand alone in the command parameter, only add + * arguments using the designated parameters. + * @note Commands emulated using this function will not trigger plugin command + * hooks. For an alternative that does, see amxclient_cmd() + * + * @param index Client index, use 0 to execute from all clients + * @param command Client command to execute on + * @param arg1 Optional command arguments + * @param arg2 Optional command arguments + * + * @noreturn + * @error If a single client is specified and the index is not within + * the range of 1 to MaxClients, an error will be thrown. + */ +native engclient_cmd(index, const command[], const arg1[] = "", const arg2[] = ""); + +/** + * Execute a command from the client without actually sending it to the client's + * DLL. This triggers plugin command hooks. + * + * @note This emulates a client command on the server side, and is an excellent + * tool to force a client to do certain actions related to the game. + * @note The command has to stand alone in the command parameter, only add + * arguments using the designated parameters. + * @note Commands emulated using this function will trigger other plugin's + * command hooks. For an alternative that doesn't, see engclient_cmd() + * + * @param index Client index, use 0 to execute from all clients + * @param command Client command to execute on + * @param arg1 Optional command arguments + * @param arg2 Optional command arguments + * + * @noreturn + * @error If a single client is specified and the index is not within + * the range of 1 to MaxClients, an error will be thrown. + */ +native amxclient_cmd(index, const command[], const arg1[] = "", const arg2[] = ""); + +/** + * Queues a command to be executed from the server console. + * + * @note Warning: This is a potential source of command injection. Do not feed + * client-controlled input (including client names) to this function + * without sanitizing it first. + * @note The queued commands will be executed by the engine on the next frame. + * If you require them to be executed immediately, see server_exec() + * + * @param command Formatting rules + * @param ... Variable number of formatting parameters + * + * @noreturn + */ +native server_cmd(const command[], any:...); + +/** + * Retrieves the name of the currently played map. + * + * @param name Buffer to copy map name to + * @param len Maximum buffer size + * + * @return Number of cells written to buffer + */ +native get_mapname(name[], len); + +/** + * Returns time remaining on map. + * + * @return Time left on map, in seconds + */ +native get_timeleft(); + +/** + * Returns the game time based on the game tick. + * + * @note This time is counted up from map start. If the engine is not processing + * this function will return the same value between calls, which makes it + * unusable for profiling purposes. + * + * @return Game time, in seconds + */ +native Float:get_gametime(); + +/** + * Returns the maxplayers setting of the current server, that is how many + * clients it supports. + * + * @note As of AMXX 1.8.3, this value is also exposed through a dynamic constant + * via the MaxClients variable, declared in amxconst.inc + * + * @return Maxplayers setting + */ +native get_maxplayers(); + +/** + * Retrieves the name of the currently played mod. + * + * @note This retrieves the short name of the mod. Example: for Counter-Strike, + * it will copy "cstrike" to the buffer. + * + * @param name Buffer to copy mod name to + * @param len Maximum size of the buffer + * + * @return Number of cells written to buffer + */ +native get_modname(name[], len); + +/** + * Retrieves the current time using the specified format string. + * + * @note Uses the strftime C function. For a list of valid format parameters, + * see: http://cplusplus.com/reference/clibrary/ctime/strftime.html + * A common example for a format string would be: "%m/%d/%Y - %H:%M:%S" + * + * @param format Format string + * @param output Buffer to copy formatted time string to + * @param len Maximum size of buffer + * + * @return Number of cells written to buffer + */ +native get_time(const format[], output[], len); + +/** + * Retrieves the provided time using the specified format string. + * + * @note Uses the strftime C function. For a list of valid format parameters, + * see: http://cplusplus.com/reference/clibrary/ctime/strftime.html + * A common example for a format string would be: "%m/%d/%Y - %H:%M:%S" + * + * @param output Buffer to copy formatted time string to + * @param len Maximum size of buffer + * @param format Format string + * @param time Unix timestamp, use -1 to use the current time + * + * @return Number of cells written to buffer + * @error If the conversion process fails, an error will be thrown. + */ +native format_time(output[], len, const format[], time = -1); + +/** + * Returns the system time as a unix timestamp (number of seconds since unix + * epoch). + * + * @param offset Optional offset value in seconds + * + * @return Unix time stamp + */ +native get_systime(offset = 0); + +/** + * Converts time strings to unix time stamp. + * + * @note Uses the strptime C function. For a list of valid format parameters, + * see: http://www.cplusplus.com/reference/ctime/strftime/ + * An example for a input/format combination would be: + * Input: "10:32:54 04/02/2013" Format: "%H:%M:%S %m:%d:%Y" + * @note Information missing from the input will be filled with the current + * time and date. + * + * @param input Time string to convert + * @param format Formatting information for conversion + * @param time If different from -1, the converted time will be added to + * this time stamp + * + * @return Unix time stamp + * @error If the conversion process fails, an error will be thrown. + */ +native parse_time(const input[], const format[], time = -1); + +/** + * Calls a function after a specified time has elapsed. + * + * @note Please consider using set_task_ex() instead which allows you to + * use named constants for flags instead of letters. + * + * @param time Time interval to assign + * @param function Function to execute + * @param id Task id to assign + * @param parameter Data to pass through to callback + * @param len Size of data + * @param flags Optional set of flags: + * "a" - repeat timer a set amount of times + * "b" - loop indefinitely until timer is stopped + * "c" - time interval is treated as absolute time after + * map start + * "d" - time interval is treated as absolute time before + * map change + * @param repeat If the "a" flag is set, the task will be repeated this + * many times + * + * @noreturn + * @error If an invalid callback function is provided, an error is + * thrown. + */ +native set_task(Float:time, const function[], id = 0, const any:parameter[] = "", len = 0, const flags[] = "", repeat = 0); + +/** + * Removes all tasks with the specified id. + * + * @param id Task id to search for + * @param outside Will remove tasks set by other plugins if nonzero + * + * @return Number of removed tasks + */ +native remove_task(id = 0, outside = 0); + +/** + * Modifies the time interval of all tasks with the specified id. + * + * @param id Task id to search for + * @param newTime New time interval to set + * @param outside Will affect tasks set by other plugins if nonzero + * + * @return Number of affected tasks + */ +native change_task(id = 0, Float:newTime = 1.0, outside = 0); + +/** + * Returns if a task with the specified id exists. + * + * @param id Task id to search for + * @param outside Search for tasks set by other plugins if nonzero + * + * @return 1 if a task was found, 0 otherwise + */ +native task_exists(id = 0, outside = 0); + +/** + * Sets the specified admin flags to a client. + * + * @note For a list of possible flags, see the ADMIN_* constants in amxconst.inc + * @note This function just adds the flags using a bitwise-or operation. After it + * has run, the flags may not exactly equal the specified bitflag sum. + * @note AMXX stores multiple sets of flags internally, but only flag set + * 0 is actively used. You should not change the value of the third + * parameter from the default. + * + * @param index Client index, 0 to set flags of server + * @param flags Admin flags + * @param id Flag set id, ranging from 0 to 31 + * + * @noreturn + * @error If the index is not within the range of 0 to MaxClients, an + * error will be thrown. + */ +native set_user_flags(index, flags = -1, id = 0); + +/** + * Returns the client's admin flags as a bitflag sum. + * + * @note For a list of possible flags, see the ADMIN_* constants in amxconst.inc + * @note AMXX stores multiple sets of flags internally, but only flag set + * 0 is actively used. You should not change the value of the second + * parameter from the default. + * + * @param index Client index, 0 to set flags of server + * @param id Flag set id, ranging from 0 to 31 + * + * @return Bitflag sum of client's admin flags + * @error If the index is not within the range of 0 to MaxClients, an + * error will be thrown. + */ +native get_user_flags(index, id = 0); + +/** + * Removes the specified admin flags from a client. + * + * @note For a list of possible flags, see the ADMIN_* constants in amxconst.inc + * @note This function just removes the flags using a bitwise-and operation. + * @note AMXX stores multiple sets of flags internally, but only flag set + * 0 is actively used. You should not change the value of the third + * parameter from the default. + * + * @param index Client index, 0 to set flags of server + * @param flags Admin flags + * @param id Flag set id, ranging from 0 to 31 + * + * @noreturn + * @error If the index is not within the range of 0 to MaxClients, an + * error will be thrown. + */ +native remove_user_flags(index, flags = -1, id = 0); + +/** + * Registers a callback to be called when the client executes a command from the + * console. + * + * @note For a list of possible access flags, see the ADMIN_* constants in + * amxconst.inc + * @note Opting in to FlagManager enables the admin privileges to be overwritten + * by the end user via the cmdaccess.ini config file. + * @note Automatic detection for FlagManager will only include a command if it + * has required privileges (flags is not -1) and it is not a command + * starting with "say". + * + * @param client_cmd Command to register + * @param function Callback function + * @param flags Admin privilege flags required + * @param info Command description + * @param FlagManager 0 opts out of flag manager, 1 opts in, -1 selects + * automatically + * @param info_ml If true, the parameter "info" will be looked up as multilingual key + * + * @return Command id, 0 on failure + * @error If an invalid callback function is specified, an error + * will be thrown. + */ +native register_clcmd(const client_cmd[], const function[], flags = -1, const info[] = "", FlagManager = -1, bool:info_ml = false); + +/** + * Registers a callback to be called when the client or server executes a + * command from the console. + * + * @note For a list of possible access flags, see the ADMIN_* constants in + * amxconst.inc + * @note Opting in to FlagManager enables the admin privileges to be overwritten + * by the end user via the cmdaccess.ini config file. + * @note Automatic detection for FlagManager will only include a command if it + * has required privileges (flags is not -1) and it is not a command + * starting with "say". + * + * @param client_cmd Command to register + * @param function Callback function + * @param flags Admin privilege flags required + * @param info Command description + * @param FlagManager 0 opts out of flag manager, 1 opts in, -1 selects + * automatically + * @param info_ml If true, the parameter "info" will be looked up as multilingual key + * + * @return Command id, 0 on failure + * @error If an invalid callback function is specified, an error + * will be thrown. + */ +native register_concmd(const cmd[], const function[], flags = -1, const info[] = "", FlagManager = -1, bool:info_ml = false); + +/** + * Registers a callback to be called when the server executes a command from the + * console. + * + * @note For a list of possible access flags, see the ADMIN_* constants in + * amxconst.inc + * + * @param client_cmd Command to register + * @param function Callback function + * @param flags Admin privilege flags required + * @param info Command description + * @param info_ml If true, the parameter "info" will be looked up as multilingual key + * + * @return Command id, 0 on failure + * @error If an invalid callback function is specified, an error + * will be thrown. + */ +native register_srvcmd(const server_cmd[], const function[], flags = -1, const info[] = "", bool:info_ml = false); + +/** + * Retrieves information about a client command. + * + * @note For a list of possible access flags, see the ADMIN_* constants in + * amxconst.inc + * + * @param index Command index + * @param command Buffer to copy command name to + * @param len1 Maximum name buffer size + * @param flags Variable to store privilege flags to + * @param info Buffer to copy command description to + * @param len2 Maximum description buffer size + * @param flag Only considers commands that can be accessed with + * the specified privilege flags + * @param info_ml Variable to store whether the parameter "info" is a multilingual key + * + * @return 1 on success, 0 if command was not found + */ +native get_clcmd(index, command[], len1, &flags, info[], len2, flag, &bool:info_ml = false); + +/** + * Returns number of registered client commands. + * + * @note For a list of possible access flags, see the ADMIN_* constants in + * amxconst.inc + * + * @param flag Only considers commands that can be accessed with + * the specified privilege flags + * + * @return Number of registered client commands + */ +native get_clcmdsnum(flag); + +/** + * Retrieves information about a server command. + * + * @note For a list of possible access flags, see the ADMIN_* constants in + * amxconst.inc + * + * @param index Command index + * @param command Buffer to copy command name to + * @param len1 Maximum name buffer size + * @param flags Variable to store privilege flags to + * @param info Buffer to copy command description to + * @param len2 Maximum description buffer size + * @param flag Only considers commands that can be accessed with + * the specified privilege flags + * @param info_ml Variable to store whether the parameter "info" is a multilingual key + * + * @return 1 on success, 0 if command was not found + */ +native get_srvcmd(index, server_cmd[], len1, &flags, info[], len2, flag, &bool:info_ml = false); + +/** + * Returns number of registered server commands. + * + * @note For a list of possible access flags, see the ADMIN_* constants in + * amxconst.inc + * + * @param flag Only considers commands that can be accessed with + * the specified privilege flags + * + * @return Number of registered server commands + */ +native get_srvcmdsnum(flag); + +/** + * Retrieves information about a console command. + * + * @note For a list of possible access flags, see the ADMIN_* constants in + * amxconst.inc + * + * @param index Command index + * @param command Buffer to copy command name to + * @param len1 Maximum name buffer size + * @param flags Variable to store privilege flags to + * @param info Buffer to copy command description to + * @param len2 Maximum description buffer size + * @param flag Only considers commands that can be accessed with + * the specified privilege flags + * @param id If set to 0 only server commands will be considered, + * positive will only consider client commands, otherwise + * all console commands will be considered + * @param info_ml Variable to store whether the parameter "info" is a multilingual key + * + * @return 1 on success, 0 if command was not found + */ +native get_concmd(index, cmd[], len1, &flags, info[], len2, flag, id = -1, &bool:info_ml = false); + +/** + * Returns the parent plugin id of a console command. + * + * @note For a list of possible access flags, see the ADMIN_* constants in + * amxconst.inc + * + * @param cid Command index + * @param flag_mask Only considers commands that can be accessed with + * the specified privilege flags. + * @param id_type If set to 0 only server commands will be considered, + * positive will only consider client commands, otherwise + * all console commands will be considered. + * + * @return Plugin id + */ +native get_concmd_plid(cid, flag_mask, id_type); + +/** + * Returns number of registered console commands. + * + * @note For a list of possible access flags, see the ADMIN_* constants in + * amxconst.inc + * + * @param flag Only considers commands that can be accessed with + * the specified privilege flags + * @param id If set to 0 only server commands will be considered, + * positive will only consider client commands, otherwise + * all console commands will be considered + * + * @return Number of registered console commands + */ +native get_concmdsnum(flag, id = -1); + +/** + * Returns unique menu id of a menu. + * + * @param menu Menu name + * @param outside Catch menus outside the calling plugin + * + * @return Menu id + */ +native register_menuid(const menu[], outside = 0); + +/** + * Registers a callback function to a menu id and keys. + * + * @param menuid Menu id + * @param keys Key flags + * @param function Callback function + * + * @noreturn + * @error If an invalid callback function is specified, an error + * will be thrown. + */ +native register_menucmd(menuid, keys, const function[]); + +/** + * Returns if the client is watching a menu. + * + * @note If there is no menu, the id is 0. If the id is negative, then the client + * views a VGUI menu. Otherwise, the id is an id acquired from the + * register_menuid() function. + * + * @param index Client index + * @param id Variable to store menu id to + * @param keys Variable to store menu keys to + * + * @return 1 if client views a menu, 0 otherwise + * @error If the client index is not within the range of 1 to + * MaxClients, an error will be thrown. + */ +native get_user_menu(index, &id, &keys); + +/** + * Forces the server to execute the command queue immediately. + * + * @note Commands can be added to the queue using server_cmd() + * + * @noreturn + */ +native server_exec(); + +/** + * Emits a sound from an entity from the engine. + * + * @note The sample must be precached using precache_sound() so it is available + * in the engine's sound table. + * @note For a list of available channels, see CHAN_* constants in amxconst.inc, + * sounds emitted from the same channel will override each other. + * @note There are helpful reference constants in amxconst.inc for sound volume + * (VOL_*), attenuation (ATTN_*), flags (SND_*), and pitch (PITCH_*). + * + * @param index Entity index, use 0 to emit from all clients + * @param channel Channel to emit from + * @param sample Sound file to emit + * @param vol Volume in percent + * @param att Sound attenuation + * @param flags Emit flags + * @param pitch Sound pitch + * + * @noreturn + */ +native emit_sound(index, channel, const sample[], Float:vol, Float:att, flags, pitch); + +/** + * Returns a random floating point value generated by the engine. + * + * @param a Minimum value (inclusive) + * @param b Maximum value (inclusive) + * + * @return Generated random value + */ +native Float:random_float(Float:a, Float:b); + +/** + * Returns a random integer value generated by the engine. + * + * @param a Minimum value (inclusive) + * @param b Maximum value (inclusive) + * + * @return Generated random value + */ +native random_num(a, b); + +/** + * Returns unique id of a client message. + * + * @note Example usage: get_user_msgid("TextMsg") + * @note The message id is unique as long as the server is running, but might + * change between updates. They should not be hardcoded into plugins. + * @note On first server start, this function will return 0 if used inside + * plugin_precache(). Consider hooking RegUserMsg in order to retrieve + * the correct message id. + * + * @param name Client message name + * + * @return Message id, 0 if message was not found + */ +native get_user_msgid(const name[]); + +/** + * Retrieves the client message name from a message id. + * + * @param msgid Client message id + * @param name Buffer to copy message name to + * @param len Maximum buffer size + * + * @return Number of cells written to buffer, 0 on invalid message id + */ +native get_user_msgname(msgid, name[], len); + +/** + * Returns a unique id for a public variable. + * + * @note Variables declared with the "public" specifier are accessible by-name + * from outside of the declaring plugin. + * @note If multiple plugins declare the same public variable, this native will + * still return a unique id. + * + * @param name Variable name + * + * @return Xvar id on success, -1 on failure + */ +native get_xvar_id(const name[]); + +/** + * Returns if a public variable exists in any loaded plugin. + * + * @param name Variable name + * + * @return 1 if public cvar exists, 0 otherwise + */ +native xvar_exists(const name[]); + +/** + * Returns the integer value of a public variable. + * + * @note If multiple plugins declare the same public variable, they are not + * automatically synchronized. The xvar system accesses only one of all + * public variables directly. Xvars have to be read through the natives or + * the value will be incorrect. + * + * @param id Xvar id, an xvar id can be retrieved using get_xvar_id() + * + * @return Xvar integer value + */ +native get_xvar_num(id); + +/** + * Returns the float value of a public variable. + * + * @note If multiple plugins declare the same public variable, they are not + * automatically synchronized. The xvar system accesses only one of all + * public variables directly. Xvars have to be read through the natives or + * the value will be incorrect. + * + * @param id Xvar id, an xvar id can be retrieved using get_xvar_id() + * + * @return Xvar float value + */ +native Float:get_xvar_float(id); + +/** + * Sets the integer value of a public variable. + * + * @note If multiple plugins declare the same public variable, they are not + * automatically synchronized. The xvar system accesses only one of all + * public variables directly. Xvars have to be set through the natives or + * the xvar will not be updated. + * + * @param id Xvar id, an xvar id can be retrieved using get_xvar_id() + * @param value Value to set + * + * @noreturn + * @error If an invalid xvar id is specified, an error will be thrown. + */ +native set_xvar_num(id, value = 0); + +/** + * Sets the float value of a public variable. + * + * @note If multiple plugins declare the same public variable, they are not + * automatically synchronized. The xvar system accesses only one of all + * public variables directly. Xvars have to be set through the natives or + * the xvar will not be updated. + * + * @param id Xvar id, an xvar id can be retrieved using get_xvar_id() + * @param value Value to set + * + * @noreturn + * @error If an invalid xvar id is specified, an error will be thrown. + */ +native set_xvar_float(id, Float:value = 0.0); + +/** + * Returns if a module is loaded. + * + * @param name Module name + * + * @return Module id of the matching module, -1 otherwise + */ +native is_module_loaded(const name[]); + +/** + * Retrieves info about a module by module index. + * + * @note For a list of possible status flags, see module_* constants in + * amxconst.inc + * + * @param id Module id + * @param name Buffer to copy module name to + * @param nameLen Maximum name buffer size + * @param author Buffer to copy module author to + * @param authorLen Maximum author buffer size + * @param version Buffer to copy module version to + * @param versionLen Maximum version buffer size + * @param status Variable to store module status to + * + * @return Module id on success, -1 on invalid module + */ +native get_module(id, name[], nameLen, author[], authorLen, version[], versionLen, &status); + +/** + * Returns the number of currently registered modules. + * + * @return Number of modules + */ +native get_modulesnum(); + +/** + * Returns if a plugin is loaded by registered name or filename. + * + * @note An example for a registered name would be "Admin Base", while a possible + * filename would be "admin.amxx". + * @note Prior to AMXX 1.80, this function would only search for plugins + * registered names, not the filename. + * @note The plugin name matching is case insensitive, while the filename + * matching is case sensitive. + * + * @param name Plugin name or filename + * @param usefilename If true searches for plugin filename, false searches for + * plugin name + * + * @return Plugin id of the matching plugin, -1 otherwise + */ +native is_plugin_loaded(const name[], bool:usefilename = false); + +/** + * Retrieves info about a plugin by plugin index. + * + * @param index Plugin index, -1 to target calling plugin + * @param filename Buffer to copy plugin filename to + * @param len1 Maximum filename buffer size + * @param name Buffer to copy plugin name to + * @param len2 Maximum name buffer size + * @param version Buffer to copy plugin version to + * @param len3 Maximum version buffer size + * @param author Buffer to copy plugin author to + * @param len4 Maximum author buffer size + * @param status Buffer to copy plugin status flags to + * @param len5 Maximum status buffer size + * @param ... Unused and ignored + * + * @return Plugin index on success, -1 if there is no plugin with given + * index + */ +native get_plugin(index, filename[] = "", len1 = 0, name[] = "", len2 = 0, version[] = "", len3 = 0, author[] = "", len4 = 0, status[] = "", len5 = 0, ...); + +/** + * Returns the number of loaded AMXX plugins. + * + * @return Number of loaded plugins + */ +native get_pluginsnum(); + +/** + * Pauses a plugin so it will not be executed until it is unpaused. + * + * @note This used to be able to pause specific functions, but this functionality + * (along with the flags "b" and "e") has been deprecated. + * @note If used without flag "c" this will pause the calling plugin. + * + * @param flag Pause flags + * "a" - pause plugin + * "c" - search for other plugins using param1 + * "d" - stop plugin, making it unavailable to unpause + * @param param1 Plugin filename + * @param param2 Unused and ignored + * + * @return 1 on success, 0 otherwise + * @error If it is attempted to use the deprecated functionality, + * an error is thrown. + */ +native pause(const flag[], const param1[] = "", const param2[] = ""); + +/** + * Unpauses a plugin so it will resume execution if it was previously paused. + * + * @note This used to be able to unpause specific functions, but this + * functionality (along with the flags "b" and "e") has been deprecated. + * @note Without specifying flag "c" this function will do nothing, as a plugin + * is incapable of unpausing itself. This is a relict of the deprecated + * functionality. + * + * @param flag Pause flags + * "a" - pause plugin + * "c" - search for other plugins using param1 + * @param param1 Plugin filename + * @param param2 Unused and ignored + * + * @return 1 on success, 0 otherwise + * @error If it is attempted to use the deprecated functionality, + * an error is thrown. + */ +native unpause(const flag[], const param1[] = "", const param2[] = ""); + +/** + * Initiates a function call to this or another plugin by function name. + * + * @note This only sets up the function call and covers the pre-requisites. + * Push parameters using the callfunc_push_* set of functions. The call + * will be executed only upon using callfunc_end() + * + * @param func Function name + * @param plugin Plugin filename, if empty the calling plugin is targeted + * The filename has to be the full exact name (e.g. stats.amxx) + * + * @return 1 on success + * 0 on runtime error + * -1 if plugin was not found + * -2 if function was not found + * @error If called while another callfunc has not yet been finished, + * an error is thrown. + */ +native callfunc_begin(const func[], const plugin[] = ""); + +/** + * Initiates a function call to this or another plugin by function id. + * + * @note This only sets up the function call and covers the pre-requisites. + * Push parameters using the callfunc_push_* set of functions. The call + * will be executed only upon using callfunc_end() + * @note The function id can be retrieved by get_func_id() + * + * @param func Function id + * @param plugin Plugin filename, if empty the calling plugin is targeted + * The filename has to be the full exact name (e.g. stats.amxx) + * + * @return 1 on success + * -1 if plugin was not found + * -2 if function is not executable + * @error If called while another callfunc has not yet been finished, + * or the specified function is invalid, an error is thrown. + */ +native callfunc_begin_i(func, plugin = -1); + +/** + * Retrieves a functions id for use with callfunc_begin_i() + * + * @param funcName Function name + * @param pluginId Plugin id, if -1 the calling plugin is targeted + * The plugin id can be retrieved using find_plugin_byfile() + * + * @return >=0 Function id on success + * -1 if plugin or function was not found + */ +native get_func_id(const funcName[], pluginId = -1); + +/** + * Pushes an int value onto the current call. + * + * @param value Int value to push + * + * @noreturn + * @error If called without initiating a callfunc, or the maximum + * amount of parameters is reached, an error is thrown. + */ +native callfunc_push_int(value); + +/** + * Pushes a float value onto the current call. + * + * @param value Float value to push + * + * @noreturn + * @error If called without initiating a callfunc, or the maximum + * amount of parameters is reached, an error is thrown. + */ +native callfunc_push_float(Float: value); + +/** + * Pushes an int value reference onto the current call. + * + * @note Changes made to this value by the called function will be reflected + * in the calling plugin. + * + * @param value Int value to push + * + * @noreturn + * @error If called without initiating a callfunc, or the maximum + * amount of parameters is reached, an error is thrown. + */ +native callfunc_push_intrf(&value); + +/** + * Pushes a float value reference onto the current call. + * + * @note Changes made to this value by the called function will be reflected + * in the calling plugin. + * + * @param value Float value to push + * + * @noreturn + * @error If called without initiating a callfunc, or the maximum + * amount of parameters is reached, an error is thrown. + */ +native callfunc_push_floatrf(&Float:value); + +/** + * Pushes a string onto the current call. + * + * @note This will defy the "const" specifier if copyback is true, which is + * only kept for special backwards compatibility. + * + * @param VALUE String to push + * @param copyback If true, any changes made in the called function will be + * copied back to the calling plugin + * + * @noreturn + * @error If called without initiating a callfunc, or the maximum + * amount of parameters is reached, an error is thrown. + */ +native callfunc_push_str(const VALUE[], bool:copyback = true); + +/** + * Pushes an array onto the current call. + * + * @note This will defy the "const" specifier if copyback is true, which is + * only kept for special backwards compatibility. + * + * @param VALUE Array to push + * @param array_size Size of the array + * @param copyback If true, any changes made in the called function will be + * copied back to the calling plugin + * + * @noreturn + * @error If called without initiating a callfunc, or the maximum + * amount of parameters is reached, an error is thrown. + */ +native callfunc_push_array(const VALUE[], array_size, bool:copyback = true); + +/** + * Completes the call to a function. + * + * @return 1 on success + * -1 if the plugin was not found + * -2 if the function was not found + * @error If called without initiating a callfunc, an error is thrown. + */ +native callfunc_end(); + +/** + * Called when an inconsistent file is encountered by the engine. + * + * @param id Client index + * @param filename Detected file + * @param reason Buffer storing the disconnect reason (can be overwritten) + * + * @return PLUGIN_CONTINUE to let the engine kick the client + * PLUGIN_HANDLED to block the inconsistency kick + */ +forward inconsistent_file(id, const filename[], reason[64]); + +/** + * Forces the clients and server to be running with the same version of a + * specified file. + * + * @note For a list of possible enforcement types, see the force_* constants + * in amxconst.inc + * + * @param force_type Enforcement type + * @param mins Bounding box mins vector + * @param maxs Bounding box maxs vector + * @param filename Filename + * + * @return 1 on success, 0 otherwise + */ +native force_unmodified(force_type, const mins[3], const maxs[3], const filename[]); + +/** + * Calculates the MD5 keysum of a string. + * + * @param szString String to calculate keysum of + * @param md5buffer Buffer to copy the MD5 hash to + * + * @return Number of cells written to the buffer (always 32) + */ +#pragma deprecated Use hash_string() function. Also, see Hash_* constants. +native md5(const szString[], md5buffer[34]); + +/** + * Calculates the MD5 keysum of a file. + * + * @param file Path to file to calculate keysum of + * @param md5buffer Buffer to copy the MD5 hash to + * + * @return Number of cells written to the buffer (always 32) + * @error If the file can not be opened, and error is thrown. + */ +#pragma deprecated Use hash_file() function. Also, see Hash_* constants. +native md5_file(const file[], md5buffer[34]); + +/** + * Generate a hash value (message digest) + * + * @param string String to be hashed. + * @param type Type of selected hashing algorithm. See Hash_* constants in amxconst.inc file. + * @param output Output string to store hash in. + * @param outputSize The maximum size of the output string to store hash in. + * + * @return Number of written bytes. + */ +native hash_string(const string[], const HashType:type, output[], const outputSize); + +/** + * Generate a hash value using the contents of a given file + * + * @param fileName Path of file to be hashed. + * @param type Type of selected hashing algorithm. See Hash_* constants in amxconst.inc file. + * @param output Output string to store hash in. + * @param outputSize The maximum size of the output string to store hash in. + * + * @return Number of written bytes. + * @error If the file couldn't be opened, an error is thrown. + */ +native hash_file(const fileName[], const HashType:type, output[], const outputSize); + +/** + * Returns the internal flags set on the plugin's state. + * + * @param hdr If nonzero, the function will return the pcode rather than + * state flags + * @param plid Plugin id, -1 to target calling plugin + * + * @return Plugin flags + */ +native plugin_flags(hdr = 0, plid = -1); + +/** + * Allows plugins to declare module dependencies using require_module() + * + * @deprecated Module dependency has been automatically handled by the compiler + * since AMXX 1.50, released in 2005. This forward is no longer + * called. + * + * @noreturn + */ +#pragma deprecated Module dependency is now automatically handled by the compiler. This forward is no longer called. +forward plugin_modules(); + +/** + * Adds a module dependency. + * + * @deprecated Module dependency has been automatically handled by the compiler + * since AMXX 1.50, released in 2005. This native has no effect. + * + * @noreturn + */ +#pragma deprecated Module dependency is now automatically handled by the compiler. This native has no effect. +native require_module(const module[]); + +/** + * Returns if the server is 64 bit. + * + * @deprecated As a result of Valve dropping support for 64bit binaries, AMXX is + * also not shipping 64bit builds anymore. This native is basically + * guaranteed to return 0. + * + * @return 1 if the server is 64 bit, 0 otherwise + */ +#pragma deprecated AMXX is not shipping 64bits builds anymore. This native is basically guaranteed to return 0. +native is_amd64_server(); + +/** + * Returns plugin id by filename. + * + * @param filename Filename to match + * @param ignoreCase If nonzero matches case insensitively, case sensitively + * otherwise + * + * @return Plugin id, -1 (INVALID_PLUGIN_ID) on failure + */ +native find_plugin_byfile(const filename[], ignoreCase = 1); + +/** + * Called before plugin_init(), allows the plugin to register natives. + * + * @noreturn + */ +forward plugin_natives(); + +/** + * Registers a native. + * + * @note Style 0 natives call the handler in the following manner: + * + * public native_handler(plugin_id, argc) + * + * plugin_id - plugin calling the native + * argc - number of parameters + * + * @note Style 1 natives are deprecated. Plugins should not use them, they might + * break. + * @note Style 1 natives work a little different. Instead of passing plugin id + * and number of parameters, the handler should be prototyped just like the + * native would be called. For each by-reference parameter, the plugin + * then has to use param_convert() to properly use them. + * @note A native should *never* recurse. Bad things will happen. + * + * @param name Native name + * @param handler Callback function + * @param style Native style + * + * @noreturn + * @error If an invalid callback is specified, an error is thrown. + */ +native register_native(const name[], const handler[], style = 0); + +/** + * Registers the plugin as a library. + * + * @note To mark a library as required, place the following in the include + * file: + * #pragma reqlib + * #if !defined AMXMODX_NOAUTOLOAD + * #pragma loadlib + * #endif + * + * @noreturn + */ +native register_library(const library[]); + +/** + * Logs an error in the native and breaks into the AMXX debugger. + * + * @note This acts as if the calling plugin - the plugin that is calling the + * native, not the plugin calling this function - triggered the error, + * just like when AMXX natives error. + * + * @param error Error number + * @param fmt Formatting rules + * @param ... Variable number of formatting parameters + * + * @noreturn + * @error The function is guaranteed to throw an error, but will make + * it appear as if the plugin calling the native triggered it. + */ +native log_error(error, const fmt[], any:...); + +/** + * Converts a parameter to work as a by-reference parameter. + * + * @deprecated Style 1 natives are deprecated and should be converted to + * style 0. This should not be used. + * + * @note This only needs to be called if the native was registered with style 1. + * @note Remember that arrays (and strings) are always by-reference and need to + * be converted. + * + * @param num Argument to convert, starting from 1 + * + * @noreturn + * @error If used outside of a native callback, or the native was + * created with style 0, an error will be thrown. + */ +native param_convert(num); + +/** + * Retrieves a string from the plugin calling the native. + * + * @param param Argument to retrieve, starting from 1 + * @param dest Buffer to copy string to + * @param maxlen Maximum size of buffer + * + * @return Number of cells copied to buffer + * @error If used outside of a native callback, or the native was + * created with style 1, an error will be thrown. + */ +native get_string(param, dest[], maxlen); + +/** + * Copies a string to the plugin calling the native. + * + * @param param Argument to set, starting from 1 + * @param dest Buffer to copy string from + * @param maxlen Maximum size of buffer + * + * @return Number of cells copied from buffer + * @error If used outside of a native callback, or the native was + * created with style 1, an error will be thrown. + */ +native set_string(param, dest[], maxlen); + +/** + * Returns the integer value of a parameter from the plugin calling the native. + * + * @param param Argument to retrieve, starting from 1 + * + * @return Integer value + * @error If used outside of a native callback, or the native was + * created with style 1, an error will be thrown. + */ +native get_param(param); + +/** + * Returns the float value of a parameter from the plugin calling the native. + * + * @param param Argument to retrieve, starting from 1 + * + * @return Float value + * @error If used outside of a native callback, or the native was + * created with style 1, an error will be thrown. + */ +native Float:get_param_f(param); + +/** + * Returns the integer value of a by-reference parameter from the plugin calling + * the native. + * + * @param param Argument to retrieve, starting from 1 + * + * @return Integer value + * @error If used outside of a native callback, or the native was + * created with style 1, an error will be thrown. + */ +native get_param_byref(param); + +/** + * Returns the float value of a by-reference parameter from the plugin calling + * the native. + * + * @param param Argument to retrieve, starting from 1 + * + * @return Float value + * @error If used outside of a native callback, or the native was + * created with style 1, an error will be thrown. + */ +native Float:get_float_byref(param); + +/** + * Sets the integer value of a by-reference parameter to the plugin calling the + * native. + * + * @param param Argument to set, starting from 1 + * @param value Value to set parameter to + * + * @noreturn + * @error If used outside of a native callback, or the native was + * created with style 1, an error will be thrown. + */ +native set_param_byref(param, value); + +/** + * Sets the float value of a by-reference parameter to the plugin calling the + * native. + * + * @param param Argument to set, starting from 1 + * @param value Value to set parameter to + * + * @noreturn + * @error If used outside of a native callback, or the native was + * created with style 1, an error will be thrown. + */ +native set_float_byref(param, Float:value); + +/** + * Retrieves an array from the plugin calling the native. + * + * @param param Argument to retrieve, starting from 1 + * @param dest Buffer to copy array to + * @param maxlen Size of buffer + * + * @noreturn + * @error If used outside of a native callback, or the native was + * created with style 1, an error will be thrown. + */ +native get_array(param, dest[], size); + +/** + * Retrieves a float array from the plugin calling the native. + * + * @param param Argument to retrieve, starting from 1 + * @param dest Buffer to copy array to + * @param maxlen Size of buffer + * + * @noreturn + * @error If used outside of a native callback, or the native was + * created with style 1, an error will be thrown. + */ +native get_array_f(param, Float:dest[], size); + +/** + * Copies an array to the plugin calling the native. + * + * @param param Argument to set, starting from 1 + * @param source Buffer to copy array from + * @param maxlen Size of buffer + * + * @noreturn + * @error If used outside of a native callback, or the native was + * created with style 1, an error will be thrown. + */ +native set_array(param, const source[], size); + +/** + * Copies a float array to the plugin calling the native. + * + * @param param Argument to set, starting from 1 + * @param source Buffer to copy array from + * @param maxlen Size of buffer + * + * @noreturn + * @error If used outside of a native callback, or the native was + * created with style 1, an error will be thrown. + */ +native set_array_f(param, const Float:source[], size); + +/** + * Allows to trap error messages that occur in a plugin. + * + * @note This can be used to override the debug messages that occur when the + * plugin causes some kind of runtime error. + * @note The handler will be called in the following manner: + * + * public error_filter(error_code, bool:debugging, message[]) + * + * error_code - AMX_ERR_* code. + * debugging - True if the plugin is in debug mode, false otherwise + * message[] - Message sent along with the error + * + * @note The handler should return PLUGIN_CONTINUE to let the error through the + * filter, or PLUGIN_HANDLED to block the error from displaying. + * + * @param handler Function name to call + * + * @noreturn + * @error If an invalid callback function is provided, an error + * is thrown. + */ +native set_error_filter(const handler[]); + +/** + * Returns a trace handle for the item at the top of the traced call stack. + * + * @note Intended for use inside an error handler set with set_error_filter() + * + * @return Trace handle, 0 if no debugging information is available + */ +native dbg_trace_begin(); + +/** + * Returns the next item in a traced call stack. + * + * @param trace Trace handle + * + * @return New trace handle, 0 if no more traces exist + */ +native dbg_trace_next(trace); + +/** + * Retrieves the call stack info for a trace. + * + * @param trace Trace handle + * @param line Variable to set line at which plugin failed to + * @param function Buffer to copy function to + * @param maxLength1 Maximum function buffer size + * @param file Buffer to copy filename to + * @param maxLength2 Maximum filename buffer size + * + * @return 1 on success, 0 if no trace data is available + */ +native dbg_trace_info(trace, &line, function[], maxLength1, file[], maxLength2); + +/** + * Retrieves the formatted error string from a trace. + * + * @note The string format is generally: "Run time error : " + * + * @param buffer Buffer to copy error message to + * @param maxLength Maximum buffer size + * + * @return 1 on success, 0 if no trace data is available + */ +native dbg_fmt_error(buffer[], maxLength); + +/** + * Sets a native filter, letting the plugin intercept and handle an + * automatic native requirement. + * + * @note This has to be used inside the plugin_native() forward, otherwise it + * has no effect. + * @note This is useful for creating plugins that can dynamically decide which + * modules or features to use at runtime, often necessary for cross-mod + * plugins. It allows to deploy a single version of the plugin instead + * of compiling multiple versions for each use-case. + * @note The handler will be called in the following manner: + * + * public native_filter(const native[], index, trap) + * + * native - Native name + * index - Native index + * trap - 0 if native couldn't be found, 1 if native use was attempted + * + * @note The handler should return PLUGIN_CONTINUE to let the error through the + * filter (which will throw a run-time error), or return PLUGIN_HANDLED + * to continue operation. + * @note Returning PLUGIN_CONTINUE if trap is 0 will result in the plugin + * failing to load! + * + * @param handler Function name to call + * + * @return 1 if handler is set successfully, 0 otherwise (called + * outside of plugin_native() forward) + * @error If an invalid callback function is provided, an error is + * thrown. + */ +native set_native_filter(const handler[]); + +/** + * Sets a module/library filter, letting the plugin intercept and handle an + * automatic module requirement. + * + * @note This has to be used inside the plugin_native() forward, otherwise it + * has no effect. + * @note This is useful for creating plugins that can dynamically decide which + * modules or features to use at runtime, often necessary for cross-mod + * plugins. It allows to deploy a single version of the plugin instead + * of compiling multiple versions for each use-case. + * @note For a list of possible libtypes see the LibType enum in amxconst.inc + * @note The handler will be called in the following manner: + * + * public module_filter(const library[], LibType:type) + * + * library - Shortname of library or class that is required + * libtrype - Type of requirement being checked (library/module or class) + * + * @note The handler should return PLUGIN_CONTINUE to let the error through the + * filter (which will result in the plugin failing to load), or + * PLUGIN_HANDLED to imply that load can continue without the module. + * @note Errors occuring inside the handler will not be filtered and cause the + * plugin to fail load as if the handler returned PLUGIN_CONTINUE. + * + * @return 0 on success, -1 if filtering is not available, -2 if handler + * could not be found. + */ +native set_module_filter(const handler[]); + +/** + * Aborts execution of the current callback by throwing an error. + * + * @note Warning: This function should not be used inside error filters, module + * filters (native filters are safe if trap equals 1) or the + * plugin_natives() forward. + * @note The message will automatically be tagged with the plugin's name and the + * log will include a timestamp with the message. + * @note For a list of possible error codes, see AMX_* constants in amxconst.inc + * + * @param error Error code + * @param fmt Formatting rules + * @param ... Variable list of formatting parameters + * + * @noreturn + * @error The function is guaranteed to throw an error, using the + * specified custom log message. + */ +native abort(error, const fmt[] = "", any:...); + +/** + * Returns if a specific module is loaded. + * + * @note This uses the same method AMXX uses internally to see if a module is + * required by a plugin. + * @note Example usage: module_exists("cstrike") + * + * @param logtag Module shortname + * + * @return 1 if module is loaded, 0 otherwise + */ +native module_exists(const logtag[]); + +/** + * Returns if a specific library or class is loaded. + * + * @note This is the newer version of module_exists(), enabling users to + * distinguish between libraries and classes, while module_exists() always + * checks for both types. + * @note For a list of possible types, see the LibType enum in amxconst.inc + * + * @param library Library/Class shortname + * @param type Type to search for + * + * @return 1 if module is loaded, 0 otherwise + */ +native LibraryExists(const library[], LibType:type); + +/** + * Returns the next valid hudchannel for the client. + * + * @note This function uses the same method set_hudmessage() uses to determine + * the next channel if it is set to auto-select. + * + * @param player Client index + * + * @return Valid hudchannel (1-4) + * @error If the index is not within the range of 1 to MaxClients or + * the client is not connected, an error will be thrown. + */ +native next_hudchannel(player); + +/** + * Creates a HUD synchronization object. + * + * @note Create one of these for each section of the screen that contains + * overlapping HUD messages. For example, if using both sides of the + * screen to display three messages that could potentially overlap, + * each side is considered a synchronizable area. You can then use + * ShowSyncHudMsg() to correctly synchronize displaying the HUD message + * with any other messages potentially in its class. + * @note This does not do anything like reserving screen area. Its sole + * purpose is to be able to wipe an old message on an auto-channel and + * ensure that it will not clear a message from another plugin. + * + * @param num Unused and ignored + * @param ... Unused and ignored + * + * @return HUD sync object handle + */ +native CreateHudSyncObj(num = 0, ...); + +/** + * Displays a synchronized HUD message. + * + * @note This will check that the HUD object has its previous display on the + * screen cleared before it proceeds to write another message. It will + * only do this in the case of that channel not having been cleared + * already. + * @note This uses the display parameters set with set_hudmessage(), ignoring + * the selected channel in favor of its own synchronization. + * @note This functions return value behaves differently depending on what is + * used as the client index: If 0 is specified, then the function will + * return 0 if nothing has been sent (no client connected). If either a + * single client is specified, or there is at least one client connected, + * the number of printed characters will refer to the message that is sent + * last, to the client with the highest index. + * + * @param target Client index, use 0 to display to all clients + * @param syncObj HUD sync object handle + * @param fmt Formatting rules + * @param ... Variable number of formatting parameters + * + * @return Number of printed characters + * @error If a single client is specified and the index is not within + * the range of 1 to MaxClients, an error will be thrown. + */ +native ShowSyncHudMsg(target, syncObj, const fmt[], any:...); + +/** + * Clears the display on a HUD sync object. + * + * @note This sends an empty message to the previously occupied HUD channel. + * It is not quite the same as manually sending an empty message to the + * sync object as that would send out two separate messages, one for + * clearing the occupied channel and another using a new channel, which + * will subsequently not mark the sync object as cleared. + * + * @param target Client index, use 0 to display to all clients + * @param syncObj HUD sync object handle + * + * @noreturn + * @error If a single client is specified and the index is not within + * the range of 1 to MaxClients, an error will be thrown. + */ +native ClearSyncHud(target, syncObj); + +/** + * Triggers the software interrupt 3, used for breaking into an attached + * debugger. + * + * @note Warning: This is a debugging function that is not intended for general + * plugin use. Using this function will either halt the server and break + * into the attached debugger, or outright crash the server if no + * debugger is attached. + * + * @noreturn + */ +native int3(); + +/** + * Sets the calling plugin to a failed state. + * + * @note Calling this will cause the calling plugin to completely cease + * operation. It is not possible to recover. + * @note This should be used to gracefully handle fatal errors. The log message + * will appear in the AMXX error log. + * + * @param fmt Formatting rules + * @param ... Variable number of formatting parameters + * + * @noreturn + * @error The function is guaranteed to throw a fatal error, ceasing + * further operation of the plugin. + */ +native set_fail_state(const fmt[], any:...); + +/** + * Returns the reference address of the variable passed in. + * + * @note Addresses are local to the plugin and do not represent a full CPU + * address. + * + * @param ... Variable to retrieve address from + * + * @return Variable address + */ +native get_var_addr(any:...); + +/** + * Returns the value of an address. + * + * @note Addresses can be acquired using get_var_addr() + * + * @param addr Variable address + * + * @return Value at address + * @error If the plugin attempts to access an address outside of the + * stack or heap limits of the plugin, an error will be thrown. + */ +native get_addr_val(addr); + +/** + * Sets the value of an address. + * + * @note Addresses can be acquired using get_var_addr() + * + * @param addr Variable address + * @param val Value to set + * + * @noreturn + * @error If the plugin attempts to access an address outside of the + * stack or heap limits of the plugin, an error will be thrown. + */ +native set_addr_val(addr, val); + +/** + * Creates a global forward that will be called in all plugins. + * + * @note For a list of valid stop types, see the ET_* constants in amxconst.inc + * @note For a list of valid parameter types, see the FP_* constants in + * amxconst.inc + * + * @param name Function name to call + * @param stop_type Treatment of the plugin return values + * @param ... List of parameter types + * + * @return Forward handle, -1 on failure + */ +native CreateMultiForward(const name[], stop_type, ...); + +/** + * Creates a private forward that will be called in a single plugin. + * + * @note Unlike other natives expecting a plugin id, specifying -1 will not + * select the calling plugin, and instead throw an error. + * + * @param plugin_id Plugin to call forward in. The plugin id can be + * retrieved using find_plugin_byfile() + * @param name Function name to call + * @param ... List of parameter types + * + * @return Forward handle, -1 on failure + * @error If an invalid plugin id is specified, an error will be + * thrown. + */ +native CreateOneForward(plugin_id, const name[], ...); + +/** + * Prepares an array for use in a forward. Pass the result ExecuteForward() + * instead of the array itself. + * + * @param array Array to prepare + * @param size Size of array + * @param copyback If nonzero, modifications made by the called plugin(s) + * will be copied back to the caller + * + * @return Special handle for use in ExecuteForward() + */ +native PrepareArray(const array[], size, copyback = 0); + +/** + * Executes a forward. + * + * @note Passing arrays requires them to be prepared using PrepareArray() + * + * @param forward_handle Forward handle + * @param ret Optional variable to store return value in + * @param ... Variable number of parameters to pass through + * + * @return 1 on success, 0 if forward can't be executed + * @error If the number of parameters mismatch from the number + * of parameters that the forward was declared with, + * an error is thrown. + */ +native ExecuteForward(forward_handle, &ret = 0, any:...); + +/** + * Destroys and deallocates a forward. + * + * @note Does not distinguish between private and global forwards. + * + * @param forward_handle Forward handle + * + * @noreturn + */ +native DestroyForward(forward_handle); + +/** + * Sets all elements of array to a specified value. + * + * @param array Array to modify + * @param value Value to set each element to + * @param size Size of array + * + * @noreturn + */ +native arrayset(any:array[], any:value, size); + +/** + * Returns the weapon id associated with a weapon name. + * + * @note The weapon name is case sensitive and has the weapon_* form. + * + * @param name Weapon name + * + * @return Weapon id, or 0 if no id was found + */ +native get_weaponid(const name[]); + +/** + * Adds an admin to the dynamic admin storage for lookup at a later time. + * + * @note For a list of possible access flags, see the ADMIN_* constants in + * amxconst.inc + * @note For a list of possible auth flags, see the FLAG_* constants in + * amxconst.inc + * + * @param AuthData Auth information to set (can be name, IP or SteamID) + * @param Password Password to set + * @param Access Admin access flags + * @param Flags Auth behavior flags + * + * @noreturn + */ +native admins_push(const AuthData[], const Password[], Access, Flags); + +/** + * Returns the number of admins in the dynamic admin storage. + * + * @return Number of admins + */ +native admins_num(); + +/** + * Retrieves information about a dynamically stored admin. + * + * @note For a list of possible props, see the AdminProp enum in amxconst.inc + * + * @param num Admin storage index + * @param Property Admin property to retrieve + * @param Buffer Buffer to copy property information to, if AdminProp_Auth + * or AdminProp_Password is specified + * @param BufferSize Maximum buffer size + * + * @return Property value if AdminProp_Access or AdminProp_Flags + * is requested, 0 otherwise + * @error If an invalid storage index is specified, an error will + * be thrown. + */ +native admins_lookup(num, AdminProp:Property, Buffer[] = "", BufferSize = 0); + +/** + * Clears the list of dynamically stored admins. + * + * @noreturn + */ +native admins_flush(); + +/** + * Returns if a map contains at least one entity with the provided class name. + * + * @param classname Entity classname to match + * + * @return True if an entity is found, false otherwise + */ +native bool:has_map_ent_class(const classname[]); + + +/** + * Called when the map has loaded, and all configs are done executing. + * This includes servercfgfile (server.cfg), amxx.cfg, plugin's config, and + * per-map config. + * + * @note This is best place to initialize plugin functions which are based on cvar data. + * @note This will always be called once and only once per map. It will be + * called few seconds after plugin_cfg(). + * + * @noreturn + */ +forward OnConfigsExecuted(); + +/** + * Called when the map has loaded, right after plugin_cfg() but any time + * before OnConfigsExecuted. It's called after amxx.cfg and all + * AutoExecConfig() exec commands have been added to the server command buffer. + * + * @note This will always be called once and only once per map. + * + * @noreturn + */ +forward OnAutoConfigsBuffered(); + +/** + * Specifies that the given config file should be executed after plugin load. + * + * @note OnConfigsExecuted() will not be called until the config file has executed, + * but it will be called if the execution fails. + * @note The name parameter should not contain dots, otherwise file will not be executed. + * + * @param autoCreate If true, and the config file does not exist, such a config + * file will be automatically created and populated with + * information from the plugin's registered cvars. + * @param name Name of the config file, excluding the .cfg extension. + * If empty, is assumed. + * @param folder Folder under plugins/ to use. + * + * @noreturn + */ +native AutoExecConfig(bool:autoCreate = true, const name[] = "", const folder[] = ""); + +/** + * Creates a single use hook for the next frame. + * + * @param callback Function to be executed on the next frame. + * @param data Optional data to be passed to the callback function. + * + * @note Callback function prototype: + * public function(data) + * + * @noreturn + */ +native RequestFrame(const callback[], any:data = 0); + +// Always keep this at the bottom of this file +#include diff --git a/bin/amxxdump/includes/amxmodx/amxmodx.inc.temp b/bin/amxxdump/includes/amxmodx/amxmodx.inc.temp new file mode 100644 index 0000000..e7bfbd9 --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/amxmodx.inc.temp @@ -0,0 +1,258 @@ +#if defined _amxmodx_included +#endinput +#endif +#define _amxmodx_included +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +forward plugin_init(); +forward plugin_pause(); +forward plugin_unpause(); +forward server_changelevel(map[]); +forward plugin_cfg(); +forward plugin_end(); +forward plugin_log(); +forward plugin_precache(); +forward client_infochanged(id); +forward client_connect(id); +forward client_connectex(id, const name[], const ip[], reason[128]); +forward client_authorized(id, const authid[]); +#pragma deprecated Use client_disconnected() instead. +forward client_disconnect(id); +forward client_disconnected(id, bool:drop, message[], maxlen); +forward client_remove(id, bool:drop, const message[]); +forward client_command(id); +forward client_putinserver(id); +native register_plugin(const plugin_name[], const version[], const author[]); +native precache_model(const name[]); +native precache_sound(const name[]); +native precache_generic(const szFile[]); +native precache_event(type, const Name[], any:...); +native engine_changelevel(const map[]); +native set_user_info(index, const info[], const value[]); +native get_user_info(index, const info[], output[], len); +native set_localinfo(const info[], const value[]); +native get_localinfo(const info[], output[], len); +native show_motd(player, const message[], const header[] = ""); +native client_print(index, type, const message[], any:...); +native client_print_color(index, sender, const message[], any:...); +native engclient_print(player, type, const message[], any:...); +native console_print(id, const message[], any:...); +native console_cmd(id, const cmd[], any:...); +native register_event(const event[], const function[], const flags[], const cond[] = "", ...); +native register_event_ex(const event[], const function[], RegisterEventFlags:flags, const cond[] = "", ...); +native enable_event(handle); +native disable_event(handle); +native register_logevent(const function[], argsnum, ...); +native enable_logevent(handle); +native disable_logevent(handle); +native set_hudmessage(red = 200, green = 100, blue = 0, Float:x = -1.0, Float:y = 0.35, effects = 0, Float:fxtime = 6.0, Float:holdtime = 12.0, Float:fadeintime = 0.1, Float:fadeouttime = 0.2, channel = -1, alpha1 = 0, color2[4] = {255, 255, 250, 0}); +native show_hudmessage(index, const message[], any:...); +native set_dhudmessage(red = 200, green = 100, blue = 0, Float:x = -1.0, Float:y = 0.35, effects = 0, Float:fxtime = 6.0, Float:holdtime = 12.0, Float:fadeintime = 0.1, Float:fadeouttime = 0.2); +native show_dhudmessage(index, const message[], any:...); +native show_menu(index, keys, const menu[], time = -1, const title[] = ""); +native read_data(value, any:...); +native read_datanum(); +native read_datatype(); +native read_logdata(output[], len); +native read_logargc(); +native read_logargv(id, output[], len); +native parse_loguser(const text[], name[], nlen, &userid =-2, authid[] = "", alen = 0, team[] = "", tlen = 0); +native server_print(const message[], any:...); +native is_map_valid(const mapname[]); +native is_user_bot(index); +native is_user_hltv(index); +native is_user_connected(index); +native is_user_connecting(index); +native is_user_alive(index); +native is_dedicated_server(); +native is_linux_server(); +native is_jit_enabled(); +native get_amxx_verstring(buffer[], length); +native get_user_attacker(index, ...); +native Float:get_user_aiming(index, &id, &body = HIT_GENERIC, dist = 9999); +native get_user_frags(index); +native get_user_armor(index); +native get_user_deaths(index); +native get_user_health(index); +native get_user_index(const name[]); +native get_user_ip(index, ip[], len, without_port = 0); +native user_has_weapon(index, weapon, setweapon = -1); +native get_user_weapon(index, &clip = 0, &ammo = 0); +native get_user_ammo(index, weapon, &clip, &ammo); +native num_to_word(num, output[], len); +native get_user_team(index, team[] = "", len = 0); +native get_user_time(index, flag = 0); +native get_user_ping(index, &ping, &loss); +native get_user_origin(index, origin[3], mode = 0); +native get_user_weapons(index, weapons[32], &num); +native get_weaponname(id, weapon[], len); +native get_user_name(index, name[], len); +native get_user_authid(index, authid[], len); +native get_user_userid(index); +native user_slap(index, power, rnddir = 1); +native user_kill(index, flag = 0); +native log_amx(const string[], any:...); +native log_message(const message[], any:...); +native elog_message(const message[], any:...); +native log_to_file(const file[], const message[], any:...); +native get_playersnum(flag = 0); +native get_players(players[MAX_PLAYERS], &num, const flags[] = "", const team[] = ""); +native read_argv(id, output[], len); +native read_argv_int(id); +native Float:read_argv_float(id); +native read_args(output[], len); +native read_argc(); +native read_flags(const flags[]); +native get_flags(flags, output[], len); +native find_player(const flags[], ...); +native find_player_ex(FindPlayerFlags:flags, ...); +native remove_quotes(text[]); +native client_cmd(index, const command[], any:...); +native engclient_cmd(index, const command[], const arg1[] = "", const arg2[] = ""); +native amxclient_cmd(index, const command[], const arg1[] = "", const arg2[] = ""); +native server_cmd(const command[], any:...); +native get_mapname(name[], len); +native get_timeleft(); +native Float:get_gametime(); +native get_maxplayers(); +native get_modname(name[], len); +native get_time(const format[], output[], len); +native format_time(output[], len, const format[], time = -1); +native get_systime(offset = 0); +native parse_time(const input[], const format[], time = -1); +native set_task(Float:time, const function[], id = 0, const any:parameter[] = "", len = 0, const flags[] = "", repeat = 0); +native remove_task(id = 0, outside = 0); +native change_task(id = 0, Float:newTime = 1.0, outside = 0); +native task_exists(id = 0, outside = 0); +native set_user_flags(index, flags = -1, id = 0); +native get_user_flags(index, id = 0); +native remove_user_flags(index, flags = -1, id = 0); +native register_clcmd(const client_cmd[], const function[], flags = -1, const info[] = "", FlagManager = -1, bool:info_ml = false); +native register_concmd(const cmd[], const function[], flags = -1, const info[] = "", FlagManager = -1, bool:info_ml = false); +native register_srvcmd(const server_cmd[], const function[], flags = -1, const info[] = "", bool:info_ml = false); +native get_clcmd(index, command[], len1, &flags, info[], len2, flag, &bool:info_ml = false); +native get_clcmdsnum(flag); +native get_srvcmd(index, server_cmd[], len1, &flags, info[], len2, flag, &bool:info_ml = false); +native get_srvcmdsnum(flag); +native get_concmd(index, cmd[], len1, &flags, info[], len2, flag, id = -1, &bool:info_ml = false); +native get_concmd_plid(cid, flag_mask, id_type); +native get_concmdsnum(flag, id = -1); +native register_menuid(const menu[], outside = 0); +native register_menucmd(menuid, keys, const function[]); +native get_user_menu(index, &id, &keys); +native server_exec(); +native emit_sound(index, channel, const sample[], Float:vol, Float:att, flags, pitch); +native Float:random_float(Float:a, Float:b); +native random_num(a, b); +native get_user_msgid(const name[]); +native get_user_msgname(msgid, name[], len); +native get_xvar_id(const name[]); +native xvar_exists(const name[]); +native get_xvar_num(id); +native Float:get_xvar_float(id); +native set_xvar_num(id, value = 0); +native set_xvar_float(id, Float:value = 0.0); +native is_module_loaded(const name[]); +native get_module(id, name[], nameLen, author[], authorLen, version[], versionLen, &status); +native get_modulesnum(); +native is_plugin_loaded(const name[], bool:usefilename = false); +native get_plugin(index, filename[] = "", len1 = 0, name[] = "", len2 = 0, version[] = "", len3 = 0, author[] = "", len4 = 0, status[] = "", len5 = 0, ...); +native get_pluginsnum(); +native pause(const flag[], const param1[] = "", const param2[] = ""); +native unpause(const flag[], const param1[] = "", const param2[] = ""); +native callfunc_begin(const func[], const plugin[] = ""); +native callfunc_begin_i(func, plugin = -1); +native get_func_id(const funcName[], pluginId = -1); +native callfunc_push_int(value); +native callfunc_push_float(Float: value); +native callfunc_push_intrf(&value); +native callfunc_push_floatrf(&Float:value); +native callfunc_push_str(const VALUE[], bool:copyback = true); +native callfunc_push_array(const VALUE[], array_size, bool:copyback = true); +native callfunc_end(); +forward inconsistent_file(id, const filename[], reason[64]); +native force_unmodified(force_type, const mins[3], const maxs[3], const filename[]); +#pragma deprecated Use hash_string() function. Also, see Hash_* constants. +native md5(const szString[], md5buffer[34]); +#pragma deprecated Use hash_file() function. Also, see Hash_* constants. +native md5_file(const file[], md5buffer[34]); +native hash_string(const string[], const HashType:type, output[], const outputSize); +native hash_file(const fileName[], const HashType:type, output[], const outputSize); +native plugin_flags(hdr = 0, plid = -1); +#pragma deprecated Module dependency is now automatically handled by the compiler. This forward is no longer called. +forward plugin_modules(); +#pragma deprecated Module dependency is now automatically handled by the compiler. This native has no effect. +native require_module(const module[]); +#pragma deprecated AMXX is not shipping 64bits builds anymore. This native is basically guaranteed to return 0. +native is_amd64_server(); +native find_plugin_byfile(const filename[], ignoreCase = 1); +forward plugin_natives(); +native register_native(const name[], const handler[], style = 0); +native register_library(const library[]); +native log_error(error, const fmt[], any:...); +native param_convert(num); +native get_string(param, dest[], maxlen); +native set_string(param, dest[], maxlen); +native get_param(param); +native Float:get_param_f(param); +native get_param_byref(param); +native Float:get_float_byref(param); +native set_param_byref(param, value); +native set_float_byref(param, Float:value); +native get_array(param, dest[], size); +native get_array_f(param, Float:dest[], size); +native set_array(param, const source[], size); +native set_array_f(param, const Float:source[], size); +native set_error_filter(const handler[]); +native dbg_trace_begin(); +native dbg_trace_next(trace); +native dbg_trace_info(trace, &line, function[], maxLength1, file[], maxLength2); +native dbg_fmt_error(buffer[], maxLength); +native set_native_filter(const handler[]); +native set_module_filter(const handler[]); +native abort(error, const fmt[] = "", any:...); +native module_exists(const logtag[]); +native LibraryExists(const library[], LibType:type); +native next_hudchannel(player); +native CreateHudSyncObj(num = 0, ...); +native ShowSyncHudMsg(target, syncObj, const fmt[], any:...); +native ClearSyncHud(target, syncObj); +native int3(); +native set_fail_state(const fmt[], any:...); +native get_var_addr(any:...); +native get_addr_val(addr); +native set_addr_val(addr, val); +native CreateMultiForward(const name[], stop_type, ...); +native CreateOneForward(plugin_id, const name[], ...); +native PrepareArray(const array[], size, copyback = 0); +native ExecuteForward(forward_handle, &ret = 0, any:...); +native DestroyForward(forward_handle); +native arrayset(any:array[], any:value, size); +native get_weaponid(const name[]); +native admins_push(const AuthData[], const Password[], Access, Flags); +native admins_num(); +native admins_lookup(num, AdminProp:Property, Buffer[] = "", BufferSize = 0); +native admins_flush(); +native bool:has_map_ent_class(const classname[]); +forward OnConfigsExecuted(); +forward OnAutoConfigsBuffered(); +native AutoExecConfig(bool:autoCreate = true, const name[] = "", const folder[] = ""); +native RequestFrame(const callback[], any:data = 0); +#include diff --git a/bin/amxxdump/includes/amxmodx/amxmodx_version.inc b/bin/amxxdump/includes/amxmodx/amxmodx_version.inc new file mode 100644 index 0000000..49ce618 --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/amxmodx_version.inc @@ -0,0 +1,20 @@ + +#if defined _amxmodx_version_included + #endinput +#endif +#define _amxmodx_version_included + +#define AMXX_VERSION_TAG "" +#define AMXX_VERSION_CSET "363871a8" +#define AMXX_VERSION_MAJOR "1" +#define AMXX_VERSION_MAJOR_NUM 1 +#define AMXX_VERSION_MINOR "9" +#define AMXX_VERSION_MINOR_NUM 9 +#define AMXX_VERSION_RELEASE "0" +#define AMXX_VERSION_LOCAL_REV_NUM 5294 +#define AMXX_VERSION_LOCAL_REV "5294" +#define AMXX_VERSION 1.90 +#define AMXX_VERSION_NUM 190 + +stock const AMXX_VERSION_STR[] = "1.9.0.5294"; + \ No newline at end of file diff --git a/bin/amxxdump/includes/amxmodx/cellarray.inc b/bin/amxxdump/includes/amxmodx/cellarray.inc new file mode 100644 index 0000000..3b1cd99 --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/cellarray.inc @@ -0,0 +1,527 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +#if defined _cellarray_included + #endinput +#endif + +#define _cellarray_included + +/** + * Cellarray tag declaration + * + * @note These dynamic arrays are intended to be used for a form of global + * storage without requiring a #define that needs to be increased each + * time the plugin author requires more storage. These are not designed + * to be a full replacement for normal arrays, as those are faster and + * should be used whenever possible. + * @note Plugins are responsible for freeing all Array handles they acquire, + * including those from ArrayClone. Failing to free handles will result + * in the plugin and AMXX leaking memory. + */ +enum Array +{ + Invalid_Array = 0 +}; + + + +/** + * Returns the number of cells required to fit a string of the specified size + * (including the null terminator). + * + * @param size Number of bytes. + * + * @return Minimum number of cells required to fit the byte count. + */ +stock ByteCountToCells(size) +{ + if (!size) + { + return 1; + } + + return (size + 3) / 4; +} + +/** + * Creates a handle to a dynamically sized array. + * + * @note It is very important that the provided cellsize matches up with the + * buffer sizes that are passed with subsequent Array[Get|Set|Push] calls. + * @note Initially the "reserved" parameter was intended to create blank entries + * that would immediately be usable with Array[Get|Set] functions. This + * functionality was never working as intended, and can now be achieved + * using ArrayResize(). + * + * @param cellsize Size of each array entry in cells + * @param reserved Pre-allocates space in the array for the specified + * number of items. The items are not valid to read or set + * until they have actually been pushed into the array. + * + * @return New array handle, which must be freed via ArrayDestroy() + * @error If an invalid cellsize is provided an error will be + * thrown. + */ +native Array:ArrayCreate(cellsize = 1, reserved = 32); + +/** + * Clones an array, returning a new handle with the same size and data. + * + * @param which Array handle + * + * @return Handle to the cloned array on success, 0 otherwise + * @error If an invalid handle is provided an error will be + * thrown. + */ +native Array:ArrayClone(Array:which); + +/** + * Clears all entries from the array. + * + * @param which Array handle + * + * @noreturn + * @error Invalid handle + */ +native ArrayClear(Array:which); + +/** + * Returns the number of elements in the array. + * + * @param which Array handle + * + * @return Number of elements in the array + * @error If an invalid handle is provided an error will be + * thrown. + */ +native ArraySize(Array:which); + +/** + * Resizes an array. + * + * @note If the size is smaller than the current array size the array is + * truncated and data lost. + * + * @param which Array handle + * @param newsize New size + * + * @noreturn + * @error If an invalid handle is provided or the resizing + * operation runs out of memory, an error will be thrown. + */ +native bool:ArrayResize(Array:which, newsize); + +/** + * Retrieves an array of data from a cellarray. + * + * @note If the size parameter is specified as -1 the output buffer has to match + * the size the array was created with. + * + * @param which Array handle + * @param item Item index in the array + * @param output Buffer to copy value to + * @param size If not set, assumes the buffer size is equal to the + * cellsize. Otherwise, the specified size is used. + * + * @return Number of cells copied + * @error If an invalid handle or index is provided an error will + * be thrown. + */ +native ArrayGetArray(Array:which, item, any:output[], size = -1); + +/** + * Returns a single cell of data from an array + * + * @param which Array handle + * @param item Item index in the array + * @param block If the array has a cellsize >1 this optionally specifies + * which block to read from + * @param asChar If true reads the value as a byte instead of a cell + * + * @return Integer value + * @error If an invalid handle, index or block is provided an + * error will be thrown. + */ +native any:ArrayGetCell(Array:which, item, block = 0, bool:asChar = false); + +/** + * Returieves string data from an array. + * + * @param which Array handle + * @param item Item index in the array + * @param output Buffer to copy value to + * @param size Maximum size of the buffer + * + * @return Number of characters copied + * @error If an invalid handle or an invalid index is provided an + * error will be thrown. + */ +native ArrayGetString(Array:which, item, output[], size); + +/** + * Fills an item's data with the contents of an array. + * + * @note If the size parameter is specified as -1 the input buffer has to match + * the size the array was created with. + * @note The item index must already be valid. Use ArrayPushArray to create + * a new array item in the cellarray. + * + * @param which Array handle + * @param item Item index in the array + * @param input Array to copy to the cellarray + * @param size If not set, assumes the buffer size is equal to the + * cellsize. Otherwise, the specified size is used. + * + * @return Number of cells copied + * @error If an invalid handle or an invalid index is provided an + * error will be thrown. + */ +native ArraySetArray(Array:which, item, const any:input[], size =-1); + +/** + * Sets an item's data to a single cell value. + * + * @note The item index must already be valid. Use ArrayPushArray to create + * a new array item in the cellarray. + * + * @param which Array handle + * @param item Item index in the array + * @param input Value to set + * @param block If the array has a cellsize >1 this optionally specifies + * which block to write to + * @param asChar If true writes the value as a byte instead of a cell + * + * @noreturn + * @error If an invalid handle, index or block is provided an + * error will be thrown. + */ +native ArraySetCell(Array:which, item, any:input, block = 0, bool:asChar = false); + +/** + * Sets an item's data to a string value. + * + * @note The input will be truncated if it is longer than the cellsize the array + * was created with. + * @note The item index must already be valid. Use ArrayPushString to create + * a new array item in the cellarray. + * + * @param which Array handle + * @param item Item index in the array + * @param input String to copy to the array + * + * @return Number of characters copied + * @error If an invalid handle or an invalid index is provided an + * error will be thrown. + */ +native ArraySetString(Array:which, item, const input[]); + +/** + * Creates a new item at the end of the cellarray and copies the provided array + * into it. + * + * @note The input will be truncated if it is bigger than the cellsize the array + * was created with. + * + * @param which Array handle + * @param input Array to copy to the cellarray + * @param size If not set, assumes the buffer size is equal to the + * cellsize. Otherwise, the specified size is used. + * + * @return Index of the new entry + * @error If an invalid handle is provided or the resizing + * operation runs out of memory, an error will be thrown. + */ +native ArrayPushArray(Array:which, const any:input[], size = -1); + +/** + * Creates a new item at the end of the array and sets the item's single cell + * value. + * + * @param which Array handle + * @param input Value to set + * + * @return Index of the new entry + * @error If an invalid handle is provided or the resizing + * operation runs out of memory, an error will be thrown. + */ +native ArrayPushCell(Array:which, any:input); + +/** + * Creates a new item at the end of the array and copies the provided string + * into it. + * + * @note The input will be truncated if it is longer than the cellsize the array + * was created with. + * + * @param which Array handle + * @param input String to copy to the array + * + * @return Index of the new entry + * @error If an invalid handle is provided or the resizing + * operation runs out of memory, an error will be thrown. + */ +native ArrayPushString(Array:which, const input[]); + +/** + * Creates a new item behind the specified item and copies the provided array + * into it. All items beyond it get shifted up by one. + * + * @param which Array handle + * @param item Item index in the array + * @param input Array to copy to the cellarray + * + * @noreturn + * @error If an invalid handle or an invalid index is provided an + * error will be thrown. + */ +native ArrayInsertArrayAfter(Array:which, item, const any:input[]); + +/** + * Creates a new item behind the specified item and sets the item's single cell + * value. All items beyond it get shifted up by one. + * + * @param which Array handle + * @param item Item index in the array + * @param input Value to set + * + * @noreturn + * @error If an invalid handle or an invalid index is provided an + * error will be thrown. + */ +native ArrayInsertCellAfter(Array:which, item, any:input); + +/** + * Creates a new item behind the specified item and copies the provided string + * into it. All items beyond it get shifted up by one. + * + * @note The input will be truncated if it is longer than the cellsize the array + * was created with. + * + * @param which Array handle + * @param item Item index in the array + * @param input String to copy to the array + * + * @noreturn + * @error If an invalid handle or an invalid index is provided an + * error will be thrown. + */ +native ArrayInsertStringAfter(Array:which, item, const input[]); + +/** + * Creates a new item in front of the specified item and copies the provided + * array into it. All items beyond it get shifted up by one. + * + * @param which Array handle + * @param item Item index in the array + * @param input Array to copy to the cellarray + * + * @noreturn + * @error If an invalid handle or an invalid index is provided an + * error will be thrown. + */ +native ArrayInsertArrayBefore(Array:which, item, const any:input[]); + +/** + * Creates a new item in front of the specified item and sets the item's single + * cell value. All items beyond it get shifted up by one. + * + * @param which Array handle + * @param item Item index in the array + * @param input Value to set + * + * @noreturn + * @error If an invalid handle or an invalid index is provided an + * error will be thrown. + */ +native ArrayInsertCellBefore(Array:which, item, const any:input); + +/** + * Creates a new item in front of the specified item and copies the provided + * string into it. All items beyond it get shifted up by one. + * + * @note The input will be truncated if it is longer than the cellsize the array + * was created with. + * + * @param which Array handle + * @param item Item index in the array + * @param input String to copy to the array + * + * @noreturn + * @error If an invalid handle or an invalid index is provided an + * error will be thrown. + */ +native ArrayInsertStringBefore(Array:which, item, const input[]); + +/** + * Swaps the position of two items. + * + * @param which Array handle + * @param item1,item2 Item pair to swap + * + * @noreturn + * @error If an invalid handle or an invalid index is provided an + * error will be thrown. + */ +native ArraySwap(Array:which, item1, item2); + +/** + * Deletes an item from the array. All items beyond it get shifted down by one. + * + * @param which Array handle + * @param item Item to delete + * + * @noreturn + * @error If an invalid handle or an invalid index is provided an + * error will be thrown. + */ +native ArrayDeleteItem(Array:which, item); + +/** + * Searches through the array and returns the index of the first occurence of + * the specified string. + * + * @param which Array handle + * @param item String to search for + * + * @return Array index on success, -1 if the string can't be found + * @error Invalid handle. + */ +native ArrayFindString(Array:which, const item[]); + +/** + * Searches through the array and returns the index of the first occurence of + * the specified value. + * + * @param which Array handle + * @param item Value to search for + * + * @return Array index on success, -1 if the value can't be found + * @error If an invalid handle is provided an error will be + * thrown. + */ +native ArrayFindValue(Array:which, any:item); + +/** + * Creates a special handle that can be passed to a string format routine for + * printing as a string (with the %a format option). + * + * @note It is recommended to pass the function as a parameter to the format + * routine directly. The array item must contain a null-terminated string! + * @note Do not save or otherwise use the handles returned by this function. + * @note Example usage: + * console_print(id, "%a", ArrayGetStringHandle(MessageArray, i)); + * + * @param which Array handle + * @param item Item to retrieve handle of + * + * @return Handle to the item + * @error If an invalid handle or an invalid index is provided an + * error will be thrown. + */ +native DoNotUse:ArrayGetStringHandle(Array:which, item); + +/** + * Destroys the array and frees its memory. + * + * @note The function automatically sets the variable passed to it to 0 to aid + * in preventing accidental usage after destroy. + * + * @param which Array to destroy + * + * @return 1 if the Array was destroyed, 0 if nothing had to be + * destroyed (invalid handle) + */ +native ArrayDestroy(&Array:which); + +/** + * Similar to sorting.inc's CustomSort, the sorting algorithm then uses the + * custom comparison function to sort the data. + * + * @note The function is called in the following manner: + * + * public MySortFunc(Array:array, item1, item2, const data[], data_size) + * + * array - Array handle in its current un-sorted state + * item1, item2 - Current item pair being compared + * data[] - Extra data array passed to the sort func + * data_size - Size of extra data + * + * @note The comparison function should return: + * -1 if item1 should go before item2 + * 0 if item1 and item2 are equal + * 1 if item1 should go after item2 + * + * @note All parameters after item2 are optional and do not need to be specified + * and used. + * @note Unlike the sorting.inc version, the array passed to the callback is not + * in mid-sorted state. + * + * @param array Array handle + * @param comparefunc Callback function used for comparison + * @param data Extra data that is passed through to the callback + * @param data_size Size of extra data + * + * @noreturn + * @error If an invalid handle or an invalid callback is provided + * an error will be thrown. + */ +native ArraySort(Array:array, const comparefunc[], data[]="", data_size=0); + +/** + * A faster version of ArraySort, the sorting algorithm then uses the custom + * comparison function to sort the data. + * + * @note The advantage of this function is that the data of the elements being + * compared is directly passed to the function, instead of the item + * indexes that are passed by ArraySort. This removes the need for calling + * ArrayGet[Cell|String|Array] every time before being able to compare the + * elements. + * + * @note For Arrays with a cellsize of 1 (used for storing integers and floats), + * the function is called in the following manner: + * + * public MySortFunc(Array:array, elem1, elem2, const data[], data_size) + * + * array - Array handle in its current un-sorted state + * elem1, elem2 - Current element pair being compared + * data[] - Extra data array passed to the sort func + * data_size - Size of extra data + * + * @note For Arrays with a cellsize larger than 1 (used for storing arrays and + * strings), the function is called in the following manner: + * + * public MySortFunc(Array:array, elem1[], elem2[], const data[], data_size) + * + * array - Array handle in its current un-sorted state + * elem1[], elem2[] - Current element pair being compared + * data[] - Extra data array passed to the sort func + * data_size - Size of extra data + * + * + * @note The comparison function should return: + * -1 if elem1 should go before elem2 + * 0 if elem1 and elem2 are equal + * 1 if elem1 should go after elem2 + * + * @note All parameters after item2 are optional and do not need to be specified + * and used. + * @note Unlike the sorting.inc version, the array passed to the callback is not + * in mid-sorted state. + * + * @param array Array handle + * @param comparefunc Callback function used for comparison + * @param data Extra data that is passed through to the callback + * @param data_size Size of extra data + * + * @noreturn + * @error If an invalid handle or an invalid callback is provided + * an error will be thrown. + */ +native ArraySortEx(Array:array, const comparefunc[], data[]="", data_size=0); diff --git a/bin/amxxdump/includes/amxmodx/cellstack.inc b/bin/amxxdump/includes/amxmodx/cellstack.inc new file mode 100644 index 0000000..15e8567 --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/cellstack.inc @@ -0,0 +1,166 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +#if defined _cellstack_included + #endinput +#endif +#define _cellstack_included + +/** + * Stack tag declaration + * + * @note Plugins are responsible for freeing all Stack handles they acquire. + * Failing to free handles will result in the plugin and AMXX leaking + * memory. + */ +enum Stack +{ + Invalid_Stack = 0 +}; + +/** + * Creates a stack structure. A stack is a LIFO (last in, first out) vector of + * of items. It has O(1) insertion and O(1) removal. + * + * @note Stacks provide only two operations: Push (adding an item to the top) + * and Pop (remove an item from the top, in reverse-push order). + * @note The contents of the stack are uniform; i.e. storing a string and then + * retrieving it as an integer is NOT the same as str_to_num()! + * @note The "blocksize" determines how many cells each stack slot has, it can + * not be changed after creation. + * + * @param blocksize The number of cells each entry in the stack can hold + * + * @return New stack Handle, which must be freed via DestroyStack() + * @error If an invalid blocksize is provided an error will be + * thrown. + */ +native Stack:CreateStack(blocksize = 1); + +/** + * Pushes a value onto the end of the stack, adding a new index. + * + * @note This may safely be used even if the stack has a blocksize greater than + * 1. + * + * @param handle Stack handle + * @param value Value to push + * + * @noreturn + * @error If an invalid handle is provided or the resizing + * operation runs out of memory, an error will be thrown. + */ +native PushStackCell(Stack:handle, any:value); + +/** + * Pushes a string onto the end of a stack, truncating it if it is too long. + * + * @param handle Stack handle + * @param value String to push + * + * @noreturn + * @error If an invalid handle is provided or the resizing + * operation runs out of memory, an error will be thrown. + */ +native PushStackString(Stack:handle, const value[]); + +/** + * Pushes an array of cells onto the end of a stack. The cells are pushed as a + * block (i.e. the entire array takes up one stack slot), rather than pushing + * each cell individually. + * + * @param handle Stack handle + * @param values Block of values to copy + * @param size If not set, the number of elements copied from the array + * will be equal to the blocksize, if set higher than the + * blocksize, the operation will be truncated, + * + * @noreturn + * @error If an invalid handle is provided or the resizing + * operation runs out of memory, an error will be thrown. + */ +native PushStackArray(Stack:handle, const any:values[], size= -1); + +/** + * Pops a cell value from a stack. + * + * @param handle Stack handle + * @param value Variable to store the value in + * @param block Optionally specify which block to read from (useful if the + * blocksize is > 0) + * @param asChar Optionally read as a byte instead of a cell + * + * @return True on success, false if the stack is empty. + * @error If an invalid handle, invalid block or invalid byte is + * provided, an error will be thrown. + */ +native bool:PopStackCell(Stack:handle, &any:value, block = 0, bool:asChar = false); + +/** + * Pops a string value from a stack. + * + * @param handle Stack handle + * @param buffer Buffer to copy string to + * @param maxlength Maximum size of the buffer + * @param written Variable to store number of characters copied to + * + * @return True on success, false if the stack is empty + * @error If an invalid handle is provided an error will be thrown. + */ +native bool:PopStackString(Stack:handle, buffer[], maxlength, &written = 0); + +/** + * Pops an array of cells from a stack. + * + * @param handle Stack handle + * @param buffer Array to copy value to + * @param size Size of buffer, if not set (-1) assumes the size is equal to + * the stack blocksize + * + * @return True on success, false if the stack is empty + * @error If an invalid handle is provided an error will be thrown. + */ +native bool:PopStackArray(Stack:handle, any:buffer[], size = -1); + +/** + * Returns if a stack is empty. + * + * @param handle Stack handle + * + * @return True if empty, false if not empty + * @error If an invalid handle is provided an error will be thrown. + */ +native bool:IsStackEmpty(Stack:handle); + +/** + * Pops a value off a stack, ignoring it completely. + * + * @param handle Stack handle + * + * @return True if a value was popped, false if stack is empty + * @error If an invalid handle is provided an error will be thrown. + */ +stock PopStack(Stack:handle) +{ + new value; + return PopStackCell(handle, value); +} + +/** + * Destroys a stack and frees its memory. + * + * @note The function automatically sets the variable passed to it to 0 to aid + * in preventing accidental usage after destroy. + * + * @param handle Stack to destroy + * + * @return 1 if the Stack was destroyed, 0 if nothing had to be + * destroyed (invalid handle) + */ +native DestroyStack(&Stack:handle); diff --git a/bin/amxxdump/includes/amxmodx/celltrie.inc b/bin/amxxdump/includes/amxmodx/celltrie.inc new file mode 100644 index 0000000..cf69dfe --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/celltrie.inc @@ -0,0 +1,412 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +#if defined _celltrie_included + #endinput +#endif +#define _celltrie_included + +/** + * Hash map tag declaration + * + * @note The word "Trie" in this API is historical. As of AMX Mod X 1.8.3, + * tries have been internally replaced with hash tables, which have O(1) + * insertion time instead of O(n). + * @note Plugins are responsible for freeing all Trie handles they acquire. + * Failing to free handles will result in the plugin and AMXX leaking + * memory. + */ +enum Trie +{ + Invalid_Trie = 0 +}; + +/** + * Hash map iterator tag declaration + * + * @note The word "Trie" in this API is historical. As of AMX Mod X 1.8.3, + * tries have been internally replaced with hash tables, which have O(1) + * insertion time instead of O(n). + * @note Plugins are responsible for freeing all TrieIter handles they acquire. + * Failing to free handles will result in the plugin and AMXX leaking + * memory. + */ +enum TrieIter +{ + Invalid_TrieIter = 0 +} + +/** + * Hash map snapshot tag declaration + * + * @note Plugins are responsible for freeing all Snapshot handles they acquire. + * Failing to free handles will result in the plugin and AMXX leaking + * memory. + */ +enum Snapshot +{ + Invalid_Snapshot = 0 +}; + +/** + * Creates a hash map. A hash map is a container that maps strings (called keys) + * to arbitrary values (cells, arrays or strings). + * + * @note Keys in a hash map are unique so there is no more than one entry in the + * map for any given key. + * @note Insertion, deletion, and lookup in a hash map are all considered to be + * fast operations, amortized to O(1), or constant time. + * + * @return New Map handle, which must be freed via TrieDestroy() + */ +native Trie:TrieCreate(); + +/** + * Clears all entries from a Map. + * + * @param handle Map handle + * + * @error If an invalid handle is provided an error will be + * thrown. + * @noreturn + */ +native TrieClear(Trie:handle); + +/** + * Sets a cell value in a hash map, either inserting a new entry or replacing + * an old one. + * + * @param handle Map handle + * @param key Key string + * @param value Value to store + * @param replace If false the operation will fail if the key is already set + * + * @return 1 on success, 0 otherwise + * @error If an invalid handle is provided an error will be + * thrown. + */ +native TrieSetCell(Trie:handle, const key[], any:value, bool:replace = true); + +/** + * Sets a string value in a hash map, either inserting a new entry or replacing + * an old one. + * + * @param handle Map handle + * @param key Key string + * @param value String to store + * @param replace If false the operation will fail if the key is already set + * + * @return 1 on success, 0 otherwise + * @error If an invalid handle is provided an error will be + * thrown. + */ +native TrieSetString(Trie:handle, const key[], const value[], bool:replace = true); + +/** + * Sets an array value in a hash map, either inserting a new entry or replacing + * an old one. + * + * @param handle Map handle + * @param key Key string + * @param buffer Array to store + * @param size Array size + * @param replace If false the operation will fail if the key is already set + * + * @return 1 on success, 0 otherwise + * @error If an invalid handle is provided an error will be + * thrown. or invalid array size + */ +native TrieSetArray(Trie:handle, const key[], const any:buffer[], size, bool:replace = true); + +/** + * Retrieves a cell value from a hash map. + * + * @param handle Map handle + * @param key Key string + * @param value Variable to store value to + * + * @return True on success, false if either the key is not set or the + * value type does not match (value is string or array) + * @error If an invalid handle is provided an error will be + * thrown. + */ +native bool:TrieGetCell(Trie:handle, const key[], &any:value); + +/** + * Retrieves a string from a hash map. + * + * @param handle Map handle + * @param key Key string + * @param output Buffer to copy the value to + * @param outputsize Maximum size of buffer + * @param size Optional variable to store the number of cells written + * to the buffer in + * + * @return True on success, false if either the key is not set or + * the value type does not match (value is cell or array) + * @error If an invalid handle is provided an error will be + * thrown. + */ +native bool:TrieGetString(Trie:handle, const key[], output[], outputsize, &size = 0); + +/** + * Retrieves a string from a hash map. + * + * @param handle Map handle + * @param key Key string + * @param output Array to copy the value to + * @param outputsize Maximum size of array + * @param size Optional variable to store the number of cells written + * to the array in + * + * @return True on success, false if either the key is not set or + * the value type does not match (value is cell or string) + * @error If an invalid handle or array size is provided an error + * will be thrown. + */ +native bool:TrieGetArray(Trie:handle, const key[], any:output[], outputsize, &size = 0); + +/** + * Removes an entry from a hash map. + * + * @param handle Map handle + * @param key Key string + * + * @return True on success, false if the key was never set + * @error If an invalid handle is provided an error will be + * thrown. + */ +native bool:TrieDeleteKey(Trie:handle, const key[]); + +/** + * Checks a hash map for the existence of an entry. + * + * @param handle Map handle + * @param key Key string + * + * @return True if the key is set, false otherwise + * @error If an invalid handle is provided an error will be + * thrown. + */ +native bool:TrieKeyExists(Trie:handle, const key[]); + +/** + * Destroys a hash map and frees its memory. + * + * @note The function automatically sets the variable passed to it to 0 to aid + * in preventing accidental usage after destroy. + * + * @param handle Map handle + * + * @return 1 on success, 0 if an invalid handle was passed in + */ +native TrieDestroy(&Trie:handle); + +/** + * Returns the number of entries in a hash map. + * + * @param handle Map handle + * + * @return Number of elements in the hash map + * @error If an invalid handle is provided an error will be + * thrown. + */ +native TrieGetSize(Trie:handle); + +/** + * Creates a snapshot of all keys in a hash map. If the map is changed + * afterwards, the changes are not reflected in the snapshot. + * Keys are not sorted. + * + * @param handle Map handle + * + * @return New map snapshot handle, which must be freed via + * TrieSnapshotDestroy() + * @error If an invalid handle is provided an error will be + * thrown. + */ +native Snapshot:TrieSnapshotCreate(Trie:handle); + +/** + * Returns the number of keys in a map snapshot. Note that this may be + * different from the size of the map, since the map can change after the + * snapshot of its keys was taken. + * + * @param handle Map snapshot handle + * + * @return Number of keys + * @error If an invalid handle is provided an error will be + * thrown. + */ +native TrieSnapshotLength(Snapshot:handle); + +/** + * Returns the buffer size required to store a given key. That is, it returns + * the length of the key plus one. + * + * @param handle Map snapshot handle + * @param index Key index (starting from 0) + * + * @return Buffer size required to store the key string + * @error If an invalid handle is provided an error will be + * thrown. or index out of range + */ +native TrieSnapshotKeyBufferSize(Snapshot:handle, index); + +/** + * Retrieves the key string of a given key in a map snapshot. + * + * @param handle Map snapshot handle + * @param index Key index (starting from 0) + * @param buffer String buffer + * @param maxlength Maximum buffer length + * + * @return Number of bytes written to the buffer + * @error If an invalid handle is provided an error will be + * thrown. or index out of range + */ +native TrieSnapshotGetKey(Snapshot:handle, index, buffer[], maxlength); + +/** + * Destroys a map snapshot and frees its memory. + * + * @note The function automatically sets the variable passed to it to 0 to aid + * in preventing accidental usage after destroy. + * + * @param handle Map snapshot handle + * + * @return 1 on success, 0 if an invalid handle was passed in + */ +native TrieSnapshotDestroy(&Snapshot:handle); + + +/** + * Creates an iterator for a map. It provides iterative read-only access to the + * maps contents. + * + * @note Removing or adding keys to the underlying map will invalidate all its + * iterators. Updating values of existing keys is allowed and the changes + * will be immediately reflected in the iterator. + * @note Iterators are designed to be short-lived and not stored, and creating + * them is very cheap. Reading data from an iterator is just as fast as + * reading directly from the map. + * @note Just like in snapshots the keys are not sorted. + * + * @return New iterator handle, which must be freed via TrieIterDestroy(). + * @error Invalid Handle + */ +native TrieIter:TrieIterCreate(Trie:handle); + +/** + * Returns if the iterator has reached its end and no more data can be read. + * + * @param handle Iterator handle + * + * @return True if iterator has reached the end, false otherwise + * @error Invalid Handle + * Iterator has been closed (underlying map destroyed) + * Iterator is outdated + */ +native bool:TrieIterEnded(TrieIter:handle); + +/** + * Advances the iterator to the next key/value pair if one is available. + * + * @param handle Iterator handle + * + * @error Invalid Handle + * Iterator has been closed (underlying map destroyed) + * Iterator is outdated + */ +native TrieIterNext(TrieIter:handle); + +/** + * Retrieves the key the iterator currently points to. + * + * @param handle Iterator handle. + * @param key Buffer to store the current key in. + * @param outputsize Maximum size of string buffer. + * + * @return Nnumber of bytes written to the buffer + * @error Invalid handle + * Iterator has been closed (underlying map destroyed) + * Iterator is outdated + */ +native TrieIterGetKey(TrieIter:handle, key[], outputsize); + +/** + * Retrieves the number of elements in the underlying map. + * + * @note When used on a valid iterator this is exactly the same as calling TrieGetSize on the map directly. + * + * @param handle Iterator handle + * + * @return Number of elements in the map + * @error Invalid handle + * Iterator has been closed (underlying map destroyed) + * Iterator is outdated + */ +native TrieIterGetSize(TrieIter:handle); + +/** + * Retrieves a value at the current position of the iterator. + * + * @param handle Iterator handle + * @param value Variable to store value in + * + * @return True on success, false if the iterator is empty or the current + * value is an array or a string. + * @error Invalid handle + * Iterator has been closed (underlying map destroyed) + * Iterator is outdated + */ +native bool:TrieIterGetCell(TrieIter:handle, &any:value); + +/** + * Retrieves a string at the current position of the iterator. + * + * @param handle Iterator handle + * @param buffer Buffer to store the string in + * @param outputsize Maximum size of string buffer + * @param size Optional parameter to store the number of bytes written to the buffer. + * + * @return True on success, false if the iterator is empty or the current value + * is not a string. + * @error Invalid handle + * Invalid buffer size + * Iterator has been closed (underlying map destroyed) + * Iterator is outdated + */ +native bool:TrieIterGetString(TrieIter:handle, buffer[], outputsize, &size = 0); + +/** + * Retrieves an array at the current position of the iterator. + * + * @param handle Iterator handle + * @param buffer Buffer to store the array + * @param outputsize Maximum size of buffer + * @param size Optional parameter to store the number of bytes written to the buffer + * + * @return True on success, false if the iterator is empty or the current + * value is not an array. + * @error Invalid handle + * Invalid buffer size + * Iterator has been closed (underlying map destroyed) + * Iterator is outdated + */ +native bool:TrieIterGetArray(TrieIter:handle, any:array[], outputsize, &size = 0); + +/** + * Destroys an iterator handle. + * + * @param handle Iterator handle. + * + * @return True on success, false if the value was never set. + */ +native TrieIterDestroy(&TrieIter:handle); diff --git a/bin/amxxdump/includes/amxmodx/core.inc b/bin/amxxdump/includes/amxmodx/core.inc new file mode 100644 index 0000000..d78e9b2 --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/core.inc @@ -0,0 +1,202 @@ +/* Core functions +* +* (c) Copyright 1998-2003, ITB CompuPhase +* +* This file is provided as is (no warranties). +*/ + +#if defined _core_included + #endinput +#endif +#define _core_included + +/** + * Returns the free memory space available to the plugin. + * + * @note This is a debugging function that is not intended for general plugin + * use. + * + * @return Free memory space in bytes + */ +native heapspace(); + +/** + * Returns the function index of a public function declared in the plugin. + * + * @param name Function name + * + * @return Function index > 0 on success, -1 if function was not found + * @error If the function name is too long (longer than 63 characters) + * an error will be thrown. + */ +native funcidx(const name[]); + +/** + * Returns the number of arguments passed into the currently executed function. + * + * @return Number of arguments passed + */ +native numargs(); + +/** + * Retrieves an argument value passed into the currently executed function. + * + * @param arg Argument index + * @param index Index to retrieve from the argument (for arrays and strings) + * + * @return Argument value at given index + */ +native getarg(arg, index = 0); + +/** + * Sets the value of an argument passed into the currently executed function. + * + * @note This is not equal to assigning a new value to a by-reference argument. + * + * @param arg Argument index + * @param index Index to set in the argument (for arrays and strings) + */ +native setarg(arg, index = 0, value); + +/** + * Converts a character to lowercase. + * + * @note This is not UTF8 or locale-safe. + * + * @param c Character to convert + * + * @return Converted character + */ +native tolower(c); + +/** + * Converts a character to uppercase. + * + * @note This is not UTF8 or locale-safe. + * + * @param c Character to convert + * + * @return Converted character + */ +native toupper(c); + +/** + * Swaps the bytes of a value (the lowest byte becomes the highest byte). + * + * @param c Value to swap + * + * @return Byte-swapped value + */ +native swapchars(c); + +/** + * Returns a random number between 0 and a specified upper bound. + * + * @param max Exclusive upper bound + * + * @return Random value + */ +native random(max); + +/** + * Returns the smaller of two provided values. + * + * @param value1 Value one + * @param value2 Value two + * + * @return Smaller of the two values + */ +native min(value1, value2); + +/** + * Returns the bigger of two provided values. + * + * @param value1 Value one + * @param value2 Value two + * + * @return Bigger of the two values + */ +native max(value1, value2); + +/** + * Limits a provided value between two specified bounds. + * + * @param value Value to clamp + * @param min Lower bound + * @param max Upper bound + * + * @return The value if it is between the lower and upper bound, min if + * value is below, max if it is above the specified bounds. + */ +native clamp(value, min = cellmin, max = cellmax); + +/** + * Returns a value raised to a specified exponent. + * + * @param value Value + * @param exponent Exponent to raise value to + * + * @return Value to the power of exponent + */ +native power(value, exponent); + +/** + * Returns the approximated square root of a value. + * + * @note This uses a simple successice approximation algorithm (continuously + * dividing the value) and only deals with integers, this makes it very + * imprecise. + * + * @param value Value + * + * @return Square root of the value + */ +native sqroot(value); + +/** + * Retrieves the current time in hours, minutes and seconds. + * + * @param hour Variable to store hours in + * @param minute Variable to store minutes in + * @param second Variable to store seconds in + * + * @return Unix timestamp + */ +native time(&hour = 0, &minute = 0, &second = 0); + +/** + * Retrieves the current date in year, month and day. + * + * @param year Variable to store year in + * @param month Variable to store month in + * @param day Variable to store day in + * + * @noreturn + */ +native date(&year = 0, &month = 0, &day = 0); + +/** + * Returns the elapsed CPU seconds. + * + * @note This is a debugging function that is not intended for general plugin + * use. + * @note This uses the C clock() function internally and comes with all its + * drawbacks attached. + * + * @param granularity Unused + * + * @return Number of CPU seconds elapsed + */ +native tickcount(&granularity = 0); + +/** + * Returns the absolute value of a number. + * + * @param x Integral value + * + * @return Absolute value of x (x if it is greater than 0, -x otherwise) + */ +stock abs(x) +{ + return x > 0 ? x : -x; +} diff --git a/bin/amxxdump/includes/amxmodx/core.inc.temp b/bin/amxxdump/includes/amxmodx/core.inc.temp new file mode 100644 index 0000000..b66ca53 --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/core.inc.temp @@ -0,0 +1,25 @@ +#if defined _core_included +#endinput +#endif +#define _core_included +native heapspace(); +native funcidx(const name[]); +native numargs(); +native getarg(arg, index = 0); +native setarg(arg, index = 0, value); +native tolower(c); +native toupper(c); +native swapchars(c); +native random(max); +native min(value1, value2); +native max(value1, value2); +native clamp(value, min = cellmin, max = cellmax); +native power(value, exponent); +native sqroot(value); +native time(&hour = 0, &minute = 0, &second = 0); +native date(&year = 0, &month = 0, &day = 0); +native tickcount(&granularity = 0); +stock abs(x) +{ +return x > 0 ? x : -x; +} diff --git a/bin/amxxdump/includes/amxmodx/crxranks.inc b/bin/amxxdump/includes/amxmodx/crxranks.inc new file mode 100644 index 0000000..e491545 --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/crxranks.inc @@ -0,0 +1,309 @@ +#if defined _crxranks_included + #endinput +#endif + +#define _crxranks_included + +#if !defined _crxranks_const_included + #include +#endif + +/** + * Called when the client's level changes. + * + * @param id Client index. + * @param level New level. + * @param levelup True if the client gained a level, false if he lost one. + * @noreturn + */ +forward crxranks_user_level_updated(id, level, bool:levelup) + +/** + * Called right before the client receives XP. + * + * @param id Client index. + * @param xp Amount of XP ready to be received. + * @param source The XP source. + * @return CRXRANKS_STOP to prevent the XP from being added, + * CRXRANKS_CONTINUE to let the XP pass through, + * any integer value to modify the amount of XP that + * is going to be received + */ +forward crxranks_user_receive_xp(id, xp, CRXRanks_XPSources:source) + +/** + * Called right after the client's XP amount changes. + * + * @param id Client index. + * @param xp Amount of XP the client has after the change. + * @param source The XP source that caused the change. + * @noreturn + */ +forward crxranks_user_xp_updated(id, xp, CRXRanks_XPSources:source) + +/** + * Returns the chat prefix set in the plugin's configuration file. + * + * @param buffer Buffer to store the prefix in. + * @param len Maximum buffer length. + * @noreturn + */ +native crxranks_get_chat_prefix(buffer[], len) + +/** + * Returns the flags that clients will receive when they reach the final level. + * + * @param buffer Buffer to store the flags in. + * @param len Maximum buffer length. + * @return Flags as bit value. + */ +native crxranks_get_final_flags(buffer[] = "", len = 0) + +/** + * Returns the HUD info format set in the plugin's configuration file. + * + * @param final If true, it will get the HUD_FORMAT_FINAL settings, otherwise HUD_FORMAT if false. + * @param buffer Buffer to store the HUD info format in. + * @param len Maximum buffer length. + * @noreturn + */ +native crxranks_get_hudinfo_format(bool:final, buffer[], len) + +/** + * Returns the number of available levels. + * + * @return Number of available levels. + */ +native crxranks_get_max_levels() + +/** + * Searches for a rank name by a specific level number. + * + * @param level Level number. + * @param buffer Buffer to store the rank name in. + * @param len Maximum buffer length. + * @return 0 if the level number is out of range, 1 otherwise. + */ +native crxranks_get_rank_by_level(level, buffer[], len) + +/** + * Returns the data saving type set in the plugin's configuration file. + * + * @note You can use the constants CRXRANKS_ST_NICKNAME, CRXRANKS_ST_IP + * and CRXRANKS_ST_STEAMID instead of numbers. + * + * @return 0 if it's set to nickname, 1 for IP and 2 for SteamID. + */ +native CRXRanks_SaveTypes:crxranks_get_save_type() + +/** + * Returns a key value set in the [Settings] section in the plugin's configuration file. + * + * @param key Key to search for. + * @param value Buffer to store the value in. + * @param len Maximum buffer length. + * @return True if the key was found, false otherwise. + */ +native bool:crxranks_get_setting(key[], value[], len) + +/** + * Returns the client's HUD information. + * + * @param id Client index. + * @param buffer Buffer to store the HUD information in. + * @param len Maximum buffer length. + * @noreturn + */ +native crxranks_get_user_hudinfo(id, buffer[], len) + +/** + * Returns the client's current level. + * + * @param id Client index. + * @return Client's current level. + */ +native crxranks_get_user_level(id) + +/** + * Returns the client's next rank. + * + * @param id Client index. + * @param buffer Buffer to store the rank name in. + * @param len Maximum buffer length. + * @noreturn + */ +native crxranks_get_user_next_rank(id, buffer[], len) + +/** + * Returns the XP needed for the client to reach the next level. + * + * @param id Client index. + * @return XP needed for the client to reach the next level. + */ +native crxranks_get_user_next_xp(id) + +/** + * Returns the client's current rank. + * + * @param id Client index. + * @param buffer Buffer to store the rank name in. + * @param len Maximum buffer length. + * @noreturn + */ +native crxranks_get_user_rank(id, buffer[], len) + +/** + * Returns the amount of XP that the client has. + * + * @param id Client index. + * @return Client's current XP. + */ +native crxranks_get_user_xp(id) + +/** + * Returns the vault name set in the plugin's configuration file. + * + * @param buffer Buffer to store the vault name in. + * @param len Maximum buffer length. + * @noreturn + */ +native crxranks_get_vault_name(buffer[], len) + +/** + * Returns the VIP flags set in the plugin's configuration file. + * + * @param buffer Buffer to store the flags in. + * @param len Maximum buffer length. + * @return Flags as bit value. + */ +native crxranks_get_vip_flags(buffer[] = "", len = 0) + +/** + * Returns the amount of XP required for a specific level. + * + * @param level Level number. + * @return -1 if the level is out of range, XP required for that level otherwise. + */ +native crxranks_get_xp_for_level(level) + +/** + * Returns the XP reward that the client will get in a specific sitaution. + * + * @param id Client index. + * @param reward Reward keyword. + * @return XP reward that the client will get. + */ +native crxranks_get_xp_reward(id, reward[]) + +/** + * Gives a specific amount of XP to the client. + * + * @note If the "reward" parameter is set, the plugin will ignore the amount set + * in the "amount" parameter and will attempt to give the XP set in the + * configuration file by the specific keyword set in the "reward" parameter. + * + * @param id Client index. + * @param amount XP amount. + * @param reward Reward keyword. + * @param source XP source. + * @return Amount of XP given. + */ +native crxranks_give_user_xp(id, amount = 0, reward[] = "", CRXRanks_XPSources:source = CRXRANKS_XPS_PLUGIN) + +/** + * Checks if the client has HUD information enabled. + * + * @param id Client index. + * @return True if he has, false otherwise. + */ +native bool:crxranks_has_user_hudinfo(id) + +/** + * Checks if the HUD info system is using DHUD messages. + * + * @return True if it is, false otherwise. + */ +native bool:crxranks_is_hi_using_dhud() + +/** + * Checks if the HUD information system is enabled. + * + * @return True if it is, false otherwise. + */ +native bool:crxranks_is_hud_enabled() + +/** + * Checks if the screen fade when a client loses a level is enabled. + * + * @return True if it is, false otherwise. + */ +native bool:crxranks_is_sfdn_enabled() + +/** + * Checks if the screen fade when a client gains a level is enabled. + * + * @return True if it is, false otherwise. + */ +native bool:crxranks_is_sfup_enabled() + +/** + * Checks if the client is on the final level. + * + * @param id Client index. + * @return True if he is, false otherwise. + */ +native bool:crxranks_is_user_on_final(id) + +/** + * Checks if the client is VIP according to the VIP flags set in the plugin's configuration file. + * + * @param id Client index. + * @return True if he is, false otherwise. + */ +native bool:crxranks_is_user_vip(id) + +/** + * Checks if the plugin is using MySQL to save/load XP. + * + * @return True if it is, false otherwise. + */ +native bool:crxranks_is_using_mysql() + +/** + * Checks if the XP notifier system is enabled. + * + * @return True if it is, false otherwise. + */ +native bool:crxranks_is_xpn_enabled() + +/** + * Checks if the XP notifier system is using DHUD messages. + * + * @return True if it is, false otherwise. + */ +native bool:crxranks_is_xpn_using_dhud() + +/** + * Sets the exact amount of XP that th client has. + * + * @param id Client index. + * @param amount XP amount. + * @param source XP source. + * @return Amount of XP given. + */ +native crxranks_set_user_xp(id, amount, CRXRanks_XPSources:source = CRXRANKS_XPS_PLUGIN) + +/** + * Checks if the plugin's option to use combined events is enabled. + * + * @return True if it is, false otherwise. + */ +native bool:crxranks_using_combined_events() + +/** + * Checks whether the specified XP reward is set in the configuration file. + * + * @param reward The XP reward to check. + * @return True if it is, false otherwise. + */ +native bool:crxranks_xp_reward_is_set(reward[]) \ No newline at end of file diff --git a/bin/amxxdump/includes/amxmodx/crxranks_const.inc b/bin/amxxdump/includes/amxmodx/crxranks_const.inc new file mode 100644 index 0000000..967fd87 --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/crxranks_const.inc @@ -0,0 +1,56 @@ +#if defined _crxranks_const_included + #endinput +#endif + +#define _crxranks_const_included + +/** + * Plugin-specific return codes + */ +#define CRXRANKS_CONTINUE 900300 +#define CRXRANKS_HANDLED 900301 + +/** + * Maximum buffer length for HUD information + */ +const CRXRANKS_MAX_HUDINFO_LENGTH = 192 + +/** + * Maximum buffer length for player information + */ +const CRXRANKS_MAX_PLAYER_INFO_LENGTH = 35 + +/** + * Maximum buffer length for a rank + */ +const CRXRANKS_MAX_RANK_LENGTH = 32 + +/** + * Maximum buffer length for a XP reward + */ +const CRXRANKS_MAX_XP_REWARD_LENGTH = 32 + +/** + * Maximum buffer length for XP as a string + */ +const CRXRANKS_MAX_XP_LENGTH = 11 + +/** + * Save types for crxranks_get_save_type() + */ +enum CRXRanks_SaveTypes +{ + CRXRANKS_ST_NICKNAME = 0, + CRXRANKS_ST_IP, + CRXRANKS_ST_STEAMID +} + +/** + * Types of sources when receiving XP + */ +enum CRXRanks_XPSources +{ + CRXRANKS_XPS_PLUGIN = 0, + CRXRANKS_XPS_REWARD, + CRXRANKS_XPS_ADMIN +} \ No newline at end of file diff --git a/bin/amxxdump/includes/amxmodx/crypto.inc b/bin/amxxdump/includes/amxmodx/crypto.inc new file mode 100644 index 0000000..995c2d1 --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/crypto.inc @@ -0,0 +1,1153 @@ +#if defined _crypto_included + #endinput +#endif +#define _crypto_included + + + +/* Guided by ********************************************************************************************************************* +BASE64: http://www.opensource.apple.com/source/QuickTimeStreamingServer/QuickTimeStreamingServer-452/CommonUtilitiesLib/base64.c +SHA1/SHA2: https://github.com/emn178/js-sha1 / https://github.com/emn178/js-sha512 +CRC32: https://forums.alliedmods.net/showthread.php?t=206640 + +INC by Destro (https://amxmodx-es.com) +*********************************************************************************************************************************/ + + +enum Sha2Bits: { + SHA2_224, + SHA2_256, + SHA2_384, + SHA2_512 +} + +stock SHA1_Data(const data[], size, output[], len) +{ + return __hash_sha1(data, size, output, len) +} + +stock SHA1_File(const file[], output[], len) +{ + return __hash_sha1(file, -1, output, len) +} + +stock SHA2_Data(const data[], size, output[], len, Sha2Bits:bits=SHA2_512) +{ + return __hash_sha2(data, size, bits, output, len) +} + +stock SHA2_File(const file[], output[], len, Sha2Bits:bits=SHA2_512) +{ + return __hash_sha2(file, -1, bits, output, len) +} + +stock MD5_Data(const data[], output[], len) +{ + new buff[34] + md5(data, buff) + + return copy(output, len, buff) +} + +stock MD5_File(const file[], output[], len) +{ + new buff[34] + md5_file(file, buff) + + return copy(output, len, buff) +} + +/* +stock BASE64_Encode(const data[], size=0, output[], len) +stock BASE64_Decode(const data[], output[], len) + +stock CRC32_Data(const data[], size) +stock CRC32_File(const file[]) + +stock encrypt_key(string[]) +stock encrypt(string[], out[], len, numkey) +stock decrypt(encrypted[], out[], len, numkey) +*/ + +/*****************************************************************************************************************/ + +#define READ_FILE_BUFFER 2048 + +stock const gCRC32_Table[] = { + 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f, + 0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988, + 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, 0x90bf1d91, 0x1db71064, 0x6ab020f2, + 0xf3b97148, 0x84be41de, 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7, + 0x136c9856, 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, 0x14015c4f, 0x63066cd9, + 0xfa0f3d63, 0x8d080df5, 0x3b6e20c8, 0x4c69105e, 0xd56041e4, 0xa2677172, + 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b, 0x35b5a8fa, 0x42b2986c, + 0xdbbbc9d6, 0xacbcf940, 0x32d86ce3, 0x45df5c75, 0xdcd60dcf, 0xabd13d59, + 0x26d930ac, 0x51de003a, 0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423, + 0xcfba9599, 0xb8bda50f, 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924, + 0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, 0x76dc4190, 0x01db7106, + 0x98d220bc, 0xefd5102a, 0x71b18589, 0x06b6b51f, 0x9fbfe4a5, 0xe8b8d433, + 0x7807c9a2, 0x0f00f934, 0x9609a88e, 0xe10e9818, 0x7f6a0dbb, 0x086d3d2d, + 0x91646c97, 0xe6635c01, 0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e, + 0x6c0695ed, 0x1b01a57b, 0x8208f4c1, 0xf50fc457, 0x65b0d9c6, 0x12b7e950, + 0x8bbeb8ea, 0xfcb9887c, 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, 0xfbd44c65, + 0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2, 0x4adfa541, 0x3dd895d7, + 0xa4d1c46d, 0xd3d6f4fb, 0x4369e96a, 0x346ed9fc, 0xad678846, 0xda60b8d0, + 0x44042d73, 0x33031de5, 0xaa0a4c5f, 0xdd0d7cc9, 0x5005713c, 0x270241aa, + 0xbe0b1010, 0xc90c2086, 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f, + 0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 0x59b33d17, 0x2eb40d81, + 0xb7bd5c3b, 0xc0ba6cad, 0xedb88320, 0x9abfb3b6, 0x03b6e20c, 0x74b1d29a, + 0xead54739, 0x9dd277af, 0x04db2615, 0x73dc1683, 0xe3630b12, 0x94643b84, + 0x0d6d6a3e, 0x7a6a5aa8, 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1, + 0xf00f9344, 0x8708a3d2, 0x1e01f268, 0x6906c2fe, 0xf762575d, 0x806567cb, + 0x196c3671, 0x6e6b06e7, 0xfed41b76, 0x89d32be0, 0x10da7a5a, 0x67dd4acc, + 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5, 0xd6d6a3e8, 0xa1d1937e, + 0x38d8c2c4, 0x4fdff252, 0xd1bb67f1, 0xa6bc5767, 0x3fb506dd, 0x48b2364b, + 0xd80d2bda, 0xaf0a1b4c, 0x36034af6, 0x41047a60, 0xdf60efc3, 0xa867df55, + 0x316e8eef, 0x4669be79, 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236, + 0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, 0xc5ba3bbe, 0xb2bd0b28, + 0x2bb45a92, 0x5cb36a04, 0xc2d7ffa7, 0xb5d0cf31, 0x2cd99e8b, 0x5bdeae1d, + 0x9b64c2b0, 0xec63f226, 0x756aa39c, 0x026d930a, 0x9c0906a9, 0xeb0e363f, + 0x72076785, 0x05005713, 0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38, + 0x92d28e9b, 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21, 0x86d3d2d4, 0xf1d4e242, + 0x68ddb3f8, 0x1fda836e, 0x81be16cd, 0xf6b9265b, 0x6fb077e1, 0x18b74777, + 0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c, 0x8f659eff, 0xf862ae69, + 0x616bffd3, 0x166ccf45, 0xa00ae278, 0xd70dd2ee, 0x4e048354, 0x3903b3c2, + 0xa7672661, 0xd06016f7, 0x4969474d, 0x3e6e77db, 0xaed16a4a, 0xd9d65adc, + 0x40df0b66, 0x37d83bf0, 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9, + 0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, 0xbad03605, 0xcdd70693, + 0x54de5729, 0x23d967bf, 0xb3667a2e, 0xc4614ab8, 0x5d681b02, 0x2a6f2b94, + 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d +} + +stock const gSHA2_Table[] = { + 0x428A2F98, 0xD728AE22, 0x71374491, 0x23EF65CD, + 0xB5C0FBCF, 0xEC4D3B2F, 0xE9B5DBA5, 0x8189DBBC, + 0x3956C25B, 0xF348B538, 0x59F111F1, 0xB605D019, + 0x923F82A4, 0xAF194F9B, 0xAB1C5ED5, 0xDA6D8118, + 0xD807AA98, 0xA3030242, 0x12835B01, 0x45706FBE, + 0x243185BE, 0x4EE4B28C, 0x550C7DC3, 0xD5FFB4E2, + 0x72BE5D74, 0xF27B896F, 0x80DEB1FE, 0x3B1696B1, + 0x9BDC06A7, 0x25C71235, 0xC19BF174, 0xCF692694, + 0xE49B69C1, 0x9EF14AD2, 0xEFBE4786, 0x384F25E3, + 0x0FC19DC6, 0x8B8CD5B5, 0x240CA1CC, 0x77AC9C65, + 0x2DE92C6F, 0x592B0275, 0x4A7484AA, 0x6EA6E483, + 0x5CB0A9DC, 0xBD41FBD4, 0x76F988DA, 0x831153B5, + 0x983E5152, 0xEE66DFAB, 0xA831C66D, 0x2DB43210, + 0xB00327C8, 0x98FB213F, 0xBF597FC7, 0xBEEF0EE4, + 0xC6E00BF3, 0x3DA88FC2, 0xD5A79147, 0x930AA725, + 0x06CA6351, 0xE003826F, 0x14292967, 0x0A0E6E70, + 0x27B70A85, 0x46D22FFC, 0x2E1B2138, 0x5C26C926, + 0x4D2C6DFC, 0x5AC42AED, 0x53380D13, 0x9D95B3DF, + 0x650A7354, 0x8BAF63DE, 0x766A0ABB, 0x3C77B2A8, + 0x81C2C92E, 0x47EDAEE6, 0x92722C85, 0x1482353B, + 0xA2BFE8A1, 0x4CF10364, 0xA81A664B, 0xBC423001, + 0xC24B8B70, 0xD0F89791, 0xC76C51A3, 0x0654BE30, + 0xD192E819, 0xD6EF5218, 0xD6990624, 0x5565A910, + 0xF40E3585, 0x5771202A, 0x106AA070, 0x32BBD1B8, + 0x19A4C116, 0xB8D2D0C8, 0x1E376C08, 0x5141AB53, + 0x2748774C, 0xDF8EEB99, 0x34B0BCB5, 0xE19B48A8, + 0x391C0CB3, 0xC5C95A63, 0x4ED8AA4A, 0xE3418ACB, + 0x5B9CCA4F, 0x7763E373, 0x682E6FF3, 0xD6B2B8A3, + 0x748F82EE, 0x5DEFB2FC, 0x78A5636F, 0x43172F60, + 0x84C87814, 0xA1F0AB72, 0x8CC70208, 0x1A6439EC, + 0x90BEFFFA, 0x23631E28, 0xA4506CEB, 0xDE82BDE9, + 0xBEF9A3F7, 0xB2C67915, 0xC67178F2, 0xE372532B, + 0xCA273ECE, 0xEA26619C, 0xD186B8C7, 0x21C0C207, + 0xEADA7DD6, 0xCDE0EB1E, 0xF57D4F7F, 0xEE6ED178, + 0x06F067AA, 0x72176FBA, 0x0A637DC5, 0xA2C898A6, + 0x113F9804, 0xBEF90DAE, 0x1B710B35, 0x131C471B, + 0x28DB77F5, 0x23047D84, 0x32CAAB7B, 0x40C72493, + 0x3C9EBE0A, 0x15C9BEBC, 0x431D67C4, 0x9C100D4C, + 0x4CC5D4BE, 0xCB3E42B6, 0x597F299C, 0xFC657E2A, + 0x5FCB6FAB, 0x3AD6FAEC, 0x6C44198C, 0x4A475817 +} + +stock const gSHA_HEXCHAR[] = "0123456789abcdef" +stock const gSHA_EXTRA[] = { -2147483648, 8388608, 32768, 128 } +stock const gSHA_SHIFT[] = { 24, 16, 8, 0 } + +stock gEncryptTable[96] // dYm4urtizlp2y@h.qsbT67n5oQf8xwU91VvcPZeB3WAk0MNHJFGKLjSgCaRDOEIX +stock gEncryptTableLen + +stock const gBase64_Fill = '=' +stock const gBase64_Table[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" +stock const gDecode_Table[256] = +{ + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 62, 64, 64, 64, 63, + 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 64, 64, 64, 64, 64, 64, + 64, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 64, 64, 64, 64, 64, + 64, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, + 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64 +}; + + +stock BASE64_Encode(const data[], size=0, output[], len) +{ + new write, i + if(!size) size = strlen(data) + + for(i = 0; i < (size - 2); i += 3) + { + if((write + 4) >= len) + { + output[0] = '^0'; + return 0; + } + + output[write++] = gBase64_Table[(data[i] >> 2) & 0x3F]; + output[write++] = gBase64_Table[((data[i] & 0x3) << 4) | ((data[i + 1] & 0xF0) >> 4)]; + output[write++] = gBase64_Table[((data[i + 1] & 0xF) << 2) | ((data[i + 2] & 0xC0) >> 6)]; + output[write++] = gBase64_Table[data[i + 2] & 0x3F]; + } + + if(i < size) + { + if((write + 4) >= len) + { + output[0] = '^0'; + return 0; + } + + output[write++] = gBase64_Table[(data[i] >> 2) & 0x3F]; + + if(i == (size - 1)) + { + output[write++] = gBase64_Table[((data[i] & 0x3) << 4)]; + output[write++] = gBase64_Fill; + } + else + { + output[write++] = gBase64_Table[((data[i] & 0x3) << 4) | ((data[i + 1] & 0xF0) >> 4)]; + output[write++] = gBase64_Table[((data[i + 1] & 0xF) << 2)]; + } + + output[write++] = gBase64_Fill; + } + + output[write] = '^0'; + return write; +} + + +stock BASE64_Decode(const data[], output[], len) +{ + new write, read, nprbytes + + while(gDecode_Table[data[read++]] <= 63) { } + + nprbytes = read - 1; + read = 0 + + while(nprbytes > 4) + { + if((write + 3) >= len) + { + output[0] = '^0'; + return 0; + } + + output[write++] = (gDecode_Table[data[read]] << 2 | gDecode_Table[data[read+1]] >> 4); + output[write++] = (gDecode_Table[data[read+1]] << 4 | gDecode_Table[data[read+2]] >> 2); + output[write++] = (gDecode_Table[data[read+2]] << 6 | gDecode_Table[data[read+3]]); + + read += 4; + nprbytes -= 4; + } + + if((write + 1 + nprbytes) >= len) + { + output[0] = '^0'; + return 0; + } + + if(nprbytes > 1) + output[write++] = (gDecode_Table[data[read]] << 2 | gDecode_Table[data[read+1]] >> 4); + + if(nprbytes > 2) + output[write++] = (gDecode_Table[data[read+1]] << 4 | gDecode_Table[data[read+2]] >> 2); + + if(nprbytes > 3) + output[write++] = (gDecode_Table[data[read+2]] << 6 | gDecode_Table[data[read+3]]); + + + output[write] = '^0'; + return write; +} + +stock CRC32_Data(const data[], size) +{ + new crc = 0xFFFFFFFF + + for (new i = 0; i < size; i++) + { + crc = gCRC32_Table[(crc ^ data[i]) & 0xFF] ^ ((crc >> 8) & 0x00FFFFFF) + } + + return crc ^ 0xFFFFFFFF +} + +stock CRC32_File(const file[]) +{ + new fp = fopen(file, "rb") + if(!fp) return 0 + + new crc = 0xFFFFFFFF; + new data[READ_FILE_BUFFER], readsize, i; + + while((readsize = fread_blocks(fp, data, READ_FILE_BUFFER, BLOCK_CHAR)) > 0) + { + for (i = 0; i < readsize; i++) + { + crc = gCRC32_Table[(crc ^ data[i]) & 0xFF] ^ ((crc >> 8) & 0x00FFFFFF) + } + } + + fclose(fp) + + return crc ^ 0xFFFFFFFF +} + +stock __hash_sha1(const dataORfile[], size, output[], len) +{ + new h0, h1, h2, h3, h4, block, blocks[160], code, end, t, f, + i, j, index, start, bytes, + fp, length, totalread, data[READ_FILE_BUFFER], data_start; + + if(size == -1) + { + fp = fopen(dataORfile, "rb"); + if(!fp) + { + copy(output, len, ""); + return false; + } + + fseek(fp, 0, SEEK_END); + length = ftell(fp); + if(length == 0) + { + fclose(fp); + copy(output, len, ""); + return false; + } + fseek(fp, 0, SEEK_SET); + + totalread = fread_blocks(fp, data, READ_FILE_BUFFER, BLOCK_CHAR); + } + else { + length = size; + } + + h0 = 0x67452301; + h1 = 0xEFCDAB89; + h2 = 0x98BADCFE; + h3 = 0x10325476; + h4 = 0xC3D2E1F0; + + do + { + blocks[0] = block; + blocks[16] = blocks[1] = blocks[2] = blocks[3] = + blocks[4] = blocks[5] = blocks[6] = blocks[7] = + blocks[8] = blocks[9] = blocks[10] = blocks[11] = + blocks[12] = blocks[13] = blocks[14] = blocks[15] = 0; + + for (i = start;index < length && i < 64; ++index) + { + if(size == -1) + { + if(index >= totalread) + { + data_start = totalread; + totalread += fread_blocks(fp, data, READ_FILE_BUFFER, BLOCK_CHAR) + + } + + code = data[index-data_start]; + } + else code = dataORfile[index]; + + + if(code < 0) code = 256 + code + + blocks[i >> 2] |= code << gSHA_SHIFT[i++ & 3]; + } + + + bytes += i - start; + start = i - 64; + + if(index == length) + { + blocks[i >> 2] |= gSHA_EXTRA[i & 3]; + ++index; + } + + block = blocks[16]; + if(index > length && i < 56) + { + blocks[15] = bytes << 3; + end = true; + } + + for(j = 16;j < 80;++j) + { + t = blocks[j - 3] ^ blocks[j - 8] ^ blocks[j - 14] ^ blocks[j - 16]; + blocks[j] = (t << 1) | (t >>> 31); + } + + new a = h0, b = h1, c = h2, d = h3, e = h4; + for(j = 0;j < 20;j += 5) + { + f = (b & c) | ((~b) & d); + t = (a << 5) | (a >>> 27); + e = t + f + e + 1518500249 + blocks[j] << 0; + b = (b << 30) | (b >>> 2); + + f = (a & b) | ((~a) & c); + t = (e << 5) | (e >>> 27); + d = t + f + d + 1518500249 + blocks[j + 1] << 0; + a = (a << 30) | (a >>> 2); + + f = (e & a) | ((~e) & b); + t = (d << 5) | (d >>> 27); + c = t + f + c + 1518500249 + blocks[j + 2] << 0; + e = (e << 30) | (e >>> 2); + + f = (d & e) | ((~d) & a); + t = (c << 5) | (c >>> 27); + b = t + f + b + 1518500249 + blocks[j + 3] << 0; + d = (d << 30) | (d >>> 2); + + f = (c & d) | ((~c) & e); + t = (b << 5) | (b >>> 27); + a = t + f + a + 1518500249 + blocks[j + 4] << 0; + c = (c << 30) | (c >>> 2); + } + + for(;j < 40;j += 5) + { + f = b ^ c ^ d; + t = (a << 5) | (a >>> 27); + e = t + f + e + 1859775393 + blocks[j] << 0; + b = (b << 30) | (b >>> 2); + + f = a ^ b ^ c; + t = (e << 5) | (e >>> 27); + d = t + f + d + 1859775393 + blocks[j + 1] << 0; + a = (a << 30) | (a >>> 2); + + f = e ^ a ^ b; + t = (d << 5) | (d >>> 27); + c = t + f + c + 1859775393 + blocks[j + 2] << 0; + e = (e << 30) | (e >>> 2); + + f = d ^ e ^ a; + t = (c << 5) | (c >>> 27); + b = t + f + b + 1859775393 + blocks[j + 3] << 0; + d = (d << 30) | (d >>> 2); + + f = c ^ d ^ e; + t = (b << 5) | (b >>> 27); + a = t + f + a + 1859775393 + blocks[j + 4] << 0; + c = (c << 30) | (c >>> 2); + } + + for(;j < 60;j += 5) + { + f = (b & c) | (b & d) | (c & d); + t = (a << 5) | (a >>> 27); + e = t + f + e - 1894007588 + blocks[j] << 0; + b = (b << 30) | (b >>> 2); + + f = (a & b) | (a & c) | (b & c); + t = (e << 5) | (e >>> 27); + d = t + f + d - 1894007588 + blocks[j + 1] << 0; + a = (a << 30) | (a >>> 2); + + f = (e & a) | (e & b) | (a & b); + t = (d << 5) | (d >>> 27); + c = t + f + c - 1894007588 + blocks[j + 2] << 0; + e = (e << 30) | (e >>> 2); + + f = (d & e) | (d & a) | (e & a); + t = (c << 5) | (c >>> 27); + b = t + f + b - 1894007588 + blocks[j + 3] << 0; + d = (d << 30) | (d >>> 2); + + f = (c & d) | (c & e) | (d & e); + t = (b << 5) | (b >>> 27); + a = t + f + a - 1894007588 + blocks[j + 4] << 0; + c = (c << 30) | (c >>> 2); + } + + for(;j < 80;j += 5) + { + f = b ^ c ^ d; + t = (a << 5) | (a >>> 27); + e = t + f + e - 899497514 + blocks[j] << 0; + b = (b << 30) | (b >>> 2); + + f = a ^ b ^ c; + t = (e << 5) | (e >>> 27); + d = t + f + d - 899497514 + blocks[j + 1] << 0; + a = (a << 30) | (a >>> 2); + + f = e ^ a ^ b; + t = (d << 5) | (d >>> 27); + c = t + f + c - 899497514 + blocks[j + 2] << 0; + e = (e << 30) | (e >>> 2); + + f = d ^ e ^ a; + t = (c << 5) | (c >>> 27); + b = t + f + b - 899497514 + blocks[j + 3] << 0; + d = (d << 30) | (d >>> 2); + + f = c ^ d ^ e; + t = (b << 5) | (b >>> 27); + a = t + f + a - 899497514 + blocks[j + 4] << 0; + c = (c << 30) | (c >>> 2); + } + + h0 = h0 + a << 0; + h1 = h1 + b << 0; + h2 = h2 + c << 0; + h3 = h3 + d << 0; + h4 = h4 + e << 0; + } while(!end); + + if(fp) fclose(fp) + + new hex[41], pos + hex[pos++] = gSHA_HEXCHAR[(h0 >> 28) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h0 >> 24) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h0 >> 20) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h0 >> 16) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h0 >> 12) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h0 >> 8) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h0 >> 4) & 0x0F];hex[pos++] = gSHA_HEXCHAR[h0 & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h1 >> 28) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h1 >> 24) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h1 >> 20) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h1 >> 16) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h1 >> 12) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h1 >> 8) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h1 >> 4) & 0x0F];hex[pos++] = gSHA_HEXCHAR[h1 & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h2 >> 28) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h2 >> 24) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h2 >> 20) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h2 >> 16) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h2 >> 12) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h2 >> 8) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h2 >> 4) & 0x0F];hex[pos++] = gSHA_HEXCHAR[h2 & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h3 >> 28) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h3 >> 24) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h3 >> 20) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h3 >> 16) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h3 >> 12) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h3 >> 8) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h3 >> 4) & 0x0F];hex[pos++] = gSHA_HEXCHAR[h3 & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h4 >> 28) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h4 >> 24) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h4 >> 20) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h4 >> 16) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h4 >> 12) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h4 >> 8) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h4 >> 4) & 0x0F];hex[pos++] = gSHA_HEXCHAR[h4 & 0x0F] + + copy(output, len, hex) + return true; +} + +stock __hash_sha2(const dataORfile[], size, Sha2Bits:bits, output[], len) +{ + new h0h, h0l, h1h, h1l, h2h, h2l, h3h, h3l, + h4h, h4l, h5h, h5l, h6h, h6l, h7h, h7l, block, blocks[160], code, end, + i, j, index, start, bytes, + s0h, s0l, s1h, s1l, c1, c2, c3, c4, + abh, abl, dah, dal, cdh, cdl, bch, bcl, + majh, majl, t1h, t1l, t2h, t2l, chh, chl, + fp, length, totalread, data[READ_FILE_BUFFER], data_start; + + if(size == -1) + { + fp = fopen(dataORfile, "rb") + if(!fp) + { + copy(output, len, "") + return false + } + + fseek(fp, 0, SEEK_END) + length = ftell(fp) + if(length == 0) + { + fclose(fp) + copy(output, len, "") + return false + } + fseek(fp, 0, SEEK_SET) + + totalread = fread_blocks(fp, data, READ_FILE_BUFFER, BLOCK_CHAR) + } + else { + length = strlen(dataORfile) + } + + + if(bits == SHA2_384) + { + h0h = 0xCBBB9D5D; + h0l = 0xC1059ED8; + h1h = 0x629A292A; + h1l = 0x367CD507; + h2h = 0x9159015A; + h2l = 0x3070DD17; + h3h = 0x152FECD8; + h3l = 0xF70E5939; + h4h = 0x67332667; + h4l = 0xFFC00B31; + h5h = 0x8EB44A87; + h5l = 0x68581511; + h6h = 0xDB0C2E0D; + h6l = 0x64F98FA7; + h7h = 0x47B5481D; + h7l = 0xBEFA4FA4; + } + else if(bits == SHA2_256) + { + h0h = 0x22312194; + h0l = 0xFC2BF72C; + h1h = 0x9F555FA3; + h1l = 0xC84C64C2; + h2h = 0x2393B86B; + h2l = 0x6F53B151; + h3h = 0x96387719; + h3l = 0x5940EABD; + h4h = 0x96283EE2; + h4l = 0xA88EFFE3; + h5h = 0xBE5E1E25; + h5l = 0x53863992; + h6h = 0x2B0199FC; + h6l = 0x2C85B8AA; + h7h = 0x0EB72DDC; + h7l = 0x81C52CA2; + } + else if(bits == SHA2_224) + { + h0h = 0x8C3D37C8; + h0l = 0x19544DA2; + h1h = 0x73E19966; + h1l = 0x89DCD4D6; + h2h = 0x1DFAB7AE; + h2l = 0x32FF9C82; + h3h = 0x679DD514; + h3l = 0x582F9FCF; + h4h = 0x0F6D2B69; + h4l = 0x7BD44DA8; + h5h = 0x77E36F73; + h5l = 0x04C48942; + h6h = 0x3F9D85A8; + h6l = 0x6A1D36C8; + h7h = 0x1112E6AD; + h7l = 0x91D692A1; + } + else { // 512 + h0h = 0x6A09E667; + h0l = 0xF3BCC908; + h1h = 0xBB67AE85; + h1l = 0x84CAA73B; + h2h = 0x3C6EF372; + h2l = 0xFE94F82B; + h3h = 0xA54FF53A; + h3l = 0x5F1D36F1; + h4h = 0x510E527F; + h4l = 0xADE682D1; + h5h = 0x9B05688C; + h5l = 0x2B3E6C1F; + h6h = 0x1F83D9AB; + h6l = 0xFB41BD6B; + h7h = 0x5BE0CD19; + h7l = 0x137E2179; + bits = SHA2_512; + } + + block = 0; + + do { + blocks[0] = block; + blocks[1] = blocks[2] = blocks[3] = blocks[4] = + blocks[5] = blocks[6] = blocks[7] = blocks[8] = + blocks[9] = blocks[10] = blocks[11] = blocks[12] = + blocks[13] = blocks[14] = blocks[15] = blocks[16] = + blocks[17] = blocks[18] = blocks[19] = blocks[20] = + blocks[21] = blocks[22] = blocks[23] = blocks[24] = + blocks[25] = blocks[26] = blocks[27] = blocks[28] = + blocks[29] = blocks[30] = blocks[31] = blocks[32] = 0; + + for (i = start;index < length && i < 128; ++index) + { + if(size == -1) + { + if(index >= totalread) + { + data_start = totalread; + totalread += fread_blocks(fp, data, READ_FILE_BUFFER, BLOCK_CHAR) + } + + code = data[index-data_start]; + } + else code = dataORfile[index]; + + if(code < 0) code = 256 + code + + blocks[i >> 2] |= code << gSHA_SHIFT[i++ & 3]; + } + + bytes += i - start; + start = i - 128; + + if(index == length) + { + blocks[i >> 2] |= gSHA_EXTRA[i & 3]; + ++index; + } + + block = blocks[32]; + if(index > length && i < 112) + { + blocks[31] = bytes << 3; + end = true; + } + + for(j = 32;j < 160;j += 2) + { + t1h = blocks[j - 30]; + t1l = blocks[j - 29]; + s0h = ((t1h >>> 1) | (t1l << 31)) ^ ((t1h >>> 8) | (t1l << 24)) ^ (t1h >>> 7); + s0l = ((t1l >>> 1) | (t1h << 31)) ^ ((t1l >>> 8) | (t1h << 24)) ^ ((t1l >>> 7) | t1h << 25); + + t1h = blocks[j - 4]; + t1l = blocks[j - 3]; + s1h = ((t1h >>> 19) | (t1l << 13)) ^ ((t1l >>> 29) | (t1h << 3)) ^ (t1h >>> 6); + s1l = ((t1l >>> 19) | (t1h << 13)) ^ ((t1h >>> 29) | (t1l << 3)) ^ ((t1l >>> 6) | t1h << 26); + + t1h = blocks[j - 32]; + t1l = blocks[j - 31]; + t2h = blocks[j - 14]; + t2l = blocks[j - 13]; + + c1 = (t2l & 0xFFFF) + (t1l & 0xFFFF) + (s0l & 0xFFFF) + (s1l & 0xFFFF); + c2 = (t2l >>> 16) + (t1l >>> 16) + (s0l >>> 16) + (s1l >>> 16) + (c1 >>> 16); + c3 = (t2h & 0xFFFF) + (t1h & 0xFFFF) + (s0h & 0xFFFF) + (s1h & 0xFFFF) + (c2 >>> 16); + c4 = (t2h >>> 16) + (t1h >>> 16) + (s0h >>> 16) + (s1h >>> 16) + (c3 >>> 16); + + blocks[j] = (c4 << 16) | (c3 & 0xFFFF); + blocks[j + 1] = (c2 << 16) | (c1 & 0xFFFF); + } + + new ah = h0h, al = h0l, bh = h1h, bl = h1l, ch = h2h, cl = h2l, dh = h3h, dl = h3l, eh = h4h, el = h4l, fh = h5h, fl = h5l, gh = h6h, gl = h6l, hh = h7h, hl = h7l; + bch = bh & ch; + bcl = bl & cl; + + for(j = 0;j < 160;j += 8) + { + s0h = ((ah >>> 28) | (al << 4)) ^ ((al >>> 2) | (ah << 30)) ^ ((al >>> 7) | (ah << 25)); + s0l = ((al >>> 28) | (ah << 4)) ^ ((ah >>> 2) | (al << 30)) ^ ((ah >>> 7) | (al << 25)); + + s1h = ((eh >>> 14) | (el << 18)) ^ ((eh >>> 18) | (el << 14)) ^ ((el >>> 9) | (eh << 23)); + s1l = ((el >>> 14) | (eh << 18)) ^ ((el >>> 18) | (eh << 14)) ^ ((eh >>> 9) | (el << 23)); + + abh = ah & bh; + abl = al & bl; + majh = abh ^ (ah & ch) ^ bch; + majl = abl ^ (al & cl) ^ bcl; + + chh = (eh & fh) ^ (~eh & gh); + chl = (el & fl) ^ (~el & gl); + + t1h = blocks[j]; + t1l = blocks[j + 1]; + t2h = gSHA2_Table[j]; + t2l = gSHA2_Table[j + 1]; + + c1 = (t2l & 0xFFFF) + (t1l & 0xFFFF) + (chl & 0xFFFF) + (s1l & 0xFFFF) + (hl & 0xFFFF); + c2 = (t2l >>> 16) + (t1l >>> 16) + (chl >>> 16) + (s1l >>> 16) + (hl >>> 16) + (c1 >>> 16); + c3 = (t2h & 0xFFFF) + (t1h & 0xFFFF) + (chh & 0xFFFF) + (s1h & 0xFFFF) + (hh & 0xFFFF) + (c2 >>> 16); + c4 = (t2h >>> 16) + (t1h >>> 16) + (chh >>> 16) + (s1h >>> 16) + (hh >>> 16) + (c3 >>> 16); + + t1h = (c4 << 16) | (c3 & 0xFFFF); + t1l = (c2 << 16) | (c1 & 0xFFFF); + + c1 = (majl & 0xFFFF) + (s0l & 0xFFFF); + c2 = (majl >>> 16) + (s0l >>> 16) + (c1 >>> 16); + c3 = (majh & 0xFFFF) + (s0h & 0xFFFF) + (c2 >>> 16); + c4 = (majh >>> 16) + (s0h >>> 16) + (c3 >>> 16); + + t2h = (c4 << 16) | (c3 & 0xFFFF); + t2l = (c2 << 16) | (c1 & 0xFFFF); + + c1 = (dl & 0xFFFF) + (t1l & 0xFFFF); + c2 = (dl >>> 16) + (t1l >>> 16) + (c1 >>> 16); + c3 = (dh & 0xFFFF) + (t1h & 0xFFFF) + (c2 >>> 16); + c4 = (dh >>> 16) + (t1h >>> 16) + (c3 >>> 16); + + hh = (c4 << 16) | (c3 & 0xFFFF); + hl = (c2 << 16) | (c1 & 0xFFFF); + + c1 = (t2l & 0xFFFF) + (t1l & 0xFFFF); + c2 = (t2l >>> 16) + (t1l >>> 16) + (c1 >>> 16); + c3 = (t2h & 0xFFFF) + (t1h & 0xFFFF) + (c2 >>> 16); + c4 = (t2h >>> 16) + (t1h >>> 16) + (c3 >>> 16); + + dh = (c4 << 16) | (c3 & 0xFFFF); + dl = (c2 << 16) | (c1 & 0xFFFF); + + s0h = ((dh >>> 28) | (dl << 4)) ^ ((dl >>> 2) | (dh << 30)) ^ ((dl >>> 7) | (dh << 25)); + s0l = ((dl >>> 28) | (dh << 4)) ^ ((dh >>> 2) | (dl << 30)) ^ ((dh >>> 7) | (dl << 25)); + + s1h = ((hh >>> 14) | (hl << 18)) ^ ((hh >>> 18) | (hl << 14)) ^ ((hl >>> 9) | (hh << 23)); + s1l = ((hl >>> 14) | (hh << 18)) ^ ((hl >>> 18) | (hh << 14)) ^ ((hh >>> 9) | (hl << 23)); + + dah = dh & ah; + dal = dl & al; + majh = dah ^ (dh & bh) ^ abh; + majl = dal ^ (dl & bl) ^ abl; + + chh = (hh & eh) ^ (~hh & fh); + chl = (hl & el) ^ (~hl & fl); + + t1h = blocks[j + 2]; + t1l = blocks[j + 3]; + t2h = gSHA2_Table[j + 2]; + t2l = gSHA2_Table[j + 3]; + + c1 = (t2l & 0xFFFF) + (t1l & 0xFFFF) + (chl & 0xFFFF) + (s1l & 0xFFFF) + (gl & 0xFFFF); + c2 = (t2l >>> 16) + (t1l >>> 16) + (chl >>> 16) + (s1l >>> 16) + (gl >>> 16) + (c1 >>> 16); + c3 = (t2h & 0xFFFF) + (t1h & 0xFFFF) + (chh & 0xFFFF) + (s1h & 0xFFFF) + (gh & 0xFFFF) + (c2 >>> 16); + c4 = (t2h >>> 16) + (t1h >>> 16) + (chh >>> 16) + (s1h >>> 16) + (gh >>> 16) + (c3 >>> 16); + + t1h = (c4 << 16) | (c3 & 0xFFFF); + t1l = (c2 << 16) | (c1 & 0xFFFF); + + c1 = (majl & 0xFFFF) + (s0l & 0xFFFF); + c2 = (majl >>> 16) + (s0l >>> 16) + (c1 >>> 16); + c3 = (majh & 0xFFFF) + (s0h & 0xFFFF) + (c2 >>> 16); + c4 = (majh >>> 16) + (s0h >>> 16) + (c3 >>> 16); + + t2h = (c4 << 16) | (c3 & 0xFFFF); + t2l = (c2 << 16) | (c1 & 0xFFFF); + + c1 = (cl & 0xFFFF) + (t1l & 0xFFFF); + c2 = (cl >>> 16) + (t1l >>> 16) + (c1 >>> 16); + c3 = (ch & 0xFFFF) + (t1h & 0xFFFF) + (c2 >>> 16); + c4 = (ch >>> 16) + (t1h >>> 16) + (c3 >>> 16); + + gh = (c4 << 16) | (c3 & 0xFFFF); + gl = (c2 << 16) | (c1 & 0xFFFF); + + c1 = (t2l & 0xFFFF) + (t1l & 0xFFFF); + c2 = (t2l >>> 16) + (t1l >>> 16) + (c1 >>> 16); + c3 = (t2h & 0xFFFF) + (t1h & 0xFFFF) + (c2 >>> 16); + c4 = (t2h >>> 16) + (t1h >>> 16) + (c3 >>> 16); + + ch = (c4 << 16) | (c3 & 0xFFFF); + cl = (c2 << 16) | (c1 & 0xFFFF); + + s0h = ((ch >>> 28) | (cl << 4)) ^ ((cl >>> 2) | (ch << 30)) ^ ((cl >>> 7) | (ch << 25)); + s0l = ((cl >>> 28) | (ch << 4)) ^ ((ch >>> 2) | (cl << 30)) ^ ((ch >>> 7) | (cl << 25)); + + s1h = ((gh >>> 14) | (gl << 18)) ^ ((gh >>> 18) | (gl << 14)) ^ ((gl >>> 9) | (gh << 23)); + s1l = ((gl >>> 14) | (gh << 18)) ^ ((gl >>> 18) | (gh << 14)) ^ ((gh >>> 9) | (gl << 23)); + + cdh = ch & dh; + cdl = cl & dl; + majh = cdh ^ (ch & ah) ^ dah; + majl = cdl ^ (cl & al) ^ dal; + + chh = (gh & hh) ^ (~gh & eh); + chl = (gl & hl) ^ (~gl & el); + + t1h = blocks[j + 4]; + t1l = blocks[j + 5]; + t2h = gSHA2_Table[j + 4]; + t2l = gSHA2_Table[j + 5]; + + c1 = (t2l & 0xFFFF) + (t1l & 0xFFFF) + (chl & 0xFFFF) + (s1l & 0xFFFF) + (fl & 0xFFFF); + c2 = (t2l >>> 16) + (t1l >>> 16) + (chl >>> 16) + (s1l >>> 16) + (fl >>> 16) + (c1 >>> 16); + c3 = (t2h & 0xFFFF) + (t1h & 0xFFFF) + (chh & 0xFFFF) + (s1h & 0xFFFF) + (fh & 0xFFFF) + (c2 >>> 16); + c4 = (t2h >>> 16) + (t1h >>> 16) + (chh >>> 16) + (s1h >>> 16) + (fh >>> 16) + (c3 >>> 16); + + t1h = (c4 << 16) | (c3 & 0xFFFF); + t1l = (c2 << 16) | (c1 & 0xFFFF); + + c1 = (majl & 0xFFFF) + (s0l & 0xFFFF); + c2 = (majl >>> 16) + (s0l >>> 16) + (c1 >>> 16); + c3 = (majh & 0xFFFF) + (s0h & 0xFFFF) + (c2 >>> 16); + c4 = (majh >>> 16) + (s0h >>> 16) + (c3 >>> 16); + + t2h = (c4 << 16) | (c3 & 0xFFFF); + t2l = (c2 << 16) | (c1 & 0xFFFF); + + c1 = (bl & 0xFFFF) + (t1l & 0xFFFF); + c2 = (bl >>> 16) + (t1l >>> 16) + (c1 >>> 16); + c3 = (bh & 0xFFFF) + (t1h & 0xFFFF) + (c2 >>> 16); + c4 = (bh >>> 16) + (t1h >>> 16) + (c3 >>> 16); + + fh = (c4 << 16) | (c3 & 0xFFFF); + fl = (c2 << 16) | (c1 & 0xFFFF); + + c1 = (t2l & 0xFFFF) + (t1l & 0xFFFF); + c2 = (t2l >>> 16) + (t1l >>> 16) + (c1 >>> 16); + c3 = (t2h & 0xFFFF) + (t1h & 0xFFFF) + (c2 >>> 16); + c4 = (t2h >>> 16) + (t1h >>> 16) + (c3 >>> 16); + + bh = (c4 << 16) | (c3 & 0xFFFF); + bl = (c2 << 16) | (c1 & 0xFFFF); + + s0h = ((bh >>> 28) | (bl << 4)) ^ ((bl >>> 2) | (bh << 30)) ^ ((bl >>> 7) | (bh << 25)); + s0l = ((bl >>> 28) | (bh << 4)) ^ ((bh >>> 2) | (bl << 30)) ^ ((bh >>> 7) | (bl << 25)); + + s1h = ((fh >>> 14) | (fl << 18)) ^ ((fh >>> 18) | (fl << 14)) ^ ((fl >>> 9) | (fh << 23)); + s1l = ((fl >>> 14) | (fh << 18)) ^ ((fl >>> 18) | (fh << 14)) ^ ((fh >>> 9) | (fl << 23)); + + bch = bh & ch; + bcl = bl & cl; + majh = bch ^ (bh & dh) ^ cdh; + majl = bcl ^ (bl & dl) ^ cdl; + + chh = (fh & gh) ^ (~fh & hh); + chl = (fl & gl) ^ (~fl & hl); + + t1h = blocks[j + 6]; + t1l = blocks[j + 7]; + t2h = gSHA2_Table[j + 6]; + t2l = gSHA2_Table[j + 7]; + + c1 = (t2l & 0xFFFF) + (t1l & 0xFFFF) + (chl & 0xFFFF) + (s1l & 0xFFFF) + (el & 0xFFFF); + c2 = (t2l >>> 16) + (t1l >>> 16) + (chl >>> 16) + (s1l >>> 16) + (el >>> 16) + (c1 >>> 16); + c3 = (t2h & 0xFFFF) + (t1h & 0xFFFF) + (chh & 0xFFFF) + (s1h & 0xFFFF) + (eh & 0xFFFF) + (c2 >>> 16); + c4 = (t2h >>> 16) + (t1h >>> 16) + (chh >>> 16) + (s1h >>> 16) + (eh >>> 16) + (c3 >>> 16); + + t1h = (c4 << 16) | (c3 & 0xFFFF); + t1l = (c2 << 16) | (c1 & 0xFFFF); + + c1 = (majl & 0xFFFF) + (s0l & 0xFFFF); + c2 = (majl >>> 16) + (s0l >>> 16) + (c1 >>> 16); + c3 = (majh & 0xFFFF) + (s0h & 0xFFFF) + (c2 >>> 16); + c4 = (majh >>> 16) + (s0h >>> 16) + (c3 >>> 16); + + t2h = (c4 << 16) | (c3 & 0xFFFF); + t2l = (c2 << 16) | (c1 & 0xFFFF); + + c1 = (al & 0xFFFF) + (t1l & 0xFFFF); + c2 = (al >>> 16) + (t1l >>> 16) + (c1 >>> 16); + c3 = (ah & 0xFFFF) + (t1h & 0xFFFF) + (c2 >>> 16); + c4 = (ah >>> 16) + (t1h >>> 16) + (c3 >>> 16); + + eh = (c4 << 16) | (c3 & 0xFFFF); + el = (c2 << 16) | (c1 & 0xFFFF); + + c1 = (t2l & 0xFFFF) + (t1l & 0xFFFF); + c2 = (t2l >>> 16) + (t1l >>> 16) + (c1 >>> 16); + c3 = (t2h & 0xFFFF) + (t1h & 0xFFFF) + (c2 >>> 16); + c4 = (t2h >>> 16) + (t1h >>> 16) + (c3 >>> 16); + + ah = (c4 << 16) | (c3 & 0xFFFF); + al = (c2 << 16) | (c1 & 0xFFFF); + } + + c1 = (h0l & 0xFFFF) + (al & 0xFFFF); + c2 = (h0l >>> 16) + (al >>> 16) + (c1 >>> 16); + c3 = (h0h & 0xFFFF) + (ah & 0xFFFF) + (c2 >>> 16); + c4 = (h0h >>> 16) + (ah >>> 16) + (c3 >>> 16); + + h0h = (c4 << 16) | (c3 & 0xFFFF); + h0l = (c2 << 16) | (c1 & 0xFFFF); + + c1 = (h1l & 0xFFFF) + (bl & 0xFFFF); + c2 = (h1l >>> 16) + (bl >>> 16) + (c1 >>> 16); + c3 = (h1h & 0xFFFF) + (bh & 0xFFFF) + (c2 >>> 16); + c4 = (h1h >>> 16) + (bh >>> 16) + (c3 >>> 16); + + h1h = (c4 << 16) | (c3 & 0xFFFF); + h1l = (c2 << 16) | (c1 & 0xFFFF); + + c1 = (h2l & 0xFFFF) + (cl & 0xFFFF); + c2 = (h2l >>> 16) + (cl >>> 16) + (c1 >>> 16); + c3 = (h2h & 0xFFFF) + (ch & 0xFFFF) + (c2 >>> 16); + c4 = (h2h >>> 16) + (ch >>> 16) + (c3 >>> 16); + + h2h = (c4 << 16) | (c3 & 0xFFFF); + h2l = (c2 << 16) | (c1 & 0xFFFF); + + c1 = (h3l & 0xFFFF) + (dl & 0xFFFF); + c2 = (h3l >>> 16) + (dl >>> 16) + (c1 >>> 16); + c3 = (h3h & 0xFFFF) + (dh & 0xFFFF) + (c2 >>> 16); + c4 = (h3h >>> 16) + (dh >>> 16) + (c3 >>> 16); + + h3h = (c4 << 16) | (c3 & 0xFFFF); + h3l = (c2 << 16) | (c1 & 0xFFFF); + + c1 = (h4l & 0xFFFF) + (el & 0xFFFF); + c2 = (h4l >>> 16) + (el >>> 16) + (c1 >>> 16); + c3 = (h4h & 0xFFFF) + (eh & 0xFFFF) + (c2 >>> 16); + c4 = (h4h >>> 16) + (eh >>> 16) + (c3 >>> 16); + + h4h = (c4 << 16) | (c3 & 0xFFFF); + h4l = (c2 << 16) | (c1 & 0xFFFF); + + c1 = (h5l & 0xFFFF) + (fl & 0xFFFF); + c2 = (h5l >>> 16) + (fl >>> 16) + (c1 >>> 16); + c3 = (h5h & 0xFFFF) + (fh & 0xFFFF) + (c2 >>> 16); + c4 = (h5h >>> 16) + (fh >>> 16) + (c3 >>> 16); + + h5h = (c4 << 16) | (c3 & 0xFFFF); + h5l = (c2 << 16) | (c1 & 0xFFFF); + + c1 = (h6l & 0xFFFF) + (gl & 0xFFFF); + c2 = (h6l >>> 16) + (gl >>> 16) + (c1 >>> 16); + c3 = (h6h & 0xFFFF) + (gh & 0xFFFF) + (c2 >>> 16); + c4 = (h6h >>> 16) + (gh >>> 16) + (c3 >>> 16); + + h6h = (c4 << 16) | (c3 & 0xFFFF); + h6l = (c2 << 16) | (c1 & 0xFFFF); + + c1 = (h7l & 0xFFFF) + (hl & 0xFFFF); + c2 = (h7l >>> 16) + (hl >>> 16) + (c1 >>> 16); + c3 = (h7h & 0xFFFF) + (hh & 0xFFFF) + (c2 >>> 16); + c4 = (h7h >>> 16) + (hh >>> 16) + (c3 >>> 16); + + h7h = (c4 << 16) | (c3 & 0xFFFF); + h7l = (c2 << 16) | (c1 & 0xFFFF); + } while(!end); + + if(fp) fclose(fp) + + new hex[129], pos + hex[pos++] = gSHA_HEXCHAR[(h0h >> 28) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h0h >> 24) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h0h >> 20) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h0h >> 16) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h0h >> 12) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h0h >> 8) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h0h >> 4) & 0x0F];hex[pos++] = gSHA_HEXCHAR[h0h & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h0l >> 28) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h0l >> 24) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h0l >> 20) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h0l >> 16) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h0l >> 12) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h0l >> 8) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h0l >> 4) & 0x0F];hex[pos++] = gSHA_HEXCHAR[h0l & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h1h >> 28) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h1h >> 24) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h1h >> 20) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h1h >> 16) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h1h >> 12) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h1h >> 8) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h1h >> 4) & 0x0F];hex[pos++] = gSHA_HEXCHAR[h1h & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h1l >> 28) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h1l >> 24) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h1l >> 20) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h1l >> 16) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h1l >> 12) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h1l >> 8) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h1l >> 4) & 0x0F];hex[pos++] = gSHA_HEXCHAR[h1l & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h2h >> 28) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h2h >> 24) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h2h >> 20) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h2h >> 16) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h2h >> 12) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h2h >> 8) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h2h >> 4) & 0x0F];hex[pos++] = gSHA_HEXCHAR[h2h & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h2l >> 28) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h2l >> 24) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h2l >> 20) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h2l >> 16) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h2l >> 12) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h2l >> 8) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h2l >> 4) & 0x0F];hex[pos++] = gSHA_HEXCHAR[h2l & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h3h >> 28) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h3h >> 24) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h3h >> 20) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h3h >> 16) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h3h >> 12) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h3h >> 8) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h3h >> 4) & 0x0F];hex[pos++] = gSHA_HEXCHAR[h3h & 0x0F] + + if(bits >= SHA2_256) + { + hex[pos++] = gSHA_HEXCHAR[(h3l >> 28) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h3l >> 24) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h3l >> 20) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h3l >> 16) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h3l >> 12) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h3l >> 8) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h3l >> 4) & 0x0F]; hex[pos++] = gSHA_HEXCHAR[h3l & 0x0F] + } + + if(bits >= SHA2_384) + { + hex[pos++] = gSHA_HEXCHAR[(h4h >> 28) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h4h >> 24) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h4h >> 20) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h4h >> 16) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h4h >> 12) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h4h >> 8) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h4h >> 4) & 0x0F]; hex[pos++] = gSHA_HEXCHAR[h4h & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h4l >> 28) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h4l >> 24) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h4l >> 20) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h4l >> 16) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h4l >> 12) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h4l >> 8) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h4l >> 4) & 0x0F]; hex[pos++] = gSHA_HEXCHAR[h4l & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h5h >> 28) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h5h >> 24) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h5h >> 20) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h5h >> 16) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h5h >> 12) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h5h >> 8) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h5h >> 4) & 0x0F]; hex[pos++] = gSHA_HEXCHAR[h5h & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h5l >> 28) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h5l >> 24) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h5l >> 20) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h5l >> 16) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h5l >> 12) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h5l >> 8) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h5l >> 4) & 0x0F]; hex[pos++] = gSHA_HEXCHAR[h5l & 0x0F] + } + + if(bits == SHA2_512) + { + hex[pos++] = gSHA_HEXCHAR[(h6h >> 28) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h6h >> 24) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h6h >> 20) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h6h >> 16) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h6h >> 12) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h6h >> 8) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h6h >> 4) & 0x0F]; hex[pos++] = gSHA_HEXCHAR[h6h & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h6l >> 28) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h6l >> 24) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h6l >> 20) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h6l >> 16) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h6l >> 12) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h6l >> 8) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h6l >> 4) & 0x0F]; hex[pos++] = gSHA_HEXCHAR[h6l & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h7h >> 28) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h7h >> 24) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h7h >> 20) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h7h >> 16) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h7h >> 12) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h7h >> 8) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h7h >> 4) & 0x0F]; hex[pos++] = gSHA_HEXCHAR[h7h & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h7l >> 28) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h7l >> 24) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h7l >> 20) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h7l >> 16) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h7l >> 12) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h7l >> 8) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h7l >> 4) & 0x0F]; hex[pos++] = gSHA_HEXCHAR[h7l & 0x0F] + } + + copy(output, len, hex) + return true; +} + +stock encrypt_init(table[]) +{ + copy(gEncryptTable, charsmax(gEncryptTable), table) + gEncryptTableLen = strlen(gEncryptTable) - 1 +} + +stock encrypt_key(string[]) +{ + new int[1] + for(new i; i < 4 && string[i]; i++) int{i} = string[i] + + return 1+int[0]%255 +} + +stock encrypt(string[], out[], len, numkey) +{ + if(!gEncryptTableLen) return; + + new charid, i + for(i=0; string[i] && i <= len;i++) + { + charid = table_find_char(string[i]) + if(charid == -1) out[i] = string[i] + else out[i] = gEncryptTable[(charid+numkey)%gEncryptTableLen] + } +} + +stock decrypt(encrypted[], out[], len, numkey) +{ + if(!gEncryptTableLen) return; + + new charid, i + for(i=0; encrypted[i] && i <= len;i++) + { + charid = table_find_char(encrypted[i]) + if(charid == -1) out[i] = encrypted[i] + else out[i] = gEncryptTable[(charid-numkey)%gEncryptTableLen] + } +} + +stock table_find_char(character) +{ + for(new i; gEncryptTable[i]; i++) if(gEncryptTable[i] == character) return i + + return -1 +} +/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE +*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang11274\\ f0\\ fs16 \n\\ par } +*/ diff --git a/bin/amxxdump/includes/amxmodx/cssdk_const.inc b/bin/amxxdump/includes/amxmodx/cssdk_const.inc new file mode 100644 index 0000000..821bbe9 --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/cssdk_const.inc @@ -0,0 +1,1585 @@ +#if defined _cssdk_const_included + #endinput +#endif +#define _cssdk_const_included + +/** +* Basic constants +*/ +#define BIT(%0) (1<<(%0)) + +#define NULLENT -1 + +#define MAX_WEAPONS 32 +#define MAX_CLIENTS 32 // Max # of clients allowed in a server. +#define MAX_ITEM_TYPES 6 // hud item selection slots + +#define MAX_EDICT_BITS 11 // How many bits to use to encode an edict. # of bits needed to represent max edicts +#define MAX_EDICTS (1< + +/** + * Retrieves the client's current weapon statistics. + * + * @note For a list of default CS weapon ids see the CSW_* constants in + * amxconst.inc, this function also works on custom weapons. + * @note For a list of possible body hitplaces see the HIT_* constants in + * amxconst.inc + * @note For a list of possible stat constants see the STATSX_* constants in + * amxconst.inc + * @note The fields in the statistics are: + * 0 - Kills + * 1 - Deaths + * 2 - Headshots + * 3 - Teamkills + * 4 - Shots + * 5 - Hits + * 6 - Damage + * + * @param index Client index + * @param wpnindex Weapon id, or 0 to retrieve total statistics across all + * weapons + * @param stats Buffer to copy statistics to + * @param bodyhits Buffer to copy body hits to + * + * @return 1 on success, 0 if no statistics are available for the weapon + * id + * @error If an invalid client index or weapon id is provided, an + * error will be thrown. + */ +native get_user_wstats(index, wpnindex, stats[STATSX_MAX_STATS], bodyhits[MAX_BODYHITS]); + +/** + * Retrieves the client's weapon statistics from the current round. + * + * @note For a list of default CS weapon ids see the CSW_* constants in + * amxconst.inc, this function also works on custom weapons. + * @note For a list of possible body hitplaces see the HIT_* constants in + * amxconst.inc + * @note For a list of possible stat constants see the STATSX_* constants in + * amxconst.inc + * @note The fields in the statistics are: + * 0 - Kills + * 1 - Deaths + * 2 - Headshots + * 3 - Teamkills + * 4 - Shots + * 5 - Hits + * 6 - Damage + * + * @param index Client index + * @param wpnindex Weapon id, or 0 to retrieve total statistics across all + * weapons + * @param stats Buffer to copy statistics to + * @param bodyhits Buffer to copy body hits to + * + * @return 1 on success, 0 if no statistics are available for the + * weapon id + * @error If an invalid client index or weapon id is provided, an + * error will be thrown. + */ +native get_user_wrstats(index, wpnindex, stats[STATSX_MAX_STATS], bodyhits[MAX_BODYHITS]); + +/** + * Retrieves the client's weapon statistics from the permanent storage on the + * server. + * + * @note The permanent storage is updated on every respawn or client disconnect. + * @note Player rank is determined by the customizable "get_score" function in + * "data/csstats.amxx". By default it uses the difference of kills to + * deaths/teamkills. + * @note For a list of possible body hitplaces see the HIT_* constants in + * amxconst.inc + * @note For a list of possible stat constants see the STATSX_* constants in + * amxconst.inc + * @note The fields in the statistics are: + * 0 - Kills + * 1 - Deaths + * 2 - Headshots + * 3 - Teamkills + * 4 - Shots + * 5 - Hits + * 6 - Damage + * 7 - Rank + * + * @param index Client index + * @param stats Buffer to copy statistics to + * @param bodyhits Buffer to copy body hits to + * + * @return Players rank > 0 on success, or 0 if player is not ranked + * and no statistics are available + * @error If an invalid client index is provided, an error will be + * thrown. + */ +native get_user_stats(index, stats[STATSX_MAX_STATS], bodyhits[MAX_BODYHITS]); + +/** + * Retrieves the client's statistics from the current round. + * + * @note For a list of possible body hitplaces see the HIT_* constants in + * amxconst.inc + * @note For a list of possible stat constants see the STATSX_* constants in + * amxconst.inc + * @note The fields in the statistics are: + * 0 - Kills + * 1 - Deaths + * 2 - Headshots + * 3 - Teamkills + * 4 - Shots + * 5 - Hits + * 6 - Damage + * + * @param index Client index + * @param stats Buffer to copy statistics to + * @param bodyhits Buffer to copy body hits to + * + * @return 1 on success, 0 if no statistics are available + * @error If an invalid client index is provided, an error will be + * thrown. + */ +native get_user_rstats(index, stats[STATSX_MAX_STATS], bodyhits[MAX_BODYHITS]); + +/** + * Retrieves the client's statistics inflicted upon another client from the + * current round. + * + * @note For a list of possible body hitplaces see the HIT_* constants in + * amxconst.inc + * @note For a list of possible stat constants see the STATSX_* constants in + * amxconst.inc + * @note The fields in the statistics are: + * 0 - Kills + * 1 - Deaths + * 2 - Headshots + * 3 - Teamkills + * 4 - Shots + * 5 - Hits + * 6 - Damage + * + * @param index Client index + * @param victim Victim client index, or 0 to retrieve the statistics against + * all victims + * @param stats Buffer to copy statistics to + * @param bodyhits Buffer to copy body hits to + * @param wpnname Optional buffer to copy last used weapon name to + * @param len Maximum buffer size + * + * @return 1 on success, 0 if no statistics are available against the + * specified victim + * @error If an invalid client index is provided, an error will be + * thrown. + */ +native get_user_vstats(index, victim, stats[STATSX_MAX_STATS], bodyhits[MAX_BODYHITS], wpnname[] = "", len = 0); + +/** + * Retrieves the client's statistics received from another client from the + * current round. + * + * @note For a list of possible body hitplaces see the HIT_* constants in + * amxconst.inc + * @note For a list of possible stat constants see the STATSX_* constants in + * amxconst.inc + * @note The fields in the statistics are: + * 0 - Kills + * 1 - Deaths + * 2 - Headshots + * 3 - Teamkills + * 4 - Shots + * 5 - Hits + * 6 - Damage + * + * @param index Client index + * @param wpnindex Attacker client index, or 0 to retrieve the statistics from + * all attackers + * @param stats Buffer to copy statistics to + * @param bodyhits Buffer to copy body hits to + * @param wpnname Optional buffer to copy last used weapon name to + * @param len Maximum buffer size + * + * @return 1 on success, 0 if no statistics are available against the + * specified attacker + * @error If an invalid client index is provided, an error will be + * thrown. + */ +native get_user_astats(index, wpnindex, stats[STATSX_MAX_STATS], bodyhits[MAX_BODYHITS], wpnname[] = "", len = 0); + +/** + * Resets the current round weapon, attacker and victim statistics. + * + * @param index Client index + * + * @noreturn + * @error If an invalid client index is provided, an error will be + * thrown. + */ +native reset_user_wstats(index); + +/** + * Retrieves statistics from the permanent storage on the server via iterative, + * incremental access. + * + * @note The permanent storage is updated on every respawn or client disconnect. + * @note Player rank is determined by the customizable "get_score" function in + * "data/csstats.amxx". By default it uses the difference of kills to + * deaths/teamkills. + * @note For a list of possible body hitplaces see the HIT_* constants in + * amxconst.inc + * @note For a list of possible stat constants see the STATSX_* constants in + * amxconst.inc + * @note The fields in the statistics are: + * 0 - Kills + * 1 - Deaths + * 2 - Headshots + * 3 - Teamkills + * 4 - Shots + * 5 - Hits + * 6 - Damage + * 7 - Rank + * + * @param index Rank index + * @param stats Buffer to copy statistics to + * @param bodyhits Buffer to copy body hits to + * @param name Buffer to copy client name to + * @param len Maximum name buffer size + * @param authid Buffer to copy client auth id to + * @param authidlen Maximum authid buffer size + * + * @return Next rank index (> 0 and > index), or 0 if no more + * statistics exist + */ +native get_stats(index, stats[STATSX_MAX_STATS], bodyhits[MAX_BODYHITS], name[], len, authid[] = "", authidlen = 0); + +/** + * Returns the number of all entries in the permanent statistics storage. + * + * @return Number of entries in statistics storage + */ +native get_statsnum(); + +/** + * Retrieves the client's objective statistics from the permanent storage. + * + * @note The permanent storage is updated on every respawn or client disconnect. + * @note For a list of possible stat constants see the STATSX_* constants in + * amxconst.inc + * @note The fields in the statistics are: + * 0 - total defusions + * 1 - bomb defused + * 2 - bomb plants + * 3 - bomb explosions + * + * @param index Client index + * @param stats Buffer to copy statistics to + * + * @return Players rank > 0 on success, or 0 if player is not ranked + * and no statistics are available + * @error If an invalid client index is provided, an error will be + * thrown. + */ +native get_user_stats2(index, stats[STATSX_MAX_OBJECTIVE]); + +/** + * Retrieves objective statistics from the permanent storage on the server via + * iterative, incremental access. + * + * @note The permanent storage is updated on every respawn or client disconnect. + * @note For a list of possible stat constants see the STATSX_* constants in + * amxconst.inc + * @note The fields in the statistics are: + * 0 - total defusions + * 1 - bomb defused + * 2 - bomb plants + * 3 - bomb explosions + * + * @param index Client index + * @param stats Buffer to copy statistics to + * @param authid Buffer to copy client auth id to + * @param authidlen Maximum authid buffer size + * + * @return Next rank index (> 0 and > index), or 0 if no more + * statistics exist + */ +native get_stats2(index, stats[STATSX_MAX_OBJECTIVE], authid[] = "", authidlen = 0); diff --git a/bin/amxxdump/includes/amxmodx/csstats.inc.temp b/bin/amxxdump/includes/amxmodx/csstats.inc.temp new file mode 100644 index 0000000..fe8d4e8 --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/csstats.inc.temp @@ -0,0 +1,16 @@ +#if defined _csstats_included +#endinput +#endif +#define _csstats_included +#include +native get_user_wstats(index, wpnindex, stats[STATSX_MAX_STATS], bodyhits[MAX_BODYHITS]); +native get_user_wrstats(index, wpnindex, stats[STATSX_MAX_STATS], bodyhits[MAX_BODYHITS]); +native get_user_stats(index, stats[STATSX_MAX_STATS], bodyhits[MAX_BODYHITS]); +native get_user_rstats(index, stats[STATSX_MAX_STATS], bodyhits[MAX_BODYHITS]); +native get_user_vstats(index, victim, stats[STATSX_MAX_STATS], bodyhits[MAX_BODYHITS], wpnname[] = "", len = 0); +native get_user_astats(index, wpnindex, stats[STATSX_MAX_STATS], bodyhits[MAX_BODYHITS], wpnname[] = "", len = 0); +native reset_user_wstats(index); +native get_stats(index, stats[STATSX_MAX_STATS], bodyhits[MAX_BODYHITS], name[], len, authid[] = "", authidlen = 0); +native get_statsnum(); +native get_user_stats2(index, stats[STATSX_MAX_OBJECTIVE]); +native get_stats2(index, stats[STATSX_MAX_OBJECTIVE], authid[] = "", authidlen = 0); diff --git a/bin/amxxdump/includes/amxmodx/csstats_const.inc b/bin/amxxdump/includes/amxmodx/csstats_const.inc new file mode 100644 index 0000000..a392d1b --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/csstats_const.inc @@ -0,0 +1,29 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Counter-Strike Functions +// + +#if defined _csstats_const_included + #endinput +#endif +#define _csstats_const_included + +/** + * Constants for objective based statistics + */ +enum +{ + STATSX_TOTAL_DEFUSIONS = 0, + STATSX_BOMBS_DEFUSED, + STATSX_BOMBS_PLANTED, + STATSX_BOMB_EXPLOSIONS, + STATSX_MAX_OBJECTIVE +} diff --git a/bin/amxxdump/includes/amxmodx/cstrike.inc b/bin/amxxdump/includes/amxmodx/cstrike.inc new file mode 100644 index 0000000..bb366f4 --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/cstrike.inc @@ -0,0 +1,1287 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Counter-Strike Functions +// + +#if defined _cstrike_included + #endinput +#endif +#define _cstrike_included + +#pragma reqlib cstrike +#if !defined AMXMODX_NOAUTOLOAD + #pragma loadlib cstrike +#endif + +#include + +/** + * Returns client's deaths. + * + * @param index Client index + * + * @return Client deaths + * @error If the client index is not within the range of 1 to + * MaxClients, or the client is not connected, an error will be + * thrown. + */ +native cs_get_user_deaths(index); + +/** + * Sets client's deaths. + * + * @param index Client index + * @param newdeaths New value to set + * @param scoreboard If true the scoreboard will be updated to reflect the new value. + * + * @noreturn + * @error If the client index is not within the range of 1 to + * MaxClients, or the client is not connected, an error + * will be thrown. + */ +native cs_set_user_deaths(index, newdeaths, bool:scoreboard = true); + +/** + * Returns index of the entity that a hostage is following. + * + * @note Hostages can theoretically follow any entity in the game, so the + * returned entity index is not necessarily a client index. + * + * @param index Hostage entity index + * + * @return Entity index if hostage is following something, 0 otherwise + * @error If the provided entity index is not a hostage, an error will + * be thrown. + */ +native cs_get_hostage_foll(index); + +/** + * Sets hostage to follow an entity. + * + * @note Hostages can theoretically follow any entity in the game, so the + * followedindex does not have to be a client index. + * + * @param index Hostage entity index + * @param followedindex New entity to follow + * + * @noreturn + * @error If the provided entity index is not a hostage, an + * error will be thrown. + */ +native cs_set_hostage_foll(index, followedindex = 0); + +/** + * Returns unique id of a hostage. + * + * @param index Hostage entity index + * + * @return Unique hostage id + * @error If the provided entity index is not a hostage, an error will + * be thrown. + */ +native cs_get_hostage_id(index); + +/** + * Returns amount of ammo in the client's backpack for a specific weapon. + * + * @note For a list of possible weapon ids see the CSW_* constants in + * amxconst.inc + * @note Some weapons share ammo types and therefore ammo backpack pools. List + * of ammo types: + * ammo_338magnum - awp + * ammo_762nato - scout, ak47, g3sg1 + * ammo_556natobox - m249 + * ammo_556nato - famas, m4a1, aug, sg550, galil, sg552 + * ammo_buckshot - m3, xm1014 + * ammo_45acp - usp, ump45, mac10 + * ammo_57mm - fiveseven, p90 + * ammo_50ae - deagle + * ammo_357sig - p228 + * ammo_9mm - glock, mp5, tmp, elites + * / - hegrenade + * / - flashbang + * / - smokegrenade + * + * @param index Client index + * @param weapon Weapon id + * + * @return Amount of ammo in backpack + * @error If the client index is not within the range of 1 to + * MaxClients, the client is not connected, or an invalid + * weapon id is provided, an error will be thrown. + */ +native cs_get_user_bpammo(index, weapon); + +/** + * Sets amount of ammo in the client's backpack for a specific weapon. + * + * @note For a list of possible weapon ids see the CSW_* constants in + * amxconst.inc + * @note Some weapons share ammo types and therefore ammo backpack pools. List + * of ammo types: + * ammo_338magnum - awp + * ammo_762nato - scout, ak47, g3sg1 + * ammo_556natobox - m249 + * ammo_556nato - famas, m4a1, aug, sg550, galil, sg552 + * ammo_buckshot - m3, xm1014 + * ammo_45acp - usp, ump45, mac10 + * ammo_57mm - fiveseven, p90 + * ammo_50ae - deagle + * ammo_357sig - p228 + * ammo_9mm - glock, mp5, tmp, elites + * / - hegrenade + * / - flashbang + * / - smokegrenade + * + * @param index Client index + * @param weapon Weapon id + * @param amount New backpack ammo amount to set + * + * @noreturn + * @error If the client index is not within the range of 1 to + * MaxClients, the client is not connected, or an invalid + * weapon id is provided, an error will be thrown. + */ +native cs_set_user_bpammo(index, weapon, amount); + +/** + * Returns if the client has a defuse kit. + * + * @param index Client index + * + * @return 1 if the client has a defuse kit, 0 otherwise + * @error If the client index is not within the range of 1 to + * MaxClients, the client is not connected, or an invalid + * weapon id is provided, an error will be thrown. + */ +native cs_get_user_defuse(index); + +/** + * Sets the client's defusekit status and allows to set a custom HUD icon and + * color. + * + * @param index Client index + * @param defusekit If nonzero the client will have a defusekit, otherwise + * it will be removed + * @param r Red component of icon color + * @param g Green component of icon color + * @param b Blue component of icon color + * @param icon HUD sprite to use as icon + * @param flash If nonzero the icon will flash red + * + * @noreturn + * @error If the client index is not within the range of 1 to + * MaxClients, or the client is not connected, an error + * will be thrown. + */ +native cs_set_user_defuse(index, defusekit = 1, r = 0, g = 160, b = 0, icon[] = "defuser", flash = 0); + +/** + * Returns if the client is inside a buyzone. + * + * @param index Client index + * + * @return 1 if the client is inside a buyzone, 0 otherwise + * @error If the client index is not within the range of 1 to + * MaxClients, or the client is not connected, an error will be + * thrown. + */ +native cs_get_user_buyzone(index); + +/** + * Returns if the client has a primary weapon or a shield in the inventory. + * + * @param index Client index + * + * @return 1 if the client has a primary weapon or shield in the + * inventory, 0 otherwise + * @error If the client index is not within the range of 1 to + * MaxClients, or the client is not connected, an error will be + * thrown. + */ +native cs_get_user_hasprim(index); + +/** + * Retrieves the client's player model. + * + * @param index Client index + * @param model Buffer to copy model to + * @param len Maximum buffer size + * + * @return Number of cells written to buffer + * @error If the client index is not within the range of 1 to + * MaxClients, or the client is not connected, an error will be + * thrown. + */ +native cs_get_user_model(index, model[], len); + +/** + * Sets the client's player model. + * + * @note This is not a one-time set. The CStrike module will remember the + * selected model and try to prevent attempts at changing the player + * model, or immediately re-apply it if necessary. + * @note Updating modelindex is useful for custom models which don't have + * the same structure as the default ones (hitbox, etc..). Model must + * be precached before. + * + * @param index Client index + * @param model Model name + * @param update_index If true, the modelindex is updated as well + * + * @noreturn + * @error If the client index is not within the range of 1 to + * MaxClients, the client is not connected, the provided + * model is empty, or if modeindex is updated and the + * provided model is not precached, an error will be thrown. + */ +native cs_set_user_model(index, const model[], bool:update_index = false); + +/** + * Resets the client's model. + * + * @note This lifts the model-lock set by a previous cs_set_user_model() call. + * + * @param index Client index + * + * @noreturn + * @error If the client index is not within the range of 1 to + * MaxClients, or the client is not connected, an error will be + * thrown. + */ +native cs_reset_user_model(index); + +/** + * Returns the client's amount of money. + * + * @param index Client index + * + * @return Amount of money + * @error If the client index is not within the range of 1 to + * MaxClients, or the client is not connected, an error will be + * thrown. + */ +native cs_get_user_money(index); + +/** + * Sets the client's amount of money. + * + * @param index Client index + * @param money New amount to set + * @param flash If nonzero the HUD will flash the difference between new + * and old amount in red or green + * + * @noreturn + * @error If the client index is not within the range of 1 to + * MaxClients, or the client is not connected, an error will be + * thrown. + */ +native cs_set_user_money(index, money, flash = 1); + +/** + * Returns if the client's has night vision goggles. + * + * @param index Client index + * + * @return 1 if user has NVG, 0 otherwise + * @error If the client index is not within the range of 1 to + * MaxClients, or the client is not connected, an error will be + * thrown. + */ +native cs_get_user_nvg(index); + +/** + * Sets the client's night vision goggles. + * + * @param index Client index + * @param nvgoogles If nonzero the NVG will be added to the client's + * inventory, otherwise they will be removed from it + * + * @noreturn + * @error If the client index is not within the range of 1 to + * MaxClients, or the client is not connected, an error + * will be thrown. + */ +native cs_set_user_nvg(index, nvgoggles = 1); + +/** + * Returns if the client has the ability to plant the bomb. + * + * @note Only with this set can the client plant the bomb within the usual bomb + * target areas. If this is not set the user can not plant the bomb, even + * when he has one in the inventory. + * + * @param index Client index + * + * @return 1 if the client is able to plant the bomb, 0 otherwise + * @error If the client index is not within the range of 1 to + * MaxClients, or the client is not connected, an error will be + * thrown. + */ +native cs_get_user_plant(index); + +/** + * Sets the client's ability to plant the bomb and displays or hides the bomb + * HUD icon. + * + * @note Only with this set can the client plant the bomb within the usual bomb + * target areas. If this is not set the user can not plant the bomb, even + * when he has one in the inventory. This is only correctly set when the + * client touches a bomb and picks it up "manually" (only possible for + * Terrorists), so this should be used if the bomb is added to the + * inventory through other means. + * + * @param index Client index + * @param plant If nonzero the client will be able to plant the bomb, + * otherwise he will be unable to + * @param showbombicon If nonzero the green C4 icon will be displayed on the + * client's hud, otherwise it will be hidden + * + * @return 1 if the client is able to plant the bomb, 0 otherwise + * @error If the client index is not within the range of 1 to + * MaxClients, or the client is not connected, an error + * will be thrown. + */ +native cs_set_user_plant(index, plant = 1, showbombicon = 1); + +/** + * Sets the client's team without killing the player, and sets the client model. + * + * @note For a list of valid team ids see the CsTeams enum, and for a list of + * valid internal model ids see the CsInternalModel enum. + * + * @param index Client index + * @param team Team id + * @param model Internal model id, if CS_DONTCHANGE the game will choose the model + * or if CS_NORESET the game will not update it. + * @param send_teaminfo If true, a TeamInfo message will be sent + * + * @noreturn + * @error If the client index is not within the range of 1 to + * MaxClients, or the client is not connected, an error will be + * thrown. + */ +native cs_set_user_team(index, any:team, any:model = CS_DONTCHANGE, bool:send_teaminfo = true); + +/** + * Returns the client's team and optionally the model id. + * + * @note For a list of valid team ids see the CsTeams enum, and for a list of + * valid internal model ids see the CsInternalModel enum. + * + * @param index Client index + * @param model Optional variable to store model id in + * + * @return Team id + * @error If the client index is not within the range of 1 to + * MaxClients, or the client is not connected, an error will be + * thrown. + */ +native CsTeams:cs_get_user_team(index, &any:model = CS_DONTCHANGE); + +/** + * Returns if the client is a VIP. + * + * @param index Client index + * + * @return 1 if the client is a VIP, 0 otherwise + * @error If the client index is not within the range of 1 to + * MaxClients, or the client is not connected, an error will be + * thrown. + */ +native cs_get_user_vip(index); + +/** + * Sets the client's VIP status and displayed model and scoreboard flag. + * + * @note This is mostly useful for removing VIP status so the client can change + * teams and/or buy items properly. It does not alter gameplay, the player + * that is selected as VIP at the start of a round will retain the + * internal VIP status and remain the primary objective for the game mode. + * + * @param index Client index + * @param vip If nonzero the client will be made a VIP, otherwise the + * VIP status will be removed + * @param model If nonzero the client's model will be changed to the VIP + * model, otherwise a random CT model will be selected + * @param scoreboard If nonzero the scoreboard will be updated to reflect the + * new VIP status + * + * @noreturn + * @error If the client index is not within the range of 1 to + * MaxClients, or the client is not connected, an error + * will be thrown. + */ +native cs_set_user_vip(index, vip = 1, model = 1, scoreboard = 1); + +/** + * Returns if the client has committed a team kill in the current round. + * + * @note If this is set to 1 the client will be punished at the start of the + * next round depending on the value of the mp_tkpunish cvar. The team + * kill status is then reset. + * + * @param index Client index + * + * @return 1 if the client has committed a team kill, 0 otherwise + * @error If the client index is not within the range of 1 to + * MaxClients, or the client is not connected, an error will be + * thrown. + */ +native cs_get_user_tked(index); + +/** + * Sets the client's team kill status, indicating whether the client has + * committed a team kill in the current round. + * + * @note If this is set to 1 the client will be punished at the start of the + * next round depending on the value of the mp_tkpunish cvar. The team + * kill status is then reset. + * + * @param index Client index + * @param tk Team kill status + * @param subtract Amount of frags to subtract, negative values add frags + * + * @noreturn + * @error If the client index is not within the range of 1 to + * MaxClients, or the client is not connected, an error will be + * thrown. + */ +native cs_set_user_tked(index, tk = 1, subtract = 1); + +/** + * Returns if the client is currently driving a vehicle and if so, indicates + * the speed. + * + * @param index Client index + * + * @return 0 if the client is not driving, 1 if driving a vehicle but + * not moving, 2 to 4 if driving positive speeds, 5 if + * driving at a negative speed (backing), see TRAIN_* constants + * in hlsdk_const.inc + * @error If the client index is not within the range of 1 to + * MaxClients, or the client is not connected, an error will be + * thrown. + */ +native cs_get_user_driving(index); + +/** + * Returns if the client has a shield in the inventory. + * + * @param index Client index + * + * @return 1 if the client has a shield, 0 otherwise + * @error If the client index is not within the range of 1 to + * MaxClients, or the client is not connected, an error will be + * thrown. + */ +native cs_get_user_shield(index); + +/** + * Returns if the client is using a stationary gun. + * + * @param index Client index + * + * @return 1 if the client uses a stationary gun, 0 otherwise + * @error If the client index is not within the range of 1 to + * MaxClients, or the client is not connected, an error will be + * thrown. + */ +native cs_get_user_stationary(index); + +/** + * Returns the client's armor value and retrieves the type of armor. + * + * @note For a list of possible armor types see the CsArmorType enum. + * + * @param index Client index + * @param armortype Variable to store armor type in + * + * @return Amount of armor, 0 if client has no armor + * @error If the client index is not within the range of 1 to + * MaxClients, or the client is not connected, an error + * will be thrown. + */ +native cs_get_user_armor(index, &CsArmorType:armortype = CS_ARMOR_NONE); + +/** + * Sets the client's armor value the type of armor. + * + * @note For a list of possible armor types see the CsArmorType enum. + * @note Sends the appropriate message to update the client's HUD. + * + * @param index Client index + * @param armorvalue Amount of armor to set + * @param armortype CS armor type + * + * @noreturn + * @error If the client index is not within the range of 1 to + * MaxClients, or the client is not connected, an error + * will be thrown. + */ +native cs_set_user_armor(index, armorvalue, CsArmorType:armortype); + +/** + * Returns if the weapon is in burst mode. + * + * @note Only the Glock and Famas can return 1 as they are the only guns in the + * game that have a burst fire mode. + * @note This native does not verify that the provided entity is a weapon + * entity. It will return incorrect values for non-weapon entities. + * + * @param index Weapon entity index + * + * @return 1 if the weapon is in burst mode, 0 otherwise + * @error If an invalid entity index or a client index is provided, + * an error will be thrown. + */ +native cs_get_weapon_burst(index); + +/** + * Sets the weapon's burst mode. + * + * @note Only the Glock and Famas can be set to burst fire mode as they are the + * only guns in the game that provide such a mode. + * @note This native does not verify that the provided entity is a weapon + * entity. It will result in undefined behavior if used on non-weapon + * entities. + * + * @param index Weapon entity index + * @param burstmode If nonzero the weapon will be put into burstmode, + * otherwise the burst mode will be removed + * + * @return 1 if burst mode set successfully, 0 if entity is not + * an applicable weapon + * @error If an invalid entity index or a client index is + * provided, an error will be thrown. + */ +native cs_set_weapon_burst(index, burstmode = 1); + +/** + * Returns if the weapon is in silenced mode. + * + * @note Only the USP and M4A1 can return 1 as they are the only guns in the + * game that have a silenced fire mode. + * @note This native does not verify that the provided entity is a weapon + * entity. It will return incorrect values for non-weapon entities. + * + * @param index Weapon entity index + * + * @return 1 if the weapon is in silenced mode, 0 otherwise + * @error If an invalid entity index or a client index is provided, + * an error will be thrown. + */ +native cs_get_weapon_silen(index); + +/** + * Sets the weapon's silenced mode. + * + * @note Only the USP and M4A1 can be set to silenced fire mode as they are the + * only guns in the game that provide such a mode. + * @note This native does not verify that the provided entity is a weapon + * entity. It will result in undefined behavior if used on non-weapon + * entities. + * + * @param index Weapon entity index + * @param silence If nonzero the weapon will be put into silenced + * mode, otherwise the silenced mode will be removed + * @param draw_animation If 1 and the weapon is currently held by a + * client, the appropriate weapon animation will be + * played + * If 2, same as 1 but follows game behavior by playing + * the associated player's model sequence and disallowing + * firing while animation is playing. + * + * @return 1 if silenced mode set successfully, 0 if entity is + * not an applicable weapon + * @error If an invalid entity index or a client index is + * provided, an error will be thrown. + */ +native cs_set_weapon_silen(index, silence = 1, draw_animation = 1); + +/** + * Returns the amount of ammo in weapon's magazine. + * + * @note This native does not verify that the provided entity is a weapon + * entity. It will return incorrect values for non-weapon entities. + * + * @param index Weapon entity index + * + * @return Amount of ammo in magazine + * @error If an invalid entity index or a client index is provided, + * an error will be thrown. + */ +native cs_get_weapon_ammo(index); + +/** + * Sets the amount of ammo in weapon's clip. + * + * @note This native does not verify that the provided entity is a weapon + * entity. It will result in undefined behavior if used on non-weapon + * entities. + * + * @param index Weapon entity index + * @param newammo New ammo amount + * + * @noreturn + * @error If an invalid entity index or a client index is provided, + * an error will be thrown. + */ +native cs_set_weapon_ammo(index, newammo); + +/** + * Returns the weapon id of an entity. + * + * @note For a list of possible weapon ids see the CSW_* constants in + * amxconst.inc + * @note This native does not verify that the provided entity is a weapon + * entity. It will return incorrect values for non-weapon entities. + * + * @param index Weapon entity index + * + * @return Weapon id + * @error If an invalid entity index or a client index is provided, + * an error will be thrown. + */ +native cs_get_weapon_id(index); + +/** + * Returns if "no knives" mode is enabled. + * + * @note "No knives" mode means that the CStrike module will prevent the game + * from creating (and thus attaching) "weapon_knife" entities. This means + * that clients will spawn without knives, but knives can still be put + * into the client inventories directly. + * + * @return 1 if "no knives" mode is enabled, 0 otherwise + */ +native cs_get_no_knives(); + +/** + * Enables or disables the "no knives" mode. + * + * @note "No knives" mode means that the CStrike module will prevent the game + * from creating (and thus attaching) "weapon_knife" entities. This means + * that clients will spawn without knives, but knives can still be put + * into the client inventories directly. + * + * @param noknives If nonzero enable "no knives" mode, disable otherwise + * + * @noreturn + */ +native cs_set_no_knives(noknives = 0); + +/** + * Sets a dead client up for spawning. + * + * @note This sets the client deadflag and triggers a client think, effectively + * making the game respawn the client. Should only be used on dead + * clients. + * + * @param player Client index + * + * @noreturn + * @error If the client index is not within the range of 1 to + * MaxClients, or the client is not connected, an error will be + * thrown. + */ +native cs_user_spawn(player); + +/** + * Returns the armoury entity's weapon id. + * + * @note Not all weapon ids are supported by Counter-Strike, an armoury entity + * can not be a pistol, a knife or a bomb for exmaple. The full list is: + * CSW_SCOUT, CSW_HEGRENADE, CSW_XM1014, CSW_MAC10, CSW_AUG, + * CSW_SMOKEGRENADE, CSW_AWP, CSW_MP5NAVY, CSW_M249, CSW_M3, CSW_M4A1, + * CSW_TMP, CSW_G3SG1, CSW_VEST, CSW_VESTHELM, CSW_FLASHBANG, + * CSW_SG552, CSW_AK47, CSW_P90 + * + * @param index Armoury entity index + * @param count Optional variable to store in the number of times that an item can be retrieved + * from the same entity before being hidden + * + * @return Weapon id + * @error If a non-armoury entity is provided, an error will be + * thrown. + */ +native cs_get_armoury_type(index, &count = 1); + +/** + * Sets the amoury entity type. + * + * @note Not all weapon ids are supported by Counter-Strike, an armoury entity + * can not be a pistol, a knife or a bomb for exmaple. The full list is: + * CSW_SCOUT, CSW_HEGRENADE, CSW_XM1014, CSW_MAC10, CSW_AUG, + * CSW_SMOKEGRENADE, CSW_AWP, CSW_MP5NAVY, CSW_M249, CSW_M3, CSW_M4A1, + * CSW_TMP, CSW_G3SG1, CSW_VEST, CSW_VESTHELM, CSW_FLASHBANG, + * CSW_SG552, CSW_AK47, CSW_P90 + * @note This does not update the entity model. + * @note On restart, entity is always unhidden and the count is restored (this can not be below 1). + * + * @param index Armoury entity index + * @param type Weapon id + * @param count Number of times that an item can be retrieved from + * the same entity before being hidden + * If zero, the entity is hidden + * If below zero, nothing is set + * @noreturn + * @error If a non-armoury entity is provided, an error will be + * thrown. + */ +native cs_set_armoury_type(index, type, count = -1); + +/** + * Returns the weapon entity index that was packed into a weaponbox. + * + * @param weaponboxIndex Weaponbox entity index + * + * @return Weapon entity index on success or 0 if no weapon can be found + * @error If a non-weaponbox entity is provided or the entity is invalid, an error will be + * thrown. + */ +native cs_get_weaponbox_item(weaponboxIndex); + +/** + * Returns the map zones the client is inside of as a bitflag value. + * + * @note If the user does not have the ability to plant (cs_get_user_plant() + * returns 0) then the bitflag will not contain CS_MAPZONE_BOMBTARGET. + * @nore For a list of possible zone flags see the CS_MAPZONE_* constants. + * + * @param index Client index + * + * @return Bitflag value of map zones + * @error If the client index is not within the range of 1 to + * MaxClients, or the client is not connected, an error will be + * thrown. + */ +native cs_get_user_mapzones(index); + +/** + * Sets a zoom type on the client. + * + * @note Zoom types are not tied to their intended weapons, so any zoom type can + * be combined with any weapon. + * @note For a list of possible zoom types see the zoom type enum above + * (CS_*_ZOOM constants). + * + * @param index Client index + * @param type Zoom type + * @param mode If zero (blocking) the client will be forced to use the zoom + * type set and won't be able to change it until it is reset + * with CS_RESET_ZOOM, otherwise the user can restore back to + * normal as usual + * + * @noreturn + * @error If the client index is not within the range of 1 to + * MaxClients, the client is not connected, or an invalid zoom + * type is provided, an error will be thrown. + */ +native cs_set_user_zoom(index, type, mode); + +/** + * Returns if the client is zooming. + * + * @note For a list of possible zoom types see the zoom type enum above + * (CS_*_ZOOM constants). + * + * @param index Client index + * + * @return Zoom type if the user is zoomed in, 0 otherwise + * @error If the client index is not within the range of 1 to + * MaxClients, or the client is not connected, an error will be + * thrown. + */ +native cs_get_user_zoom(index); + +/** + * Returns if a submodel is set on the client. + * + * @note In Counter-Strike the submodel setting determines whether the user has + * a bomb backpack (if a Terrorist) or a defuse kit (if a CT) on their + * model. + * + * @param index Client index + * + * @return 1 if submodel is set, 0 otherwise + * @error If the client index is not within the range of 1 to + * MaxClients, or the client is not connected, an error will be + * thrown. + */ +native cs_get_user_submodel(index); + +/** + * Sets the submodel on a client. + * + * @note In Counter-Strike the submodel setting determines whether the user has + * a bomb backpack (if a Terrorist) or a defuse kit (if a CT) on their + * model. + * + * @param index Client index + * @param value If nonzero the submodel is set, otherwise it is removed + * + * @noreturn + * @error If the client index is not within the range of 1 to + * MaxClients, or the client is not connected, an error will be + */ +native cs_set_user_submodel(index, value); + +/** + * Returns the client's last activity time. + * + * @note This is the time that the internal Counter-Strike afk kicker uses to + * see who has been inactive too long. + * + * @param index Client index + * + * @return Last activity time + * @error If the client index is not within the range of 1 to + * MaxClients, or the client is not connected, an error will be + */ +native Float:cs_get_user_lastactivity(index); + +/** + * Sets the client's last activity time. + * + * @note This is the time that the internal Counter-Strike afk kicker uses to + * see who has been inactive too long. + * + * @param index Client index + * @param value New last activity time + * + * @noreturn + * @error If the client index is not within the range of 1 to + * MaxClients, or the client is not connected, an error will be + */ +native cs_set_user_lastactivity(index, Float:value); + +/** + * Returns the amount of hostages that the client has killed. + * + * @note This is the value that the internal Counter-Strike hostage punisher + * uses to determine if a client should be kicked, depending on the + * value of the mp_hostagepenalty value. + * + * @param index Client index + * + * @return Amount of hostages killed + * @error If the client index is not within the range of 1 to + * MaxClients, or the client is not connected, an error will be + */ +native cs_get_user_hostagekills(index); + +/** + * Sets the amount of hostages that the client has killed. + * + * @note This is the value that the internal Counter-Strike hostage punisher + * uses to determine if a client should be kicked, depending on the + * value of the mp_hostagepenalty value. The punisher only checks this + * value when a hostage is killed, so setting this will not cause the + * client to be kicked until they actually kill a hostage. + * + * @param index Client index + * @param value New amount of hostages killed + * + * @noreturn + * @error If the client index is not within the range of 1 to + * MaxClients, or the client is not connected, an error will be + */ +native cs_set_user_hostagekills(index, value); + +/** + * Returns the last time a hostage was used. + * + * @param index Hostage entity + * + * @return Last use time + * @error If the provided entity index is not a hostage, an error will + * be thrown. + */ +native Float:cs_get_hostage_lastuse(index); + +/** + * Sets the last time a hostage was used. + * + * @param index Hostage entity + * @param value New last use time + * + * @noreturn + * @error If the provided entity index is not a hostage, an error will + * be thrown. + */ +native cs_set_hostage_lastuse(index, Float:value); + +/** + * Returns the next time a hostage can be used. + * + * @param index Hostage entity + * + * @return Next use time + * @error If the provided entity index is not a hostage, an error will + * be thrown. + */ +native Float:cs_get_hostage_nextuse(index); + +/** + * Sets the next time a hostage can be used. + * + * @param index Hostage entity + * @param value New next use time + * + * @noreturn + * @error If the provided entity index is not a hostage, an error will + * be thrown. + */ +native cs_set_hostage_nextuse(index, Float:value); + +/** + * Returns the game time at which the bomb will explode. + * + * @param index C4 entity + * + * @return Explosion time + * @error If the provided entity index is not a bomb, an error will be + * thrown. + */ +native Float:cs_get_c4_explode_time(index); + +/** + * Sets the game time at which the bomb will explode. + * + * @param index C4 entity + * @param value New explosion time + * + * @noreturn + * @error If the provided entity index is not a bomb, an error will be + * thrown. + */ +native cs_set_c4_explode_time(index, Float:value); + +/** + * Returns if the bomb is being defused. + * + * @param c4index C4 entity + * + * @return 1 if the bomb is being defused, 0 otherwise + * @error If the provided entity index is not a bomb, an error will be + * thrown. + */ +native bool:cs_get_c4_defusing(c4index); + +/** + * Sets if the bomb is being defused. + * + * @param c4index C4 entity + * @param defusing True if the bomb should be defused, false otherwise + * + * @noreturn + * @error If the provided entity index is not a bomb, an error will be + * thrown. + */ +native cs_set_c4_defusing(c4index, bool:defusing); + +/** + * Creates an entity using Counter-Strike's custom CreateNamedEntity wrapper. + * + * @note Unlike other mods CS keeps track of entities using a custom hashtable. + * This function adds entities to this hashtable, providing benefits over + * the default CreateNamedEntity (used by create_entity() for example): + * - Storing entities in a hashtable allows CS to improve classname lookup + * performance compared to functions like FindEntityByString (used by + * find_ent_by_class() for example) that usually have to loop + * through all entities incrementally. + * - As CS exclusively uses the hashtable for classname lookup, entities + * created using the default engine functions will not be found by the + * game. For example "weaponbox" entities are supposed to be + * automatically cleaned up on round restart but are not considered if + * they have not been added to the hashtable. + * @note The faster hashtable lookup can be utilized with cs_find_ent_by_class() + * @note When creating an entity the classname has to be valid in the mod, as + * the engine needs to link the entity to an existing class internally. + * The classname string that is stored in the entvar struct + * (EV_SZ_classname) is separate from this association and can later be + * freely changed to serve other purposes. + * + * @param classname Entity class name + * + * @return Index of the created entity (> 0), 0 otherwise + */ +native cs_create_entity(const classname[]); + +/** + * Finds an entity in the world using Counter-Strike's custom FindEntityByString + * wrapper. + * + * @note Unlike other mods CS keeps track of entities using a custom hashtable. + * This function utilizes the hasthable and allows for considerably faster + * classname lookup compared to the default FindEntityByString (used by + * find_ent_by_class() for example). + * @note This exclusively considers entities in the hashtable, created by the + * game itself, using cs_create_entity(), or added via cs_set_ent_class(). + * + * @param start_index Entity index to start searching from. -1 to start from + * the first entity + * @param classname Classname to search for + * + * @return Entity index > 0 if found, 0 otherwise + */ +native cs_find_ent_by_class(start_index, const classname[]); + +/** + * Finds an entity in the world using Counter-Strike's custom FindEntityByString + * wrapper, matching by owner. + * + * @note Unlike other mods CS keeps track of entities using a custom hashtable. + * This function utilizes the hasthable and allows for considerably faster + * classname lookup compared to the default FindEntityByString (used by + * find_ent_by_owner() for example). + * @note This exclusively considers entities in the hashtable, created by the + * game itself, using cs_create_entity(), or added via cs_set_ent_class(). + * + * @param start_index Entity index to start searching from. -1 to start from + * the first entity + * @param classname Classname to search for + * @param owner Entity index to search for entity's owner + * + * @return Entity index > 0 if found, 0 otherwise + */ +native cs_find_ent_by_owner(start_index, const classname[], owner); + +/** + * Sets a custom classname of an entity. + * + * @note Unlike other mods CS keeps track of entities using a custom hashtable. + * This function adds or updates the classname in the hasthable as well. + * This is useful for use with cs_find_ent_by_class() and cs_find_ent_by_owner(). + * + * @param index Entity index + * @param classname Classname to update for + * + * @noreturn + */ +native cs_set_ent_class(index, const classname[]); + +/** + * Returns the item id associated with an item name and its aliases. + * + * @note The item name is case sensitive an can be with or without + * weapon_ and item_ prefixes. This can be a command alias as well. + * Values examples: ak47, weapon_ak47, kevlar, item_kevlar, vest, bullpup, ... + * + * @param name Alias or classname + * @param classid If item is a weapon, variable to store the associated + * weapon class id in (CS_WEAPONCLASS_* constants) + * + * @return Item id (CSI_* constants) + */ +native any:cs_get_item_id(const name[], &CsWeaponClassType:classid = CS_WEAPONCLASS_NONE); + +/** + * Returns the alias name associated with an item index. + * + * @param itemid Item id (CSI_* constants) + * @param name Buffer to store alias name to + * @param name_maxlen Maximum buffer size + * @param altname Optional buffer to store if available alternative alias name to + * @param altname_maxlen Maximum buffer size + * + * @return True if alias is found, false otherwise + */ +native bool:cs_get_item_alias(itemid, name[], name_maxlen, altname[] = "", altname_maxlen = 0); + +/** + * Returns an item name associated with a command alias. + * + * @note The alias is case sensitive. + * @note If not an alias to a weapon, buffer will be set with the original alias. + * + * @param alias Alias name + * @param itemname Buffer to store item name to + * @param maxlength Maximum buffer size + * + * @return True if alias is translated, false otherwise + */ +native bool:cs_get_translated_item_alias(const alias[], itemname[], maxlength); + +/** + * Returns some information about a weapon. + * + * @param weapon_id Weapon id, see CSW_* constants + * @param type Info type, see CS_WEAPONINFO_* constants + * + * @return Weapon information value + * @error If weapon_id and type are out of bound, an error will be thrown. + */ +native any:cs_get_weapon_info(weapon_id, CsWeaponInfo:type); + +/** + * Returns active weapon entity. + * + * @param playerIndex Player index + * + * @return Weapon entity index on success or 0 if there is no active weapon + * @error If the client index is not within the range of 1 to + * maxClients, or the client is not connected, an error will be + * thrown. + */ +native cs_get_user_weapon_entity(playerIndex); + +/** + * Returns weapon index of the active weapon. + * + * @note More reliable than get_user_weapon. + * + * @param playerIndex Player index + * @param clip Optional variable to store clip ammo to + * @param ammo Optional variable to store backpack ammo to + * + * @return Weapon index on success or 0 if there is no active weapon + * @error If the client index is not within the range of 1 to + * maxClients, or the client is not connected, an error will be + * thrown. + */ +native cs_get_user_weapon(playerIndex, &clip = 0, &ammo = 0); + +/** + * Returns a weapon class id associated with a weapon id. + * + * @param weapon_id Weapon id (CSI_* constants) + * + * @return Weapon class id (CS_WEAPONCLASS_* constants) + */ +stock CsWeaponClassType:cs_get_weapon_class(weapon_id) +{ + new CsWeaponClassType:type = CS_WEAPONCLASS_NONE; + + if (cs_is_valid_itemid(weapon_id, .weapon_only = true) || weapon_id == CSI_SHIELD) + { + switch (weapon_id) + { + case CSI_SHIELDGUN, CSI_SHIELD: + { + type = CS_WEAPONCLASS_PISTOL; + } + case CSI_KNIFE: + { + type = CS_WEAPONCLASS_KNIFE; + } + default: + { + new const bits = (1 << weapon_id); + + if(bits & CSI_ALL_PISTOLS) + { + type = CS_WEAPONCLASS_PISTOL; + } + else if(bits & CSI_ALL_GRENADES) + { + type = CS_WEAPONCLASS_GRENADE; + } + else if(bits & CSI_ALL_SMGS) + { + type = CS_WEAPONCLASS_SUBMACHINEGUN; + } + else if(bits & CSI_ALL_SHOTGUNS) + { + type = CS_WEAPONCLASS_SHOTGUN; + } + else if(bits & CSI_ALL_MACHINEGUNS) + { + type = CS_WEAPONCLASS_MACHINEGUN; + } + else if(bits & CSI_ALL_RIFLES) + { + type = CS_WEAPONCLASS_RIFLE; + } + else if(bits & CSI_ALL_SNIPERRIFLES) + { + type = CS_WEAPONCLASS_SNIPERRIFLE; + } + } + } + } + + return type; +} + +/** + * Checks whether an item id is not out of bounds. + * + * @param id Item id (CSI_* constants) + * @param weapon_only If true, only the real weapon ids will be checked, + * including shield as well + * + * @return True if item id is valid, false otherwise + */ +stock bool:cs_is_valid_itemid(id, bool:weapon_only = false) +{ + if (id <= CSI_NONE) + { + return false; + } + + if (id > CSI_LAST_WEAPON && id != CSI_SHIELDGUN && weapon_only) + { + return false; + } + + if (id >= CSI_MAX_COUNT) + { + return false; + } + + return true; +} + +/** + * Called when CS internally fires a command to a player. + * + * @note This is most notably used by the rebuy/autobuy functionality, + * Condition Zero also uses this to pass commands to bots internally. + * + * @param id Client index + * @param cmd Command string + * + * @return PLUGIN_CONTINUE to let the command continue + * PLUGIN_HANDLED to block the command + */ +forward CS_InternalCommand(id, const cmd[]); + +/** + * Called when a client attempts to purchase an item. + * + * @note This is called immediately when the client issues a buy command. The + * game has not yet checked if the client can actually buy the weapon. + * @note For a list of possible item ids see the CSI_* constants. + * + * @param index Client index + * @param item Item id + * + * @return PLUGIN_CONTINUE to let the buy attempt continue + * PLUGIN_HANDLED to block the buy attempt + */ +forward CS_OnBuyAttempt(index, item); + +/** + * Called when a client purchases an item. + * + * @note This is called right before the user receives the item and before the + * money is deducted from their cash reserves. + * @note For a list of possible item ids see the CSI_* constants. + * + * @param index Client index + * @param item Item id + * + * @return PLUGIN_CONTINUE to let the buy continue + * PLUGIN_HANDLED to block the buy + */ +forward CS_OnBuy(index, item); diff --git a/bin/amxxdump/includes/amxmodx/cstrike.inc.temp b/bin/amxxdump/includes/amxmodx/cstrike.inc.temp new file mode 100644 index 0000000..84e82a8 --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/cstrike.inc.temp @@ -0,0 +1,150 @@ +#if defined _cstrike_included +#endinput +#endif +#define _cstrike_included +#pragma reqlib cstrike +#if !defined AMXMODX_NOAUTOLOAD +#pragma loadlib cstrike +#endif +#include +native cs_get_user_deaths(index); +native cs_set_user_deaths(index, newdeaths, bool:scoreboard = true); +native cs_get_hostage_foll(index); +native cs_set_hostage_foll(index, followedindex = 0); +native cs_get_hostage_id(index); +native cs_get_user_bpammo(index, weapon); +native cs_set_user_bpammo(index, weapon, amount); +native cs_get_user_defuse(index); +native cs_set_user_defuse(index, defusekit = 1, r = 0, g = 160, b = 0, icon[] = "defuser", flash = 0); +native cs_get_user_buyzone(index); +native cs_get_user_hasprim(index); +native cs_get_user_model(index, model[], len); +native cs_set_user_model(index, const model[], bool:update_index = false); +native cs_reset_user_model(index); +native cs_get_user_money(index); +native cs_set_user_money(index, money, flash = 1); +native cs_get_user_nvg(index); +native cs_set_user_nvg(index, nvgoggles = 1); +native cs_get_user_plant(index); +native cs_set_user_plant(index, plant = 1, showbombicon = 1); +native cs_set_user_team(index, any:team, any:model = CS_DONTCHANGE, bool:send_teaminfo = true); +native CsTeams:cs_get_user_team(index, &any:model = CS_DONTCHANGE); +native cs_get_user_vip(index); +native cs_set_user_vip(index, vip = 1, model = 1, scoreboard = 1); +native cs_get_user_tked(index); +native cs_set_user_tked(index, tk = 1, subtract = 1); +native cs_get_user_driving(index); +native cs_get_user_shield(index); +native cs_get_user_stationary(index); +native cs_get_user_armor(index, &CsArmorType:armortype = CS_ARMOR_NONE); +native cs_set_user_armor(index, armorvalue, CsArmorType:armortype); +native cs_get_weapon_burst(index); +native cs_set_weapon_burst(index, burstmode = 1); +native cs_get_weapon_silen(index); +native cs_set_weapon_silen(index, silence = 1, draw_animation = 1); +native cs_get_weapon_ammo(index); +native cs_set_weapon_ammo(index, newammo); +native cs_get_weapon_id(index); +native cs_get_no_knives(); +native cs_set_no_knives(noknives = 0); +native cs_user_spawn(player); +native cs_get_armoury_type(index, &count = 1); +native cs_set_armoury_type(index, type, count = -1); +native cs_get_weaponbox_item(weaponboxIndex); +native cs_get_user_mapzones(index); +native cs_set_user_zoom(index, type, mode); +native cs_get_user_zoom(index); +native cs_get_user_submodel(index); +native cs_set_user_submodel(index, value); +native Float:cs_get_user_lastactivity(index); +native cs_set_user_lastactivity(index, Float:value); +native cs_get_user_hostagekills(index); +native cs_set_user_hostagekills(index, value); +native Float:cs_get_hostage_lastuse(index); +native cs_set_hostage_lastuse(index, Float:value); +native Float:cs_get_hostage_nextuse(index); +native cs_set_hostage_nextuse(index, Float:value); +native Float:cs_get_c4_explode_time(index); +native cs_set_c4_explode_time(index, Float:value); +native bool:cs_get_c4_defusing(c4index); +native cs_set_c4_defusing(c4index, bool:defusing); +native cs_create_entity(const classname[]); +native cs_find_ent_by_class(start_index, const classname[]); +native cs_find_ent_by_owner(start_index, const classname[], owner); +native cs_set_ent_class(index, const classname[]); +native any:cs_get_item_id(const name[], &CsWeaponClassType:classid = CS_WEAPONCLASS_NONE); +native bool:cs_get_item_alias(itemid, name[], name_maxlen, altname[] = "", altname_maxlen = 0); +native bool:cs_get_translated_item_alias(const alias[], itemname[], maxlength); +native any:cs_get_weapon_info(weapon_id, CsWeaponInfo:type); +native cs_get_user_weapon_entity(playerIndex); +native cs_get_user_weapon(playerIndex, &clip = 0, &ammo = 0); +stock CsWeaponClassType:cs_get_weapon_class(weapon_id) +{ +new CsWeaponClassType:type = CS_WEAPONCLASS_NONE; +if (cs_is_valid_itemid(weapon_id, .weapon_only = true) || weapon_id == CSI_SHIELD) +{ +switch (weapon_id) +{ +case CSI_SHIELDGUN, CSI_SHIELD: +{ +type = CS_WEAPONCLASS_PISTOL; +} +case CSI_KNIFE: +{ +type = CS_WEAPONCLASS_KNIFE; +} +default: +{ +new const bits = (1 << weapon_id); +if(bits & CSI_ALL_PISTOLS) +{ +type = CS_WEAPONCLASS_PISTOL; +} +else if(bits & CSI_ALL_GRENADES) +{ +type = CS_WEAPONCLASS_GRENADE; +} +else if(bits & CSI_ALL_SMGS) +{ +type = CS_WEAPONCLASS_SUBMACHINEGUN; +} +else if(bits & CSI_ALL_SHOTGUNS) +{ +type = CS_WEAPONCLASS_SHOTGUN; +} +else if(bits & CSI_ALL_MACHINEGUNS) +{ +type = CS_WEAPONCLASS_MACHINEGUN; +} +else if(bits & CSI_ALL_RIFLES) +{ +type = CS_WEAPONCLASS_RIFLE; +} +else if(bits & CSI_ALL_SNIPERRIFLES) +{ +type = CS_WEAPONCLASS_SNIPERRIFLE; +} +} +} +} +return type; +} +stock bool:cs_is_valid_itemid(id, bool:weapon_only = false) +{ +if (id <= CSI_NONE) +{ +return false; +} +if (id > CSI_LAST_WEAPON && id != CSI_SHIELDGUN && weapon_only) +{ +return false; +} +if (id >= CSI_MAX_COUNT) +{ +return false; +} +return true; +} +forward CS_InternalCommand(id, const cmd[]); +forward CS_OnBuyAttempt(index, item); +forward CS_OnBuy(index, item); diff --git a/bin/amxxdump/includes/amxmodx/cstrike_const.inc b/bin/amxxdump/includes/amxmodx/cstrike_const.inc new file mode 100644 index 0000000..00d3b85 --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/cstrike_const.inc @@ -0,0 +1,521 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Counter-Strike Functions +// + +#if defined _cstrike_const_included + #endinput +#endif +#define _cstrike_const_included + +/** + * IDs of weapons in CS + */ +#define CSW_NONE 0 +#define CSW_P228 1 +#define CSW_GLOCK 2 // Unused by game, See CSW_GLOCK18. +#define CSW_SCOUT 3 +#define CSW_HEGRENADE 4 +#define CSW_XM1014 5 +#define CSW_C4 6 +#define CSW_MAC10 7 +#define CSW_AUG 8 +#define CSW_SMOKEGRENADE 9 +#define CSW_ELITE 10 +#define CSW_FIVESEVEN 11 +#define CSW_UMP45 12 +#define CSW_SG550 13 +#define CSW_GALI 14 +#define CSW_GALIL 14 +#define CSW_FAMAS 15 +#define CSW_USP 16 +#define CSW_GLOCK18 17 +#define CSW_AWP 18 +#define CSW_MP5NAVY 19 +#define CSW_M249 20 +#define CSW_M3 21 +#define CSW_M4A1 22 +#define CSW_TMP 23 +#define CSW_G3SG1 24 +#define CSW_FLASHBANG 25 +#define CSW_DEAGLE 26 +#define CSW_SG552 27 +#define CSW_AK47 28 +#define CSW_KNIFE 29 +#define CSW_P90 30 +#define CSW_VEST 31 // Custom +#define CSW_VESTHELM 32 // Custom +#define CSW_SHIELDGUN 99 +#define CSW_LAST_WEAPON CSW_P90 + +const CSW_ALL_WEAPONS = (~(1< + +#pragma reqclass xstats +#if !defined AMXMODX_NOAUTOLOAD + #pragma defclasslib xstats csx +#endif + +/** + * Map objective flags returned by get_map_objectives(). + */ +enum MapObjective +{ + MapObjective_Bomb = (1<<0), + MapObjective_Hostage = (1<<1), + MapObjective_Vip = (1<<2), + MapObjective_Escape = (1<<3), +}; + +/** + * Called after a client attacks another client. + * + * @note For a list of possible weapon ids see the CSW_* constants in + * amxconst.inc + * @note For a list of possible body hitplaces see the HIT_* constants in + * amxconst.inc + * + * @param attacker Attacker client index + * @param victim Victim client index + * @param damage Damage dealt to victim + * @param wpnindex Weapon id + * @param hitplace Body hitplace + * @param ta If nonzero the attack was a team attack + * + * @noreturn + */ +forward client_damage(attacker, victim, damage, wpnindex, hitplace, TA); + +/** + * Called after a client death. + * + * @note For a list of possible weapon ids see the CSW_* constants in + * amxconst.inc + * @note For a list of possible body hitplaces see the HIT_* constants in + * amxconst.inc + * + * @param attacker Attacker client index + * @param victim Victim client index + * @param wpnindex Weapon id + * @param hitplace Body hitplace + * @param tk If nonzero the death was a teamkill + * + * @noreturn + */ +forward client_death(killer, victim, wpnindex, hitplace, TK); + +/** + * Called after a grenade was thrown. + * + * @note Weapon id is one of CSW_HEGRENADE, CSW_SMOKEGRENADE or CSW_FLASHBANG. + * + * @param index Client index + * @param greindex Grenade entity index + * @param wId Weapon id + * + * @noreturn + */ +forward grenade_throw(index, greindex, wId); + +/** + * Called after a bomb plant attempt has started. + * + * @param planter Planter client index + * + * @noreturn + */ +forward bomb_planting(planter); + +/** + * Called after a bomb plant has finished. + * + * @param planter Planter client index + * + * @noreturn + */ +forward bomb_planted(planter); + +/** + * Called when the bomb exploded. + * + * @param planter Planter client index + * @param defuser Defuser client index, if applicable + * + * @noreturn + */ +forward bomb_explode(planter, defuser); + +/** + * Called after a bomb defuse attempt has started. + * + * @param defuser Defuser client index + * + * @noreturn + */ +forward bomb_defusing(defuser); + +/** + * Called after a bomb defuse has finished. + * + * @param defuser Defuser client index + * + * @noreturn + */ +forward bomb_defused(defuser); + +/** + * @section Shared natives + */ + +/** + * Adds a custom weapon to the stats system. + * + * @note The weapon name should be the full display name of the gun such as + * "Desert Eagle" while the logname should be "weapon_deagle". + * + * @param wpnname Full weapon name + * @param melee If nonzero the weapon will be considered a melee weapon + * @param logname Weapon short name + * + * @return Cusom weapon id (>0) on success, 0 if no more custom weapons + * can be added + */ +native custom_weapon_add(const wpnname[], melee = 0, const logname[] = ""); + +/** + * Triggers a damage event on a custom weapon, adding it to the internal stats. + * + * @note This will also call the client_damage() and client_kill() forwards if + * applicable. + * @note For a list of possible body hitplaces see the HIT_* constants in + * amxconst.inc + * + * @param weapon Custom weapon id + * @param att Attacker client index + * @param vic Victim client index + * @param damage Damage dealt + * @param hitplace Optional body hitplace + * + * @noreturn + * @error If the weapon id is not a custom weapon, an invalid client + * index, damage value or hitplace is provided, an error will + * be thrown. + */ +native custom_weapon_dmg(weapon, att, vic, damage, hitplace = 0); + +/** + * Adds a shot event on a custom weapon to the internal stats. + * + * @param weapon Custom weapon id + * @param index Client index + * + * @noreturn + * @error If the weapon id is not a custom weapon or an invalid client + * index is provided, an error will be thrown. + */ +native custom_weapon_shot(weapon, index); + +/** + * Returns if the weapon is considered a melee weapon. + * + * @note For a list of default CS weapon ids see the CSW_* constants in + * amxconst.inc, this function also works on custom weapons. + * @note For the default CS weapons this obviously returns true only for + * CSW_KNIFE. + * + * @param wpnindex Weapon id + * + * @return 1 if weapon is a melee weapon, 0 + * @error If an invalid weapon id is provided an error will be thrown. + */ +native xmod_is_melee_wpn(wpnindex); + +/** + * Retrieves the full weapon name of a weapon id. + * + * @note For a list of default CS weapon ids see the CSW_* constants in + * amxconst.inc, this function also works on custom weapons. + * @note For the default CS weapons this obviously returns true only for + * CSW_KNIFE. + * + * @param wpnindex Weapon id + * @param name Buffer to copy weapon name to + * @param len Maximmum buffer size + * + * @return Number of cells written to buffer + * @error If an invalid weapon id is provided an error will be thrown. + */ +native xmod_get_wpnname(wpnindex, name[], len); + +/** + * Retrieves the weapon log name of a weapon id. + * + * @note For a list of default CS weapon ids see the CSW_* constants in + * amxconst.inc, this function also works on custom weapons. + * @note For the default CS weapons this obviously returns true only for + * CSW_KNIFE. + * + * @param wpnindex Weapon id + * @param name Buffer to copy weapon log name to + * @param len Maximmum buffer size + * + * @return Number of cells written to buffer + * @error If an invalid weapon id is provided an error will be thrown. + */ +native xmod_get_wpnlogname(wpnindex, name[], len); + +/** + * Returns the maximum amount of weapons that the stats system supports. + * + * @return Maximum number of weapons supported + */ +native xmod_get_maxweapons(); + +/** + * Returns the number of stats tracked by the stats system. + * + * @return Number of stats tracked + */ +native xmod_get_stats_size(); + +/** + * @endsection Shared natives + */ + +/** + * Returns the current map's objectives as a bitflag value. + * + * @note For a list of possible map objective flags see the MapObjective enum. + * + * @return Bitflag value of map objectives + */ +native MapObjective:get_map_objectives(); diff --git a/bin/amxxdump/includes/amxmodx/csx.inc.temp b/bin/amxxdump/includes/amxmodx/csx.inc.temp new file mode 100644 index 0000000..555a73b --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/csx.inc.temp @@ -0,0 +1,33 @@ +#if defined _csx_included +#endinput +#endif +#define _csx_included +#include +#pragma reqclass xstats +#if !defined AMXMODX_NOAUTOLOAD +#pragma defclasslib xstats csx +#endif +enum MapObjective +{ +MapObjective_Bomb = (1<<0), +MapObjective_Hostage = (1<<1), +MapObjective_Vip = (1<<2), +MapObjective_Escape = (1<<3), +}; +forward client_damage(attacker, victim, damage, wpnindex, hitplace, TA); +forward client_death(killer, victim, wpnindex, hitplace, TK); +forward grenade_throw(index, greindex, wId); +forward bomb_planting(planter); +forward bomb_planted(planter); +forward bomb_explode(planter, defuser); +forward bomb_defusing(defuser); +forward bomb_defused(defuser); +native custom_weapon_add(const wpnname[], melee = 0, const logname[] = ""); +native custom_weapon_dmg(weapon, att, vic, damage, hitplace = 0); +native custom_weapon_shot(weapon, index); +native xmod_is_melee_wpn(wpnindex); +native xmod_get_wpnname(wpnindex, name[], len); +native xmod_get_wpnlogname(wpnindex, name[], len); +native xmod_get_maxweapons(); +native xmod_get_stats_size(); +native MapObjective:get_map_objectives(); diff --git a/bin/amxxdump/includes/amxmodx/cvars.inc b/bin/amxxdump/includes/amxmodx/cvars.inc new file mode 100644 index 0000000..2e86f9a --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/cvars.inc @@ -0,0 +1,547 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +#if defined _cvars_included + #endinput +#endif +#define _cvars_included + +/** + * CVAR flags for create_cvar() and register_cvar(). + */ +#define FCVAR_NONE 0 // No special behavior +#define FCVAR_ARCHIVE 1 // Cvar will be saved to vars.rc Set to cause it to be saved to vars.rc +#define FCVAR_USERINFO 2 // Cvar changes the client's info string +#define FCVAR_SERVER 4 // Clients get notified when cvar value is changed +#define FCVAR_EXTDLL 8 // Defined by an external DLL +#define FCVAR_CLIENTDLL 16 // Defined by the client DLL +#define FCVAR_PROTECTED 32 // Cvar value is masked from outside access, should be used for sensitive cvars like passwords +#define FCVAR_SPONLY 64 // Cvar can't be changed by clients connected to a multiplayer server +#define FCVAR_PRINTABLEONLY 128 // The cvar string value can not contain unprintable characters +#define FCVAR_UNLOGGED 256 // If the cvar is FCVAR_SERVER, don't log changes to a file/the console +#define FCVAR_NOEXTRAWHITEPACE 512 // Automatically strips trailing/leading white space from the string value + +/** + * Cvar bound constants used with [get|set]_pcvar_bounds(). + */ +enum CvarBounds +{ + CvarBound_Upper = 0, + CvarBound_Lower +}; + +/** + * Creates a new cvar for the engine. + * + * @note This has the same effect as register_cvar() but provides more options. + * @note For a list of possible cvar flags see FCVAR_* constants above. + * @note If an already existing cvar is registered it will not be duplicated. + * The default value is only set when the cvar is registered for the very + * first time since the server was started. Cvar bounds are overwritten + * by the create_cvar() call just as if they were re-set using + * set_pcvar_bounds(). + * @note The returned cvar pointer should be used with the get_pcvar_* and + * set_pcvar_* set of functions. + * + * @param name Cvar name + * @param string Default cvar value + * @param flags Optional bitsum of flags specifying cvar behavior + * @param description Optional description of the cvar + * @param has_min Optional boolean that specifies if the cvar has a + * minimum value + * @param min_val Minimum floating point value + * @param has_max Optional boolean that specifies if the cvar has a + * maximum value + * @param max_val Maximum floating point value + * + * @return Unique cvar pointer + * @error If invalid bounds are provided (min_val > max_val or + * vice versa), an error will be thrown. + */ +native create_cvar(const name[], const string[], flags = FCVAR_NONE, const description[] = "", bool:has_min = false, Float:min_val = 0.0, bool:has_max = false, Float:max_val = 0.0); + +/** + * Registers a new cvar for the engine. + * + * @note Deprecated. Consider to use create_cvar for more options. + * @note For a list of possible cvar flags see FCVAR_* constants in amxconst.inc + * @note If an already existing cvar is registered it will not be duplicated. + * The default value is only set when the cvar is registered for the very + * first time since the server was started. + * @note The returned cvar pointer should be used with the get_pcvar_* and + * set_pcvar_* set of functions. + * + * @param name Cvar name + * @param string Default cvar value + * @param flags Optional bitsum of flags specifying cvar behavior + * @param fvalue Unused + * + * @return Unique cvar pointer + */ +native register_cvar(const name[], const string[], flags = FCVAR_NONE, Float:fvalue = 0.0); + +/** + * Returns if a cvar is registered on the server. + * + * @param cvar Cvar name to check + * + * @return 1 if the cvar exists, 0 otherwise + */ +native cvar_exists(const cvar[]); + +/** + * Returns the cvar pointer of the specified cvar. + * + * @note A pointer is also returned by register_cvar() and create_cvar(). + * Plugins can (and should) retrieve and use pointers for already existing + * mod cvars. + * + * @param cvar Cvar name to find + * + * @return Cvar pointer on success, 0 if cvar was not found + */ +native get_cvar_pointer(const cvar[]); + +/** + * Creates a hook for when a cvar's value is changed. + * + * @note Changing the cvar value from within this forward can lead to infinite + * recursion and should be avoided. + * @note The callback will be called in the following manner: + * + * public cvar_change_callback(pcvar, const old_value[], const new_value[]) + * + * pcvar - Pointer to cvar that was changed + * old_value - Buffer containing the previous value of the cvar + * new_value - Buffer containing the new value of the cvar + * + * The return value is ignored + * + * @param pcvar Pointer to cvar + * @param callback Name of callback function + * + * @return Callback handle that can be used with + * [disable|enable]_cvar_hook + * @error If an invalid cvar pointer or callback function is provided, + * an error will be thrown. + */ +native cvarhook:hook_cvar_change(pcvar, const callback[]); + +/** + * Disables a cvar hook, stopping it from being called. + * + * @note Use the handle returned by hook_cvar_change as the parameter here. + * + * @param handle Forward to disable + * @error If an invalid hook handle is provided, an error will be + * thrown. + */ +native disable_cvar_hook(cvarhook:handle); + +/** + * Enables a cvar hook, restoring it to being called. + * + * @note Use the handle returned by hook_cvar_change as the parameter here. + * + * @param handle Forward to enable + * @error If an invalid hook handle is provided, an error will be + * thrown. + */ +native enable_cvar_hook(cvarhook:handle); + +/** + * Returns flags of a cvar. The cvar is accessed by name. + * + * @note For a list of possible flags see the FCVAR_* constants in amxconst.inc + * @note Accessing a Cvar by name is slower than direct pointer access, which is + * why the otherwise equivalent get_pcvar_flags() function should be used + * instead. + * + * @param cvar Cvar name to retrieve flags from + * + * @return Flag value + */ +native get_cvar_flags(const cvar[]); + +/** + * Sets specified flags to a cvar. The cvar is accessed by name. + * + * @note Not permitted for the "amx_version", "amxmodx_version", "fun_version" + * and "sv_cheats" cvars. + * @note For a list of possible flags see the FCVAR_* constants in amxconst.inc + * @note This function just adds the flags using a bitwise-or operation. After + * it has run the flags may not exactly equal the specified bitflag sum. + * @note Accessing a Cvar by name is slower than direct pointer access, which is + * why the otherwise equivalent set_pcvar_flags() function should be used + * instead. + * + * @param cvar Cvar name to remove flags from + * @param flags Bitflag sum of flags to set + * + * @return 1 on success, 0 if cvar does not exist or is not permitted + */ +native set_cvar_flags(const cvar[], flags); + +/** + * Removes specified flags from a cvar. The cvar is accessed by name. + * + * @note Not permitted for the "amx_version", "amxmodx_version", "fun_version" + * and "sv_cheats" cvars. + * @note For a list of possible flags see the FCVAR_* constants in amxconst.inc + * @note This function removes the flags using a bitwise-and operation. + * @note Accessing a Cvar by name is slower than direct pointer access, which is + * why the set_pcvar_flags() function should be used instead. + * + * @param cvar Cvar name to remove flags from + * @param flags Bitflag sum of flags to remove + * + * @return 1 on success, 0 if cvar does not exist or is not permitted + */ +native remove_cvar_flags(const cvar[], flags=-1); + +/** + * Gets a string value from a cvar. The cvar is accessed by name. + * + * @note Accessing a Cvar by name is slower than direct pointer access, which is + * why the otherwise equivalent get_pcvar_string() function should be used + * instead. + * + * @param cvar Cvar name to retrieve value from + * @param output Buffer to copy cvar value to + * @param iLen Maximum size of the buffer + * + * @return Number of cells written to buffer. + */ +native get_cvar_string(const cvarname[], output[], iLen); + +/** + * Sets a cvar to a given string value. The cvar is accessed by name. + * + * @note Accessing a Cvar by name is slower than direct pointer access, which is + * why the otherwise equivalent set_pcvar_string() function should be used + * instead. + * + * @param cvar Cvar name to set value of + * @param value Value to set cvar to + * + * @noreturn + */ +native set_cvar_string(const cvar[], const value[]); + +/** + * Returns a floating value from a cvar. The cvar is accessed by name. + * + * @note Accessing a Cvar by name is slower than direct pointer access, which is + * why the otherwise equivalent get_pcvar_float() function should be used + * instead. + * + * @param cvarname Cvar name to retrieve value from + * + * @return Cvar value, converted to float + */ +native Float:get_cvar_float(const cvarname[]); + +/** + * Sets a cvar to a given float value. The cvar is accessed by name. + * + * @note Accessing a Cvar by name is slower than direct pointer access, which is + * why the otherwise equivalent set_pcvar_float() function should be used + * instead. + * + * @param cvar Cvar name to set value of + * @param value Value to set cvar to + * + * @noreturn + */ +native set_cvar_float(const cvar[], Float:value); + +/** + * Returns an integer value from a cvar. The cvar is accessed by name. + * + * @note Accessing a Cvar by name is slower than direct pointer access, which is + * why the otherwise equivalent get_pcvar_num() function should be used + * instead. + * + * @param cvarname Cvar name to retrieve value from + * + * @return Cvar value, converted to int + */ +native get_cvar_num(const cvarname[]); + +/** + * Sets a cvar to a given integer value. The cvar is accessed by name. + * + * @note Accessing a Cvar by name is slower than direct pointer access, which is + * why the otherwise equivalent set_pcvar_num() function should be used + * instead. + * + * @param cvar Cvar name to set value of + * @param value Value to set cvar to + * + * @noreturn + */ +native set_cvar_num(const cvarname[], value); + +/** + * Returns flags of a cvar via direct pointer access. + * + * @note For a list of possible flags see the FCVAR_* constants in amxconst.inc + * + * @param pcvar Pointer to cvar to retrieve flags from + * + * @return 1 on success, 0 if cvar pointer is invalid + * @error If an invalid cvar pointer is provided, an error will be + * thrown. + */ +native get_pcvar_flags(pcvar); + +/** + * Sets specified flags to a cvar via direct pointer access. + * + * @note For a list of possible flags see the FCVAR_* constants in amxconst.inc + * @note This function directly sets the provided bitflag, unlike set_cvar_flags + * which adds them using a bitwise OR. + * + * @param pcvar Pointer to cvar to set flags of + * @param flags Bitflag sum of flags to set + * + * @return 1 on success, 0 if cvar does not exist or is not permitted + * @error If an invalid cvar pointer is provided, an error will be + * thrown. + */ +native set_pcvar_flags(pcvar, flags); + +/** + * Returns an integer value from a cvar via direct pointer access. + * + * @param pcvar Pointer to cvar to retrieve value from + * + * @return Cvar value, converted to int + * @error If an invalid cvar pointer is provided, an error will be + * thrown. + */ +native get_pcvar_num(pcvar); + +/** + * Returns an boolean value from a cvar via direct pointer access. + * + * @param pcvar Pointer to cvar to retrieve value from + * + * @return Cvar value, converted to bool + * @error If an invalid cvar pointer is provided, an error will be + * thrown. + */ +native bool:get_pcvar_bool(pcvar); + +/** + * Sets an integer value to a cvar via direct pointer access. + * + * @param pcvar Pointer to cvar to set value of + * @param num Value to set cvar to + * + * @noreturn + * @error If an invalid cvar pointer is provided, an error will be + * thrown. + */ +native set_pcvar_num(pcvar, num); + +/** + * Sets a boolean value to a cvar via direct pointer access. + * + * @param pcvar Pointer to cvar to set value of + * @param num Value to set cvar to + * + * @noreturn + * @error If an invalid cvar pointer is provided, an error will be + * thrown. + */ +native set_pcvar_bool(pcvar, bool:num); + +/** + * Returns a float value from a cvar via direct pointer access. + * + * @param pcvar Pointer to cvar to retrieve value from + * + * @return Cvar value, converted to float + * @error If an invalid cvar pointer is provided, an error will be + * thrown. + */ +native Float:get_pcvar_float(pcvar); + +/** + * Sets a float value to a cvar via direct pointer access. + * + * @param pcvar Pointer to cvar to set value of + * @param num Value to set cvar to + * + * @noreturn + * @error If an invalid cvar pointer is provided, an error will be + * thrown. + */ +native set_pcvar_float(pcvar, Float:num); + +/** + * Returns a string value from a cvar via direct pointer access. + * + * @param pcvar Pointer to cvar to retrieve value from + * @param string Buffer to copy cvar value to + * @param maxlen Maximum size of the buffer + * + * @return Number of cells written to buffer. + * @error If an invalid cvar pointer is provided, an error will be + * thrown. + */ +native get_pcvar_string(pcvar, string[], maxlen); + +/** + * Sets a string value to a cvar via direct pointer access. + * + * @param pcvar Pointer to cvar to retrieve value from + * @param string Value to set cvar to + * + * @noreturn + * @error If an invalid cvar pointer is provided, an error will be + * thrown. + */ +native set_pcvar_string(pcvar, const string[]); + +/** + * Retrieves the specified value boundary of a cvar. + * + * @param pcvar Pointer to cvar + * @param type Type of boundary to retrieve + * @param value Variable to store the specified boundary to + * + * @return True if the cvar has a boundary set, false otherwise + * @error If an invalid cvar pointer or boundary type is provided, + * an error will be thrown. + */ +native bool:get_pcvar_bounds(pcvar, CvarBounds:type, &Float:value); + +/** + * Sets the specified boundary of a cvar. + * + * @param pcvar Pointer to cvar + * @param type Type of boundary to set + * @param set If true the cvar boundary will be set, otherwise it will be + * removed (value is ignored) + * @param value Floating point value to use as the boundary + * + * @noreturn + * @error If an invalid cvar pointer or boundary type is provided, an + * error will be thrown. + */ +native set_pcvar_bounds(pcvar, CvarBounds:type, bool:set, Float:value = 0.0); + +/** + * Binds a cvar's integer value to a global variable. The variable will then + * always contain the current cvar value as it is automatically kept up to date. + * + * @note The variable *has* to be a global or a static variable. Local variables + * created within functions can not be used for technical reasons. + * @note Variables can not be bound to multiple cvars. + * + * @param pcvar Pointer to cvar + * @param var Global variable to keep updated + * + * @noreturn + * @error If an invalid cvar pointer or variable is provided, an error + * will be thrown. + */ +native bind_pcvar_num(pcvar, &any:var); + +/** + * Binds a cvar's float value to a global variable. The variable will then + * always contain the current cvar value as it is automatically kept up to date. + * + * @note The variable *has* to be a global or a static variable. Local variables + * created within functions can not be used for technical reasons. + * @note Variables can not be bound to multiple cvars. + * + * @param pcvar Pointer to cvar + * @param var Global variable to keep updated + * + * @noreturn + * @error If an invalid cvar pointer or variable is provided, an error + * will be thrown. + */ +native bind_pcvar_float(pcvar, &Float:var); + +/** + * Binds a cvar's string value to a global array. The array will then + * always contain the current cvar value as it is automatically kept up to date. + * + * @note The array *has* to be a global or a static array. Local arrays + * created within functions can not be used for technical reasons. + * @note Arrays can not be bound to multiple cvars. + * + * @param pcvar Pointer to cvar + * @param var Global array to keep updated + * @param varlen Maximum length of string array + * + * @noreturn + * @error If an invalid cvar pointer or variable is provided, an error + * will be thrown. + */ +native bind_pcvar_string(pcvar, any:var[], varlen); + +/** + * Returns the number of plugin-registered cvars. + * + * @return Number of registered cvars + */ +native get_plugins_cvarsnum(); + +/** + * Retrieves information about a plugin-registered cvar via iterative access. + * + * @note The returned cvar pointer should be used with the get_pcvar_* and + * set_pcvar_* set of functions. + * @note The cvar index does not equal the cvar pointer. It is the internal + * AMXX id of a cvar, incremented for each registered cvar. + * + * @param num Index to retrieve + * @param name Buffer to copy cvar name to + * @param namelen Maximum buffer size + * @param flags Variable to store cvar flags to + * @param plugin_id Variable to store id of the registering plugin to + * @param pcvar_handle Variable to store cvar pointer to + * @param description Variable to store cvar description to + * @param desc_len Maximum length of string buffer + * + * @return 1 on success, 0 if index is invalid + */ +native get_plugins_cvar(num, name[], namelen, &flags = 0, &plugin_id = 0, &pcvar_handle = 0, description[] = "", desc_len = 0); + +/** + * Dispatches a client cvar query, allowing the plugin to query for its value on + * the client. + * + * @note The callback will be called in the following manner: + * + * public cvar_query_callback(id, const cvar[], const value[], const param[]) + * + * id - Client index + * cvar - Cvar queried + * value - Cvar value on the client + * param - Optional extra data + * + * @param id Client index + * @param cvar Cvar to query + * @param resultFunc Callback function + * @param paramlen Size of extra data + * @param params Extra data to pass through to callback + * + * @noreturn + * @error If the client index is not within the range of 1 to + * MaxClients, the client is not connected, the callback + * function is invalid or the querying process encounters + * a problem, an error will be thrown. + */ +native query_client_cvar(id, const cvar[], const resultFunc[], paramlen = 0, const params[] = ""); diff --git a/bin/amxxdump/includes/amxmodx/datapack.inc b/bin/amxxdump/includes/amxmodx/datapack.inc new file mode 100644 index 0000000..8c9f86f --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/datapack.inc @@ -0,0 +1,161 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +#if defined _datapack_included + #endinput +#endif +#define _datapack_included + +/** + * Datapack tag declaration + * + * @note Datapacks provide a way to store and move around arbitrary amounts (and + * types) of data in AMX Mox X. Data is packed into a single cell value - + * the DataPack handle. This handle can be passed around more easily, can + * be returned by functions and can simulate advanced concepts like string + * consummation. + * @note Plugins are responsible for freeing all datapack handles they acquire. + * Failing to free handles will result in the plugin and AMXX leaking + * memory. + */ +enum DataPack +{ + Invalid_DataPack = 0 +}; + +/** + * Creates a new datapack. + * + * @return New datapack handle, which must be freed via DestroyDataPack(). + */ +native DataPack:CreateDataPack(); + +/** + * Packs a cell value into a datapack. + * + * @param pack Datapack handle + * @param cell Cell value to pack + * + * @noreturn + * @error If an invalid handle is provided, an error will be thrown. + */ +native WritePackCell(DataPack:pack, any:cell); + +/** + * Packs a float value into a datapack. + * + * @param pack Datapack handle + * @param val Float value to pack + * + * @noreturn + * @error If an invalid handle is provided, an error will be thrown. + */ +native WritePackFloat(DataPack:pack, Float:val); + +/** + * Packs a string into a datapack. + * + * @param pack Datapack handle + * @param str String to pack + * + * @return Length of copied string + * @error If an invalid handle is provided, an error will be thrown. + */ +native WritePackString(DataPack:pack, const str[]); + +/** + * Reads a cell from a Datapack. + * + * @param pack Datapack handle + * + * @return Cell value + * @error If an invalid handle is provided, or not enough data is left + * in the datapack, an error will be thrown. + */ +native any:ReadPackCell(DataPack:pack); + +/** + * Reads a float from a datapack. + * + * @param pack Datapack handle + * + * @return Float value + * @error If an invalid handle is provided, or not enough data is left + * in the datapack, an error will be thrown. + */ +native Float:ReadPackFloat(DataPack:pack); + +/** + * Reads a string from a Datapack. + * + * @param pack Datapack handle + * @param buffer Buffer to copy string to + * @param maxlen Maximum size of buffer + * + * @return Number of cells written to buffer + * @error If an invalid handle is provided, or not enough data is left + * in the datapack, an error will be thrown. + */ +native ReadPackString(DataPack:pack, buffer[], maxlen); + +/** + * Resets the datapack read/write position to the start. + * + * @param pack Datapack handle + * @param clear If true, clears the contained data + * + * @noreturn + * @error If an invalid handle is provided, an error will be thrown. + */ +native ResetPack(DataPack:pack, bool:clear = false); + +/** + * Returns the datapack read/write position. + * + * @param pack Datapack handle + * + * @return Position in the datapack, only usable with calls to SetPackPosition + * @error If an invalid handle is provided, an error will be thrown. + */ +native DataPackPos:GetPackPosition(DataPack:pack); + +/** + * Sets the datapack read/write position. + * + * @note This should only ever be used with (known to be valid) positions + * returned by GetPackPosition(). It is not possible for plugins to safely + * compute datapack positions. + * + * @param pack Datapack handle + * @param position New position to set + * + * @noreturn + * @error If an invalid handle is provided, or the new position is + * out of datapack bounds, an error will be thrown. + */ +native SetPackPosition(DataPack:pack, DataPackPos:position); + +/** + * Returns if the datapack has reached its end and no more data can be read. + * + * @param pack Datapack handle + * + * @return True if datapack has reached the end, false otherwise + * @error If an invalid handle is provided, an error will be thrown. + */ +native bool:IsPackEnded(DataPack:pack); + +/** + * Destroys the datapack and frees its memory. + * + * @param pack Datapack handle + * + * @return True if disposed, false otherwise + */ +native DestroyDataPack(&DataPack:pack); diff --git a/bin/amxxdump/includes/amxmodx/dbi.inc b/bin/amxxdump/includes/amxmodx/dbi.inc new file mode 100644 index 0000000..b84ee0f --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/dbi.inc @@ -0,0 +1,154 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// SQL Database API +// + +// +// Notes - Read the comments! Make sure your plugins use +// nice ANSI SQL and don't use database column names like "key" +// otherwise this API will be a nightmare +// +// Never do error checking with the not operator! This is bad: +// if (!dbi_query()) +// You should do: +// ret = dbi_query() +// if (ret < 0) +// This is because DBI functions can and will return negative numbers +// Negative numbers evaluate to "true" in AMX. +// + +#if defined _dbi_included + #endinput +#endif +#define _dbi_included + +// You can't include SQLX first! +// there's really no reason to anyway. +#assert !defined _sqlx_included + +#pragma reqclass dbi + +enum Sql +{ + SQL_FAILED=0, + SQL_OK +}; + +enum Result +{ + RESULT_FAILED=-1, + RESULT_NONE, + RESULT_OK +}; + +/* This will return a number equal to or below 0 on failure. + * If it does fail, the error will be mirrored in dbi_error() + * The return value will otherwise be a resource handle, not an + * OK code or cell pointer. + */ +native Sql:dbi_connect(_host[], _user[], _pass[], _dbname[], _error[]="", _maxlength=0); + +/* This will do a simple query execution on the SQL server. + * If it fails, it will return a number BELOW ZERO (0) + * If zero, it succeeded with NO RETURN RESULT. + * If greater than zero, make sure to call dbi_free_result() on it! + * The return is a handle to the result set + */ +native Result:dbi_query(Sql:_sql, _query[], any:...); + +/* Has the same usage as dbi_query, but this native returns by + * reference the number of rows affected in the query. If the + * query fails rows will be equal to -1. + */ +native Result:dbi_query2(Sql:_sql, &rows, _query[], any:...); + +/* Returns 0 on failure or End of Results. + * Advances result pointer by one row. + */ +native dbi_nextrow(Result:_result); + +/* Gets a field by number. Returns 0 on failure. + * Although internally fields always start from 0, + * This function takes fieldnum starting from 1. + * No extra params: returns int + * One extra param: returns Float: byref + * Two extra param: Stores string with length + */ +native dbi_field(Result:_result, _fieldnum, any:... ); + +/* Gets a field by name. Returns 0 on failure. + * One extra param: returns Float: byref + * Two extra param: Stores string with length + */ +native dbi_result(Result:_result, _field[], any:... ); + +/* Returns the number of rows returned from a query + */ +native dbi_num_rows(Result:_result); + +/* Frees memory used by a result handle. Do this or get memory leaks. + */ +native dbi_free_result(&Result:result); + +/* Closes a database handle. Internally, it will also + * mark the handle as free, so this particular handle may + * be re-used in the future to save time. + */ +native dbi_close(&Sql:_sql); + +/* Returns an error message set. For PGSQL and MySQL, + * this is a direct error return from the database handle/API. + * For MSSQL, it returns the last error message found from a + * thrown exception. + */ +native dbi_error(Sql:_sql, _error[], _len); + +/* Returns the type of database being used. So far: + * "mysql", "pgsql", "mssql", "sqlite" + */ +native dbi_type(_type[], _len); + +/* Returns the number of fields/colums in a result set. + * Unlike dbi_nextrow, you must pass a valid result handle. + */ +native dbi_num_fields(Result:result); + +/* Retrieves the name of a field/column in a result set. + * Requires a valid result handle, and columns are numbered 1 to n. + */ +native dbi_field_name(Result:result, field, name[], maxLength); + +/* This function can be used to find out if a table in a Sqlite database exists. + */ +stock bool:sqlite_table_exists(Sql:sql, table[]) +{ + new bool:exists; + new query[128]; + format(query, 127, "SELECT name FROM sqlite_master WHERE type='table' AND name='%s' LIMIT 1;", table); + + new Result:result = dbi_query(sql, query); + + if (dbi_nextrow(result)) + { + exists = true; + } + else + { + exists = false; + } + + if (result > RESULT_NONE) + { + dbi_free_result(result); + } + + return exists; +} diff --git a/bin/amxxdump/includes/amxmodx/dbi.inc.temp b/bin/amxxdump/includes/amxmodx/dbi.inc.temp new file mode 100644 index 0000000..a6d99b7 --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/dbi.inc.temp @@ -0,0 +1,50 @@ +#if defined _dbi_included +#endinput +#endif +#define _dbi_included +#assert !defined _sqlx_included +#pragma reqclass dbi +enum Sql +{ +SQL_FAILED=0, +SQL_OK +}; +enum Result +{ +RESULT_FAILED=-1, +RESULT_NONE, +RESULT_OK +}; +native Sql:dbi_connect(_host[], _user[], _pass[], _dbname[], _error[]="", _maxlength=0); +native Result:dbi_query(Sql:_sql, _query[], any:...); +native Result:dbi_query2(Sql:_sql, &rows, _query[], any:...); +native dbi_nextrow(Result:_result); +native dbi_field(Result:_result, _fieldnum, any:... ); +native dbi_result(Result:_result, _field[], any:... ); +native dbi_num_rows(Result:_result); +native dbi_free_result(&Result:result); +native dbi_close(&Sql:_sql); +native dbi_error(Sql:_sql, _error[], _len); +native dbi_type(_type[], _len); +native dbi_num_fields(Result:result); +native dbi_field_name(Result:result, field, name[], maxLength); +stock bool:sqlite_table_exists(Sql:sql, table[]) +{ +new bool:exists; +new query[128]; +format(query, 127, "SELECT name FROM sqlite_master WHERE type='table' AND name='%s' LIMIT 1;", table); +new Result:result = dbi_query(sql, query); +if (dbi_nextrow(result)) +{ +exists = true; +} +else +{ +exists = false; +} +if (result > RESULT_NONE) +{ +dbi_free_result(result); +} +return exists; +} diff --git a/bin/amxxdump/includes/amxmodx/debug.inc b/bin/amxxdump/includes/amxmodx/debug.inc new file mode 100644 index 0000000..c14a3ad --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/debug.inc @@ -0,0 +1,299 @@ +/********************************* + *** Debug Utility By Destro *** + +- Activar: +#define DEBUG_ENABLE + +- Configuracion opcional: + +// Si el nivel es menor al numero de la función (debug_console1/2/3() y debug_log1/2/3()), se comporta como debug_hidden() +#define DEBUG_LEVEL 3 // default: 3 + +// Números de registros que se muestran al usar debug_end() +#define DEBUG_MAX_RECORDS // defaukt: 20 + +#define DEBUG_ENABLE_GAMETIME // Agrega el gametime al mensaje +#define DEBUG_ENABLE_CLIENT // Los mensajes tambien se muestran a todos los jugadores +#define DEBUG_ONLY_CONSOLE // debug_log() y debug_hidden() funcionan como debug_console() +#define DEBUG_ONLY_LOGS // debug_console() y debug_hidden() funcionan como debug_log() +#define DEBUG_HIDDEN_ALL // debug_log() y debug_console() funcionan como debug_hidden() +#define DEBUG_LOGFILE "debug.log" // Define el nombre del archivo Log, si no se define usa "debug_%PLUGIN%.log" + + +- Funciones (funciones falsa): +# Inicializa variables, usar en plugin_init/precache() +@ debug_init() + +# Guarda en el Log los ultimos registros +@ debug_end() + +# Muestra mensaje en la consola del servidor +@ debug_console1(info[], any:...) +@ debug_console2(info[], any:...) +@ debug_console3(info[], any:...) + +# Muestra mensaje en la consola del servidor y tambien lo guarda en Log +@ debug_log1(info[], any:...) +@ debug_log2(info[], any:...) +@ debug_log3(info[], any:...) + +# No muestra mensaje, solo se puede ver al utilizar debug_end() +@ debug_hidden(info[], any:...) + +# Calcula los milisegundos entre Start y End +@ debug_performance_start(keyname) +@ debug_performance_end(keyname, info[], any:...) + +***********************************************************************/ + +/* AMXX Editor 3.0 */ +/*@fakefunc: debug_console1(const fmt[], any:...)*/ +/*@fakefunc: debug_console2(const fmt[], any:...)*/ +/*@fakefunc: debug_console3(const fmt[], any:...)*/ + +/*@fakefunc: debug_log1(const fmt[], any:...)*/ +/*@fakefunc: debug_log2(const fmt[], any:...)*/ +/*@fakefunc: debug_log3(const fmt[], any:...)*/ +/*@fakefunc: debug_hidden(const fmt[], any:...)*/ + +#if defined _debug_included + #endinput +#endif +#define _debug_included + +#if !defined DEBUG_LEVEL + #define DEBUG_LEVEL 3 +#endif + +#if !defined DEBUG_MAX_RECORDS + #define DEBUG_MAX_RECORDS 20 +#endif + +#define DEBUG_DRAW_NONE 0 +#define DEBUG_DRAW_CONSOLE 1 +#define DEBUG_DRAW_LOG 2 + +#if defined DEBUG_ENABLE + #define __DEBUG_BUFF 256 + #define __DEBUG_MAXLINES 500 + + stock __debug_list[DEBUG_MAX_RECORDS][__DEBUG_BUFF], Float:__debug_list_gametime[DEBUG_MAX_RECORDS] + stock __debug_list_loop, __debug_list_size, Float:__debug_gametime, Float:__debug_performancetime + stock __debug_logfile[64], __debug_amxxfile[32], __debug_mapname[32], __debug_date[32] + + #if defined DEBUG_ONLY_CONSOLE + #define debug_console1(%1) __debug(DEBUG_DRAW_CONSOLE,1,%1) + #define debug_console2(%1) __debug(DEBUG_DRAW_CONSOLE,2,%1) + #define debug_console3(%1) __debug(DEBUG_DRAW_CONSOLE,3,%1) + #define debug_log1(%1) __debug(DEBUG_DRAW_CONSOLE,1,%1) + #define debug_log2(%1) __debug(DEBUG_DRAW_CONSOLE,2,%1) + #define debug_log3(%1) __debug(DEBUG_DRAW_CONSOLE,3,%1) + #define debug_hidden(%1) __debug(DEBUG_DRAW_CONSOLE,1,%1) + + #else + #if defined DEBUG_ONLY_LOGS + + #define debug_console1(%1) __debug(DEBUG_DRAW_LOG,1,%1) + #define debug_console2(%1) __debug(DEBUG_DRAW_LOG,2,%1) + #define debug_console3(%1) __debug(DEBUG_DRAW_LOG,3,%1) + #define debug_log1(%1) __debug(DEBUG_DRAW_LOG,1,%1) + #define debug_log2(%1) __debug(DEBUG_DRAW_LOG,2,%1) + #define debug_log3(%1) __debug(DEBUG_DRAW_LOG,3,%1) + #define debug_hidden(%1) __debug(DEBUG_DRAW_LOG,1,%1) + + #else + #if defined DEBUG_HIDDEN_ALL + + #define debug_console1(%1) __debug(DEBUG_DRAW_NONE,1,%1) + #define debug_console2(%1) __debug(DEBUG_DRAW_NONE,2,%1) + #define debug_console3(%1) __debug(DEBUG_DRAW_NONE,3,%1) + #define debug_log1(%1) __debug(DEBUG_DRAW_NONE,1,%1) + #define debug_log2(%1) __debug(DEBUG_DRAW_NONE,2,%1) + #define debug_log3(%1) __debug(DEBUG_DRAW_NONE,3,%1) + #define debug_hidden(%1) __debug(DEBUG_DRAW_NONE,1,%1) + + #else + + #define debug_console1(%1) __debug(DEBUG_DRAW_CONSOLE,1,%1) + #define debug_console2(%1) __debug(DEBUG_DRAW_CONSOLE,2,%1) + #define debug_console3(%1) __debug(DEBUG_DRAW_CONSOLE,3,%1) + #define debug_log1(%1) __debug(DEBUG_DRAW_LOG,1,%1) + #define debug_log2(%1) __debug(DEBUG_DRAW_LOG,2,%1) + #define debug_log3(%1) __debug(DEBUG_DRAW_LOG,3,%1) + #define debug_hidden(%1) __debug(DEBUG_DRAW_NONE,1,%1) + + #endif + #endif + #endif + + + #define debug_performance_start(%1) \ + new __debug_tick_%1 = tickcount() + + #define debug_performance_end(%1,%2) \ + __debug_log_write("[DEBUG Performance] ^"%s^" -> (%dms)",%2,tickcount()-__debug_tick_%1) + + #define __debug_check_init() if(!__debug_amxxfile[0]) debug_init() + + stock debug_init() + { + get_plugin(-1, __debug_amxxfile, 31) + replace(__debug_amxxfile, 31, ".amxx", "") + + get_mapname(__debug_mapname, 31) + + get_localinfo("amxx_logs", __debug_logfile, 63) + #if defined DEBUG_LOGFILE + format(__debug_logfile, 63 "%s/%s", __debug_logfile, DEBUG_LOGFILE) + #else + format(__debug_logfile, 63, "%s/debug_%s.log", __debug_logfile, __debug_amxxfile) + #endif + + __debug_update_date() + __debug_log_write("[DEBUG START: %s] - Map: ^"%s^" | Plugin: ^"%s^"", __debug_date, __debug_mapname, __debug_amxxfile) + } + + stock debug_end() + { + __debug_check_init() + + __debug_gametime = get_gametime() + + __debug_update_date() + __debug_log_write("[DEBUG END: %s] - Map: ^"%s^" | Plugin: ^"%s^"", __debug_date, __debug_mapname, __debug_amxxfile) + + if(__debug_list_size == 0) + { + __debug_log_write("# [ Empty Records List ]") + __debug_log_write("----------------------------------------------------------------------^n") + return + } + + new Float:last_gametime, slot + + slot = __debug_list_loop - 1 + if(slot < 0) slot += __debug_list_size + + last_gametime = __debug_list_gametime[slot] + + __debug_log_write("# - GameTime: (%.4f) | Last: (%.4f) | Difference: (%dms)", __debug_gametime, last_gametime, floatround((__debug_gametime - last_gametime) * 1000.0)) + __debug_log_write("# - Records List:") + + for(new count=__debug_list_size; count > 0; count--) + { + slot = __debug_list_loop - count + if(slot < 0) slot += __debug_list_size + + if(__debug_gametime == __debug_list_gametime[slot]) + __debug_log_write("#%2d: (curframe) - [%s]", count, __debug_list[slot]) + else + __debug_log_write("#%2d: (%dms) - [%s]", count, floatround((__debug_gametime - __debug_list_gametime[slot]) * 1000.0), __debug_list[slot]) + } + + __debug_log_write("----------------------------------------------------------------------^n") + } + + stock __debug(drawmode, level, const info[], any:...) + { + static slot + if(__debug_list_size == DEBUG_MAX_RECORDS) + { + slot = __debug_list_loop++ + __debug_list_loop = __debug_list_loop % DEBUG_MAX_RECORDS + } + else slot = __debug_list_size++ + + vformat(__debug_list[slot], __DEBUG_BUFF-1, info, 4) + __debug_list_gametime[slot] = __debug_gametime = get_gametime() + + if(drawmode == DEBUG_DRAW_NONE || level > DEBUG_LEVEL) + return + + #if defined DEBUG_ENABLE_CLIENT + client_print(0, print_console, "[DEBUG, GameTime: (%.3f)] %s", __debug_gametime, __debug_list[slot]) + #endif + + if(drawmode == DEBUG_DRAW_CONSOLE) + { + #if defined DEBUG_GAMETIME + server_print("[DEBUG, GameTime: (%.3f)] %s", __debug_gametime, __debug_list[slot]) + #if defined DEBUG_ENABLE_CLIENT + client_print(0, print_console, "[DEBUG, GameTime: (%.3f)] %s", __debug_gametime, __debug_list[slot]) + #endif + #else + server_print("[DEBUG] %s", __debug_list[slot]) + #if defined DEBUG_ENABLE_CLIENT + client_print(0, print_console, "[DEBUG] %s", __debug_list[slot]) + #endif + #endif + } + else + { + #if defined DEBUG_GAMETIME + __debug_log_write("[DEBUG, GameTime: (%.3f)] %s", __debug_gametime, __debug_list[slot]) + #else + __debug_log_write("[DEBUG] %s", __debug_list[slot]) + #endif + } + } + + stock __debug_update_date() + { + get_time("%d/%m/%Y - %H:%M:%S", __debug_date, 31) + } + + stock __debug_log_clear() + { + __debug_check_init() + + delete_file(__debug_logfile) + + __debug_update_date() + __debug_log_write("[DEBUG CLEAR: %s] - Map: ^"%s^" | Plugin: ^"%s^"", __debug_date, __debug_mapname, __debug_amxxfile) + } + + stock __debug_log_write(const info[], any:...) + { + __debug_check_init() + + static buff[__DEBUG_BUFF], lines + + if(++lines > __DEBUG_MAXLINES) + { + lines = 0 + __debug_log_clear() + } + + + vformat(buff, charsmax(buff), info, 2) + + write_file(__debug_logfile, buff) + server_print(buff) + + #if defined DEBUG_ENABLE_CLIENT + client_print(0, print_console, buff) + #endif + } + +#else + + #define debug_init(%1) {} + #define debug_end(%1) {} + + #define debug_console1(%1) {} + #define debug_console2(%1) {} + #define debug_console3(%1) {} + + #define debug_log1(%1) {} + #define debug_log2(%1) {} + #define debug_log3(%1) {} + + #define debug_hidden(%1) {} + + #define debug_performance_start(%1) {} + #define debug_performance_end(%1) {} + + #define __debug(%1) {} + +#endif + diff --git a/bin/amxxdump/includes/amxmodx/dodconst.inc b/bin/amxxdump/includes/amxmodx/dodconst.inc new file mode 100644 index 0000000..14807e5 --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/dodconst.inc @@ -0,0 +1,152 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +#if defined _dodconst_included + #endinput +#endif +#define _dodconst_included + +/* DoD teams */ +#define ALLIES 1 +#define AXIS 2 + +#define FT_NEW 1<<0 +#define FT_OLD 1<<1 + +#define STAMINA_SET 0 +#define STAMINA_RESET 1 + +#define FUSE_SET 0 +#define FUSE_RESET 1 + +#define DODMAX_WEAPONS 46 // 5 slots for custom weapons + +// DoD Weapon Types +enum +{ + DODWT_PRIMARY = 0, + DODWT_SECONDARY, + DODWT_MELEE, + DODWT_GRENADE, + DODWT_OTHER +}; + +// Ammo Channels +#define AMMO_SMG 1 // thompson, greasegun, sten, mp40 +#define AMMO_ALTRIFLE 2 // carbine, k43, mg34 +#define AMMO_RIFLE 3 // garand, enfield, scoped enfield, k98, scoped k98 +#define AMMO_PISTOL 4 // colt, webley, luger +#define AMMO_SPRING 5 // springfield +#define AMMO_HEAVY 6 // bar, bren, stg44, fg42, scoped fg42 +#define AMMO_MG42 7 // mg42 +#define AMMO_30CAL 8 // 30cal +#define AMMO_GREN 9 // grenades (should be all 3 types) +#define AMMO_ROCKET 13 // bazooka, piat, panzerschreck +enum { + PS_NOPRONE =0, + PS_PRONE, + PS_PRONEDEPLOY, + PS_DEPLOY, +}; + +/* info types for dod_get_map_info native */ +enum { + MI_ALLIES_TEAM = 0, + MI_ALLIES_PARAS, + MI_AXIS_PARAS, +}; + +/* DoD weapons */ +enum { + DODW_AMERKNIFE = 1, + DODW_GERKNIFE, + DODW_COLT, + DODW_LUGER, + DODW_GARAND, + DODW_SCOPED_KAR, + DODW_THOMPSON, + DODW_STG44, + DODW_SPRINGFIELD, + DODW_KAR, + DODW_BAR, + DODW_MP40, + DODW_HANDGRENADE, + DODW_STICKGRENADE, + DODW_STICKGRENADE_EX, + DODW_HANDGRENADE_EX, + DODW_MG42, + DODW_30_CAL, + DODW_SPADE, + DODW_M1_CARBINE, + DODW_MG34, + DODW_GREASEGUN, + DODW_FG42, + DODW_K43, + DODW_ENFIELD, + DODW_STEN, + DODW_BREN, + DODW_WEBLEY, + DODW_BAZOOKA, + DODW_PANZERSCHRECK, + DODW_PIAT, + DODW_SCOPED_FG42, + DODW_FOLDING_CARBINE, + DODW_KAR_BAYONET, + DODW_SCOPED_ENFIELD, + DODW_MILLS_BOMB, + DODW_BRITKNIFE, + DODW_GARAND_BUTT, + DODW_ENFIELD_BAYONET, + DODW_MORTAR, + DODW_K43_BUTT, +}; + +/* DoD Classes */ +enum { + DODC_GARAND = 1, + DODC_CARBINE, + DODC_THOMPSON, + DODC_GREASE, + DODC_SNIPER, + DODC_BAR, + DODC_30CAL, + DODC_BAZOOKA, + //DODC_ALLIES_MORTAR, + DODC_KAR = 10, + DODC_K43, + DODC_MP40, + DODC_MP44, + DODC_SCHARFSCHUTZE, + DODC_FG42, + DODC_SCOPED_FG42, + DODC_MG34, + DODC_MG42, + DODC_PANZERJAGER, + //DODC_AXIS_MORTAR, + DODC_ENFIELD = 21, + DODC_STEN, + DODC_MARKSMAN, + DODC_BREN, + DODC_PIAT, + //DODC_BRIT_MORTAR, +}; + +/* DoD stats constants */ +enum { + DODX_KILLS = 0, + DODX_DEATHS, + DODX_HEADSHOTS, + DODX_TEAMKILLS, + DODX_SHOTS, + DODX_HITS, + DODX_DAMAGE, + DODX_POINTS, + DODX_RANK, + DODX_MAX_STATS +} diff --git a/bin/amxxdump/includes/amxmodx/dodfun.inc b/bin/amxxdump/includes/amxmodx/dodfun.inc new file mode 100644 index 0000000..cc8ea1e --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/dodfun.inc @@ -0,0 +1,152 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// DoD Fun Functions +// + +#if defined _dodfun_included + #endinput +#endif +#define _dodfun_included + +#include + +#pragma reqlib dodfun +#if !defined AMXMODX_NOAUTOLOAD + #pragma loadlib dodfun +#endif + +/* Function is called after grenade throw */ +forward grenade_throw(index,greindex,wId); + +/* Function is called after a rocket is shot */ +forward rocket_shoot(index,rocketindex,wId); + +/* Example: for full stamina use dod_player_stamina(1,STAMINA_SET,100,100) */ +/* value is from 0 - 100 */ +native dod_set_stamina(index,set=STAMINA_SET,minvalue=0,maxvalue=100); + +/* Sets fuse for grenades. Valid number is from 0.1-20.0 */ +/* types : new or preprimed */ +native dod_set_fuse(index,set=FUSE_SET,Float:newFuse=5.0, Type=FT_NEW); + +/* Sets player class */ +native dod_set_user_class(index,classId); + +/* Sets player team and random class. Don't work for spectators. */ +native dod_set_user_team(index,teamId,refresh=1); + +/* Returns next player class. Usefull is player is using random class */ +native dod_get_next_class(index); + +/* Returns 1 if player choose random class */ +native dod_is_randomclass(index); + +/* Returns player deaths */ +native dod_get_pl_deaths(index); + +/* Sets player deaths. + * Note if you opt to refresh the scoreboard, it + * will make the player appear as "DEAD" in the scoreboard. + */ +native dod_set_pl_deaths(index,value,refresh=1); + +/* Returns player deaths. */ +native dod_get_user_kills(index); + +/* Sets player kills. */ +native dod_set_user_kills(index,value,refresh=1); + +/* Sets player score. */ +native dod_set_user_score(index,value,refresh=1); + +/* Sets new team name for this player */ +native dod_set_pl_teamname(index,const szName[]); + +/* Gets player team name */ +native dod_get_pl_teamname(index,szName[],len); + +/* Returns 1 is player weapon is deployed (bar,mg..) */ +native dod_is_deployed(index); + +/*Sets the ammo of the specified weapon entity id */ +native dod_set_user_ammo(index,wid,value); + +/*Gets the ammo of the specified weapon entity id */ +native dod_get_user_ammo(index,wid); + +/* called after first InitObj */ +forward controlpoints_init(); + +enum CP_VALUE { + CP_edict = 1, // read only + CP_area, // read only + CP_index, // read only + CP_owner, + CP_default_owner, + CP_visible, // reinit after change + CP_icon_neutral, // reinit after change + CP_icon_allies, // reinit after change + CP_icon_axis, // reinit after change + CP_origin_x, // reinit after change + CP_origin_y, // reinit after change + + CP_can_touch, + CP_pointvalue, + + CP_points_for_cap, + CP_team_points, + + CP_model_body_neutral, + CP_model_body_allies, + CP_model_body_axis, + + // strings + CP_name, + CP_reset_capsound, + CP_allies_capsound, + CP_axis_capsound, + CP_targetname, + + CP_model_neutral, + CP_model_allies, + CP_model_axis, +}; + +/* returns number of objectives */ +native objectives_get_num(); + +/* use this function to update client(s) hud. You need to do this sometimes. Check CP_VALUE comments. + if player is 0 , all clients will get this message */ +native objectives_reinit( player=0 ); + +/* use this function to get info about specified control point */ +native objective_get_data( index, CP_VALUE:key, szValue[]="", len=0 ); + +/* use this function to change control point's data */ +native objective_set_data( index, CP_VALUE:key , iValue=-1, const szValue[]="" ); + +enum CA_VALUE { + CA_edict = 1, + CA_allies_numcap, + CA_axis_numcap, + CA_timetocap, + CA_can_cap, + + // strings + CA_target, + CA_sprite, +}; + +/* use this function to get info about specified control point's area */ +native area_get_data( index, CA_VALUE:key, szValue[]="", len=0 ); + +/* use this function to change control point's area data */ +native area_set_data( index, CA_VALUE:key , iValue=-1, const szValue[]="" ); diff --git a/bin/amxxdump/includes/amxmodx/dodfun.inc.temp b/bin/amxxdump/includes/amxmodx/dodfun.inc.temp new file mode 100644 index 0000000..d52f5b4 --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/dodfun.inc.temp @@ -0,0 +1,62 @@ +#if defined _dodfun_included +#endinput +#endif +#define _dodfun_included +#include +#pragma reqlib dodfun +#if !defined AMXMODX_NOAUTOLOAD +#pragma loadlib dodfun +#endif +forward grenade_throw(index,greindex,wId); +forward rocket_shoot(index,rocketindex,wId); +native dod_set_stamina(index,set=STAMINA_SET,minvalue=0,maxvalue=100); +native dod_set_fuse(index,set=FUSE_SET,Float:newFuse=5.0, Type=FT_NEW); +native dod_set_user_class(index,classId); +native dod_set_user_team(index,teamId,refresh=1); +native dod_get_next_class(index); +native dod_is_randomclass(index); +native dod_get_pl_deaths(index); +native dod_set_pl_deaths(index,value,refresh=1); +native dod_get_user_kills(index); +native dod_set_user_kills(index,value,refresh=1); +native dod_set_user_score(index,value,refresh=1); +native dod_set_pl_teamname(index,const szName[]); +native dod_get_pl_teamname(index,szName[],len); +native dod_is_deployed(index); +native dod_set_user_ammo(index,wid,value); +native dod_get_user_ammo(index,wid); +forward controlpoints_init(); +enum CP_VALUE { +CP_edict = 1, CP_area, CP_index, CP_owner, +CP_default_owner, +CP_visible, CP_icon_neutral, CP_icon_allies, CP_icon_axis, CP_origin_x, CP_origin_y, CP_can_touch, +CP_pointvalue, +CP_points_for_cap, +CP_team_points, +CP_model_body_neutral, +CP_model_body_allies, +CP_model_body_axis, +CP_name, +CP_reset_capsound, +CP_allies_capsound, +CP_axis_capsound, +CP_targetname, +CP_model_neutral, +CP_model_allies, +CP_model_axis, +}; +native objectives_get_num(); +native objectives_reinit( player=0 ); +native objective_get_data( index, CP_VALUE:key, szValue[]="", len=0 ); +native objective_set_data( index, CP_VALUE:key , iValue=-1, const szValue[]="" ); +enum CA_VALUE { +CA_edict = 1, +CA_allies_numcap, +CA_axis_numcap, +CA_timetocap, +CA_can_cap, +CA_target, +CA_sprite, +}; +native area_get_data( index, CA_VALUE:key, szValue[]="", len=0 ); +native area_set_data( index, CA_VALUE:key , iValue=-1, const szValue[]="" ); diff --git a/bin/amxxdump/includes/amxmodx/dodstats.inc b/bin/amxxdump/includes/amxmodx/dodstats.inc new file mode 100644 index 0000000..381496a --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/dodstats.inc @@ -0,0 +1,69 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// DODX Stats Functions +// + +#if defined _dodstats_included + #endinput +#endif +#define _dodstats_included + +/* Gets stats from given weapon index. If wpnindex is 0 +* then the stats are from all weapons. If weapon has not been used function +* returns 0 in other case 1. Fields in stats are: +* 0 - kills +* 1 - deaths +* 2 - headshots +* 3 - teamkilling +* 4 - shots +* 5 - hits +* 6 - damage +* 7 - score +* For body hits fields see amxconst.inc. */ +native get_user_wstats(index,wpnindex,stats[DODX_MAX_STATS],bodyhits[MAX_BODYHITS]); + +/* Gets round stats from given weapon index.*/ +native get_user_wrstats(index,wpnindex,stats[DODX_MAX_STATS],bodyhits[MAX_BODYHITS]); + +/* Gets life (from spawn to spawn) stats from given weapon index.*/ +native get_user_wlstats(index,wpnindex,stats[DODX_MAX_STATS],bodyhits[MAX_BODYHITS]); + +/* Gets overall stats which are stored in file on server +* and updated on every respawn or user disconnect. +* Function returns the position in stats by diff. kills to deaths. */ +native get_user_stats(index,stats[DODX_MAX_STATS],bodyhits[MAX_BODYHITS]); + +/* Gets round stats of player. */ +native get_user_rstats(index,stats[DODX_MAX_STATS],bodyhits[MAX_BODYHITS]); + +/* Gets life (from spawn to spawn) stats of player. */ +native get_user_lstats(index,stats[DODX_MAX_STATS],bodyhits[MAX_BODYHITS]); + +/* Gets stats with which user have killed/hurt his victim. If victim is 0 +* then stats are from all victims. If victim has not been hurt, function +* returns 0 in other case 1. User stats are reset on his respawn. */ +native get_user_vstats(index,victim,stats[DODX_MAX_STATS],bodyhits[MAX_BODYHITS],wpnname[]="",len=0); + +/* Gets stats with which user have been killed/hurt. If killer is 0 +* then stats are from all attacks. If killer has not hurt user, function +* returns 0 in other case 1. User stats are reset on his respawn. */ +native get_user_astats(index,wpnindex,stats[DODX_MAX_STATS],bodyhits[MAX_BODYHITS],wpnname[]="",len=0); + +/* Resets life, weapon, victims and attackers user stats. */ +native reset_user_wstats(index); + +/* Gets overall stats which stored in stats.dat file in amx folder +* and updated on every mapchange or user disconnect. +* Function returns next index of stats entry or 0 if no more exists. */ +native get_stats(index,stats[DODX_MAX_STATS],bodyhits[MAX_BODYHITS],name[],len); + +/* Returns number of all entries in stats. */ +native get_statsnum(); diff --git a/bin/amxxdump/includes/amxmodx/dodstats.inc.temp b/bin/amxxdump/includes/amxmodx/dodstats.inc.temp new file mode 100644 index 0000000..4a554a2 --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/dodstats.inc.temp @@ -0,0 +1,15 @@ +#if defined _dodstats_included +#endinput +#endif +#define _dodstats_included +native get_user_wstats(index,wpnindex,stats[DODX_MAX_STATS],bodyhits[MAX_BODYHITS]); +native get_user_wrstats(index,wpnindex,stats[DODX_MAX_STATS],bodyhits[MAX_BODYHITS]); +native get_user_wlstats(index,wpnindex,stats[DODX_MAX_STATS],bodyhits[MAX_BODYHITS]); +native get_user_stats(index,stats[DODX_MAX_STATS],bodyhits[MAX_BODYHITS]); +native get_user_rstats(index,stats[DODX_MAX_STATS],bodyhits[MAX_BODYHITS]); +native get_user_lstats(index,stats[DODX_MAX_STATS],bodyhits[MAX_BODYHITS]); +native get_user_vstats(index,victim,stats[DODX_MAX_STATS],bodyhits[MAX_BODYHITS],wpnname[]="",len=0); +native get_user_astats(index,wpnindex,stats[DODX_MAX_STATS],bodyhits[MAX_BODYHITS],wpnname[]="",len=0); +native reset_user_wstats(index); +native get_stats(index,stats[DODX_MAX_STATS],bodyhits[MAX_BODYHITS],name[],len); +native get_statsnum(); diff --git a/bin/amxxdump/includes/amxmodx/dodx.inc b/bin/amxxdump/includes/amxmodx/dodx.inc new file mode 100644 index 0000000..42e21da --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/dodx.inc @@ -0,0 +1,161 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// DODX Functions +// + +#if defined _dodx_included + #endinput +#endif +#define _dodx_included + +#include +#include + +#pragma reqclass xstats +#if !defined AMXMODX_NOAUTOLOAD + #pragma defclasslib xstats dodx +#endif + +/************* Shared Natives Start ********************************/ + +/* Forward types */ +enum { + XMF_DAMAGE = 0, + XMF_DEATH, + XMF_SCORE, +}; + +/* Use this function to register forwards */ +native register_statsfwd(ftype); + +/* Function is called after player to player attacks , +* if players were damaged by teammate TA is set to 1 */ +forward client_damage(attacker, victim, damage, wpnindex, hitplace, TA); + +/* Function is called after player death , +* if player was killed by teammate TK is set to 1 */ +forward client_death(killer, victim, wpnindex, hitplace, TK); + +/* Function is called if player scored */ +forward client_score(id, score, total); + +/* This Forward is called when a player changes team */ +forward dod_client_changeteam(id, team, oldteam); + +/* This Forward is called if a player changes class, but just after spawn */ +forward dod_client_changeclass(id, class, oldclass); + +/* This Forward is called when a player spawns */ +forward dod_client_spawn(id); + +/* This will be called whenever a player scopes or unscopes +value = 1 scope up +value = 0 scope down */ +forward dod_client_scope(id, value); + +/* This will be called whenever a player drops a weapon +weapon is weapon dropped or picked up +value = 1 picked up +value = 0 dropped */ +forward dod_client_weaponpickup(id, weapon, value); + +/* Called whenever the the player goes to or comes from prone position +value = 1 going down +value = 0 getting up */ +forward dod_client_prone(id, value); + +/* This will be called whenever a player switches a weapon */ +forward dod_client_weaponswitch(id, wpnew, wpnold); + +/* Forward for when a grenade explodes and its location */ +forward dod_grenade_explosion(id, Float:pos[3], wpnid); + +/* Forward for when a rocket explodes and its location */ +forward dod_rocket_explosion(id, Float:pos[3], wpnid); + +/* Forward for when a player picks up a object */ +forward dod_client_objectpickup(id, objid, Float:pos[3], value); + +/* Forward for when a users stamina decreases */ +forward dod_client_stamina(id, stamina); + +/* We want to get just the weapon of whichever type that the player is on him +Use DODWT_* in dodconst.inc for type */ +native dod_weapon_type(id, type); + +/* This native will change the position of a weapon within the users slots and its ammo ammount */ +native dod_set_weaponlist(id, wpnID, slot, dropslot, totalrds); + +/* Sets the model for a player */ +native dod_set_model(id, const model[]); + +/* Sets the model for a player */ +native dod_set_body_number(id, bodynumber); + +/* Un-Sets the model for a player */ +native dod_clear_model(id); + +/* Custom Weapon Support */ +/* function will return index of new weapon */ +native custom_weapon_add( const wpnname[], melee = 0, const logname[]="" ); + +/* Function will pass damage done by this custom weapon to stats module and other plugins */ +native custom_weapon_dmg( weapon, att, vic, damage, hitplace=0 ); + +/* Function will pass info about custom weapon shot to stats module */ +native custom_weapon_shot( weapon, index ); // weapon id , player id + +/* function will return 1 if true */ +native xmod_is_melee_wpn(wpnindex); + +/* Returns weapon name. */ +native xmod_get_wpnname(wpnindex, name[], len); + +/* Returns weapon logname. */ +native xmod_get_wpnlogname(wpnindex, name[], len); + +/* Returns weapons array size */ +native xmod_get_maxweapons(); + +/* Returns stats array size ex. 8 in TS , 9 in DoD */ +native xmod_get_stats_size(); + +/* Returns 1 if true */ +native xmod_is_custom_wpn(wpnindex); + +/************* Shared Natives End ********************************/ + +/* weapon logname to weapon name convertion */ +native dod_wpnlog_to_name(const logname[],name[],len); + +/* weapon logname to weapon index convertion */ +native dod_wpnlog_to_id(const logname[]); + +native dod_get_map_info( info ); + +/* Returns id of currently carried weapon. Gets also +* ammount of ammo in clip and backpack. */ +native dod_get_user_weapon(index,&clip=0,&ammo=0); + +/* Returns team score */ +native dod_get_team_score(teamId); + +/* Returns player class id */ +native dod_get_user_class(index); + +/* Returns player score */ +native dod_get_user_score(index); + +/* values are: 0-no prone, 1-prone, 2-prone + w_deploy */ +native dod_get_pronestate(index); + +/* It is not as safe as original but player deaths will not be increased */ +native dod_user_kill(index); diff --git a/bin/amxxdump/includes/amxmodx/dodx.inc.temp b/bin/amxxdump/includes/amxmodx/dodx.inc.temp new file mode 100644 index 0000000..a827173 --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/dodx.inc.temp @@ -0,0 +1,52 @@ +#if defined _dodx_included +#endinput +#endif +#define _dodx_included +#include +#include +#pragma reqclass xstats +#if !defined AMXMODX_NOAUTOLOAD +#pragma defclasslib xstats dodx +#endif +enum { +XMF_DAMAGE = 0, +XMF_DEATH, +XMF_SCORE, +}; +native register_statsfwd(ftype); +forward client_damage(attacker, victim, damage, wpnindex, hitplace, TA); +forward client_death(killer, victim, wpnindex, hitplace, TK); +forward client_score(id, score, total); +forward dod_client_changeteam(id, team, oldteam); +forward dod_client_changeclass(id, class, oldclass); +forward dod_client_spawn(id); +forward dod_client_scope(id, value); +forward dod_client_weaponpickup(id, weapon, value); +forward dod_client_prone(id, value); +forward dod_client_weaponswitch(id, wpnew, wpnold); +forward dod_grenade_explosion(id, Float:pos[3], wpnid); +forward dod_rocket_explosion(id, Float:pos[3], wpnid); +forward dod_client_objectpickup(id, objid, Float:pos[3], value); +forward dod_client_stamina(id, stamina); +native dod_weapon_type(id, type); +native dod_set_weaponlist(id, wpnID, slot, dropslot, totalrds); +native dod_set_model(id, const model[]); +native dod_set_body_number(id, bodynumber); +native dod_clear_model(id); +native custom_weapon_add( const wpnname[], melee = 0, const logname[]="" ); +native custom_weapon_dmg( weapon, att, vic, damage, hitplace=0 ); +native custom_weapon_shot( weapon, index ); native xmod_is_melee_wpn(wpnindex); +native xmod_get_wpnname(wpnindex, name[], len); +native xmod_get_wpnlogname(wpnindex, name[], len); +native xmod_get_maxweapons(); +native xmod_get_stats_size(); +native xmod_is_custom_wpn(wpnindex); +native dod_wpnlog_to_name(const logname[],name[],len); +native dod_wpnlog_to_id(const logname[]); +native dod_get_map_info( info ); +native dod_get_user_weapon(index,&clip=0,&ammo=0); +native dod_get_team_score(teamId); +native dod_get_user_class(index); +native dod_get_user_score(index); +native dod_get_pronestate(index); +native dod_user_kill(index); diff --git a/bin/amxxdump/includes/amxmodx/engine.inc b/bin/amxxdump/includes/amxmodx/engine.inc new file mode 100644 index 0000000..4c9483d --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/engine.inc @@ -0,0 +1,1343 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// Special thanks to Vexd and mahnsawce. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Engine Functions +// + +#if defined _engine_included + #endinput +#endif +#define _engine_included + +#include + +#pragma reqlib engine +#if !defined AMXMODX_NOAUTOLOAD + #pragma loadlib engine +#endif + +/** + * Retrieves a result from the global engine module trace handle. + * + * @note For a list of trace results available see the TR_* constants in + * engine_const.inc. + * @note Usage examples: + * value = traceresult(TR_AllSolid); + * traceresult(TR_Fraction, floatvalue); + * traceresult(TR_EndPos, vector); + * + * @param type Result to retrieve + * @param ... Depending on the result type a different number of + * additional parameters should be provided: + * int - Returns the result integer value directly, no + * additional parameters required + * float - Stores the result float value into the + * variable provided as the second parameter + * vector - Copies the result vector to the Float:array[3] + * provided in the second parameter + * + * @return Changes depending on the result type: + * int - Returns the result integer value + * float - Returns 1 + * vector - Returns 1 + */ +native traceresult(type, any:...); + +/** + * Registers a function to be called on a client impulse. + * + * @note The function will be called in the following manner: + * + * public impulse_handler(client, impulse) + * + * client - Client index + * impulse - Impulse triggered by the client + * + * @note The callback should return PLUGIN_CONTINUE to ignore the impulse, + * PLUGIN_HANDLED or higher to nullify it (CmdStart() is not blocked). + * @note When returning PLUGIN_HANDLED or higher from the callback, Engine will + * still fire other impulse functions. This includes the client_impulse() + * and client_cmdStart() forwards. + * + * @param impulse Impulse to hook + * @param function Name of callback function + * + * @return Impulse forward id + */ +native register_impulse(impulse, const function[]); + +/** + * Registers a function to be called on a touch action between entities of + * specified classes. + * + * @note The function will be called in the following manner: + * + * public touch_handler(touched, toucher) + * + * touched - Index of entity being touched + * toucher - Index of entity touching + * + * @note The callback should return PLUGIN_CONTINUE to ignore the touch, + * PLUGIN_HANDLED or higher to block it. + * @note When returning PLUGIN_HANDLED from the callback, Engine will still fire + * other touch functions like the pfn_touch() forward before actually + * blocking the touch. To immediately block return PLUGIN_HANDLED_MAIN + * instead. + * + * @param Touched Entity classname being touched, "*" or "" for any class + * @param Toucher Entity classname touching, "*" or "" for any class + * @param function Name of callback function + * + * @return Touch forward id + */ +native register_touch(const Touched[], const Toucher[], const function[]); + +/** + * Registers a function to be called on entity think on all entities of a + * specified class. + * + * @note The function will be called in the following manner: + * + * public think_handler(entity) + * + * entity - Index of entity thinking + * + * @note The callback should return PLUGIN_CONTINUE to ignore the think, + * PLUGIN_HANDLED or higher to block it. + * @note When returning PLUGIN_HANDLED from the callback, Engine will still fire + * other think functions like the pfn_think() forward before actually + * blocking the think. To immediately block return PLUGIN_HANDLED_MAIN + * instead. + * + * @param Classname Entity classname to hook + * @param function Name of callback function + * + * @return Think forward id + */ +native register_think(const Classname[], const function[]); + +/** + * Removes a previously registered impulse hook. + * + * @param registerid Impulse forward id + * + * @return 1 on success, 0 if nothing was removed + */ +native unregister_impulse(registerid); + +/** + * Removes a previously registered touch hook. + * + * @param registerid Touch forward id + * + * @return 1 on success, 0 if nothing was removed + */ +native unregister_touch(registerid); + +/** + * Removes a previously registered think hook. + * + * @param registerid Think forward id + * + * @return 1 on success, 0 if nothing was removed + */ +native unregister_think(registerid); + +/** + * Sets the engine module speak flags on a client. + * + * @note For a list of available flags see the SPEAK_* constants in + * engine_const.inc + * + * @param iIndex Client index + * @param iSpeakFlags New flags to set + * + * @noreturn + * @error If the client index is not within the range of 1 to + * MaxClients, or the client is not connected, an error + * will be thrown. + */ +native set_speak(iIndex, iSpeakFlags); + +/** + * Returns the engine module speak flags currently set on a client. + * + * @note For a list of available flags see the SPEAK_* constants in + * engine_const.inc + * + * @param iIndex Client index + * + * @return Client speak flags + * @error If the client index is not within the range of 1 to + * MaxClients, or the client is not connected, an error will be + * thrown. + */ +native get_speak(iIndex); + +/** + * Uses the DROP_TO_FLOOR() engine function on an entity, which attempts to put + * it down on the floor. + * + * @note This engine function traces 256 units straight downwards from the + * entity origin. If the trace hits the floor, the origin is updated to + * the end position of the trace, FL_ONGROUND is added to the flags and + * EV_ENT_groundentity is updated. When the trace does not hit anything or + * the entity would be stuck inside something, the function does nothing + * and returns 0. + * + * @param entity Entity index + * + * @return 1 if entity is on the floor, 0 otherwise + */ +native drop_to_floor(entity); + +/** + * Retrieves keyvalue buffer from a client or the server. + * + * @note There are three different types of keyvalue buffers, depending on the + * index passed: + * -1 - "local" buffer (various server information and config values) + * 0 - server buffer (usually contains "*gamedir" only) + * >0 - client buffer ("name", "rate" and other client info) + * @note The buffer is formatted as "\key1\value1\key2\value2\...\keyN\valueN" + * + * @param id Server/client index + * @param buffer Buffer to copy keybuffer to + * @param length Maximum size of buffer + * + * @return Number of cells written to buffer + * @error If an invalid entity index is provided or, if the index is a + * client index, the client is not connected, an error will be + * thrown. + */ +native get_info_keybuffer(id, buffer[], length); + +/** + * Forces an entity (such as a player) to use another entity (such as a button). + * + * @param entUsed Index of entity being used + * @param entUser Index of entity using + * + * @noreturn + * @error If an invalid entity index is provided or, if either index + * is a client index, that client is not connected, an error + * will be thrown. + */ +native force_use(entUsed, entUser); + +/** + * Returns a float type value from the server globals. + * + * @note For a list of valid float type entries, see the GL_* constants in + * engine_const.inc under the "Float" section. + * + * @param variable Entry to retrieve from + * + * @return Value of specified entry + * @error If an invalid entry is provided, an error will be thrown. + */ +native Float:get_global_float(variable); + +/** + * Returns a integer type value from the server globals. + * + * @note For a list of valid integer type entries, see the GL_* constants in + * engine_const.inc under the "Int" section. + * + * @param variable Entry to retrieve from + * + * @return Value of specified entry + * @error If an invalid entry is provided, an error will be thrown. + */ +native get_global_int(variable); + +/** + * Retrieves a global string type value from the server. + * + * @note For a list of valid string type entries, see the GL_* constants in + * engine_const.inc under the "String" section. + * + * @param variable Entry to retrieve from + * @param string Buffer to copy value to + * @param maxlen Maximum size of buffer + * + * @return Number of cells written to buffer + * @error If an invalid entry is provided, an error will be thrown. + */ +native get_global_string(variable, string[], maxlen); + +/** + * Returns a vector type value from the server globals. + * + * @note For a list of valid vector type entries, see the GL_* constants in + * engine_const.inc under the "Vector" section. + * + * @param variable Entry to retrieve from + * @param vector Array to store vector in + * + * @noreturn + * @error If an invalid entry is provided, an error will be thrown. + */ +native get_global_vector(variable, Float:vector[3]); + +/** + * Returns a edict type value from the server globals. + * + * @note For a list of valid edict type entries, see the GL_* constants in + * engine_const.inc under the "Edict" section. + * @note This native returns 0 as an error value if the edict retrieved is an + * invalid entity. As 0 is an entity index that is considered to be a + * valid value for some globals ("worldspawn"), this native can + * potentially return a misleading value. Use get_global_edict2() for a + * safe version. + * + * @param variable Entry to retrieve from + * + * @return Value of specified entry + * @error If an invalid entry is provided, an error will be thrown. + */ +native get_global_edict(variable); + +/** + * Returns a edict type value from the server globals. + * + * @note For a list of valid edict type entries, see the GL_* constants in + * engine_const.inc under the "Edict" section. + * @note This native returns -1 as a safe error value if the edict retrieved is + * an invalid entity. Otherwise it is identical to get_global_edict(). + * + * @param variable Entry to retrieve from + * + * @return Value of specified entry + * @error If an invalid entry is provided, an error will be thrown. + */ +native get_global_edict2(variable); + +/** + * Sets the size of the entity bounding box, as described by the minimum and + * maximum vectors relative to the origin. + * + * @param index Entity index + * @param mins Vector containing the minimum point relative to the origin + * @param maxs Vector containing the maximum point relative to the origin + * + * @noreturn + * @error If an invalid entity index is provided, an error will be + * thrown. + */ +native entity_set_size(index, const Float:mins[3], const Float:maxs[3]); + +/** + * Returns the index of a decal. + * + * @param szDecalName Decal name + * + * @return Decal index >= 0, or -1 if decal was not found + */ +native get_decal_index(const szDecalName[]); + +/** + * Returns the distance between two entities. + * + * @param ida Entity index 1 + * @param idb Entity index 2 + * + * @return Distance between the entities + * @error If an invalid entity index is provided or, if either index is a + * client index, that client is not connected, an error will be + * thrown. + */ +native Float:entity_range(ida, idb); + +/** + * Returns if two entities bounding boxes intersect by comparing their absolute + * minimum and maximum origins. + * + * @param entity Entity index 1 + * @param other Entity index 2 + * + * @return True if entities intersect, false otherwise + * @error If an invalid entity index is provided, an error will be + * thrown. + */ +native bool:entity_intersects(entity, other); + +/** + * Returns an integer type value from an entities entvar struct. + * + * @note For a list of valid integer type entries, see the EV_INT_* constants in + * engine_const.inc + * + * @param iIndex Entity index + * @param iKey Entry to retrieve from + * + * @return Value of specified entry + * @error If an invalid entity index is provided, an error will be + * thrown. + */ +native entity_get_int(iIndex, iKey); + +/** + * Sets an integer type value in an entities entvar struct. + * + * @note For a list of valid integer type entries, see the EV_INT_* constants in + * engine_const.inc + * + * @param iIndex Entity index + * @param iKey Entry to write to + * @param iVal Value to set + * + * @return 1 if value was sucessfully set, 0 if an invalid entry was + * specified + * @error If an invalid entity index is provided, an error will be + * thrown. + */ +native entity_set_int(iIndex, iKey, iVal); + +/** + * Returns a float type value from an entities entvar struct. + * + * @note For a list of valid float type entries, see the EV_FL_* constants in + * engine_const.inc + * + * @param iIndex Entity index + * @param iKey Entry to retrieve from + * + * @return Value of specified entry, or 0 if an invalid entry was + * specified + * @error If an invalid entity index is provided, an error will be + * thrown. + */ +native Float:entity_get_float(iIndex, iKey); + +/** + * Sets a float type value in an entities entvar struct. + * + * @note For a list of valid float type entries, see the EV_FL_* constants in + * engine_const.inc + * + * @param iIndex Entity index + * @param iKey Entry to write to + * @param iVal Value to set + * + * @return 1 if value was sucessfully set, 0 if an invalid entry was + * specified + * @error If an invalid entity index is provided, an error will be + * thrown. + */ +native entity_set_float(iIndex, iKey, Float:iVal); + +/** + * Retrieves a vector type value from an entities entvar struct. + * + * @note For a list of valid vector type entries, see the EV_VEC_* constants in + * engine_const.inc + * + * @param iIndex Entity index + * @param iKey Entry to retrieve from + * @param vRetVector Array to store vector in + * + * @return 1 if value was sucessfully retrieved, 0 if an invalid + * entry was specified + * @error If an invalid entity index is provided, an error will be + * thrown. + */ +native entity_get_vector(iIndex, iKey, Float:vRetVector[3]); + +/** + * Sets a vector type value in an entities entvar struct. + * + * @note For a list of valid vector type entries, see the EV_VEC_* constants in + * engine_const.inc + * + * @param iIndex Entity index + * @param iKey Entry to write to + * @param vNewVector Array to copy to the entity + * + * @return 1 if value was sucessfully set, 0 if an invalid entry + * was specified + * @error If an invalid entity index is provided, an error will be + * thrown. + */ +native entity_set_vector(iIndex, iKey, const Float:vNewVector[3]); + +/** + * Returns an edict type value from an entities entvar struct. + * + * @note For a list of valid edict type entries, see the EV_ENT_* constants in + * engine_const.inc + * @note This native returns 0 as an error value if the edict retrieved from the + * entvar is an invalid entity. As 0 is an entity index that is + * considered to be a valid value for some entvars ("worldspawn"), this + * native can potentially return a misleading value. Use + * entity_get_edict2() for a safe version. + * + * @param iIndex Entity index + * @param iKey Entry to retrieve from + * + * @return Entity index in specified entry, 0 if the edict in the + * entvar is not a valid entity or an invalid entry was + * specified + * @error If an invalid entity index is provided, an error will be + * thrown. + */ +native entity_get_edict(iIndex, iKey); + +/** + * Returns an edict type value from an entities entvar struct. + * + * @note For a list of valid edict type entries, see the EV_ENT_* constants in + * engine_const.inc + * @note This native returns -1 as a safe error value if the edict retrieved + * from the entvar is an invalid entity. Otherwise it is identical to + * entity_get_edict(). + * + * @param iIndex Entity index + * @param iKey Entry to retrieve from + * + * @return Entity index in specified entry, -1 if the edict in the + * entvar is not a valid entity or an invalid entry was + * specified + * @error If an invalid entity index is provided, an error will be + * thrown. + */ +native entity_get_edict2(iIndex, iKey); + +/** + * Sets an edict type value in an entities entvar struct. + * + * @note For a list of valid edict type entries, see the EV_ENT_* constants in + * engine_const.inc + * @note This native will crash the server if an invalid entity index is + * provided in iNewIndex. + * + * @param iIndex Entity index + * @param iKey Entry to write to + * @param iNewIndex Entity index to set + * + * @return 1 if value was sucessfully set, 0 if an invalid entry + * was specified + * @error If an invalid entity index is provided, an error will be + * thrown. + */ +native entity_set_edict(iIndex, iKey, iNewIndex); + +/** + * Retrieves a string type value from an entities entvar struct. + * + * @note For a list of valid string type entries, see the EV_SZ_* constants in + * engine_const.inc + * + * @param iIndex Entity index + * @param iKey Entry to retrieve from + * @param szReturn Buffer to copy value to + * @param iRetLen Maximum size of buffer + * + * @return Number of cells written to buffer, 0 if an invalid entry + * was specified + * @error If an invalid entity index is provided, an error will be + * thrown. + */ +native entity_get_string(iIndex, iKey, szReturn[], iRetLen); + +/** + * Sets a string type value in an entities entvar struct. + * + * @note For a list of valid string type entries, see the EV_SZ_* constants in + * engine_const.inc + * + * @param iIndex Entity index + * @param iKey Entry to retrieve from + * @param szNewVal String to copy to the entity + * + * @return 1 if value was sucessfully set, 0 if an invalid entry was + * specified + * @error If an invalid entity index is provided, an error will be + * thrown. + */ +native entity_set_string(iIndex, iKey, const szNewVal[]); + +/** + * Returns a bytearray type value from an entities entvar struct. + * + * @note For a list of valid bytearray type entries, see the EV_BYTE_* constants + * in engine_const.inc + * + * @param iIndex Entity index + * @param iKey Entry to retrieve from + * + * @return Value of specified entry, 0 if an invalid entry was + * specified + * @error If an invalid entity index is provided, an error will be + * thrown. + */ +native entity_get_byte(iIndex, iKey); + +/** + * Sets a bytearray type value in an entities entvar struct. + * + * @note For a list of valid bytearray type entries, see the EV_BYTE_* constants + * in engine_const.inc + * @note The value is automatically clamped to [0,255]. + * + * @param iIndex Entity index + * @param iKey Entry to write to + * @param iVal Value to set + * + * @return 1 if value was sucessfully set, 0 if an invalid entry was + * specified + * @error If an invalid entity index is provided, an error will be + * thrown. + */ +native entity_set_byte(iIndex, iKey, iVal); + +/** + * Creates an entity. + * + * @note When creating an entity the classname has to be valid in the mod, as + * the engine needs to link the entity to an existing class internally. + * The classname string that is stored in the entvar struct + * (EV_SZ_classname) is separate from this association and can later be + * freely changed to serve other purposes. + * + * @param szClassname Entity classname + * + * @return Entity index > 0 on success, 0 otherwise + */ +native create_entity(const szClassname[]); + +/** + * Removes an entity from the world. + * + * @param iIndex Entity index + * + * @return 1 if entity was sucessfully removed, 0 if an invalid entity + * was provided + * @error If an entity index in the range of 0 to MaxClients is + * provided, an error will be thrown. + */ +native remove_entity(iIndex); + +/** + * Returns the current number of entities in the world. + * + * @return Number of entities + */ +native entity_count(); + +/** + * Returns if an entity index is valid (as required by other engine natives). + * + * @note Engine considers an entity index valid if it is in the range between 1 + * and the maximum number of entities possible. The index also has to + * point to an existing entity or, if it is a client index, the client has + * to be connected. + * + * @param iIndex Entity index + * + * @return 1 if entity is valid, 0 otherwise + */ +native is_valid_ent(iIndex); + +/** + * Searches entities in the world, starting at a specified index and matching by + * classname. + * + * @param iIndex Entity index to start from + * @param szClass Classname to match + * + * @return Entity index if an entity was found, 0 otherwise + */ +native find_ent_by_class(iIndex, const szClass[]); + +/** + * Searches entities in the world, starting at a specified index, matching by + * owner and a configurable entity field. + * + * @param iIndex Entity index to start from + * @param szClass String to match + * @param iOwner Owner entity index to match + * @param iJghgType Entity field to match string against: + * 0 - Classname + * 1 - Target + * 2 - Targetname + * + * @return Entity index if an entity was found, 0 otherwise + */ +native find_ent_by_owner(iIndex, const szClass[], iOwner, iJghgType = 0); + +/** + * Searches entities in the world, starting at a specified index and matching by + * target. + * + * @param iIndex Entity index to start from + * @param szClass Target to match + * + * @return Entity index if an entity was found, 0 otherwise + */ +native find_ent_by_target(iIndex, const szClass[]); + +/** + * Searches entities in the world, starting at a specified index and matching by + * targetname. + * + * @param iIndex Entity index to start from + * @param szClass Targetname to match + * + * @return Entity index if an entity was found, 0 otherwise + */ +native find_ent_by_tname(iIndex, const szClass[]); + +/** + * Searches entities in the world, starting at a specified index and matching by + * classname and model. + * + * @param iIndex Entity index to start from + * @param szClass Classname to match + * @param szModel Model to match + * + * @return Entity index if an entity was found, 0 otherwise + */ +native find_ent_by_model(iIndex, const szClass[], const szModel[]); + +/** + * Searches for entities inside a sphere, starting at a specified index. + * + * @param start_from_ent Entity index to start from + * @param origin Center of sphere + * @param radius Sphere radius + * + * @return Entity index if an entity was found, 0 otherwise + */ +native find_ent_in_sphere(start_from_ent, const Float:origin[3], Float:radius); + +/** + * Searches for entities inside a sphere around a specified entity or origin, + * matching by classname. + * + * @note This native always starts searching from entity index 0, there is no + * way to specify the starting point. If the entlist array is not big + * enough to accomodate all entities, the results will be truncated. + * + * @param aroundent Entity index to center sphere around, < 1 to use + * origin + * @param _lookforclassname Classname to match + * @param radius Sphere radius + * @param entlist Array to store entities in + * @param maxents Maximum size of array + * @param origin Center of sphere, used if aroundent < 1 + * + * @return Number of entities stored in entlist + * @error If an invalid entity index is provided or, if + * the index is a client index, the client is not + * connected, an error will be thrown. + */ +native find_sphere_class(aroundent, const _lookforclassname[], Float:radius, entlist[], maxents, const Float:origin[3] = {0.0, 0.0, 0.0}); + +/** + * Sets the origin of an entity. + * + * @note This native uses engine functions to set the origin, keeping it + * properly updated with the game. Directly writing to EV_VEC_origin is an + * error and will cause problems. + * + * @param iIndex Entity index + * @param fNewOrigin New origin + * + * @noreturn + * @error If an invalid entity index is provided, an error will be + * thrown. + */ +native entity_set_origin(iIndex, const Float:fNewOrigin[3]); + +/** + * Sets the model of an entity. + * + * @note This native uses an engine function to set the model, keeping it + * properly updated with the game. Simply writing to EV_SZ_model is an + * error and will cause problems. + * + * @param iIndex Entity index + * @param szModel Model to set + * + * @noreturn + * @error If an invalid entity index is provided, an error will be + * thrown. + */ +native entity_set_model(iIndex, const szModel[]); + +/** + * Sets rendering options of an entity. + * + * @note For a list of valid rendering effects see the kRenderFx* constants in + * amxconst.inc + * @note For a list of valid rendering modes see the kRender* constants in + * amxconst.inc + * @note Rendering amount has different meanings depending on the rendering + * effect and mode used on the entity. + * + * @param index Entity index + * @param fx Rendering effect + * @param r Red component of rendering color + * @param g Green component of rendering color + * @param b Blue component of rendering color + * @param render Rendering mode + * @param amount Rendering amount + * + * @noreturn + * @error If an invalid entity index is provided, an error will be + * thrown. + */ +native set_ent_rendering(index, fx = kRenderFxNone, r = 0, g = 0, b = 0, render = kRenderNormal, amount = 0); + +/** + * Calls the DispatchThink() game DLL function on an entity, triggering it to + * think if applicable. + * + * @note DispatchThink() checks the entity for the FL_DORMANT flag - if it is + * set, the entity will not proceed to think. It will first call the + * class-specific think function and eventually CBaseEntity::Think(), thus + * triggering other think hooks and forwards. + * + * @param entity Entity index + * + * @noreturn + * @error If an invalid entity index is provided, an error will be + * thrown. + */ +native call_think(entity); + +/** + * Forces an entity to touch another entity. + * + * @note This calls the game touch function even when the entities do not + * intersect. It doesn't change their origins and/or bounding boxes. + * + * @param entTouched Index of entity being touched + * @param entToucher Index of entity touching + * + * @noreturn + * @error If an invalid entity index is provided or, if the index + * is a client index, the client is not connected, an error + * will be thrown. + */ +native fake_touch(entTouched, entToucher); + +/** + * Calls the spawn function on an entity. + * + * @param iIndex Entity index + * + * @noreturn + * @error If an invalid entity index is provided or, if the index is a + * client index, the client is not connected, an error will be + * thrown. + */ +native DispatchSpawn(iIndex); + +/** + * Fires/sets a keyvalue on an entity. + * + * @param ... (1) To fire a new keyvalue struct, three parameters should be + * provided in the following manner: + * DispatchKeyValue(entity, "KeyName", "Value"); + * The "szClassName" value will automatically use the classname + * of the specified entity, "fHandled" will be set to 0. + * (2) Inside the pfn_keyvalue() forward this native can be used to + * modify the keyvalue struct inline, two parameters should be + * provided in the following manner: + * DispatchKeyValue("KeyName", "Value"); + * The "szClassName" or "fHandled" values can not be changed. + * + * @noreturn + * @error For variant (1), if an invalid entity index is provided, an + * error will be thrown. For variant (2), if it is used outside of + * the pfn_keyvalue() forward, an error will be thrown. + */ +native DispatchKeyValue(...); + +/** + * Retrieves a value from an entities keyvalues. + * + * @param entity Entity index + * @param szKey Key to retrieve value of + * @param value Buffer to copy value to + * @param maxLength Maximum size of buffer + * + * @return Number of cells written to buffer + * @error If an invalid entity index is provided or, if the index + * is a client index, the client is not connected, an error + * will be thrown. + */ +native get_keyvalue(entity, const szKey[], value[], maxLength); + +/** + * Retrieves buffers from the keyvalue structure. + * + * @note Can only be used inside the pfn_keyvalue() forward. + * + * @param szClassName Buffer to copy classname to + * @param sizea Maximum size of classname buffer + * @param szKeyName Buffer to copy keyname to + * @param sizeb Maximum size of keyname buffer + * @param szVlaue Buffer to copy value to + * @param sizec Maximum size of value buffer + * + * @return 1 on success, 0 if used outside the pfn_keyvalue() + * forward + */ +native copy_keyvalue(szClassName[], sizea, szKeyName[], sizeb, szValue[], sizec); + +/** + * Hurts (and kills, if applicable) players in a sphere. + * + * @note Players that have the DAMAGE_NO flag set in EV_INT_flags will be + * ignored. + * @note The sphere has four different damage zones. Below is pseudo-code of the + * algorithm, indicating how damage will be dealt to players: + * if (distance <= 5 * radius) damage(10 + random(1 * dmg_multi)) + * if (distance <= 4 * radius) damage(25 + random(2 * dmg_multi)) + * if (distance <= 3 * radius) damage(50 + random(3 * dmg_multi)) + * if (distance <= 2 * radius) kill() + * + * @param fExplodeAt Center origin of sphere + * @param iDamageMultiplier Damage multiplier + * @param iRadiusMultiplier Sphere radius + * + * @noreturn + */ +native radius_damage(const Float:fExplodeAt[3], iDamageMultiplier, iRadiusMultiplier); + +/** + * Returns the contents value of an origin. + * + * @note For a list of valid contents values see the CONTENTS_* constants in + * hlsdk_const.inc + * + * @param fCheckAt Origin to retrieve contents of + * + * @return Contents value + */ +native point_contents(const Float:fCheckAt[3]); + +/** + * Returns if an origin is in an entities view cone. Derived from SDK. + * + * @note This uses the entities EV_FL_fov value in the calculations and applies + * it on all axes. It might be unreliable depending on the use-case. + * + * @param entity Entity index + * @param origin Origin + * @param use3d If zero the calculation will ignore the z axis (height), if + * nonzero it is done in 3D + * + * @return 1 if origin is in view code, 0 otherwise + */ +native is_in_viewcone(entity, const Float:origin[3], use3d = 0); + +/** + * Returns if an entity is visible to another entity. Derived from SDK. + * + * @note If the target entity has the FL_NOTARGET flag set, this native always + * returns 0. + * @note This native fires a traceline between the view-offset origins of the + * entities. If the traceline is unobstructed it returns true. This is not + * a full 3D visibility check. + * + * @param entity Entity index + * @param target Target entity index + * + * @return 1 if entity is visible, 0 otherwise + * @error If an invalid entity index is provided or, if the index is a + * client index, the client is not connected, an error will be + * thrown. + */ +native is_visible(entity, target); + +/** + * Fires a trace line between two origins, retrieving the end point and entity + * hit. + * + * @note This native writes to the global engine module trace handle. Additional + * trace results can be retrieved using traceresult(). + * @note This native returns 0 if the trace did not hit anything. As 0 is an + * entity index that is considered to be a valid value for a trace hit + * ("worldspawn"), this native can potentially return a misleading value. + * Check other components of the trace result to verify the entity index. + * + * @param iIgnoreEnt Entity index that trace will ignore, -1 if trace should + * not ignore any entities + * @param fStart Trace starting point + * @param fEnd Trace target point + * @param vReturn Vector to copy trace end point to + * + * @return Entity index if trace hit an entity, 0 otherwise + */ +native trace_line(iIgnoreEnt, const Float:fStart[3], const Float:fEnd[3], Float:vReturn[3]); + +/** + * Fires a trace line between two origins, retrieving the trace normal. + * + * @note This native writes to the global engine module trace handle. Additional + * trace results can be retrieved using traceresult(). + * + * @param iIgnoreEnt Entity index that trace will ignore, -1 if trace should + * not ignore any entities + * @param fStart Trace starting point + * @param fEnd Trace target point + * @param vReturn Vector to copy trace normal to + * + * @return 1 if a normal is available (trace hit something), 0 + * otherwise + */ +native trace_normal(iIgnoreEnt, const Float:fStart[3], const Float:fEnd[3], Float:vReturn[3]); + +/** + * Fires a trace hull on a specified origin or between two origins. + * + * @note This native writes to the global engine module trace handle. Additional + * trace results can be retrieved using traceresult(). + * @note For a list of valid hull types see the HULL_* constants in + * hlsdk_const.inc + * @note For a list of valid ignore types see the *IGNORE_* constants in + * hlsdk_const.inc + * + * @param origin Trace start point (and end point if not specified) + * @param hull Hull type + * @param ignoredent Entity index that trace will ignore + * @param ignoremonsters Entity ignore type + * @param end Trace end point, pass NULL_VECTOR to use start point + * + * @return Custom bitflag sum of relevant trace results + * StartSolid (1), AllSolid (2) and InOpen (4) + */ +native trace_hull(const Float:origin[3], hull, ignoredent = 0, ignoremonsters = 0, const Float:end[3] = NULL_VECTOR); + +/** + * Attempts to describe an obstacle by firing trace lines in a specified + * direction, offset on the z-axis around an origin. + * + * @note The functionality of this native can mostly be replaced by a single + * hull trace. This native does not write to the global engine module + * trace handle. + * @note This native is intended to examine an obstacle in front of a standing + * player. Start should usually be the origin of a client while angle + * should be its forward angle vector. 73 traces are fired, each offset by + * one unit on the z-axis from the last, starting at -36 and moving up to + * +36. This is because a standing player model is 72 units high, so 73 + * units of clearance are required to fit them. The values stored in the + * various parameters then attempt to describe the obstacle. + * @note To fully understand the nuances of the algorithm it is necessary to + * view its source code located in engine.cpp of the engine module. + * + * @param start Starting origin + * @param angle Trace line direction + * @param give Units that a trace line can be longer than the + * shortest trace line to still be considered hitting + * the same obstacle + * @param ignoreEnt Entity index that traces will ignore, -1 if traces + * should not ignore any entities + * @param hitX Variable to store X axis value of shortest trace + * line endpoint in + * @param hitY Variable to store Y axis value of shortest trace + * line endpoint in + * @param shortestDistance Variable to store length of shortest trace line in + * @param shortestDistLow Variable to store Z axis offset of shortest trace + * line in + * @param shortestDistHigh Variable to store Z axis offset of highest trace + * line that satisfies "give" condition in + * + * @noreturn + */ +native trace_forward(const Float:start[3], const Float:angle[3], Float:give, ignoreEnt, &Float:hitX, &Float:hitY, &Float:shortestDistance, &Float:shortestDistLow, &Float:shortestDistHigh); + +/** + * Finds a grenade entity, matching by owner. + * + * @param id Owner entity index to match + * @param model Buffer to copy grenade model to + * @param len Maximum length of buffer + * @param grenadeid Entity index to start searching from + * + * @return Grenade entity index > 0 if found, 0 otherwise + * @error If an invalid entity index is provided, an error will be + * thrown. + */ +native get_grenade_id(id, model[], len, grenadeid = 0); + +/** + * Returns the game time based on the game tick. + * + * @note This time is counted up from map start. If the engine is not processing + * this function will return the same value between calls, which makes it + * unusable for profiling purposes. + * + * @return Game time, in seconds + */ +native Float:halflife_time(); + +/** + * Sets the map lighting level. + * + * @note After setting the map lighting level, the engine module enforces it by + * continuously re-applying it until it is reset. + * + * @param Lighting Map lighting level (described by a character a-z), #OFF to + * reset + * + * @noreturn + */ +native set_lights(const Lighting[]); + +/** + * Attaches a clients viewport to an entity. + * + * @note To reset the clients viewport, call this function with the client index + * as the target entity. + * + * @param iIndex Client index + * @param iTargetIndex Index of entity to attach to + * + * + * @error If the client index is not within the range of 1 to + * MaxClients, or the client is not connected, an error + * will be thrown. + */ +native attach_view(iIndex, iTargetIndex); + +/** + * Sets the engine module view mode on a client. + * + * @note For a list of valid view modes see the CAMERA_* constants in + * engine_const.inc + * @note The engine module uses a custom entity to achieve the camera effects + * and requires "models/rpgrocket.mdl" to be precached by the plugin. + * + * @param iIndex Client index + * @param ViewType View mode + */ +native set_view(iIndex, ViewType); + +/** + * Plays back an event on the client. Most prominently used for gun firing + * animations. + * + * @note Event indexes can be acquired using precache_event() with the sc dummy + * files in the events folder. + * + * @param flags Event flags + * @param invoker Index of entity to invoke event on + * @param eventindex Index of event in the precache table + * @param delay Time until the event is played + * @param origin Origin to play event from + * @param angles Angles to play event with + * @param fparam1 Float parameter 1 to pass along into/with the event + * @param fparam2 Float parameter 2 to pass along into/with the event + * @param iparam1 Integer parameter 1 to pass along into/with the event + * @param iparam2 Integer parameter 2 to pass along into/with the event + * @param bparam1 Boolean parameter 1 to pass along into/with the event + * @param bparam2 Boolean parameter 2 to pass along into/with the event + * + * @noreturn + */ +native playback_event(flags, invoker, eventindex, Float:delay, const Float:origin[3], const Float:angles[3], Float:fparam1, Float:fparam2, iparam1, iparam2, bparam1, bparam2); + +/** + * Retrieves a value from a usercmd struct. + * + * @note This native can only be used inside the client_cmdStart() forward. If + * it is used outside this forward it will not retrieve any results and + * always return 0. + * @note For a list of valid usercmd entries see the usercmd_* constants in + * engine_const.inc + * + * @param type Entry to retrieve from + * @param ... Depending on the entry type a different number of + * additional parameters should be provided: + * int - Returns the entry integer value directly, no + * additional parameters required + * float - Stores the entry float value into the + * variable provided as the second parameter + * vector - Copies the entry vector to the Float:array[3] + * provided in the second parameter + * + * @return Changes depending on the entry type: + * int - Returns the entry integer value + * float - Returns 1 + * vector - Returns 1 + */ +native get_usercmd(type, any:...); + +/** + * Sets a value in a usercmd struct. + * + * @note This native can only be used inside the client_cmdStart() forward. + * @note For a list of valid usercmd entries see the usercmd_* constants in + * engine_const.inc + * @note Changes will be immediately reflected in get_usercmd() for all plugins. + * + * @param type Entry to write to + * @param ... Depending on the entry type a different additional parameter + * should be provided: + * int - Second parameter should be an integer variable + * float - Second parameter should be a float variable + * vector - Second parameter should be a Float:array[3] + * + * @noreturn + */ +native set_usercmd(type, any:...); + +/** + * Retrieves a string from the engine string table. + * + * @param _string String table index + * @param _returnString Buffer to copy string to + * @param _len Maximum size of buffer + * + * @return Number of cells written to buffer + */ +native eng_get_string(_string, _returnString[], _len); + +/** + * @section Forwards + */ + +/** + * Called when two entities touch. + * + * @param ptr Index of entity being touched + * @param ptd Index of entity touching + * + * @return PLUGIN_CONTINUE to ignore, PLUGIN_HANDLED or higher to block + */ +forward pfn_touch(ptr, ptd); + +/** + * Called at the start of every server frame. + * + * @note Using his forward can easily become performance-critical. More specific + * hooks and forwards should be used whenever possible. + * + * @noreturn + */ +forward server_frame(); + +/** + * Called when a client types kill in console. + * + * @param id Client index + * + * @return PLUGIN_CONTINUE to ignore, PLUGIN_HANDLED or higher to block + */ +forward client_kill(id); + +/** + * Called at the start of each client think. + * + * @note Using his forward can easily become performance-critical. More specific + * hooks and forwards should be used whenever possible. + * + * @param id Client index + * + * @noreturn + */ +forward client_PreThink(id); + +/** + * Called after each client think. + * + * @note Using his forward can easily become performance-critical. More specific + * hooks and forwards should be used whenever possible. + * + * @param id Client index + * + * @noreturn + */ +forward client_PostThink(id); + +/** + * Called when a client triggers an impulse. + * + * @param id Client index + * @param impulse Impulse triggered by client + * + * @param PLUGIN_CONTINUE to ignore, PLUGIN_HANDLED or higher to + * nullify impulse (CmdStart() is not blocked) + */ +forward client_impulse(id, impulse); + +/** + * Called for CmdStart() on a client. + * + * @note Use [get|set]_usercmd() to read and modify information in the usercmd + * struct. + * + * @param id Client index + * + * @return PLUGIN_CONTINUE to ignore, PLUGIN_HANDLED or higher to block + */ +forward client_cmdStart(id); + +/** + * Called when an entity thinks. + * + * @param entid Entity index + * + * @return PLUGIN_CONTINUE to ignore, PLUGIN_HANDLED or higher to block + */ +forward pfn_think(entid); + +/** + * Called when an event is played. + * + * @param flags Event flags + * @param entid Index of entity to invoke event on + * @param eventid Index of event in the precache table + * @param delay Time until the event is played + * @param Origin Origin to play event from + * @param Angles Angles to play event with + * @param fparam1 Float parameter 1 to pass along into/with the event + * @param fparam2 Float parameter 2 to pass along into/with the event + * @param iparam1 Integer parameter 1 to pass along into/with the event + * @param iparam2 Integer parameter 2 to pass along into/with the event + * @param bparam1 Boolean parameter 1 to pass along into/with the event + * @param bparam2 Boolean parameter 2 to pass along into/with the event + * + * @return PLUGIN_CONTINUE to ignore, PLUGIN_HANDLED or higher to block + */ +forward pfn_playbackevent(flags, entid, eventid, Float:delay, Float:Origin[3], Float:Angles[3], Float:fparam1, Float:fparam2, iparam1, iparam2, bparam1, bparam2); + +/** + * Called when a keyvalue pair is sent to an entity. + * + * @note Use copy_keyvalue() to retrieve the keyvalue information, and + * DispatchKeyVaue() to modify it. + * + * @param entid Entity index + * + * @return PLUGIN_CONTINUE to ignore, PLUGIN_HANDLED or higher to block + */ +forward pfn_keyvalue(entid); + +/** + * Called when an entity is spawned. + * + * @param entid Entity index + * + * @return PLUGIN_CONTINUE to ignore, PLUGIN_HANDLED or higher to block + */ +forward pfn_spawn(entid); + +/** + * @endsection + */ + +#include diff --git a/bin/amxxdump/includes/amxmodx/engine.inc.temp b/bin/amxxdump/includes/amxmodx/engine.inc.temp new file mode 100644 index 0000000..5f187db --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/engine.inc.temp @@ -0,0 +1,93 @@ +#if defined _engine_included +#endinput +#endif +#define _engine_included +#include +#pragma reqlib engine +#if !defined AMXMODX_NOAUTOLOAD +#pragma loadlib engine +#endif +native traceresult(type, any:...); +native register_impulse(impulse, const function[]); +native register_touch(const Touched[], const Toucher[], const function[]); +native register_think(const Classname[], const function[]); +native unregister_impulse(registerid); +native unregister_touch(registerid); +native unregister_think(registerid); +native set_speak(iIndex, iSpeakFlags); +native get_speak(iIndex); +native drop_to_floor(entity); +native get_info_keybuffer(id, buffer[], length); +native force_use(entUsed, entUser); +native Float:get_global_float(variable); +native get_global_int(variable); +native get_global_string(variable, string[], maxlen); +native get_global_vector(variable, Float:vector[3]); +native get_global_edict(variable); +native get_global_edict2(variable); +native entity_set_size(index, const Float:mins[3], const Float:maxs[3]); +native get_decal_index(const szDecalName[]); +native Float:entity_range(ida, idb); +native bool:entity_intersects(entity, other); +native entity_get_int(iIndex, iKey); +native entity_set_int(iIndex, iKey, iVal); +native Float:entity_get_float(iIndex, iKey); +native entity_set_float(iIndex, iKey, Float:iVal); +native entity_get_vector(iIndex, iKey, Float:vRetVector[3]); +native entity_set_vector(iIndex, iKey, const Float:vNewVector[3]); +native entity_get_edict(iIndex, iKey); +native entity_get_edict2(iIndex, iKey); +native entity_set_edict(iIndex, iKey, iNewIndex); +native entity_get_string(iIndex, iKey, szReturn[], iRetLen); +native entity_set_string(iIndex, iKey, const szNewVal[]); +native entity_get_byte(iIndex, iKey); +native entity_set_byte(iIndex, iKey, iVal); +native create_entity(const szClassname[]); +native remove_entity(iIndex); +native entity_count(); +native is_valid_ent(iIndex); +native find_ent_by_class(iIndex, const szClass[]); +native find_ent_by_owner(iIndex, const szClass[], iOwner, iJghgType = 0); +native find_ent_by_target(iIndex, const szClass[]); +native find_ent_by_tname(iIndex, const szClass[]); +native find_ent_by_model(iIndex, const szClass[], const szModel[]); +native find_ent_in_sphere(start_from_ent, const Float:origin[3], Float:radius); +native find_sphere_class(aroundent, const _lookforclassname[], Float:radius, entlist[], maxents, const Float:origin[3] = {0.0, 0.0, 0.0}); +native entity_set_origin(iIndex, const Float:fNewOrigin[3]); +native entity_set_model(iIndex, const szModel[]); +native set_ent_rendering(index, fx = kRenderFxNone, r = 0, g = 0, b = 0, render = kRenderNormal, amount = 0); +native call_think(entity); +native fake_touch(entTouched, entToucher); +native DispatchSpawn(iIndex); +native DispatchKeyValue(...); +native get_keyvalue(entity, const szKey[], value[], maxLength); +native copy_keyvalue(szClassName[], sizea, szKeyName[], sizeb, szValue[], sizec); +native radius_damage(const Float:fExplodeAt[3], iDamageMultiplier, iRadiusMultiplier); +native point_contents(const Float:fCheckAt[3]); +native is_in_viewcone(entity, const Float:origin[3], use3d = 0); +native is_visible(entity, target); +native trace_line(iIgnoreEnt, const Float:fStart[3], const Float:fEnd[3], Float:vReturn[3]); +native trace_normal(iIgnoreEnt, const Float:fStart[3], const Float:fEnd[3], Float:vReturn[3]); +native trace_hull(const Float:origin[3], hull, ignoredent = 0, ignoremonsters = 0, const Float:end[3] = NULL_VECTOR); +native trace_forward(const Float:start[3], const Float:angle[3], Float:give, ignoreEnt, &Float:hitX, &Float:hitY, &Float:shortestDistance, &Float:shortestDistLow, &Float:shortestDistHigh); +native get_grenade_id(id, model[], len, grenadeid = 0); +native Float:halflife_time(); +native set_lights(const Lighting[]); +native attach_view(iIndex, iTargetIndex); +native set_view(iIndex, ViewType); +native playback_event(flags, invoker, eventindex, Float:delay, const Float:origin[3], const Float:angles[3], Float:fparam1, Float:fparam2, iparam1, iparam2, bparam1, bparam2); +native get_usercmd(type, any:...); +native set_usercmd(type, any:...); +native eng_get_string(_string, _returnString[], _len); +forward pfn_touch(ptr, ptd); +forward server_frame(); +forward client_kill(id); +forward client_PreThink(id); +forward client_PostThink(id); +forward client_impulse(id, impulse); +forward client_cmdStart(id); +forward pfn_think(entid); +forward pfn_playbackevent(flags, entid, eventid, Float:delay, Float:Origin[3], Float:Angles[3], Float:fparam1, Float:fparam2, iparam1, iparam2, bparam1, bparam2); +forward pfn_keyvalue(entid); +forward pfn_spawn(entid); +#include diff --git a/bin/amxxdump/includes/amxmodx/engine_const.inc b/bin/amxxdump/includes/amxmodx/engine_const.inc new file mode 100644 index 0000000..389a776 --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/engine_const.inc @@ -0,0 +1,310 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Engine Constants +// + +#if defined _engine_const_included + #endinput +#endif +#define _engine_const_included + +#include + +/** + * Flags for the [set|get]_speak() natives. + * + * @note These do not correspond to any HLSDK constants and are only relevant to + * the custom functionality provided by the engine module. + */ +#define SPEAK_NORMAL 0 // Normal behavior, client follows alltalk rules +#define SPEAK_MUTED 1 // Client can not talk +#define SPEAK_ALL 2 // Client can talk to every other client +#define SPEAK_LISTENALL 4 // Client can listen to every other client + +/** + * View types for the set_view() native. + * + * @note These do not correspond to any HLSDK constants and are only relevant to + * the custom functionality provided by the engine module. + */ +#define CAMERA_NONE 0 +#define CAMERA_3RDPERSON 1 +#define CAMERA_UPLEFT 2 +#define CAMERA_TOPDOWN 3 + +/** + * @section Entvar constants used with entity_[get|set]_* functions. + */ + +/** + * Integers, use with entity_[get|set]_int() + */ +enum { + EV_INT_gamestate = 0, + EV_INT_oldbuttons, + EV_INT_groupinfo, + EV_INT_iuser1, + EV_INT_iuser2, + EV_INT_iuser3, + EV_INT_iuser4, + EV_INT_weaponanim, + EV_INT_pushmsec, + EV_INT_bInDuck, + EV_INT_flTimeStepSound, + EV_INT_flSwimTime, + EV_INT_flDuckTime, + EV_INT_iStepLeft, + EV_INT_movetype, + EV_INT_solid, + EV_INT_skin, + EV_INT_body, + EV_INT_effects, + EV_INT_light_level, + EV_INT_sequence, + EV_INT_gaitsequence, + EV_INT_modelindex, + EV_INT_playerclass, + EV_INT_waterlevel, + EV_INT_watertype, + EV_INT_spawnflags, + EV_INT_flags, + EV_INT_colormap, + EV_INT_team, + EV_INT_fixangle, + EV_INT_weapons, + EV_INT_rendermode, + EV_INT_renderfx, + EV_INT_button, + EV_INT_impulse, + EV_INT_deadflag, +}; + +/** + * Floats, use with entity_[get|set]_float() + */ +enum { + EV_FL_impacttime = 0, + EV_FL_starttime, + EV_FL_idealpitch, + EV_FL_pitch_speed, + EV_FL_ideal_yaw, + EV_FL_yaw_speed, + EV_FL_ltime, + EV_FL_nextthink, + EV_FL_gravity, + EV_FL_friction, + EV_FL_frame, + EV_FL_animtime, + EV_FL_framerate, + EV_FL_health, + EV_FL_frags, + EV_FL_takedamage, + EV_FL_max_health, + EV_FL_teleport_time, + EV_FL_armortype, + EV_FL_armorvalue, + EV_FL_dmg_take, + EV_FL_dmg_save, + EV_FL_dmg, + EV_FL_dmgtime, + EV_FL_speed, + EV_FL_air_finished, + EV_FL_pain_finished, + EV_FL_radsuit_finished, + EV_FL_scale, + EV_FL_renderamt, + EV_FL_maxspeed, + EV_FL_fov, + EV_FL_flFallVelocity, + EV_FL_fuser1, + EV_FL_fuser2, + EV_FL_fuser3, + EV_FL_fuser4, +}; + +/** + * Vectors, use with entity_[get|set]_vector() + */ +enum { + EV_VEC_origin = 0, + EV_VEC_oldorigin, + EV_VEC_velocity, + EV_VEC_basevelocity, + EV_VEC_clbasevelocity, + EV_VEC_movedir, + EV_VEC_angles, + EV_VEC_avelocity, + EV_VEC_punchangle, + EV_VEC_v_angle, + EV_VEC_endpos, + EV_VEC_startpos, + EV_VEC_absmin, + EV_VEC_absmax, + EV_VEC_mins, + EV_VEC_maxs, + EV_VEC_size, + EV_VEC_rendercolor, + EV_VEC_view_ofs, + EV_VEC_vuser1, + EV_VEC_vuser2, + EV_VEC_vuser3, + EV_VEC_vuser4, +}; + +/** + * Edicts, use with entity_[get|set]_edict() + */ +enum { + EV_ENT_chain = 0, + EV_ENT_dmg_inflictor, + EV_ENT_enemy, + EV_ENT_aiment, + EV_ENT_owner, + EV_ENT_groundentity, + EV_ENT_pContainingEntity, + EV_ENT_euser1, + EV_ENT_euser2, + EV_ENT_euser3, + EV_ENT_euser4, +}; + +/** + * Strings, use with entity_[get|set]_string() + */ +enum { + EV_SZ_classname = 0, + EV_SZ_globalname, + EV_SZ_model, + EV_SZ_target, + EV_SZ_targetname, + EV_SZ_netname, + EV_SZ_message, + EV_SZ_noise, + EV_SZ_noise1, + EV_SZ_noise2, + EV_SZ_noise3, + EV_SZ_viewmodel, + EV_SZ_weaponmodel, +}; + +/** + * Bytearrays, use with entity_[get|set]_byte() + */ +enum { + EV_BYTE_controller1 = 0, + EV_BYTE_controller2, + EV_BYTE_controller3, + EV_BYTE_controller4, + EV_BYTE_blending1, + EV_BYTE_blending2, +}; + +/** + * @endsection + */ + +#if defined _jghg_enums + #endinput +#endif +#define _jghg_enums + +/** + * Used by get_global_[edict/float/int/string/vector]() + */ +enum { + + // Edict + GL_trace_ent = 0, + + // Float + GL_coop, + GL_deathmatch, + GL_force_retouch, + GL_found_secrets, + GL_frametime, + GL_serverflags, + GL_teamplay, + GL_time, + GL_trace_allsolid, + GL_trace_fraction, + GL_trace_inopen, + GL_trace_inwater, + GL_trace_plane_dist, + GL_trace_startsolid, + + // Int + GL_cdAudioTrack, + GL_maxClients, + GL_maxEntities, + GL_msg_entity, + GL_trace_flags, + GL_trace_hitgroup, + + // String + GL_pStringBase, + GL_mapname, + GL_startspot, + + // Vector + GL_trace_endpos, + GL_trace_plane_normal, + GL_v_forward, + GL_v_right, + GL_v_up, + GL_vecLandmarkOffset, + + // Void (not supported) + GL_pSaveData +}; + + +/** + * Used by [get/set]_usercmd() + */ +enum +{ + usercmd_float_start, + usercmd_forwardmove, // Float + usercmd_sidemove, // Float + usercmd_upmove, // Float + usercmd_float_end, + usercmd_int_start, + usercmd_lerp_msec, // short + usercmd_msec, // byte + usercmd_lightlevel, // byte + usercmd_buttons, // unsigned short + usercmd_impulse, // byte + usercmd_weaponselect, // byte + usercmd_impact_index, // int + usercmd_int_end, + usercmd_vec_start, + usercmd_viewangles, // Vector + usercmd_impact_position, // vec + usercmd_vec_end +}; + +/** + * Used by the traceresult() + */ +enum +{ + TR_AllSolid, // (int) if true, plane is not valid + TR_StartSolid, // (int) if true, the initial point was in a solid area + TR_InOpen, // (int) + TR_InWater, // (int) + TR_Fraction, // (float) time completed, 1.0 = didn't hit anything + TR_EndPos, // (vector) final position + TR_PlaneDist, // (float) + TR_PlaneNormal, // (vector) surface normal at impact + TR_Hit, // (entity) entity the surface is on + TR_Hitgroup // (int) 0 == generic, non zero is specific body part +}; + diff --git a/bin/amxxdump/includes/amxmodx/engine_stocks.inc b/bin/amxxdump/includes/amxmodx/engine_stocks.inc new file mode 100644 index 0000000..baa386f --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/engine_stocks.inc @@ -0,0 +1,248 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// Special thanks to AssKicR, Freecode, and T(+)rget. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Engine Stocks +// + +#if defined _engine_stocks_included + #endinput +#endif +#define _engine_stocks_included + +#if !defined _amxmodx_included + #include +#endif + +#if !defined _engine_included + #include +#endif + +stock fakedamage(idvictim,const szClassname[],Float:takedmgdamage,damagetype) +{ + new entity = create_entity("trigger_hurt"); + if (entity) + { + DispatchKeyValue(entity,"classname","trigger_hurt"); + new szDamage[16]; + // Takedamages only do half damage per attack (damage is damage per second, and it's triggered in 0.5 second intervals). + // Compensate for that. + format(szDamage,15,"%f",takedmgdamage * 2); + DispatchKeyValue(entity,"dmg",szDamage); + format(szDamage,15,"%i",damagetype); + DispatchKeyValue(entity,"damagetype",szDamage); + DispatchKeyValue(entity,"origin","8192 8192 8192"); + DispatchSpawn(entity); + entity_set_string(entity, EV_SZ_classname, szClassname); + fake_touch(entity,idvictim); + remove_entity(entity); + return 1; + } + return 0; +} + +//wrapper for find_ent_by_class +stock find_ent(iStart, const szClassname[]) +{ + return find_ent_by_class(iStart, szClassname); +} + +/* Get the Button(s) user is pressing */ +stock get_user_button(id) +{ + return entity_get_int(id, EV_INT_button); +} + +stock get_user_oldbutton(id) +{ + return entity_get_int(id, EV_INT_oldbuttons); +} + +/* Get flags an entity is flagged with */ +stock get_entity_flags(ent) +{ + return entity_get_int(ent, EV_INT_flags); +} + +/* Get the distance between two entities */ +stock get_entity_distance(ent1, ent2) +{ + return floatround(entity_range(ent1, ent2)); +} + +/* Get grenade thrown by this user */ +stock get_grenade(id) +{ + new iGrenade = find_ent_by_class(-1, "grenade"); + while(iGrenade > 0) + { + if(entity_get_edict(iGrenade, EV_ENT_owner) == id) + return iGrenade; + + iGrenade = find_ent_by_class(iGrenade, "grenade"); + } + + return 0; +} + +/* Get origin of a brush entity */ +stock get_brush_entity_origin(ent, Float:orig[3]) +{ + new Float:Min[3], Float:Max[3]; + + entity_get_vector(ent, EV_VEC_origin, orig); + entity_get_vector(ent, EV_VEC_mins, Min); + entity_get_vector(ent, EV_VEC_maxs, Max); + + orig[0] += (Min[0] + Max[0]) * 0.5; + orig[1] += (Min[1] + Max[1]) * 0.5; + orig[2] += (Min[2] + Max[2]) * 0.5; + + return 1; +} + +/* Remove entity by name */ +stock remove_entity_name(const eName[]) +{ + new iEntity = find_ent_by_class(-1, eName); + while (iEntity > 0) + { + remove_entity(iEntity); + iEntity = find_ent_by_class(-1, eName); + } + + return 1; +} + +/* Get the contents of the point a user is aiming at */ +stock ViewContents(id) +{ + new origin[3], Float:Orig[3]; + get_user_origin(id, origin, Origin_AimEndEyes); + Orig[0] = float(origin[0]); + Orig[1] = float(origin[1]); + Orig[2] = float(origin[2]); + + return point_contents(Orig); +} + +stock get_speed(ent) +{ + new Float:Vel[3]; + entity_get_vector(ent, EV_VEC_velocity, Vel); + + return floatround(vector_length(Vel)); +} + +/* Set rendering of an entity */ +stock set_rendering(index, fx=kRenderFxNone, r=255, g=255, b=255, render=kRenderNormal, amount=16) +{ + entity_set_int(index,EV_INT_renderfx,fx); + new Float:RenderColor[3]; + RenderColor[0] = float(r); + RenderColor[1] = float(g); + RenderColor[2] = float(b); + entity_set_vector(index,EV_VEC_rendercolor,RenderColor); + entity_set_int(index,EV_INT_rendermode,render); + entity_set_float(index,EV_FL_renderamt,float(amount)); + + return 1; +} + +/* Set flags on an entity */ +stock set_entity_flags(ent,flag,onoff) +{ + new iFlags = entity_get_int(ent, EV_INT_flags); + if(iFlags & flag) + { + if(onoff == 1) return 2; + iFlags &= ~flag; + } + else + { + if(onoff == 0) return 2; + iFlags |= flag; + } + entity_set_int(ent, EV_INT_flags, iFlags); + return 1; +} + +/* If visible = 1, entity will be set to be visible, else invisible. */ +stock set_entity_visibility(entity, visible = 1) +{ + entity_set_int(entity, EV_INT_effects, visible == 1 ? entity_get_int(entity, EV_INT_effects) & ~EF_NODRAW : entity_get_int(entity, EV_INT_effects) | EF_NODRAW); + + return 1; +} + +/* Returns 1 if entity is visible. */ +stock get_entity_visibility(entity) +{ + return !(entity_get_int(entity, EV_INT_effects) & EF_NODRAW); +} + +stock set_user_velocity(entity, const Float:vec[3]) +{ + return entity_set_vector(entity, EV_VEC_velocity, vec); +} + +stock get_user_velocity(entity, Float:vec[3]) +{ + return entity_get_vector(entity, EV_VEC_velocity, vec); +} + +/* Backwards compatible */ +/* Hurts/Kills players in a sphere, like an explosion, Multiplier determines damage. */ +stock RadiusDamage(const Float:fExplodeAt[3], iDamageMultiplier, iRadiusMultiplier) +{ + return radius_damage(fExplodeAt, iDamageMultiplier, iRadiusMultiplier); +} +/* Gives you a velocity in the direction a player is looking, iVelocity is the multiplier. */ +stock VelocityByAim(iIndex,iVelocity, Float:vRetValue[3]) +{ + return velocity_by_aim(iIndex,iVelocity,vRetValue); +} +/* Will return the contents of a point (inside map? in sky? outside map? etc.). */ +stock PointContents(const Float:fCheckAt[3]) +{ + return point_contents(fCheckAt); +} + +stock set_size(index, const Float:mins[3], const Float:maxs[3]) +{ + return entity_set_size(index,mins,maxs); +} + +//by Twilight Suzuka, request addition at29428 +//"Lifted from HLSDK" +stock IsInWorld( ent ) +{ + new Float:origin[3]; + entity_get_vector(ent,EV_VEC_origin,origin); + + if (origin[0] >= 4096.0) return 0; + if (origin[1] >= 4096.0) return 0; + if (origin[2] >= 4096.0) return 0; + if (origin[0] <= -4096.0) return 0; + if (origin[1] <= -4096.0) return 0; + if (origin[2] <= -4096.0) return 0; + + new Float:velocity[3]; + entity_get_vector(ent,EV_VEC_velocity,velocity); + + if (velocity[0] >= 2000) return 0; + if (velocity[1] >= 2000) return 0; + if (velocity[2] >= 2000) return 0; + if (velocity[0] <= -2000) return 0; + if (velocity[1] <= -2000) return 0; + if (velocity[2] <= -2000) return 0; + + return 1; +} diff --git a/bin/amxxdump/includes/amxmodx/esf.inc b/bin/amxxdump/includes/amxmodx/esf.inc new file mode 100644 index 0000000..cd67903 --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/esf.inc @@ -0,0 +1,70 @@ +/*********************************************** + +[ Corona-Bytes.NET ] EvolutionX Core Plugin + + (c) Corona - Bytes .NET coders :: coders@corona-bytes.net + + > 2005 Corona Bytes :: http://www.corona-bytes.net + +***********************************************/ + +#if defined __EVOLUTION_CORE__ + #endinput +#endif +#define __EVOLUTION_CORE__ + +#pragma library EvolutionXCore + +native setClientPL ( Client, PowerLevel ); +native getClientPL ( Client ); +native setClientACPL ( Client, ActualPowerLevel ); +native getClientACPL ( Client ); +native setClientADPL ( Client, AfterDeathPowerLevel ); +native getClientADPL ( Client ); +native setClientSPL ( Client, PowerLevel ); +native setClientPLtoADPL ( Client ); + +native setClientKI ( Client, Ki ); +native getClientKI ( Client ); + +native setClientHP ( Client, Health ); +native getClientHP ( Client ); +native setClientMHP ( Client, MaximumHealth ); +native getClientMHP ( Client ); + +native setClientSPEED ( Client, Speed ); +native getClientSPEED ( Client ); +native setClientSWOOPSPEED ( Client, SwoopSpeed ); +native getClientSWOOPSPEED ( Client ); + +native setClientPROTECT ( Client, bool:Enable = true ); +native getClientPROTECT ( Client ); + +native setClientFROZEN ( Client, bool:Enable = true ); +native getClientFROZEN ( Client ); + +native setClientGOD ( Client, bool:Enable = true ); +native getClientGOD ( Client ); + +native getClientFLY ( Client ); + +native setClientHiddenTURBO ( Client, bool:Enable = true ); +native getClientTURBO ( Client ); + +native getClientBLOCK ( Client ); + +native setClientHiddenPOWERUP ( Client, bool:Enable = true ); +native getClientPOWERUP ( Client ); + +native getClientSWOOPING ( Client ); +native getClientATKSHOOT ( Client ); +native getClientATKCHARGE ( Client ); +native getClientMELEE ( Client ); +native getClientTHROWAWAY ( Client ); +native getClientTHROW ( Client ); +native getClientWALLGND ( Client ); +native getClientINFREEFALL ( Client ); +native getClientBEAMJUMP ( Client ); + +// kills a player without score/death msg +native silentClientKILL ( Client ); \ No newline at end of file diff --git a/bin/amxxdump/includes/amxmodx/esf.inc.temp b/bin/amxxdump/includes/amxmodx/esf.inc.temp new file mode 100644 index 0000000..7a304be --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/esf.inc.temp @@ -0,0 +1,45 @@ +#if defined __EVOLUTION_CORE__ +#endinput +#endif +#define __EVOLUTION_CORE__ +#pragma library EvolutionXCore +native setClientPL ( Client, PowerLevel ); +native getClientPL ( Client ); +native setClientACPL ( Client, ActualPowerLevel ); +native getClientACPL ( Client ); +native setClientADPL ( Client, AfterDeathPowerLevel ); +native getClientADPL ( Client ); +native setClientSPL ( Client, PowerLevel ); +native setClientPLtoADPL ( Client ); +native setClientKI ( Client, Ki ); +native getClientKI ( Client ); +native setClientHP ( Client, Health ); +native getClientHP ( Client ); +native setClientMHP ( Client, MaximumHealth ); +native getClientMHP ( Client ); +native setClientSPEED ( Client, Speed ); +native getClientSPEED ( Client ); +native setClientSWOOPSPEED ( Client, SwoopSpeed ); +native getClientSWOOPSPEED ( Client ); +native setClientPROTECT ( Client, bool:Enable = true ); +native getClientPROTECT ( Client ); +native setClientFROZEN ( Client, bool:Enable = true ); +native getClientFROZEN ( Client ); +native setClientGOD ( Client, bool:Enable = true ); +native getClientGOD ( Client ); +native getClientFLY ( Client ); +native setClientHiddenTURBO ( Client, bool:Enable = true ); +native getClientTURBO ( Client ); +native getClientBLOCK ( Client ); +native setClientHiddenPOWERUP ( Client, bool:Enable = true ); +native getClientPOWERUP ( Client ); +native getClientSWOOPING ( Client ); +native getClientATKSHOOT ( Client ); +native getClientATKCHARGE ( Client ); +native getClientMELEE ( Client ); +native getClientTHROWAWAY ( Client ); +native getClientTHROW ( Client ); +native getClientWALLGND ( Client ); +native getClientINFREEFALL ( Client ); +native getClientBEAMJUMP ( Client ); +native silentClientKILL ( Client ); \ No newline at end of file diff --git a/bin/amxxdump/includes/amxmodx/esf_const.inc b/bin/amxxdump/includes/amxmodx/esf_const.inc new file mode 100644 index 0000000..0b2615b --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/esf_const.inc @@ -0,0 +1,74 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// Based on stocks and information provided by LynX. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +#if defined _esfconst_included + #endinput +#endif +#define _esfconst_included + +enum +{ + Character_Buu = 1, + Character_Goku = 2, + Character_Gohan = 3, //my favorite :) + Character_Krillin = 4, + Character_Frieza = 5, + Character_Piccolo = 6, + Character_Trunks = 7, + Character_Vegeta = 8, + Character_Cell = 9, +}; + +enum +{ + Explosion_Blue = 0, + Explosion_Green, + Explosion_Orange, + Explosion_Purple, + Explosion_Yellow, + Explosion_Red, + Explosion_White, + Explosions_Total, +}; + +enum +{ + Attack_Kamehameha=1, + Attack_SpiritBomb, + Attack_GalletGun, + Attack_FinalFlash, + Attack_Renzoku, + Attack_Kametorpedo, + Attack_GenericBeam, + Attack_Throw, +}; + +enum +{ + Direction_Left=1, + Direction_Right, + Direction_Up, + Direction_Down, + Direction_Forward, + Direction_Backward, +}; + +enum +{ + Recovery_Kicked=1, + Recovery_Tumbled, + Recovery_Lying, + Recovery_Thrown, +}; + +#define ESF_CHARGING 1 +#define ESF_CONTROLLING 2 +#define ESF_SHOOTING 3 +#define ESF_SHOT 4 diff --git a/bin/amxxdump/includes/amxmodx/fakemeta.inc b/bin/amxxdump/includes/amxmodx/fakemeta.inc new file mode 100644 index 0000000..35171a8 --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/fakemeta.inc @@ -0,0 +1,1127 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Fakemeta Functions +// + +#if defined _fakemeta_included + #endinput +#endif +#define _fakemeta_included + +#include + +#pragma reqlib fakemeta +#if !defined AMXMODX_NOAUTOLOAD + #pragma loadlib fakemeta +#endif + +/** + * Returns entvar data from an entity. Use the pev_* enum (in fakemeta_const.inc) to specify which data you want retrieved. + * + * @note This function uses "read_data" style data syntax. It returns integer values, + * by-references float data, and sets a buffer for string data. + * + * @note If retrieving strings, you may optionally get a pointer into the global string table. Depending on + * your situation, there are two ways to do this. + * 1: This simply gets the pointer. + * new ptr = pev(entid, pev_classname) + * 2: The pointer will be stored in ptr AND the actual string is retrieved. + * new ptr, classname[32] + * pev(entid, pev_classname, ptr, classname, 31) + * + * @param _index The entity index to lookup. + * @param _value The pev field to lookup (look in fakemeta_const.inc) + */ +native pev(_index,_value,any:...); + +/** + * Sets entvar data for an entity. Use the pev_* enum from fakemeta_const.inc for reference. + * + * @note Setting string data will automatically allocate a new string (via AllocString) + * If you have a string already allocated with your own call to AllocString, use + * set_pev_string_ptr instead. + * + * @param _index The entity index to set the value on. + * @param _value The pev field to set, (look in fakemeta_const.inc) + */ +native set_pev(_index,_value,any:...); + +/** + * Use this native to set a pev field to a string that is already allocated (via a function such + * as EngFunc_AllocString). + * + * @note If you specify _value as anything other than string fields, an error will be thrown. + * @note Pass 0 as the _string field to set it to an empty string. + * + * @param _index The entity index to set the value on. + * @param _value The pev field to set - MUST be a string field. + * @param _string The string handle, retrieved from places like AllocString. + */ +native set_pev_string(_index, _value, _string); + + +/** + * Checks the validity of an entity. + * + * @param entindex The entity id to check. + * + * @return 0 on invalid entity + * 1 on entity is valid + * 2 on entity is valid and it has private data (safe to use pdata natives on). + */ +native pev_valid(entindex); + +/** + * Returns the serial number for each entity. The serial number is a unique identity + * generated when an entity is created. + * + * @param entindex The entity id. + * + * @return The serial number for the entity. + */ +native pev_serial(entindex); + +/* Returns any global variable inside globalvars_t structure. Use the glb_* enum. + * + * When returning data from glb_pStringBase (the global string table), you may give a pointer into that table + * in order to get different strings. + * Example: + * new model[128] + * new ptr = pev(id, pev_viewmodel) + * global_get(glb_pStringBase, ptr, model, 127) + */ +native global_get(_value, any:...); + +/** + * Returns a integer from an entity's private data. + * + * _linuxdiff value is what to add to the _Offset for linux servers. + * _macdiff value is what to add to the _Offset for os x servers. + * + * A log error is thrown on invalid _index and _Offset. + * + * @param _index Entity index. + * @param _Offset Offset to search. + * @param _linuxdiff Linux difference. + * @param _macdiff Mac OS X difference. + * @return An integer value is returned. + */ +native get_pdata_int(_index, _Offset, _linuxdiff = 5, _macdiff = 5); + +/** + * Sets an integer to an entity's private data. + * + * _linuxdiff value is what to add to the _Offset for linux servers. + * _macdiff value is what to add to the _Offset for os x servers. + * + * A log error is thrown on invalid _index and _Offset. + * + * @param _index Entity index. + * @param _Offset Offset to search. + * @param _Value Value to set. + * @param _linuxdiff Linux difference. + * @param _macdiff Mac OS X difference. + * @return 1 on success. + */ +native set_pdata_int(_index, _Offset, _Value, _linuxdiff = 5, _macdiff = 5); + +/** + * Returns a float from an entity's private data. + * + * _linuxdiff value is what to add to the _Offset for linux servers. + * _macdiff value is what to add to the _Offset for os x servers. + * + * A log error is thrown on invalid _index and _Offset. + * + * @param _index Entity index. + * @param _Offset Offset to search. + * @param _linuxdiff Linux difference. + * @param _macdiff Mac OS X difference. + * @return An float value is returned. + */ +native Float:get_pdata_float(_index, _Offset, _linuxdiff = 5, _macdiff = 5); + +/** + * Sets a float to an entity's private data. + * + * _linuxdiff value is what to add to the _Offset for linux servers. + * _macdiff value is what to add to the _Offset for os x servers. + * + * A log error is thrown on invalid _index and _Offset. + * + * @param _index Entity index. + * @param _Offset Offset to search. + * @param _Value Value to set. + * @param _linuxdiff Linux difference. + * @param _macdiff Mac OS X difference. + * @return 1 on success. + */ +native set_pdata_float(_index, _Offset, Float:_Value, _linuxdiff = 5, _macdiff = 5); + +/** + * Tries to retrieve an edict pointer from an entity's private data. + * + * This function is byte-addressable. Unlike get_pdata_int() which searches in byte increments of 4, + * get_pdata_ent searches in increments of 1. + * + * _linuxdiff value is what to add to the _offset for linux servers. + * _macdiff value is what to add to the _offset for os x servers. + * + * A log error is thrown on invalid _index and _Offset. + * + * @param _index Entity index. + * @param _offset Offset to search. + * @param _linuxdiff Linux difference. + * @param _macdiff Mac OS X difference. + * @return -2 if an invalid entity was found. + * -1 if an empty entity was found. + * Otherwise, an entity index is returned. + */ +native get_pdata_ent(_index, _offset, _linuxdiff = 20, _macdiff = 20); + +/** + * Sets an edict pointer to an entity's private data. + * + * This function is byte-addressable. Unlike set_pdata_int() which searches in byte increments of 4, + * set_pdata_ent searches in increments of 1. + * + * _linuxdiff value is what to add to the _offset for linux servers. + * _macdiff value is what to add to the _offset for os x servers. + * + * A log error is thrown on invalid _index and _offset. + * + * @param _index Entity index. + * @param _offset Offset to search. + * @param _value Value to set. + * @param _linuxdiff Linux difference. + * @param _macdiff Mac OS X difference. + * @return 1 on success. + */ +native set_pdata_ent(_index, _offset, _value, _linuxdiff = 20, _macdiff = 20); + +/** + * Returns a boolean from an entity's private data. + * + * This function is byte-addressable. Unlike get_pdata_int() which searches in byte increments of 4, + * get_pdata_bool searches in increments of 1. + * + * _linuxdiff value is what to add to the _offset for linux servers. + * _macdiff value is what to add to the _offset for os x servers. + * + * A log error is thrown on invalid _index and _offset. + * + * @param _index Entity index. + * @param _offset Offset to search. + * @param _linuxdiff Linux difference. + * @param _macdiff Mac OS X difference. + * @return An boolean value is returned. + */ +native bool:get_pdata_bool(_index, _offset, _linuxdiff = 20, _macdiff = 20); + +/** + * Sets a boolean to an entity's private data. + * + * This function is byte-addressable. Unlike set_pdata_int() which searches in byte increments of 4, + * set_pdata_bool searches in increments of 1. + * + * _linuxdiff value is what to add to the _offset for linux servers. + * _macdiff value is what to add to the _offset for os x servers. + * + * A log error is thrown on invalid _index and _offset. + * + * @param _index Entity index. + * @param _offset Offset to search. + * @param _value Value to set. + * @param _linuxdiff Linux difference. + * @param _macdiff Mac OS X difference. + * @return 1 on success. + */ +native set_pdata_bool(_index, _offset, bool:_value, _linuxdiff = 20, _macdiff = 20); + +/** + * Returns a byte value from an entity's private data. + * + * This function is byte-addressable. Unlike get_pdata_int() which searches in byte increments of 4, + * get_pdata_byte searches in increments of 1. + * + * _linuxdiff value is what to add to the _offset for linux servers. + * _macdiff value is what to add to the _offset for os x servers. + * + * A log error is thrown on invalid _index and _offset. + * + * @param _index Entity index. + * @param _offset Offset to search. + * @param _linuxdiff Linux difference. + * @param _macdiff Mac OS X difference. + * @return A byte value is returned. + */ +native get_pdata_byte(_index, _offset, _linuxdiff = 20, _macdiff = 20); + +/** + * Sets a byte value to an entity's private data. + * + * This function is byte-addressable. Unlike set_pdata_int() which searches in byte increments of 4, + * set_pdata_byte searches in increments of 1. + * + * _linuxdiff value is what to add to the _offset for linux servers. + * _macdiff value is what to add to the _offset for os x servers. + * + * A log error is thrown on invalid _index and _offset. + * + * @param _index Entity index. + * @param _offset Offset to search. + * @param _value Value to set. + * @param _linuxdiff Linux difference. + * @param _macdiff Mac OS X difference. + * @return 1 on success. + */ +native set_pdata_byte(_index, _offset, _value, _linuxdiff = 20, _macdiff = 20); + +/** + * Returns a short value from an entity's private data. + * + * This function is byte-addressable. Unlike get_pdata_int() which searches in byte increments of 4, + * get_pdata_short searches in increments of 1. + * + * _linuxdiff value is what to add to the _offset for linux servers. + * _macdiff value is what to add to the _offset for os x servers. + * + * A log error is thrown on invalid _index and _offset. + * + * @param _index Entity index. + * @param _offset Offset to search. + * @param _linuxdiff Linux difference. + * @param _macdiff Mac OS X difference. + * @return A short value is returned. + */ +native get_pdata_short(_index, _offset, _linuxdiff = 20, _macdiff = 20); + +/** + * Sets a short value to an entity's private data. + * + * This function is byte-addressable. Unlike set_pdata_int() which searches in byte increments of 4, + * set_pdata_short searches in increments of 1. + * + * _linuxdiff value is what to add to the _offset for linux servers. + * _macdiff value is what to add to the _offset for os x servers. + * + * A log error is thrown on invalid _index and _offset. + * + * @param _index Entity index. + * @param _offset Offset to search. + * @param _value Value to set. + * @param _linuxdiff Linux difference. + * @param _macdiff Mac OS X difference. + * @return 1 on success. + */ +native set_pdata_short(_index, _offset, _value, _linuxdiff = 20, _macdiff = 20); + +/** + * Returns a vector from an entity's private data. + * + * This function is byte-addressable. Unlike get_pdata_int() which searches in byte increments of 4, + * get_pdata_vector searches in increments of 1. + * + * _linuxdiff value is what to add to the _offset for linux servers. + * _macdiff value is what to add to the _offset for os x servers. + * + * A log error is thrown on invalid _index and _offset. + * + * @param _index Entity index. + * @param _offset Offset to search. + * @param _output Vector returned by reference. + * @param _linuxdiff Linux difference. + * @param _macdiff Mac OS X difference. + * @return 1 on success. + */ +native get_pdata_vector(_index, _offset, Float:_output[3], _linuxdiff = 20, _macdiff = 20); + +/** + * Sets a vector to an entity's private data. + * + * This function is byte-addressable. Unlike set_pdata_int() which searches in byte increments of 4, + * set_pdata_vector searches in increments of 1. + * + * _linuxdiff value is what to add to the _offset for linux servers. + * _macdiff value is what to add to the _offset for os x servers. + * + * A log error is thrown on invalid _index and _Offset. + * + * @param _index Entity index. + * @param _offset Offset to search. + * @param _origin Value to set. + * @param _linuxdiff Linux difference. + * @param _macdiff Mac OS X difference. + * @return 1 on success. + */ +native set_pdata_vector(_index, _offset, Float:_origin[3], _linuxdiff = 20, _macdiff = 20); + +/** + * Tries to retrieve an edict (entity encapsulation) pointer from an entity's private data. + * + * This function is byte-addressable. Unlike get_pdata_int() which searches in byte increments of 4, + * get_pdata_ehandle searches in increments of 1. + * + * _linuxdiff value is what to add to the _offset for linux servers. + * _macdiff value is what to add to the _offset for os x servers. + * + * A log error is thrown on invalid _index and _offset. + * + * @param _index Entity index. + * @param _offset Offset to search. + * @param _linuxdiff Linux difference. + * @param _macdiff Mac OS X difference. + * @return -2 if an invalid entity was found. + * -1 if an empty entity was found. + * 0 if serialnumber is not matching. + * Otherwise, an entity index is returned. + */ +native get_pdata_ehandle(_index, _offset, _linuxdiff = 20, _macdiff = 20); + +/** + * Sets an edict (entity encapsulation) pointer to an entity's private data. + * + * This function is byte-addressable. Unlike set_pdata_int() which searches in byte increments of 4, + * set_pdata_ehandle searches in increments of 1. + * + * _linuxdiff value is what to add to the _offset for linux servers. + * _macdiff value is what to add to the _offset for os x servers. + * + * A log error is thrown on invalid _index and _Offset. + * + * @param _index Entity index. + * @param _offset Offset to search. + * @param _value Value to set. + * @param _linuxdiff Linux difference. + * @param _macdiff Mac OS X difference. + * @return 1 on success. + */ +native set_pdata_ehandle(_index, _offset, _value, _linuxdiff = 20, _macdiff = 20); + +/* Registers a forward. + * Returns an id you can pass to unregister_forward + */ +native register_forward(_forwardType,const _function[],_post=0); + +/* Unregisters a forward. + * The registerId must be from register_forward, and + * post/forwardtype must match what you registered the forward as. + */ +native unregister_forward(_forwardType, registerId, post=0); + +/* Returns data for metamod */ +native forward_return(type,any:...); + +/* Returns the original return value of an engine function. + * This is only valid in forwards that were registered as post. + * + * get_orig_retval() - no params, retrieves integer return value + * get_orig_retval(&Float:value) - retrieves float return value by reference + * get_orig_retval(value[], len) - retrives string return value + */ +native get_orig_retval(any:...); + +native engfunc(type,any:...); +native dllfunc(type,any:...); + +//only use this with functions that pass a Trace +// get: zero extra params - return int, one extra param = byref float or vector +// set: use anything +native get_tr(TraceResult:tr_member, any:...); +native set_tr(TraceResult:tr_member, any:...); + +//Upgraded version takes in a TraceResult handle, optionally passed in as the last parameter to the +//TraceResult forward. Use 0 to specify the global traceresult handle set from calling +// some of the Engfucs. +native get_tr2(tr_handle, any:tr_member, any:...); +native set_tr2(tr_handle, any:tr_member, any:...); + +/** + * Creates a traceresult handle. This value should never be altered. + * The handle can be used in get/set_tr2 and various traceresult engine functions. + * + * NOTE: You must call free_tr2() on every handle made with create_tr2(). + * + * @return A new TraceResult handle. + */ +native create_tr2(); + +/** + * Frees a traceresult handle created with free_tr2(). Do not call + * this more than once per handle, or on handles not created through + * create_tr2(). + * + * @param tr_handle TraceResult handle created via create_tr2(). + * @noreturn + */ +native free_tr2(tr_handle); + +//Same as above, use either a kvd_handle or 0 for global reserved kvd data +//kvd_handle is passed by the kvd hook, last param +native get_kvd(kvd_handle, KeyValueData:member, any:...); + +//Using set_kvd with the handle from the hook for anything under KV_fHandled +// is considered an undefined operation (it could crash). You should fire a new +// keyvalues structure rather than changing the internal engine strings. +native set_kvd(kvd_handle, KeyValueData:member, any:...); + +/** + * Creates a KeyValueData handle. + * + * @note Handles should be freed using free_kvd(). + * + * @return New KeyValueData handle + */ +native create_kvd(); + +/** + * Frees a KeyValueData handle. + * + * @param kvd_handle KeyValueData handle + * + * @noreturn + */ +native free_kvd(kvd_handle); + +// These functions are used with the clientdata data structure (FM_UpdateClientData) +// Get: 0 extra params - Return integer; 1 extra param - by ref float or vector; 2 extra params - string and length +// Set: Use anything +// Use 0 for cd_handle to specify the global clientdata handle +native get_cd(cd_handle, ClientData:member, any:...); +native set_cd(cd_handle, ClientData:member, any:...); + +// These functions are used with the entity_state data structure (FM_AddToFullPack) +// Get: 0 extra params - Return integer; 1 extra param - by ref float or vector or array +// Set: Use anything +// Use 0 for es_handle to specify the global entity_state handle +native get_es(es_handle, EntityState:member, any:...); +native set_es(es_handle, EntityState:member, any:...); + +// These functions are used with the usercmd data structure (FM_CmdStart) +// Get: 0 extra params - Return integer; 1 extra param - by ref float or vector +// Set: Use anything +// Use 0 for uc_handle to specify the global usercmd handle +native get_uc(uc_handle, UserCmd:member, any:...); +native set_uc(uc_handle, UserCmd:member, any:...); + +//NOTE that for the string offsets below, on AMD64, a byref (char **) offset is NOT the same as an int offset +//In fact it's QWORD aligned rather than DWORD aligned, so the offset will be exactly half. +//Gets a string from a private offset. If byref is false, the string is treated as static rather than dynamic. +//linux value is what to add to the offset for linux servers. +//mac value is what to add to the offset for os x servers. Default (cellmin) means that linux value will be used. +//this cannot use a default value due to older version using an awkward default value. +native get_pdata_string(entity, offset, dest[], maxlength, byref=1, linux, mac=cellmin); + +//Sets a string in a private offset. +//realloc = -1 - nonbyref copy (static +//realloc = 0 - copy byref, no realloc *(char **) +//realloc = 1 - reallocate new string with free+malloc +//realloc = 2 - reallocate new string with delete[]+new[] +//linux value is what to add to the offset for linux servers. +//mac value iswhat to add to the offset for os x servers. +//this cannot use a default value due to older version using an awkward default value. +native set_pdata_string(entity, offset, const source[], realloc=2, linux, mac=cellmin); + +// Copies the given infoBuffer pointer into out[] +// An infoBuffer pointer is returned by EngFunc_GetInfoKeyBuffer +native copy_infokey_buffer(infoBuffer, out[], maxlen); + + +/** + * Looks up the sequence for the entity. + * + * @param entity The entity id to lookup. + * @param name The sequence name to lookup, case insensitive. ("JUMP" would match "jump") + * @param framerate The framerate of the sequence, if found. + * @param loops Whether or not the sequence loops. + * @param groundspeed The groundspeed setting of the sequence. + * @return -1 on failed lookup, the sequence number on successful lookup. + */ +native lookup_sequence(entity, const name[], &Float:framerate = 0.0, &bool:loops = false, &Float:groundspeed = 0.0); + +/** + * Sets a bone controller with the specified value. + * + * @param entity The entity id to set the value on. + * @param controller Which controller to set (0 through 3). + * @param value The value to set it to. + * @return The percentage that the controller is extended (0.0 through 1.0) + */ +native Float:set_controller(entity, controller, Float:value); + +/** + * Retrieves an integer value from an entity's private data based off a class + * and member name. + * + * @note Unlike the [get|set]_pdata_* natives that require compiling the class + * member offset into the plugin, this native instead retrieves the + * necessary offset from the AMXX gamedata files at runtime, based on the + * provided class and member name. + * @note This native is safer than [get|set]_pdata_* as it can perform stricter + * offset and typing checks. + * @note This native is used to access the following (C++/engine) data types: + * integer, boolean, short, character, pointer, structure, class, + * stringint and function. Unsigned variants (if applicable) are supported + * and will be converted automatically. + * + * @param entity Entity index + * @param class Class name + * @param member Member name + * @param element Element to retrieve (starting from 0) if member is an array + * + * @return Integer value + * @error If an invalid entity is provided, either class or member is + * empty, no offset is found or an invalid offset is retrieved, + * or the data type does not match, an error will be thrown. + */ +native any:get_ent_data(entity, const class[], const member[], element = 0); + +/** + * Sets an integer value to an entity's private data based off a class + * and member name. + * + * @note Unlike the [get|set]_pdata_* natives that require compiling the class + * member offset into the plugin, this native instead retrieves the + * necessary offset from the AMXX gamedata files at runtime, based on the + * provided class and member name. + * @note This native is safer than [get|set]_pdata_* as it can perform stricter + * offset and typing checks. + * @note This native is used to access the following (C++/engine) data types: + * integer, boolean, short, character, pointer, stringint and function. + * Unsigned variants (if applicable) are supported and will be converted + * automatically. + * + * @param entity Entity index + * @param class Class name + * @param member Member name + * @param value Value to set + * @param element Element to set (starting from 0) if member is an array + * + * @noreturn + * @error If an invalid entity is provided, either class or member is + * empty, no offset is found or an invalid offset is retrieved, + * or the data type does not match, an error will be thrown. + */ +native set_ent_data(entity, const class[], const member[], any:value, element = 0); + +/** + * Retrieves a float value from an entity's private data based off a class + * and member name. + * + * @note Unlike the [get|set]_pdata_* natives that require compiling the class + * member offset into the plugin, this native instead retrieves the + * necessary offset from the AMXX gamedata files at runtime, based on the + * provided class and member name. + * @note This native is safer than [get|set]_pdata_* as it can perform stricter + * offset and typing checks. + * + * @param entity Entity index + * @param class Class name + * @param member Member name + * @param element Element to retrieve (starting from 0) if member is an array + * + * @return Float value + * @error If an invalid entity is provided, either class or member is + * empty, no offset is found or an invalid offset is retrieved, + * or the data type does not match, an error will be thrown. + */ +native Float:get_ent_data_float(entity, const class[], const member[], element = 0); + +/** + * Sets a float value to an entity's private data based off a class + * and member name. + * + * @note Unlike the [get|set]_pdata_* natives that require compiling the class + * member offset into the plugin, this native instead retrieves the + * necessary offset from the AMXX gamedata files at runtime, based on the + * provided class and member name. + * @note This native is safer than [get|set]_pdata_* as it can perform stricter + * offset and typing checks. + * + * @param entity Entity index + * @param class Class name + * @param member Member name + * @param value Value to set + * @param element Element to set (starting from 0) if member is an array + * + * @noreturn + * @error If an invalid entity is provided, either class or member is + * empty, no offset is found or an invalid offset is retrieved, + * or the data type does not match, an error will be thrown. + */ +native set_ent_data_float(entity, const class[], const member[], Float:value, element = 0); + +/** + * Retrieves a vector from an entity's private data based off a class and member name. + * + * @note Unlike the [get|set]_pdata_* natives that require compiling the class + * member offset into the plugin, this native instead retrieves the + * necessary offset from the AMXX gamedata files at runtime, based on the + * provided class and member name. + * @note This native is safer than [get|set]_pdata_* as it can perform stricter + * offset and typing checks. + * + * @param entity Entity index + * @param class Class name + * @param member Member name + * @param value Vector buffer to store data in + * @param element Element to retrieve (starting from 0) if member is an array + * + * @noreturn + * @error If an invalid entity is provided, either class or member is + * empty, no offset is found or an invalid offset is retrieved, + * or the data type does not match, an error will be thrown. + */ +native get_ent_data_vector(entity, const class[], const member[], Float:value[3], element = 0); + +/** + * Sets a vector to an entity's private data based off a class and member name. + * + * @note Unlike the [get|set]_pdata_* natives that require compiling the class + * member offset into the plugin, this native instead retrieves the + * necessary offset from the AMXX gamedata files at runtime, based on the + * provided class and member name. + * @note This native is safer than [get|set]_pdata_* as it can perform stricter + * offset and typing checks. + * + * @param entity Entity index + * @param class Class name + * @param member Member name + * @param value Vector to set + * @param element Element to set (starting from 0) if member is an array + * + * @noreturn + * @error If an invalid entity is provided, either class or member is + * empty, no offset is found or an invalid offset is retrieved, + * or the data type does not match, an error will be thrown. + */ +native set_ent_data_vector(entity, const class[], const member[], Float:value[3], element = 0); + +/** + * Retrieves an entity index from an entity's private data based off a class + * and member name. + * + * @note Unlike the [get|set]_pdata_* natives that require compiling the class + * member offset into the plugin, this native instead retrieves the + * necessary offset from the AMXX gamedata files at runtime, based on the + * provided class and member name. + * @note This native is safer than [get|set]_pdata_* as it can perform stricter + * offset and typing checks. + * @note This native is used to access the following (C++/engine) data types: + * classptr, entvars, edict and ehandle. + * + * @param entity Entity index + * @param class Class name + * @param member Member name + * @param element Element to retrieve (starting from 0) if member is an array + * + * @return Entity index if found, -1 otherwise + * @error If an invalid entity is provided, either class or member is + * empty, no offset is found or an invalid offset is retrieved, + * or the data type does not match, an error will be thrown. + */ +native get_ent_data_entity(entity, const class[], const member[], element = 0); + +/** + * Sets an entity index to an entity's private data based off a class + * and member name. + * + * @note Unlike the [get|set]_pdata_* natives that require compiling the class + * member offset into the plugin, this native instead retrieves the + * necessary offset from the AMXX gamedata files at runtime, based on the + * provided class and member name. + * @note This native is safer than [get|set]_pdata_* as it can perform stricter + * offset and typing checks. + * @note This native is used to access the following (C++/engine) data types: + * classptr, entvars, edict and ehandle. + * @note Pass -1 as value to act as C++ NULL. + * + * @param entity Entity index + * @param class Class name + * @param member Member name + * @param value Entity index to set + * @param element Element to set (starting from 0) if member is an array + * + * @noreturn + * @error If an invalid entity or value is provided, either class or member + * is empty, no offset is found or an invalid offset is retrieved, + * or the data type does not match, an error will be thrown. + */ +native set_ent_data_entity(entity, const class[], const member[], value, element = 0); + +/** + * Retrieves a string from an entity's private data based off a class and member name. + * + * @note Unlike the [get|set]_pdata_* natives that require compiling the class + * member offset into the plugin, this native instead retrieves the + * necessary offset from the AMXX gamedata files at runtime, based on the + * provided class and member name. + * @note This native is safer than [get|set]_pdata_* as it can perform stricter + * offset and typing checks. + * @note This native is used to access the following (C++/engine) data types: + * string, stringptr. + * + * @param entity Entity index + * @param class Class name + * @param member Member name + * @param value Buffer to store data in + * @param maxlen Maximum size of the buffer + * @param element Element to retrieve (starting from 0) if member is an array + * + * @return Number of cells written to buffer + * @error If an invalid entity is provided, either class or member is + * empty, no offset is found or an invalid offset is retrieved, + * or the data type does not match, an error will be thrown. + */ +native get_ent_data_string(entity, const class[], const member[], value[], maxlen, element = 0); + +/** + * Sets a string to an entity's private data based off a class and member name. + * + * @note Unlike the [get|set]_pdata_* natives that require compiling the class + * member offset into the plugin, this native instead retrieves the + * necessary offset from the AMXX gamedata files at runtime, based on the + * provided class and member name. + * @note This native is safer than [get|set]_pdata_* as it can perform stricter + * offset and typing checks. + * @note This native is used to access the following (C++/engine) data types: + * string, stringptr. + * + * @param entity Entity index + * @param class Class name + * @param member Member name + * @param value String to set + * @param element Element to set (starting from 0) if member is an array + * + * @return Number of cells written to buffer + * @error If an invalid entity is provided, either class or member is + * empty, no offset is found or an invalid offset is retrieved, + * or the data type does not match, an error will be thrown. + */ +native set_ent_data_string(entity, const class[], const member[], const value[], element = 0); + +/** + * Retrieves the size of array of n entity class member. + * + * @param class Class name + * @param member Member name + * + * @return Size of array (in elements), otherwise 1 if member is not an array + * @error If either class or member is empty, no offset is found or an invalid + * offset is retrieved, an error will be thrown. + */ +native get_ent_data_size(const class[], const member[]); + +/** + * Finds a offset based off an entity class and member name. + * + * @param class Class name + * @param member Member name + * @param type Optional variable to store member type in (FIELD_* constants) + * @param arraysize Optional variable to store array size in, if member is an array + * @param unsigned Optional variable to store whether member is unsigned (short and char types only) + * + * @return Class member offset + * @error If either class or member is empty, no offset is found or an invalid + * offset is retrieved, an error will be thrown. + */ +native find_ent_data_info(const class[], const member[], &FieldType:type = FIELD_NONE, &arraysize = 0, &bool:unsigned = false); + + +/** + * Retrieves an integer value from the gamerules object based off a class + * and member name. + * + * @note This native is used to access the following (C++/engine) data types: + * integer, boolean, short, character, pointer, structure, class, + * stringint and function. Unsigned variants (if applicable) are supported + * and will be converted automatically. + * + * @param class Class name + * @param member Member name + * @param element Element to retrieve (starting from 0) if member is an array + * + * @return Integer value + * @error If member is empty, no offset is found or an invalid offset + * is retrieved, or the data type does not match, an error will + * be thrown. + */ +native any:get_gamerules_int(const class[], const member[], element = 0); + +/** + * Sets an integer value to the gamerules objecta based off a class + * and member name. + * + * @note This native is used to access the following (C++/engine) data types: + * integer, boolean, short, character, pointer, stringint and function. + * Unsigned variants (if applicable) are supported and will be converted + * automatically. + * + * @param class Class name + * @param member Member name + * @param value Value to set + * @param element Element to set (starting from 0) if member is an array + * + * @noreturn + * @error If member is empty, no offset is found or an invalid offset + * is retrieved, or the data type does not match, an error will + * be thrown. + */ +native set_gamerules_int(const class[], const member[], any:value, element = 0); + +/** + * Retrieves a float value from the gamerules object based off a class + * and member name. + * + * @param class Class name + * @param member Member name + * @param element Element to retrieve (starting from 0) if member is an array + * + * @return Float value + * @error If member is empty, no offset is found or an invalid offset + * is retrieved, or the data type does not match, an error will + * be thrown. + */ +native Float:get_gamerules_float(const class[], const member[], element = 0); + +/** + * Sets a float value to the gamerules object based off a class + * and member name. + * + * @param class Class name + * @param member Member name + * @param value Value to set + * @param element Element to set (starting from 0) if member is an array + * + * @noreturn + * @error If member is empty, no offset is found or an invalid offset + * is retrieved, or the data type does not match, an error will + * be thrown. + */ +native set_gamerules_float(const class[], const member[], Float:value, element = 0); + +/** + * Retrieves a vector from the gamerules object based off a class and member name. + * + * @param class Class name + * @param member Member name + * @param value Vector buffer to store data in + * @param element Element to retrieve (starting from 0) if member is an array + * + * @noreturn + * @error If member is empty, no offset is found or an invalid offset + * is retrieved, or the data type does not match, an error will + * be thrown. + */ +native get_gamerules_vector(const class[], const member[], Float:value[3], element = 0); + +/** + * Sets a vector to the gamerules object based off a class and member name. + * + * @param class Class name + * @param member Member name + * @param value Vector to set + * @param element Element to set (starting from 0) if member is an array + * + * @noreturn + * @error If member is empty, no offset is found or an invalid offset + * is retrieved, or the data type does not match, an error will + * be thrown. + */ +native set_gamerules_vector(const class[], const member[], Float:value[3], element = 0); + +/** + * Retrieves an entity index from the gamerules object based off a class + * and member name. + * + * @note This native is used to access the following (C++/engine) data types: + * classptr, entvars, edict and ehandle. + * + * @param class Class name + * @param member Member name + * @param element Element to retrieve (starting from 0) if member is an array + * + * @return Entity index if found, -1 otherwise + * @error If member is empty, no offset is found or an invalid offset + * is retrieved, or the data type does not match, an error will + * be thrown. + */ +native get_gamerules_entity(const class[], const member[], element = 0); + +/** + * Sets an entity index to the gamerules object based off a class + * and member name. + * + * @note This native is used to access the following (C++/engine) data types: + * classptr, entvars, edict and ehandle. + * @note Pass -1 as value to act as C++ NULL. + * + * @param class Class name + * @param member Member name + * @param value Entity index to set + * @param element Element to set (starting from 0) if member is an array + * + * @noreturn + * @error If member is empty, no offset is found or an invalid offset + * is retrieved, or the data type does not match, an error will + * be thrown. + */ +native set_gamerules_entity(const class[], const member[], value, element = 0); + +/** + * Retrieves a string from the gamerules object based off a class and member name. + * + * @note This native is used to access the following (C++/engine) data types: + * string, stringptr. + * + * @param class Class name + * @param member Member name + * @param value Buffer to store data in + * @param maxlen Maximum size of the buffer + * @param element Element to retrieve (starting from 0) if member is an array + * + * @return Number of cells written to buffer + * @error If member is empty, no offset is found or an invalid offset + * is retrieved, or the data type does not match, an error will + * be thrown. + */ +native get_gamerules_string(const class[], const member[], value[], maxlen, element = 0); + +/** + * Sets a string to the gamerules object based off a class and member name. + * + * @note This native is used to access the following (C++/engine) data types: + * string, stringptr. + * + * @param class Class name + * @param member Member name + * @param value String to set + * @param element Element to set (starting from 0) if member is an array + * + * @return Number of cells written to buffer + * @error If member is empty, no offset is found or an invalid offset + * is retrieved, or the data type does not match, an error will + * be thrown. + */ +native set_gamerules_string(const class[], const member[], const value[], element = 0); + +/** + * Retrieves the size of array of a gamerules class member. + * + * @param class Class name + * @param member Member name + * + * @return Size of array (in elements), otherwise 1 if member is not an array + * @error If either class or member is empty, no offset is found or an invalid + * offset is retrieved, an error will be thrown. + */ +native get_gamerules_size(const class[], const member[]); + +/** + * Finds a gamerules offset based off a class and member name. + * + * @param class Class name + * @param member Member name + * @param type Optional variable to store member type in (FIELD_* constants) + * @param arraysize Optional variable to store array size in, if member is an array + * @param unsigned Optional variable to store whether member is unsigned (short and char types only) + * + * @return Class member offset + * @error If either class or member is empty, no offset is found or an invalid + * offset is retrieved, an error will be thrown. + */ +native find_gamerules_info(const class[], const member[], &FieldType:type = FIELD_NONE, &arraysize = 0, &bool:unsigned = false); + +/** + * Returns the data field base type based off a specific field type. + * + * @note From an AMXX plugin perspective, the (C++/engine) data types can be grouped + * in five base types: integer, float, vector, entity and string. This stock is + * essentially for convenience and debug purpose. + * + * @param type Class member type (FIELD_* constants) + * @param type_name Optional buffer to store base type name in + * @param maxlen Maximum size of the buffer + * + * @return Base field type (BASEFIELD_* constants) + */ +stock BaseFieldType:get_field_basetype(FieldType:type, type_name[] = "", maxlen = 0) +{ + static const baseFieldTypeNames[BaseFieldType][] = + { + "none", + "integer", + "float", + "vector", + "entity", + "string", + }; + + new BaseFieldType:baseType = BASEFIELD_NONE; + + switch (type) + { + case FIELD_INTEGER, FIELD_STRINGINT, FIELD_SHORT , FIELD_CHARACTER, + FIELD_CLASS , FIELD_STRUCTURE, FIELD_POINTER, FIELD_FUNCTION, + FIELD_BOOLEAN: + { + baseType = BASEFIELD_INTEGER; + } + case FIELD_FLOAT: + { + baseType = BASEFIELD_FLOAT; + } + case FIELD_VECTOR: + { + baseType = BASEFIELD_VECTOR; + } + case FIELD_CLASSPTR, FIELD_ENTVARS, FIELD_EDICT, FIELD_EHANDLE: + { + baseType = BASEFIELD_ENTITY; + } + case FIELD_STRINGPTR, FIELD_STRING: + { + baseType = BASEFIELD_STRING; + } + } + + if (maxlen > 0) + { + copy(type_name, maxlen, baseFieldTypeNames[baseType]); + } + + return baseType; +} + + +enum +{ + Model_DefaultSize = -2, + Model_CurrentSequence = -1, +}; + +/** + * Gets size of a model bounding box. + * + * @param entity The entity index to use. + * @param mins The local negative bounding box distance. + * @param maxs The local positive bounding box distance. + * @param sequence The animation sequence to retrieve. + * Model_DefaultSize retrieves ideal moevement hull size. + * Model_CurrentSequence retrieves hull size of the current sequence. + * Values >= 0 will specify which sequence to retrieve size from. + * + * @return 1 on success, 0 on faillure. + * + * @error Invalid entity. + * Invalid model pointer. + */ +native GetModelBoundingBox(entity, Float:mins[3], Float:maxs[3], sequence = Model_DefaultSize); diff --git a/bin/amxxdump/includes/amxmodx/fakemeta.inc.temp b/bin/amxxdump/includes/amxmodx/fakemeta.inc.temp new file mode 100644 index 0000000..f0ebb9e --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/fakemeta.inc.temp @@ -0,0 +1,131 @@ +#if defined _fakemeta_included +#endinput +#endif +#define _fakemeta_included +#include +#pragma reqlib fakemeta +#if !defined AMXMODX_NOAUTOLOAD +#pragma loadlib fakemeta +#endif +native pev(_index,_value,any:...); +native set_pev(_index,_value,any:...); +native set_pev_string(_index, _value, _string); +native pev_valid(entindex); +native pev_serial(entindex); +native global_get(_value, any:...); +native get_pdata_int(_index, _Offset, _linuxdiff = 5, _macdiff = 5); +native set_pdata_int(_index, _Offset, _Value, _linuxdiff = 5, _macdiff = 5); +native Float:get_pdata_float(_index, _Offset, _linuxdiff = 5, _macdiff = 5); +native set_pdata_float(_index, _Offset, Float:_Value, _linuxdiff = 5, _macdiff = 5); +native get_pdata_ent(_index, _offset, _linuxdiff = 20, _macdiff = 20); +native set_pdata_ent(_index, _offset, _value, _linuxdiff = 20, _macdiff = 20); +native bool:get_pdata_bool(_index, _offset, _linuxdiff = 20, _macdiff = 20); +native set_pdata_bool(_index, _offset, bool:_value, _linuxdiff = 20, _macdiff = 20); +native get_pdata_byte(_index, _offset, _linuxdiff = 20, _macdiff = 20); +native set_pdata_byte(_index, _offset, _value, _linuxdiff = 20, _macdiff = 20); +native get_pdata_short(_index, _offset, _linuxdiff = 20, _macdiff = 20); +native set_pdata_short(_index, _offset, _value, _linuxdiff = 20, _macdiff = 20); +native get_pdata_vector(_index, _offset, Float:_output[3], _linuxdiff = 20, _macdiff = 20); +native set_pdata_vector(_index, _offset, Float:_origin[3], _linuxdiff = 20, _macdiff = 20); +native get_pdata_ehandle(_index, _offset, _linuxdiff = 20, _macdiff = 20); +native set_pdata_ehandle(_index, _offset, _value, _linuxdiff = 20, _macdiff = 20); +native register_forward(_forwardType,const _function[],_post=0); +native unregister_forward(_forwardType, registerId, post=0); +native forward_return(type,any:...); +native get_orig_retval(any:...); +native engfunc(type,any:...); +native dllfunc(type,any:...); +native get_tr(TraceResult:tr_member, any:...); +native set_tr(TraceResult:tr_member, any:...); +native get_tr2(tr_handle, any:tr_member, any:...); +native set_tr2(tr_handle, any:tr_member, any:...); +native create_tr2(); +native free_tr2(tr_handle); +native get_kvd(kvd_handle, KeyValueData:member, any:...); +native set_kvd(kvd_handle, KeyValueData:member, any:...); +native create_kvd(); +native free_kvd(kvd_handle); +native get_cd(cd_handle, ClientData:member, any:...); +native set_cd(cd_handle, ClientData:member, any:...); +native get_es(es_handle, EntityState:member, any:...); +native set_es(es_handle, EntityState:member, any:...); +native get_uc(uc_handle, UserCmd:member, any:...); +native set_uc(uc_handle, UserCmd:member, any:...); +native get_pdata_string(entity, offset, dest[], maxlength, byref=1, linux, mac=cellmin); +native set_pdata_string(entity, offset, const source[], realloc=2, linux, mac=cellmin); +native copy_infokey_buffer(infoBuffer, out[], maxlen); +native lookup_sequence(entity, const name[], &Float:framerate = 0.0, &bool:loops = false, &Float:groundspeed = 0.0); +native Float:set_controller(entity, controller, Float:value); +native any:get_ent_data(entity, const class[], const member[], element = 0); +native set_ent_data(entity, const class[], const member[], any:value, element = 0); +native Float:get_ent_data_float(entity, const class[], const member[], element = 0); +native set_ent_data_float(entity, const class[], const member[], Float:value, element = 0); +native get_ent_data_vector(entity, const class[], const member[], Float:value[3], element = 0); +native set_ent_data_vector(entity, const class[], const member[], Float:value[3], element = 0); +native get_ent_data_entity(entity, const class[], const member[], element = 0); +native set_ent_data_entity(entity, const class[], const member[], value, element = 0); +native get_ent_data_string(entity, const class[], const member[], value[], maxlen, element = 0); +native set_ent_data_string(entity, const class[], const member[], const value[], element = 0); +native get_ent_data_size(const class[], const member[]); +native find_ent_data_info(const class[], const member[], &FieldType:type = FIELD_NONE, &arraysize = 0, &bool:unsigned = false); +native any:get_gamerules_int(const class[], const member[], element = 0); +native set_gamerules_int(const class[], const member[], any:value, element = 0); +native Float:get_gamerules_float(const class[], const member[], element = 0); +native set_gamerules_float(const class[], const member[], Float:value, element = 0); +native get_gamerules_vector(const class[], const member[], Float:value[3], element = 0); +native set_gamerules_vector(const class[], const member[], Float:value[3], element = 0); +native get_gamerules_entity(const class[], const member[], element = 0); +native set_gamerules_entity(const class[], const member[], value, element = 0); +native get_gamerules_string(const class[], const member[], value[], maxlen, element = 0); +native set_gamerules_string(const class[], const member[], const value[], element = 0); +native get_gamerules_size(const class[], const member[]); +native find_gamerules_info(const class[], const member[], &FieldType:type = FIELD_NONE, &arraysize = 0, &bool:unsigned = false); +stock BaseFieldType:get_field_basetype(FieldType:type, type_name[] = "", maxlen = 0) +{ +static const baseFieldTypeNames[BaseFieldType][] = +{ +"none", +"integer", +"float", +"vector", +"entity", +"string", +}; +new BaseFieldType:baseType = BASEFIELD_NONE; +switch (type) +{ +case FIELD_INTEGER, FIELD_STRINGINT, FIELD_SHORT , FIELD_CHARACTER, +FIELD_CLASS , FIELD_STRUCTURE, FIELD_POINTER, FIELD_FUNCTION, +FIELD_BOOLEAN: +{ +baseType = BASEFIELD_INTEGER; +} +case FIELD_FLOAT: +{ +baseType = BASEFIELD_FLOAT; +} +case FIELD_VECTOR: +{ +baseType = BASEFIELD_VECTOR; +} +case FIELD_CLASSPTR, FIELD_ENTVARS, FIELD_EDICT, FIELD_EHANDLE: +{ +baseType = BASEFIELD_ENTITY; +} +case FIELD_STRINGPTR, FIELD_STRING: +{ +baseType = BASEFIELD_STRING; +} +} +if (maxlen > 0) +{ +copy(type_name, maxlen, baseFieldTypeNames[baseType]); +} +return baseType; +} +enum +{ +Model_DefaultSize = -2, +Model_CurrentSequence = -1, +}; +native GetModelBoundingBox(entity, Float:mins[3], Float:maxs[3], sequence = Model_DefaultSize); diff --git a/bin/amxxdump/includes/amxmodx/fakemeta_const.inc b/bin/amxxdump/includes/amxmodx/fakemeta_const.inc new file mode 100644 index 0000000..eba34b6 --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/fakemeta_const.inc @@ -0,0 +1,793 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Fakemeta Constants +// + +#if defined _fakemeta_const_included + #endinput +#endif +#define _fakemeta_const_included + +// For forward_return +#define FMV_STRING 1 +#define FMV_FLOAT 2 +#define FMV_CELL 3 + +#include + +/* The actual return value of the function, use these instead of PLUGIN_HANDLED etc when + * returning from registered forwards. + */ +#define FMRES_IGNORED 1 // Calls target function, returns normal value +#define FMRES_HANDLED 2 // Tells metamod you did something, still calls target function and returns normal value +#define FMRES_OVERRIDE 3 // Supposed to still call the target function but return your value instead + // however this does not work properly with metamod; use supercede instead. +#define FMRES_SUPERCEDE 4 // Block the target call, and use your return value (if applicable) + +// Use this with GetInfoKeyBuffer if you want the server's localinfo buffer +#define FM_NULLENT -1 + + +/* Used with engfunc() + */ +enum { + EngFunc_PrecacheModel, // int ) (char *s); + EngFunc_PrecacheSound, // int ) (char *s); + EngFunc_SetModel, // void ) (edict_t *e, const char *m); + EngFunc_ModelIndex, // int ) (const char *m); + EngFunc_ModelFrames, // int ) (int modelIndex); + EngFunc_SetSize, // void ) (edict_t *e, const float *rgflMin, const float *rgflMax); + EngFunc_ChangeLevel, // void ) (char* s1, char* s2); + EngFunc_VecToYaw, // float) (const float *rgflVector); + EngFunc_VecToAngles, // void ) (const float *rgflVectorIn, float *rgflVectorOut); + EngFunc_MoveToOrigin, // void ) (edict_t *ent, const float *pflGoal, float dist, int iMoveType); + EngFunc_ChangeYaw, // void ) (edict_t* ent); + EngFunc_ChangePitch, // void ) (edict_t* ent); + EngFunc_FindEntityByString, // edict) (edict_t *pEdictStartSearchAfter, const char *pszField, const char *pszValue); + EngFunc_GetEntityIllum, // int ) (edict_t* pEnt); + EngFunc_FindEntityInSphere, // edict) (edict_t *pEdictStartSearchAfter, const float *org, float rad); + EngFunc_FindClientInPVS, // edict) (edict_t *pEdict); + EngFunc_EntitiesInPVS, // edict) (edict_t *pplayer); + EngFunc_MakeVectors, // void ) (const float *rgflVector); + EngFunc_AngleVectors, // void ) (const float *rgflVector, float *forward, float *right, float *up); + EngFunc_CreateEntity, // edict) (void); + EngFunc_RemoveEntity, // void ) (edict_t *e); + EngFunc_CreateNamedEntity, // edict) (int className); + EngFunc_MakeStatic, // void ) (edict_t *ent); + EngFunc_EntIsOnFloor, // int ) (edict_t *e); + EngFunc_DropToFloor, // int ) (edict_t *e); + EngFunc_WalkMove, // int ) (edict_t *ent, float yaw, float dist, int iMode); + EngFunc_SetOrigin, // void ) (edict_t *e, const float *rgflOrigin); + EngFunc_EmitSound, // void ) (edict_t *entity, int channel, const char *sample, float volume, float attenuation, int fFlags, int pitch); + EngFunc_EmitAmbientSound, // void ) (edict_t *entity, float *pos, const char *samp, float vol, float attenuation, int fFlags, int pitch); + + //With 1.71 you can pass an optional TraceLine ptr for trace natives + // it can be 0, for meaning "global tr handle" (for get/set_tr2), or + // it can be any other TR handle (such as one from a TR hook) + EngFunc_TraceLine, // void ) (const float *v1, const float *v2, int fNoMonsters, edict_t *pentToSkip, TraceResult *ptr); + EngFunc_TraceToss, // void ) (edict_t *pent, edict_t *pentToIgnore, TraceResult *ptr); + EngFunc_TraceMonsterHull, // int ) (edict_t *pEdict, const float *v1, const float *v2, int fNoMonsters, edict_t *pentToSkip, TraceResult *ptr); + EngFunc_TraceHull, // void ) (const float *v1, const float *v2, int fNoMonsters, int hullNumber, edict_t *pentToSkip, TraceResult *ptr); + EngFunc_TraceModel, // void ) (const float *v1, const float *v2, int hullNumber, edict_t *pent, TraceResult *ptr); + EngFunc_TraceTexture, // const char *) (edict_t *pTextureEntity, const float *v1, const float *v2 ); + EngFunc_TraceSphere, // void ) (const float *v1, const float *v2, int fNoMonsters, float radius, edict_t *pentToSkip, TraceResult *ptr); + + EngFunc_GetAimVector, // void ) (edict_t *ent, float speed, float *rgflReturn); + EngFunc_ParticleEffect, // void ) (const float *org, const float *dir, float color, float count); + EngFunc_LightStyle, // void ) (int style, char *val); + EngFunc_DecalIndex, // int ) (const char *name); + EngFunc_PointContents, // int ) (const float *rgflVector); + EngFunc_FreeEntPrivateData, // void ) (edict_t *pEdict); + EngFunc_SzFromIndex, // const char *) (int iString); + EngFunc_AllocString, // int ) (const char *szValue); + EngFunc_RegUserMsg, // int ) (const char *pszName, int iSize); + EngFunc_AnimationAutomove, // void ) (const edict_t *pEdict, float flTime); + EngFunc_GetBonePosition, // void ) (const edict_t *pEdict, int iBone, float *rgflOrigin, float *rgflAngles); + EngFunc_GetAttachment, // void ) (const edict_t *pEdict, int iAttachment, float *rgflOrigin, float *rgflAngles); + EngFunc_SetView, // void ) (const edict_t *pClient, const edict_t *pViewent); + EngFunc_Time, // float) ( void ); + EngFunc_CrosshairAngle, // void ) (const edict_t *pClient, float pitch, float yaw); + EngFunc_FadeClientVolume, // void ) (const edict_t *pEdict, int fadePercent, int fadeOutSeconds, int holdTime, int fadeInSeconds); + EngFunc_SetClientMaxspeed, // void ) (const edict_t *pEdict, float fNewMaxspeed); + EngFunc_CreateFakeClient, // edict) (const char *netname); // returns NULL if fake client can't be created + EngFunc_RunPlayerMove, // void ) (edict_t *fakeclient, const float *viewangles, float forwardmove, float sidemove, float upmove, unsigned short buttons, byte impulse, byte msec); + EngFunc_NumberOfEntities, // int ) ( void ); + EngFunc_StaticDecal, // void ) (const float *origin, int decalIndex, int entityIndex, int modelIndex); + EngFunc_PrecacheGeneric, // int ) (char* s); + EngFunc_BuildSoundMsg, // void ) (edict_t *entity, int channel, const char *sample, /*int*/float volume, float attenuation, int fFlags, int pitch, int msg_dest, int msg_type, const float *pOrigin, edict_t *ed); + EngFunc_GetPhysicsKeyValue, // const char *) (const edict_t *pClient, const char *key); + EngFunc_SetPhysicsKeyValue, // void ) (const edict_t *pClient, const char *key, const char *value); + EngFunc_GetPhysicsInfoString, // const char *) (const edict_t *pClient); + EngFunc_PrecacheEvent, // unsigned short) (int type, const char*psz); + EngFunc_PlaybackEvent, // void ) (int flags, const edict_t *pInvoker, unsigned short eventindex, float delay, float *origin, float *angles, float fparam1, float fparam2, int iparam1, int iparam2, int bparam1, int bparam2); + EngFunc_CheckVisibility, // int ) (const edict_t *entity, unsigned char *pset); + EngFunc_GetCurrentPlayer, // int ) ( void ); + EngFunc_CanSkipPlayer, // int ) (const edict_t *player); + EngFunc_SetGroupMask, // void ) (int mask, int op); + EngFunc_GetClientListening, // bool ) (int iReceiver, int iSender) + EngFunc_SetClientListening, // bool ) (int iReceiver, int iSender, bool Listen) + EngFunc_MessageBegin, // void ) (int msg_dest, int msg_type, const float *pOrigin, edict_t *ed) + EngFunc_WriteCoord, // void ) (float flValue) + EngFunc_WriteAngle, // void ) (float flValue) + EngFunc_InfoKeyValue, // char*) (char *infobuffer, char *key); + EngFunc_SetKeyValue, // void ) (char *infobuffer, char *key, char *value); + EngFunc_SetClientKeyValue, // void ) (int clientIndex, char *infobuffer, char *key, char *value); + EngFunc_CreateInstBaseline, // int ) (int classname, struct entity_state_s *baseline); + + // Returns pointer to info buffer that can be used with the infobuffer param of InfoKeyValue, SetKeyValue, and SetClientKeyValue + EngFunc_GetInfoKeyBuffer, // char*) (edict_t *e); + EngFunc_AlertMessage, // void ) (ALERT_TYPE atype, char *szFmt, ...); + EngFunc_ClientPrintf, // void ) (edict_t* pEdict, PRINT_TYPE ptype, const char *szMsg); + EngFunc_ServerPrint // void ) (const char *szMsg); +}; + +/* Used with dllfunc() + */ +enum +{ + DLLFunc_GameInit, // void ) ( void ); + DLLFunc_Spawn, // int ) (edict_t *pent); + DLLFunc_Think, // void ) (edict_t *pent); + DLLFunc_Use, // void ) (edict_t *pentUsed, edict_t *pentOther); + DLLFunc_Touch, // void ) (edict_t *pentTouched, edict_t *pentOther); + DLLFunc_Blocked, // void ) (edict_t *pentBlocked, edict_t *pentOther); + + //You can pass in 0 for glb kvd handle or a kvd handle here + DLLFunc_KeyValue, // void ) (edict_t *pentKeyvalue, KeyValueData *pkvd); + DLLFunc_SetAbsBox, // void ) (edict_t *pent); + DLLFunc_ClientConnect, // bool ) (edict_t *pEntity, const char *pszName, const char *pszAddress, char szRejectReason[128]); + + DLLFunc_ClientDisconnect, // void ) (edict_t *pEntity); + DLLFunc_ClientKill, // void ) (edict_t *pEntity); + DLLFunc_ClientPutInServer, // void ) (edict_t *pEntity); + DLLFunc_ClientCommand, // void ) (edict_t *pEntity); + + DLLFunc_ServerDeactivate, // void ) ( void ); + + DLLFunc_PlayerPreThink, // void ) (edict_t *pEntity); + DLLFunc_PlayerPostThink, // void ) (edict_t *pEntity); + + DLLFunc_StartFrame, // void ) ( void ); + DLLFunc_ParmsNewLevel, // void ) ( void ); + DLLFunc_ParmsChangeLevel, // void ) ( void ); + + // Returns string describing current .dll. E.g., TeamFotrress 2, Half-Life + // This also gets called when the server is queried for information (for example, by a server browser tool) + DLLFunc_GetGameDescription, // const char *) ( void ); + + // Spectator funcs + DLLFunc_SpectatorConnect, // void ) (edict_t *pEntity); + DLLFunc_SpectatorDisconnect, // void ) (edict_t *pEntity); + DLLFunc_SpectatorThink, // void ) (edict_t *pEntity); + + // Notify game .dll that engine is going to shut down. Allows mod authors to set a breakpoint. + DLLFunc_Sys_Error, // void ) (const char *error_string); + + DLLFunc_PM_FindTextureType, // char ) (char *name); + DLLFunc_RegisterEncoders, // void ) ( void ); + + // Enumerates player hulls. Returns 0 if the hull number doesn't exist, 1 otherwise + DLLFunc_GetHullBounds, // int ) (int hullnumber, float *mins, float *maxs); + + // Create baselines for certain "unplaced" items. + DLLFunc_CreateInstBaselines, // void ) ( void ); + DLLFunc_pfnAllowLagCompensation, // int ) ( void ); + // I know this does not fit with DLLFUNC(), but I don't want another native just for it. + MetaFunc_CallGameEntity, // bool ) (plid_t plid, const char *entStr,entvars_t *pev); + DLLFunc_ClientUserInfoChanged, // void ) (edict *pEntity, char *infobuffer); + // You can pass in 0 for global cd handle or another cd handle here + DLLFunc_UpdateClientData, // void ) (const struct edict_s *ent, int sendweapons, struct clientdata_s *cd); + // You can pass in 0 for global entity state handle or another entity state handle here + DLLFunc_AddToFullPack, // int ) (struct entity_state_s *state, int e, edict_t *ent, edict_t *host, int hostflags, int player, unsigned char *pSet); + // You can pass in 0 for global usercmd handle or another usercmd handle here + DLLFunc_CmdStart, // void ) (const edict_t *player, const struct usercmd_s *cmd, unsigned int random_seed); + DLLFunc_CmdEnd, // void ) (const edict_t *player); + DLLFunc_CreateBaseline // void ) (int player, int eindex, struct entity_state_s *baseline, struct edict_s *entity, int playermodelindex, vec3_t player_mins, vec3_t player_maxs); +}; + +enum { + pev_string_start = 0, + pev_classname, + pev_globalname, + pev_model, + pev_target, + pev_targetname, + pev_netname, + pev_message, + pev_noise, + pev_noise1, + pev_noise2, + pev_noise3, + pev_string_end, + pev_edict_start, + pev_chain, + pev_dmg_inflictor, + pev_enemy, + pev_aiment, + pev_owner, + pev_groundentity, + pev_euser1, + pev_euser2, + pev_euser3, + pev_euser4, + pev_edict_end, + pev_float_start, + pev_impacttime, + pev_starttime, + pev_idealpitch, + pev_ideal_yaw, + pev_pitch_speed, + pev_yaw_speed, + pev_ltime, + pev_nextthink, + pev_gravity, + pev_friction, + pev_frame, + pev_animtime, + pev_framerate, + pev_scale, + pev_renderamt, + pev_health, + pev_frags, + pev_takedamage, + pev_max_health, + pev_teleport_time, + pev_armortype, + pev_armorvalue, + pev_dmg_take, + pev_dmg_save, + pev_dmg, + pev_dmgtime, + pev_speed, + pev_air_finished, + pev_pain_finished, + pev_radsuit_finished, + pev_maxspeed, + pev_fov, + pev_flFallVelocity, + pev_fuser1, + pev_fuser2, + pev_fuser3, + pev_fuser4, + pev_float_end, + pev_int_start, + pev_fixangle, + pev_modelindex, + pev_viewmodel, + pev_weaponmodel, + pev_movetype, + pev_solid, + pev_skin, + pev_body, + pev_effects, + pev_light_level, + pev_sequence, + pev_gaitsequence, + pev_rendermode, + pev_renderfx, + pev_weapons, + pev_deadflag, + pev_button, + pev_impulse, + pev_spawnflags, + pev_flags, + pev_colormap, + pev_team, + pev_waterlevel, + pev_watertype, + pev_playerclass, + pev_weaponanim, + pev_pushmsec, + pev_bInDuck, + pev_flTimeStepSound, + pev_flSwimTime, + pev_flDuckTime, + pev_iStepLeft, + pev_gamestate, + pev_oldbuttons, + pev_groupinfo, + pev_iuser1, + pev_iuser2, + pev_iuser3, + pev_iuser4, + pev_int_end, + pev_byte_start, + pev_controller_0, + pev_controller_1, + pev_controller_2, + pev_controller_3, + pev_blending_0, + pev_blending_1, + pev_byte_end, + pev_bytearray_start, + pev_controller, + pev_blending, + pev_bytearray_end, + pev_vecarray_start, + pev_origin, + pev_oldorigin, + pev_velocity, + pev_basevelocity, + pev_clbasevelocity, + pev_movedir, + pev_angles, + pev_avelocity, + pev_v_angle, + pev_endpos, + pev_startpos, + pev_absmin, + pev_absmax, + pev_mins, + pev_maxs, + pev_size, + pev_rendercolor, + pev_view_ofs, + pev_vuser1, + pev_vuser2, + pev_vuser3, + pev_vuser4, + pev_punchangle, + pev_vecarray_end, + pev_string2_begin, /* anything after here are string corrections */ + pev_weaponmodel2, + pev_viewmodel2, + pev_string2_end, + pev_edict2_start, /* edict corrections */ + pev_pContainingEntity, + pev_absolute_end +}; + +/* Used with global_get() + */ +enum +{ + glb_start_int = 0, + glb_trace_hitgroup, + glb_trace_flags, + glb_msg_entity, + glb_cdAudioTrack, + glb_maxClients, + glb_maxEntities, + glb_end_int, + glb_start_float, + glb_time, + glb_frametime, + glb_force_retouch, + glb_deathmatch, + glb_coop, + glb_teamplay, + glb_serverflags, + glb_found_secrets, + glb_trace_allsolid, + glb_trace_startsolid, + glb_trace_fraction, + glb_trace_plane_dist, + glb_trace_inopen, + glb_trace_inwater, + glb_end_float, + glb_start_edict, + glb_trace_ent, + glb_end_edict, + glb_start_vector, + glb_v_forward, + glb_v_up, + glb_v_right, + glb_trace_endpos, + glb_trace_plane_normal, + glb_vecLandmarkOffset, + glb_end_vector, + glb_start_string, + glb_mapname, + glb_startspot, + glb_end_string, + glb_start_pchar, + glb_pStringBase, + glb_end_pchar +}; + +/* Used with register_forward() + */ +enum { + FM_PrecacheModel = 1, + FM_PrecacheSound, + FM_SetModel, + FM_ModelIndex, + FM_ModelFrames, + FM_SetSize, + FM_ChangeLevel, + FM_VecToYaw, + FM_VecToAngles, + FM_MoveToOrigin, + FM_ChangeYaw, + FM_ChangePitch, + FM_FindEntityByString, + FM_GetEntityIllum, + FM_FindEntityInSphere, + FM_FindClientInPVS, + FM_EntitiesInPVS, + FM_MakeVectors, + FM_AngleVectors, + FM_CreateEntity, + FM_RemoveEntity, + FM_CreateNamedEntity, + FM_MakeStatic, + FM_EntIsOnFloor, + FM_DropToFloor, + FM_WalkMove, + FM_SetOrigin, + FM_EmitSound, + FM_EmitAmbientSound, + FM_TraceLine, + FM_TraceToss, + FM_TraceMonsterHull, + FM_TraceHull, + FM_TraceModel, + FM_TraceTexture, + FM_TraceSphere, + FM_GetAimVector, + FM_ParticleEffect, + FM_LightStyle, + FM_DecalIndex, + FM_PointContents, + FM_MessageBegin, + FM_MessageEnd, + FM_WriteByte, + FM_WriteChar, + FM_WriteShort, + FM_WriteLong, + FM_WriteAngle, + FM_WriteCoord, + FM_WriteString, + FM_WriteEntity, + FM_CVarGetFloat, + FM_CVarGetString, + FM_CVarSetFloat, + FM_CVarSetString, + FM_FreeEntPrivateData, + FM_SzFromIndex, + FM_AllocString, + FM_RegUserMsg, + FM_AnimationAutomove, + FM_GetBonePosition, + FM_GetAttachment, + FM_SetView, + FM_Time, + FM_CrosshairAngle, + FM_FadeClientVolume, + FM_SetClientMaxspeed, + FM_CreateFakeClient, + FM_RunPlayerMove, + FM_NumberOfEntities, + FM_StaticDecal, + FM_PrecacheGeneric, + FM_BuildSoundMsg, + FM_GetPhysicsKeyValue, + FM_SetPhysicsKeyValue, + FM_GetPhysicsInfoString, + FM_PrecacheEvent, + FM_PlaybackEvent, + FM_CheckVisibility, + FM_GetCurrentPlayer, + FM_CanSkipPlayer, + FM_SetGroupMask, + FM_Voice_GetClientListening, + FM_Voice_SetClientListening, + FM_InfoKeyValue, + FM_SetKeyValue, + FM_SetClientKeyValue, + FM_GetPlayerAuthId, + FM_GetPlayerWONId, + FM_IsMapValid, + + FM_Spawn, + FM_Think, + FM_Use, + FM_Touch, + FM_Blocked, + FM_KeyValue, + FM_SetAbsBox, + FM_ClientConnect, + + FM_ClientDisconnect, + FM_ClientKill, + FM_ClientPutInServer, + FM_ClientCommand, + + FM_ServerDeactivate, + + FM_PlayerPreThink, + FM_PlayerPostThink, + + FM_StartFrame, + FM_ParmsNewLevel, + FM_ParmsChangeLevel, + + // Returns string describing current .dll. E.g., TeamFotrress 2, Half-Life + // This also gets called when the server is queried for information (for example, by a server browser tool) + FM_GetGameDescription, + + // Spectator funcs + FM_SpectatorConnect, + FM_SpectatorDisconnect, + FM_SpectatorThink, + + // Notify game .dll that engine is going to shut down. Allows mod authors to set a breakpoint. + FM_Sys_Error, + + FM_PM_FindTextureType, + FM_RegisterEncoders, + + // Create baselines for certain "unplaced" items. + FM_CreateInstBaselines, + + FM_AllowLagCompensation, + FM_AlertMessage, + + // NEW_DLL_FUNCTIONS: + FM_OnFreeEntPrivateData, + FM_GameShutdown, + FM_ShouldCollide, + + // LATE ADDITIONS (v1.71) + FM_ClientUserInfoChanged, + + // LATE ADDITIONS (v1.75) + FM_UpdateClientData, + FM_AddToFullPack, + FM_CmdStart, + FM_CmdEnd, + FM_CreateInstBaseline, + FM_CreateBaseline, + FM_GetInfoKeyBuffer, + FM_ClientPrintf, + + // LATE ADDITIONS (v1.80) + FM_ServerPrint +}; + +enum TraceResult +{ + TR_AllSolid, // int + TR_StartSolid, // int + TR_InOpen, // int + TR_InWater, // int + TR_flFraction, // float + TR_vecEndPos, // float array[3] + TR_flPlaneDist, // float + TR_vecPlaneNormal, // float array[3] + TR_pHit, // int (edict_t*) + TR_iHitgroup, // int +}; + +enum KeyValueData +{ + KV_ClassName, // string + KV_KeyName, // string + KV_Value, // string + KV_fHandled // int +}; + +enum ClientData +{ + CD_Origin, // float array[3] + CD_Velocity, // float array[3] + CD_ViewModel, // int + CD_PunchAngle, // float array[3] + CD_Flags, // int + CD_WaterLevel, // int + CD_WaterType, // int + CD_ViewOfs, // float array[3] + CD_Health, // float + CD_bInDuck, // int + CD_Weapons, // int + CD_flTimeStepSound, // int + CD_flDuckTime, // int + CD_flSwimTime, // int + CD_WaterJumpTime, // int + CD_MaxSpeed, // float + CD_FOV, // float + CD_WeaponAnim, // int + CD_ID, // int + CD_AmmoShells, // int + CD_AmmoNails, // int + CD_AmmoCells, // int + CD_AmmoRockets, // int + CD_flNextAttack, // float + CD_tfState, // int + CD_PushMsec, // int + CD_DeadFlag, // int + CD_PhysInfo, // string[256] + CD_iUser1, // int + CD_iUser2, // int + CD_iUser3, // int + CD_iUser4, // int + CD_fUser1, // float + CD_fUser2, // float + CD_fUser3, // float + CD_fUser4, // float + CD_vUser1, // float array[3] + CD_vUser2, // float array[3] + CD_vUser3, // float array[3] + CD_vUser4 // float array[3] +}; + +enum EntityState +{ + // Fields which are filled in by routines outside of delta compression + ES_EntityType, // int + // Index into cl_entities array for this entity + ES_Number, // int + ES_MsgTime, // float + + // Message number last time the player/entity state was updated + ES_MessageNum, // int + + // Fields which can be transitted and reconstructed over the network stream + ES_Origin, // float array[3] + ES_Angles, // float array[3] + + ES_ModelIndex, // int + ES_Sequence, // int + ES_Frame, // float + ES_ColorMap, // int + ES_Skin, // short + ES_Solid, // short + ES_Effects, // int + ES_Scale, // float + ES_eFlags, // byte + + // Render information + ES_RenderMode, // int + ES_RenderAmt, // int + ES_RenderColor, // byte array[3], RGB value + ES_RenderFx, // int + + ES_MoveType, // int + ES_AnimTime, // float + ES_FrameRate, // float + ES_Body, // int + ES_Controller, // byte array[4] + ES_Blending, // byte array[4] + ES_Velocity, // float array[3] + + // Send bbox down to client for use during prediction + ES_Mins, // float array[3] + ES_Maxs, // float array[3] + + ES_AimEnt, // int + // If owned by a player, the index of that player (for projectiles) + ES_Owner, // int + + // Friction, for prediction + ES_Friction, // float + // Gravity multiplier + ES_Gravity, // float + + // PLAYER SPECIFIC + ES_Team, // int + ES_PlayerClass, // int + ES_Health, // int + ES_Spectator, // bool + ES_WeaponModel, // int + ES_GaitSequence, // int + // If standing on conveyor, e.g. + ES_BaseVelocity, // float array[3] + // Use the crouched hull, or the regular player hull + ES_UseHull, // int + // Latched buttons last time state updated + ES_OldButtons, // int + // -1 = in air, else pmove entity number + ES_OnGround, // int + ES_iStepLeft, // int + // How fast we are falling + ES_flFallVelocity, // float + + ES_FOV, // float + ES_WeaponAnim, // int + + // Parametric movement overrides + ES_StartPos, // float array[3] + ES_EndPos, // float array[3] + ES_ImpactTime, // float + ES_StartTime, // float + + // For mods + ES_iUser1, // int + ES_iUser2, // int + ES_iUser3, // int + ES_iUser4, // int + ES_fUser1, // float + ES_fUser2, // float + ES_fUser3, // float + ES_fUser4, // float + ES_vUser1, // float array[3] + ES_vUser2, // float array[3] + ES_vUser3, // float array[3] + ES_vUser4 // float array[3] +}; + +enum UserCmd +{ + // Interpolation time on client + UC_LerpMsec, // short + // Duration in ms of command + UC_Msec, // byte + // Command view angles + UC_ViewAngles, // float array[3] + + // Intended velocities + // Forward velocity + UC_ForwardMove, // float + // Sideways velocity + UC_SideMove, // float + // Upward velocity + UC_UpMove, // float + // Light level at spot where we are standing + UC_LightLevel, // byte + // Attack buttons + UC_Buttons, // unsigned short + // Impulse command issued + UC_Impulse, // byte + // Current weapon id + UC_WeaponSelect, // byte + + // Experimental player impact stuff + UC_ImpactIndex, // int + UC_ImpactPosition // float array[3] +}; + +enum AlertType +{ + at_notice = 0, + at_console, // same as at_notice, but forces a ConPrintf, not a message box + at_aiconsole, // same as at_console, but only shown if developer level is 2! + at_warning, + at_error, + at_logged // Server print to console (only in multiplayer games) +}; + +/** + * Data field types for use with find_ent_data_info(). + */ +enum FieldType +{ + FIELD_NONE, + FIELD_FLOAT, // Floating point value + FIELD_STRINGINT, // String ID (return from ALLOC_STRING) + FIELD_STRINGPTR, // String, pointer-to-char + FIELD_STRING, // String, fixed size + FIELD_CLASSPTR, // Classes pointer derived of CBaseEntity + FIELD_CLASS, // Arbitrary classes, direct + FIELD_STRUCTURE, // Arbitrary structures, direct + FIELD_EHANDLE, // Entity handle + FIELD_ENTVARS, // entvars_t* + FIELD_EDICT, // edict_t* + FIELD_VECTOR, // Vector + FIELD_POINTER, // Arbitrary data pointer + FIELD_INTEGER, // Integer or enum + FIELD_FUNCTION, // Class function pointer (Think, Use, etc) + FIELD_BOOLEAN, // Boolean + FIELD_SHORT, // 2 bytes integer + FIELD_CHARACTER, // 1 byte +}; + +/** + * Base data field types for use with get_ent_data_basetype(). + */ +enum BaseFieldType +{ + BASEFIELD_NONE, + BASEFIELD_INTEGER, + BASEFIELD_FLOAT, + BASEFIELD_VECTOR, + BASEFIELD_ENTITY, + BASEFIELD_STRING, +}; diff --git a/bin/amxxdump/includes/amxmodx/fakemeta_stocks.inc b/bin/amxxdump/includes/amxmodx/fakemeta_stocks.inc new file mode 100644 index 0000000..088f951 --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/fakemeta_stocks.inc @@ -0,0 +1,395 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Fakemeta Stocks +// + +#if !defined _fakemeta_included + #include +#endif + +#if defined _fakemeta_stocks_included + #endinput +#endif +#define _fakemeta_stocks_included + +// EngFuncs +stock EF_PrecacheModel(const string[]) { + return engfunc(EngFunc_PrecacheModel, string); +} + +stock EF_PrecacheSound(const string[]) { + return engfunc(EngFunc_PrecacheSound, string); +} +stock EF_SetModel(const ID, const STRING[]) { + return engfunc(EngFunc_SetModel, ID, STRING); +} +stock EF_ModelIndex(const STRING[]) { + return engfunc(EngFunc_ModelIndex, STRING); +} +stock EF_ModelFrames(modelIndex) { + return engfunc(EngFunc_ModelFrames, modelIndex); +} + +stock EF_SetSize(const ENTITY, const Float:MIN[3], const Float:MAX[3]) { + return engfunc(EngFunc_SetSize, ENTITY, MIN, MAX); +} +stock EF_ChangeLevel(const S1[], const S2[]) { + return engfunc(EngFunc_ChangeLevel, S1, S2); +} +stock EF_VecToYaw(const Float:VECTOR[3], &Float:returnValue) { + return engfunc(EngFunc_VecToYaw, VECTOR, returnValue); +} +stock EF_VecToAngles(const Float:VECTORIN[3], const Float:VECTOROUT[3]) { + return engfunc(EngFunc_VecToAngles, VECTORIN, VECTOROUT); +} +stock EF_MoveToOrigin(const ENTITY, const Float:GOAL[3], const Float:DISTANCE, const MOVETYPE) { + return engfunc(EngFunc_MoveToOrigin, ENTITY, GOAL, DISTANCE, MOVETYPE); +} + +stock EF_ChangeYaw(const ENTITY) { + return engfunc(EngFunc_ChangeYaw, ENTITY); +} +stock EF_ChangePitch(const ENTITY) { + return engfunc(EngFunc_ChangePitch, ENTITY); +} +stock EF_FindEntityByString(const STARTSEARCHAFTER, const FIELD[], const VALUE[]) { + return engfunc(EngFunc_FindEntityByString, STARTSEARCHAFTER, FIELD, VALUE); +} +stock EF_GetEntityIllum(const ENTITY) { + return engfunc(EngFunc_GetEntityIllum, ENTITY); +} +stock EF_FindEntityInSphere(const STARTSEARCHAFTER, const Float:ORIGIN[3], Float:radius) { + return engfunc(EngFunc_FindEntityInSphere, STARTSEARCHAFTER, ORIGIN, radius); +} + +stock EF_FindClientInPVS(const CLIENT) { + return engfunc(EngFunc_FindClientInPVS, CLIENT); +} +stock EF_EntitiesInPVS(const CLIENT) { + return engfunc(EngFunc_EntitiesInPVS, CLIENT); +} +stock EF_MakeVectors(const Float:VECTOR[3]) { + return engfunc(EngFunc_MakeVectors, VECTOR); +} +stock EF_AngleVectors(const Float:VECTOR[3], Float:forward_[3], Float:right[3], Float:up[3]) { + return engfunc(EngFunc_AngleVectors, VECTOR, forward_, right, up); +} +stock EF_CreateEntity() { + return engfunc(EngFunc_CreateEntity); +} + +stock EF_RemoveEntity(const ENTITY) { + return engfunc(EngFunc_RemoveEntity, ENTITY); +} +stock EF_CreateNamedEntity(const CLASSNAME) { + return engfunc(EngFunc_CreateNamedEntity, CLASSNAME); +} +stock EF_MakeStatic(const ENTITY) { + return engfunc(EngFunc_MakeStatic, ENTITY); +} +stock EF_EntIsOnFloor(const ENTITY) { + return engfunc(EngFunc_EntIsOnFloor, ENTITY); +} +stock EF_DropToFloor(const ENTITY) { + return engfunc(EngFunc_DropToFloor, ENTITY); +} + +stock EF_WalkMove(const ENTITY, Float:yaw, Float:distance, iMode) { + return engfunc(EngFunc_WalkMove, ENTITY, yaw, distance, iMode); +} +stock EF_SetOrigin(const ENTITY, const Float:ORIGIN[3]) { + return engfunc(EngFunc_SetOrigin, ENTITY, ORIGIN); +} +stock EF_EmitSound(const ENTITY, channel, const SAMPLE[], Float:volume, Float:attenuation, fFlags, pitch) { + return engfunc(EngFunc_EmitSound, ENTITY, channel, SAMPLE, volume, attenuation, fFlags, pitch); +} +stock EF_EmitAmbientSound(const ENTITY, Float:pos[3], const SAMPLE[], Float:volume, Float:attenuation, fFlags, pitch) { + return engfunc(EngFunc_EmitAmbientSound, ENTITY, pos, SAMPLE, volume, attenuation, fFlags, pitch); +} +stock EF_TraceLine(const Float:V1[3], const Float:V2[3], fNoMonsters, const ENT_TO_SKIP) { + return engfunc(EngFunc_TraceLine, V1, V2, fNoMonsters, ENT_TO_SKIP); +} + +stock EF_TraceToss(const ENTITY, const ENTITY_TO_IGNORE) { + return engfunc(EngFunc_TraceToss, ENTITY, ENTITY_TO_IGNORE); +} +stock EF_TraceMonsterHull(const ENTITY, const Float:V1[3], const Float:V2[3], fNoMonsters, const ENTITY_TO_SKIP) { + return engfunc(EngFunc_TraceMonsterHull, ENTITY, V1, V2, fNoMonsters, ENTITY_TO_SKIP); +} +stock EF_TraceHull(const Float:V1[3], const Float:V2[3], fNoMonsters, hullNumber, const ENTITY_TO_SKIP) { + return engfunc(EngFunc_TraceHull, V1, V2, fNoMonsters, hullNumber, ENTITY_TO_SKIP); +} +stock EF_TraceModel(const Float:V1[3], const Float:V2[3], hullNumber, const ENTITY) { + return engfunc(EngFunc_TraceModel, V1, V2, hullNumber, ENTITY); +} +stock EF_TraceTexture(const TEXTURE_ENTITY, const Float:V1[3], const Float:V2[3]) { + return engfunc(EngFunc_TraceTexture, TEXTURE_ENTITY, V1, V2); +} + +stock EF_TraceSphere(const Float:V1[3], const Float:V2[3], fNoMonsters, Float:radius, const ENTITY_TO_SKIP) { + return engfunc(EngFunc_TraceSphere, V1, V2, fNoMonsters, radius, ENTITY_TO_SKIP); +} +stock EF_GetAimVector(const ENTITY, Float:speed, Float:returnVector[3]) { + return engfunc(EngFunc_GetAimVector, ENTITY, speed, returnVector); +} +stock EF_ParticleEffect(const Float:ORIGIN[3], const Float:DIRECTION[3], Float:color, Float:count) { + return engfunc(EngFunc_ParticleEffect, ORIGIN, DIRECTION, color, count); +} +stock EF_LightStyle(style, val[]) { + return engfunc(EngFunc_LightStyle, style, val); +} +stock EF_DecalIndex(const NAME[]) { + return engfunc(EngFunc_DecalIndex, NAME); +} + +stock EF_PointContents(const Float:VECTOR[3]) { + return engfunc(EngFunc_PointContents, VECTOR); +} +stock EF_FreeEntPrivateData(const ENTITY) { + return engfunc(EngFunc_FreeEntPrivateData, ENTITY); +} +stock EF_SzFromIndex(iString) { + return engfunc(EngFunc_SzFromIndex, iString); +} +stock EF_AllocString(const STRING[]) { + return engfunc(EngFunc_AllocString, STRING); +} +stock EF_RegUserMsg(const NAME[], iSize) { + return engfunc(EngFunc_RegUserMsg, NAME, iSize); +} + +stock EF_AnimationAutomove(const ENTITY, Float:flTime) { + return engfunc(EngFunc_AnimationAutomove, ENTITY, flTime); +} +stock EF_GetBonePosition(const ENTITY, iBone, Float:origin[3], Float:angles[3]) { + return engfunc(EngFunc_GetBonePosition, ENTITY, iBone, origin, angles); +} +stock EF_GetAttachment(const ENTITY, iAttachment, Float:origin[3], Float:angles[3]) { + return engfunc(EngFunc_GetAttachment, ENTITY, iAttachment, origin, angles); +} +stock EF_SetView(const CLIENT, const VIEW_ENTITY) { + return engfunc(EngFunc_SetView, CLIENT, VIEW_ENTITY); +} +stock EF_Time(&Float:returnValue) { + return engfunc(EngFunc_Time, returnValue); +} + +stock EF_CrosshairAngle(const CLIENT, Float:pitch, Float:yaw) { + return engfunc(EngFunc_CrosshairAngle, CLIENT, pitch, yaw); +} +stock EF_FadeClientVolume(const ENTITY, fadePercent, fadeOutSeconds, holdTime, fadeInSeconds) { + return engfunc(EngFunc_FadeClientVolume, ENTITY, fadePercent, fadeOutSeconds, holdTime, fadeInSeconds); +} +stock EF_SetClientMaxspeed(const ENTITY, Float:newMaxspeed) { + return engfunc(EngFunc_SetClientMaxspeed, ENTITY, newMaxspeed); +} +stock EF_CreateFakeClient(const NETNAME[]) { + return engfunc(EngFunc_CreateFakeClient, NETNAME); +} +stock EF_RunPlayerMove(const FAKECLIENT, const Float:VIEWANGLES[3], Float:forwardmove, Float:sidemove, Float:upmove, buttons, impulse, msec) { + return engfunc(EngFunc_RunPlayerMove, FAKECLIENT, VIEWANGLES, forwardmove, sidemove, upmove, buttons, impulse, msec); +} + +stock EF_NumberOfEntities() { + return engfunc(EngFunc_NumberOfEntities); +} +stock EF_StaticDecal(const Float:ORIGIN[3], decalIndex, entityIndex, modelIndex) + return engfunc(EngFunc_StaticDecal, ORIGIN, decalIndex, entityIndex, modelIndex); +stock EF_PrecacheGeneric(const STRING[]) { + return engfunc(EngFunc_PrecacheGeneric, STRING); +} +stock EF_BuildSoundMSG(const ENTITY, channel, const SAMPLE[], Float:volume, Float:attenuation, fFlags, pitch, msg_dest, msg_type, const Float:ORIGIN[3], const ED) { + return engfunc(EngFunc_BuildSoundMsg, ENTITY, channel, SAMPLE, volume, attenuation, fFlags, pitch, msg_dest, msg_type, ORIGIN, ED); +} +stock EF_GetPhysicsKeyValue(const CLIENT, const KEY[]) { + return engfunc(EngFunc_GetPhysicsKeyValue, CLIENT, KEY); +} + +stock EF_SetPhysicsKeyValue(const CLIENT, const KEY[], const VALUE[]) { + return engfunc(EngFunc_SetPhysicsKeyValue, CLIENT, KEY, VALUE); +} +stock EF_GetPhysicsInfoString(const CLIENT, returnString[], maxLength) { + return engfunc(EngFunc_GetPhysicsInfoString, CLIENT, returnString, maxLength); +} +stock EF_PrecacheEvent(type, const STRING[]) { + return engfunc(EngFunc_PrecacheEvent, type, STRING); +} +stock EF_PlaybackEvent(flags, const INVOKER, eventindex, Float:delay, Float:origin[3], Float:angles[3], Float:fparam1, Float:fparam2, iparam1, iparam2, bparam1, bparam2) { + return engfunc(EngFunc_PlaybackEvent, flags, INVOKER, eventindex, delay, origin, angles, fparam1, fparam2, iparam1, iparam2, bparam1, bparam2); +} +stock EF_CheckVisibility(const ENTITY, set) { + return engfunc(EngFunc_CheckVisibility, ENTITY, set); +} + +stock EF_GetCurrentPlayer() { + return engfunc(EngFunc_GetCurrentPlayer); +} +stock EF_CanSkipPlayer(const PLAYER) { + return engfunc(EngFunc_CanSkipPlayer, PLAYER); +} +stock EF_SetGroupMask(mask, op) { + return engfunc(EngFunc_SetGroupMask, mask, op); +} +stock EF_GetClientListening(receiver, sender) { + return engfunc(EngFunc_GetClientListening, receiver, sender); +} +stock EF_SetClientListening(receiver, sender, bool:listen) { + return engfunc(EngFunc_SetClientListening, receiver, sender, listen); +} + +stock EF_MessageBegin(msg_dest, msg_type, const Float:ORIGIN[3], const ED) { + return engfunc(EngFunc_MessageBegin, msg_dest, msg_type, ORIGIN, ED); +} +stock EF_WriteCoord(Float:value) { + return engfunc(EngFunc_WriteCoord, value); +} +stock EF_WriteAngle(Float:value) { + return engfunc(EngFunc_WriteAngle, value); +} +stock EF_InfoKeyValue(const INFOBUFFER, const KEY[], returnValue[], maxLength) { + return engfunc(EngFunc_InfoKeyValue, INFOBUFFER, KEY, returnValue, maxLength); +} +stock EF_SetKeyValue(const INFOBUFFER, const KEY[], const VALUE[]) { + return engfunc(EngFunc_SetKeyValue, INFOBUFFER, KEY, VALUE); +} + +stock EF_SetClientKeyValue(const ID, const INFOBUFFER, const KEY[], const VALUE[]) { + return engfunc(EngFunc_SetClientKeyValue, ID, INFOBUFFER, KEY, VALUE); +} + +stock EF_CreateInstBaseline(CLASSNAME, baseline) { + return engfunc(EngFunc_CreateInstBaseline, CLASSNAME, baseline); +} + +// Returns pointer to info buffer that can be used with the INFOBUFFER param +// of EF_InfoKeyValue, EF_SetKeyValue, and EF_SetClientKeyValue +stock EF_GetInfoKeyBuffer(const ENTITY) { + return engfunc(EngFunc_GetInfoKeyBuffer, ENTITY); +} +stock EF_ClientPrintf(const ENTITY, const printType, const MESSAGE[]) { + return engfunc(EngFunc_ClientPrintf, ENTITY, printType, MESSAGE); +} +stock EF_ServerPrint(const MESSAGE[]) { + return engfunc(EngFunc_ServerPrint, MESSAGE); +} + +// DLLFuncs +stock DF_GameInit() { + return dllfunc(DLLFunc_GameInit); +} +stock DF_Spawn(const ENTITY) { + return dllfunc(DLLFunc_Spawn, ENTITY); +} +stock DF_Think(const ENTITY) { + return dllfunc(DLLFunc_Think, ENTITY); +} +stock DF_Use(const ENT_Used, const ENT_User) { + return dllfunc(DLLFunc_Use, ENT_Used, ENT_User); +} +stock DF_Touch(const ENT_Touched, const ENT_Toucher) { + return dllfunc(DLLFunc_Touch, ENT_Touched, ENT_Toucher); +} + +stock DF_Blocked(const ENT_Blocked, const ENT_Other) { + return dllfunc(DLLFunc_Blocked, ENT_Blocked, ENT_Other); +} +stock DF_SetAbsBox(const ENTITY) { + return dllfunc(DLLFunc_SetAbsBox, ENTITY); +} +stock DF_ClientConnect(const ENTITY, const NAME[], const ADDRESS[], RejectReason[128]) { + return dllfunc(DLLFunc_ClientConnect, ENTITY, NAME, ADDRESS, RejectReason); +} +stock DF_ClientDisconnect(const ENTITY) { + return dllfunc(DLLFunc_ClientDisconnect, ENTITY); +} +stock DF_ClientKill(const ENTITY) { + return dllfunc(DLLFunc_ClientKill, ENTITY); +} + +stock DF_ClientPutInServer(const ENTITY) { + return dllfunc(DLLFunc_ClientPutInServer, ENTITY); +} +stock DF_ClientCommand(const ENTITY) { + return dllfunc(DLLFunc_ClientCommand, ENTITY); +} +stock DF_ServerDeactivate() { + return dllfunc(DLLFunc_ServerDeactivate); +} +stock DF_PlayerPreThink(const ENTITY) { + return dllfunc(DLLFunc_PlayerPreThink, ENTITY); +} +stock DF_PlayerPostThink(const ENTITY) { + return dllfunc(DLLFunc_PlayerPostThink, ENTITY); +} + +stock DF_StartFrame() { + return dllfunc(DLLFunc_StartFrame); +} +stock DF_ParmsNewLevel() { + return dllfunc(DLLFunc_ParmsNewLevel); +} +stock DF_ParmsChangeLevel() { + return dllfunc(DLLFunc_ParmsChangeLevel); +} +stock DF_GetGameDescription() { + return dllfunc(DLLFunc_GetGameDescription); +} +stock DF_SpectatorConnect(const ENTITY) { + return dllfunc(DLLFunc_SpectatorConnect, ENTITY); +} + +stock DF_SpectatorDisconnect(const ENTITY) { + return dllfunc(DLLFunc_SpectatorDisconnect, ENTITY); +} +stock DF_SpectatorThink(const ENTITY) { + return dllfunc(DLLFunc_SpectatorThink, ENTITY); +} +stock DF_Sys_Error(const ERROR_STRING[]) { + return dllfunc(DLLFunc_Sys_Error, ERROR_STRING); +} +stock DF_PM_FindTextureType(name[]) { + return dllfunc(DLLFunc_PM_FindTextureType, name); +} +stock DF_RegisterEncoders() { + return dllfunc(DLLFunc_RegisterEncoders); +} + +stock DF_GetHullBounds(hullnumber, Float:mins[3], Float:maxs[3]) { + return dllfunc(DLLFunc_GetHullBounds, hullnumber, mins, maxs); +} +stock DF_CreateInstBaselines() { + return dllfunc(DLLFunc_CreateInstBaselines); +} +stock DF_pfnAllowLagCompensation() { + return dllfunc(DLLFunc_pfnAllowLagCompensation); +} +stock DF_MetaFunc_CallGameEntity(const STRING[], const ENTITY) { + return dllfunc(MetaFunc_CallGameEntity, STRING, ENTITY); +} +stock DF_ClientUserInfoChanged(const IDPLAYER) { + return dllfunc(DLLFunc_ClientUserInfoChanged, IDPLAYER); +} + +stock DF_UpdateClientData(const ENTITY, sendweapons, const cd/* = 0*/) { + return dllfunc(DLLFunc_UpdateClientData, ENTITY, sendweapons, cd); +} +stock DF_AddToFullPack(const STATE/* = 0*/, e, ENT, HOST, hostflags, player, set) { + return dllfunc(DLLFunc_AddToFullPack, STATE, e, ENT, HOST, hostflags, player, set); +} +stock DF_CmdStart(const PLAYER, const CMD/* = 0*/, randomSeed) { + return dllfunc(DLLFunc_CmdStart, PLAYER, CMD, randomSeed); +} +stock DF_CmdEnd(const PLAYER) { + return dllfunc(DLLFunc_CmdEnd, PLAYER); +} +stock DF_CreateBaseline(PLAYER, eIndex, baseline, playerModelIndex, Float:playerMins[3], Float:playerMaxs[3]) { + return dllfunc(DLLFunc_CreateBaseline, PLAYER, eIndex, baseline, playerModelIndex, playerMins, playerMaxs); +} diff --git a/bin/amxxdump/includes/amxmodx/fakemeta_util.inc b/bin/amxxdump/includes/amxmodx/fakemeta_util.inc new file mode 100644 index 0000000..4c66231 --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/fakemeta_util.inc @@ -0,0 +1,882 @@ +/** + * This file provides various utility functions that use the Fakemeta module. + * This file is created and maintained by VEN. + * For support and issues, see: + * http://forums.alliedmods.net/showthread.php?t=28284 + */ + + +/* Fakemeta Utilities +* +* by VEN +* +* This file is provided as is (no warranties). +*/ + +#if !defined _fakemeta_included + #include +#endif + +#if defined _fakemeta_util_included + #endinput +#endif +#define _fakemeta_util_included + +#include + + +/* Engine functions */ + +#define fm_precache_generic(%1) engfunc(EngFunc_PrecacheGeneric, %1) +/* stock fm_precache_generic(const file[]) + return engfunc(EngFunc_PrecacheGeneric, file) */ + +#define fm_precache_event(%1,%2) engfunc(EngFunc_PrecacheEvent, %1, %2) +/* stock fm_precache_event(type, const name[]) + return engfunc(EngFunc_PrecacheEvent, type, name) */ + +// ported by v3x +#define fm_drop_to_floor(%1) engfunc(EngFunc_DropToFloor, %1) +/* stock fm_drop_to_floor(entity) + return engfunc(EngFunc_DropToFloor, entity) */ + +#define fm_force_use(%1,%2) dllfunc(DLLFunc_Use, %2, %1) +/* stock fm_force_use(user, used) + return dllfunc(DLLFunc_Use, used, user) */ + +#define fm_entity_set_size(%1,%2,%3) engfunc(EngFunc_SetSize, %1, %2, %3) +/* stock fm_entity_set_size(index, const Float:mins[3], const Float:maxs[3]) + return engfunc(EngFunc_SetSize, index, mins, maxs) */ + +#define fm_get_decal_index(%1) engfunc(EngFunc_DecalIndex, %1) +/* stock fm_get_decal_index(const decalname[]) + return engfunc(EngFunc_DecalIndex, decalname) */ + +stock Float:fm_entity_range(ent1, ent2) { + new Float:origin1[3], Float:origin2[3]; + pev(ent1, pev_origin, origin1); + pev(ent2, pev_origin, origin2); + + return get_distance_f(origin1, origin2); +} + +// based on KoST's port, upgraded version fits into the macros +#define fm_create_entity(%1) engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, %1)) +/* stock fm_create_entity(const classname[]) + return engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, classname)) */ + +#define fm_find_ent_by_class(%1,%2) engfunc(EngFunc_FindEntityByString, %1, "classname", %2) +/* stock fm_find_ent_by_class(index, const classname[]) + return engfunc(EngFunc_FindEntityByString, index, "classname", classname) */ + +stock fm_find_ent_by_owner(index, const classname[], owner, jghgtype = 0) { + new strtype[11] = "classname", ent = index; + switch (jghgtype) { + case 1: strtype = "target"; + case 2: strtype = "targetname"; + } + + while ((ent = engfunc(EngFunc_FindEntityByString, ent, strtype, classname)) && pev(ent, pev_owner) != owner) {} + + return ent; +} + +#define fm_find_ent_by_target(%1,%2) engfunc(EngFunc_FindEntityByString, %1, "target", %2) +/* stock fm_find_ent_by_target(index, const target[]) + return engfunc(EngFunc_FindEntityByString, index, "target", target) */ + +#define fm_find_ent_by_tname(%1,%2) engfunc(EngFunc_FindEntityByString, %1, "targetname", %2) +/* stock fm_find_ent_by_tname(index, const targetname[]) + return engfunc(EngFunc_FindEntityByString, index, "targetname", targetname) */ + +stock fm_find_ent_by_model(index, const classname[], const model[]) { + new ent = index, mdl[72]; + while ((ent = fm_find_ent_by_class(ent, classname))) { + pev(ent, pev_model, mdl, sizeof mdl - 1); + if (equal(mdl, model)) + return ent; + } + + return 0; +} + +#define fm_find_ent_in_sphere(%1,%2,%3) engfunc(EngFunc_FindEntityInSphere, %1, %2, %3) +/* stock fm_find_ent_in_sphere(index, const Float:origin[3], Float:radius) + return engfunc(EngFunc_FindEntityInSphere, index, origin, radius) */ + +#define fm_call_think(%1) dllfunc(DLLFunc_Think, %1) +/* stock fm_call_think(entity) + return dllfunc(DLLFunc_Think, entity) */ + +#define fm_is_valid_ent(%1) pev_valid(%1) +/* stock fm_is_valid_ent(index) + return pev_valid(index) */ + +stock fm_entity_set_origin(index, const Float:origin[3]) { + new Float:mins[3], Float:maxs[3]; + pev(index, pev_mins, mins); + pev(index, pev_maxs, maxs); + engfunc(EngFunc_SetSize, index, mins, maxs); + + return engfunc(EngFunc_SetOrigin, index, origin); +} + +#define fm_entity_set_model(%1,%2) engfunc(EngFunc_SetModel, %1, %2) +/* stock fm_entity_set_model(index, const model[]) + return engfunc(EngFunc_SetModel, index, model) */ + +// ported by v3x +#define fm_remove_entity(%1) engfunc(EngFunc_RemoveEntity, %1) +/* stock fm_remove_entity(index) + return engfunc(EngFunc_RemoveEntity, index) */ + +#define fm_entity_count() engfunc(EngFunc_NumberOfEntities) +/* stock fm_entity_count() + return engfunc(EngFunc_NumberOfEntities) */ + +#define fm_fake_touch(%1,%2) dllfunc(DLLFunc_Touch, %1, %2) +/* stock fm_fake_touch(toucher, touched) + return dllfunc(DLLFunc_Touch, toucher, touched) */ + +#define fm_DispatchSpawn(%1) dllfunc(DLLFunc_Spawn, %1) +/* stock fm_DispatchSpawn(entity) + return dllfunc(DLLFunc_Spawn, entity) */ + +// ported by v3x +#define fm_point_contents(%1) engfunc(EngFunc_PointContents, %1) +/* stock fm_point_contents(const Float:point[3]) + return engfunc(EngFunc_PointContents, point) */ + +stock fm_trace_line(ignoreent, const Float:start[3], const Float:end[3], Float:ret[3]) { + engfunc(EngFunc_TraceLine, start, end, ignoreent == -1 ? 1 : 0, ignoreent, 0); + + new ent = get_tr2(0, TR_pHit); + get_tr2(0, TR_vecEndPos, ret); + + return pev_valid(ent) ? ent : 0; +} + +stock fm_trace_hull(const Float:origin[3], hull, ignoredent = 0, ignoremonsters = 0) { + new result = 0; + engfunc(EngFunc_TraceHull, origin, origin, ignoremonsters, hull, ignoredent > 0 ? ignoredent : 0, 0); + + if (get_tr2(0, TR_StartSolid)) + result += 1; + if (get_tr2(0, TR_AllSolid)) + result += 2; + if (!get_tr2(0, TR_InOpen)) + result += 4; + + return result; +} + +stock fm_trace_normal(ignoreent, const Float:start[3], const Float:end[3], Float:ret[3]) { + engfunc(EngFunc_TraceLine, start, end, 0, ignoreent, 0); + get_tr2(0, TR_vecPlaneNormal, ret); + + new Float:fraction; + get_tr2(0, TR_flFraction, fraction); + if (fraction >= 1.0) + return 0; + + return 1; +} + +// note that for CS planted C4 has a "grenade" classname as well +stock fm_get_grenade_id(id, model[], len, grenadeid = 0) { + new ent = fm_find_ent_by_owner(grenadeid, "grenade", id); + if (ent && len > 0) + pev(ent, pev_model, model, len); + + return ent; +} + +#define fm_halflife_time() get_gametime() +/* stock Float:fm_halflife_time() + return get_gametime() */ + +#define fm_attach_view(%1,%2) engfunc(EngFunc_SetView, %1, %2) +/* stock fm_attach_view(index, entity) + return engfunc(EngFunc_SetView, index, entity) */ + +stock fm_playback_event(flags, invoker, eventindex, Float:delay, const Float:origin[3], const Float:angles[3], Float:fparam1, Float:fparam2, iparam1, iparam2, bparam1, bparam2) { + return engfunc(EngFunc_PlaybackEvent, flags, invoker, eventindex, delay, origin, angles, fparam1, fparam2, iparam1, iparam2, bparam1, bparam2); +} + +#define fm_eng_get_string(%1,%2,%3) engfunc(EngFunc_SzFromIndex, %1, %2, %3) +/* stock fm_eng_get_string(istring, string[], len) + return engfunc(EngFunc_SzFromIndex, istring, string, len) */ + + +/* HLSDK functions */ + +// the dot product is performed in 2d, making the view cone infinitely tall +stock bool:fm_is_in_viewcone(index, const Float:point[3]) { + new Float:angles[3]; + pev(index, pev_angles, angles); + engfunc(EngFunc_MakeVectors, angles); + global_get(glb_v_forward, angles); + angles[2] = 0.0; + + new Float:origin[3], Float:diff[3], Float:norm[3]; + pev(index, pev_origin, origin); + xs_vec_sub(point, origin, diff); + diff[2] = 0.0; + xs_vec_normalize(diff, norm); + + new Float:dot, Float:fov; + dot = xs_vec_dot(norm, angles); + pev(index, pev_fov, fov); + if (dot >= floatcos(fov * M_PI / 360)) + return true; + + return false; +} + +stock bool:fm_is_visible(index, const Float:point[3], ignoremonsters = 0) { + new Float:start[3], Float:view_ofs[3]; + pev(index, pev_origin, start); + pev(index, pev_view_ofs, view_ofs); + xs_vec_add(start, view_ofs, start); + + engfunc(EngFunc_TraceLine, start, point, ignoremonsters, index, 0); + + new Float:fraction; + get_tr2(0, TR_flFraction, fraction); + if (fraction == 1.0) + return true; + + return false; +} + + +/* Engine_stocks functions */ + +stock fm_fakedamage(victim, const classname[], Float:takedmgdamage, damagetype) { + new class[] = "trigger_hurt"; + new entity = fm_create_entity(class); + if (!entity) + return 0; + + new value[16]; + float_to_str(takedmgdamage * 2, value, sizeof value - 1); + fm_set_kvd(entity, "dmg", value, class); + + num_to_str(damagetype, value, sizeof value - 1); + fm_set_kvd(entity, "damagetype", value, class); + + fm_set_kvd(entity, "origin", "8192 8192 8192", class); + fm_DispatchSpawn(entity); + + set_pev(entity, pev_classname, classname); + fm_fake_touch(entity, victim); + fm_remove_entity(entity); + + return 1; +} + +#define fm_find_ent(%1,%2) engfunc(EngFunc_FindEntityByString, %1, "classname", %2) +/* stock fm_find_ent(index, const classname[]) + return engfunc(EngFunc_FindEntityByString, index, "classname", classname) */ + +#define fm_get_user_button(%1) pev(%1, pev_button) +/* stock fm_get_user_button(index) + return pev(index, pev_button) */ + +#define fm_get_user_oldbutton(%1) pev(%1, pev_oldbuttons) +/* stock fm_get_user_oldbutton(index) + return pev(index, pev_oldbuttons) */ + +#define fm_get_entity_flags(%1) pev(%1, pev_flags) +/* stock fm_get_entity_flags(index) + return pev(index, pev_flags) */ + +#define fm_get_entity_distance(%1,%2) floatround(fm_entity_range(%1, %2)) +/* stock fm_get_entity_distance(ent1, ent2) + return floatround(fm_entity_range(ent1, ent2)) */ + +#define fm_get_grenade(%1) fm_get_grenade_id(%1, "", 0) +/* stock fm_get_grenade(id) + return fm_get_grenade_id(id, "", 0) */ + +// optimization idea by Orangutanz +stock fm_get_brush_entity_origin(index, Float:origin[3]) { + new Float:mins[3], Float:maxs[3]; + + pev(index, pev_origin, origin); + pev(index, pev_mins, mins); + pev(index, pev_maxs, maxs); + + origin[0] += (mins[0] + maxs[0]) * 0.5; + origin[1] += (mins[1] + maxs[1]) * 0.5; + origin[2] += (mins[2] + maxs[2]) * 0.5; + + return 1; +} + +// based on v3x's port, upgraded version returns number of removed entities +stock fm_remove_entity_name(const classname[]) { + new ent = -1, num = 0; + while ((ent = fm_find_ent_by_class(ent, classname))) + num += fm_remove_entity(ent); + + return num; +} + +stock fm_ViewContents(id) { + new origin[3], Float:Orig[3]; + get_user_origin(id, origin, Origin_AimEndEyes); + IVecFVec(origin, Orig); + + return fm_point_contents(Orig); +} + +stock fm_get_speed(entity) { + new Float:Vel[3]; + pev(entity, pev_velocity, Vel); + + return floatround(vector_length(Vel)); +} + +stock fm_set_rendering(entity, fx = kRenderFxNone, r = 255, g = 255, b = 255, render = kRenderNormal, amount = 16) { + new Float:RenderColor[3]; + RenderColor[0] = float(r); + RenderColor[1] = float(g); + RenderColor[2] = float(b); + + set_pev(entity, pev_renderfx, fx); + set_pev(entity, pev_rendercolor, RenderColor); + set_pev(entity, pev_rendermode, render); + set_pev(entity, pev_renderamt, float(amount)); + + return 1; +} + +stock fm_set_entity_flags(index, flag, onoff) { + new flags = pev(index, pev_flags); + if ((flags & flag) > 0) + return onoff == 1 ? 2 : 1 + 0 * set_pev(index, pev_flags, flags - flag); + else + return onoff == 0 ? 2 : 1 + 0 * set_pev(index, pev_flags, flags + flag); + + return 0; +} + +stock fm_set_entity_visibility(index, visible = 1) { + set_pev(index, pev_effects, visible == 1 ? pev(index, pev_effects) & ~EF_NODRAW : pev(index, pev_effects) | EF_NODRAW); + + return 1; +} + +#define fm_get_entity_visibility(%1) (!(pev(%1, pev_effects) & EF_NODRAW)) +/* stock fm_get_entity_visibility(index) + return !(pev(index, pev_effects) & EF_NODRAW) */ + +stock fm_set_user_velocity(entity, const Float:vector[3]) { + set_pev(entity, pev_velocity, vector); + + return 1; +} + +#define fm_get_user_velocity(%1,%2) pev(%1, pev_velocity, %2) +/* stock fm_get_user_velocity(entity, Float:vector[3]) + return pev(entity, pev_velocity, vector) */ + + +/* Fun functions */ + +#define fm_get_client_listen(%1,%2) engfunc(EngFunc_GetClientListening, %1, %2) +/* stock fm_get_client_listen(receiver, sender) + return engfunc(EngFunc_GetClientListening, receiver, sender) */ + +#define fm_set_client_listen(%1,%2,%3) engfunc(EngFunc_SetClientListening, %1, %2, %3) +/* stock fm_set_client_listen(receiver, sender, listen) + return engfunc(EngFunc_SetClientListening, receiver, sender, listen) */ + +stock fm_get_user_godmode(index) { + new Float:val; + pev(index, pev_takedamage, val); + + return (val == DAMAGE_NO); +} + +stock fm_set_user_godmode(index, godmode = 0) { + set_pev(index, pev_takedamage, godmode == 1 ? DAMAGE_NO : DAMAGE_AIM); + + return 1; +} + +stock fm_set_user_armor(index, armor) { + set_pev(index, pev_armorvalue, float(armor)); + + return 1; +} + +stock fm_set_user_health(index, health) { + health > 0 ? set_pev(index, pev_health, float(health)) : dllfunc(DLLFunc_ClientKill, index); + + return 1; +} + +stock fm_set_user_origin(index, /* const */ origin[3]) { + new Float:orig[3]; + IVecFVec(origin, orig); + + return fm_entity_set_origin(index, orig); +} + +stock fm_set_user_rendering(index, fx = kRenderFxNone, r = 255, g = 255, b = 255, render = kRenderNormal, amount = 16) { + return fm_set_rendering(index, fx, r, g, b, render, amount); +} + +stock fm_give_item(index, const item[]) { + if (!equal(item, "weapon_", 7) && !equal(item, "ammo_", 5) && !equal(item, "item_", 5) && !equal(item, "tf_weapon_", 10)) + return 0; + + new ent = fm_create_entity(item); + if (!pev_valid(ent)) + return 0; + + new Float:origin[3]; + pev(index, pev_origin, origin); + set_pev(ent, pev_origin, origin); + set_pev(ent, pev_spawnflags, pev(ent, pev_spawnflags) | SF_NORESPAWN); + dllfunc(DLLFunc_Spawn, ent); + + new save = pev(ent, pev_solid); + dllfunc(DLLFunc_Touch, ent, index); + if (pev(ent, pev_solid) != save) + return ent; + + engfunc(EngFunc_RemoveEntity, ent); + + return -1; +} + +stock fm_set_user_maxspeed(index, Float:speed = -1.0) { + engfunc(EngFunc_SetClientMaxspeed, index, speed); + set_pev(index, pev_maxspeed, speed); + + return 1; +} + +stock Float:fm_get_user_maxspeed(index) { + new Float:speed; + pev(index, pev_maxspeed, speed); + + return speed; +} + +stock fm_set_user_gravity(index, Float:gravity = 1.0) { + set_pev(index, pev_gravity, gravity); + + return 1; +} + +stock Float:fm_get_user_gravity(index) { + new Float:gravity; + pev(index, pev_gravity, gravity); + + return gravity; +} + +/* interferes with FM_Spawn enum, just use fm_DispatchSpawn +stock fm_spawn(entity) { + return dllfunc(DLLFunc_Spawn, entity) +} +*/ + +stock fm_set_user_noclip(index, noclip = 0) { + set_pev(index, pev_movetype, noclip == 1 ? MOVETYPE_NOCLIP : MOVETYPE_WALK); + + return 1; +} + +#define fm_get_user_noclip(%1) (pev(%1, pev_movetype) == MOVETYPE_NOCLIP) +/* stock fm_get_user_noclip(index) + return (pev(index, pev_movetype) == MOVETYPE_NOCLIP) */ + +// note: get_user_weapon will still return former weapon index +stock fm_strip_user_weapons(index) { + new ent = fm_create_entity("player_weaponstrip"); + if (!pev_valid(ent)) + return 0; + + dllfunc(DLLFunc_Spawn, ent); + dllfunc(DLLFunc_Use, ent, index); + engfunc(EngFunc_RemoveEntity, ent); + + return 1; +} + +stock fm_set_user_frags(index, frags) { + set_pev(index, pev_frags, float(frags)); + + return 1; +} + + +/* Cstrike functions */ + +stock fm_cs_user_spawn(index) { + set_pev(index, pev_deadflag, DEAD_RESPAWNABLE); + dllfunc(DLLFunc_Spawn, index); + set_pev(index, pev_iuser1, 0); + + return 1; +} + + +/* Custom functions */ + +// based on Basic-Master's set_keyvalue, upgraded version accepts an optional classname (a bit more efficient if it is passed) +stock fm_set_kvd(entity, const key[], const value[], const classname[] = "") { + if (classname[0]) + set_kvd(0, KV_ClassName, classname); + else { + new class[32]; + pev(entity, pev_classname, class, sizeof class - 1); + set_kvd(0, KV_ClassName, class); + } + + set_kvd(0, KV_KeyName, key); + set_kvd(0, KV_Value, value); + set_kvd(0, KV_fHandled, 0); + + return dllfunc(DLLFunc_KeyValue, entity, 0); +} + +stock fm_find_ent_by_integer(index, pev_field, value) { + static maxents; + if (!maxents) + maxents = global_get(glb_maxEntities); + + for (new i = index + 1; i < maxents; ++i) { + if (pev_valid(i) && pev(i, pev_field) == value) + return i; + } + + return 0; +} + +stock fm_find_ent_by_flags(index, pev_field, flags) { + static maxents; + if (!maxents) + maxents = global_get(glb_maxEntities); + + for (new i = index + 1; i < maxents; ++i) { + if (pev_valid(i) && (pev(i, pev_field) & flags) == flags) + return i; + } + + return 0; +} + +stock Float:fm_distance_to_box(const Float:point[3], const Float:mins[3], const Float:maxs[3]) { + new Float:dist[3]; + for (new i = 0; i < 3; ++i) { + if (point[i] > maxs[i]) + dist[i] = point[i] - maxs[i]; + else if (mins[i] > point[i]) + dist[i] = mins[i] - point[i]; + } + + return vector_length(dist); +} + +stock Float:fm_boxes_distance(const Float:mins1[3], const Float:maxs1[3], const Float:mins2[3], const Float:maxs2[3]) { + new Float:dist[3]; + for (new i = 0; i < 3; ++i) { + if (mins1[i] > maxs2[i]) + dist[i] = mins1[i] - maxs2[i]; + else if (mins2[i] > maxs1[i]) + dist[i] = mins2[i] - maxs1[i]; + } + + return vector_length(dist); +} + +stock Float:fm_distance_to_boxent(entity, boxent) { + new Float:point[3]; + pev(entity, pev_origin, point); + + new Float:mins[3], Float:maxs[3]; + pev(boxent, pev_absmin, mins); + pev(boxent, pev_absmax, maxs); + + return fm_distance_to_box(point, mins, maxs); +} + +stock Float:fm_boxents_distance(boxent1, boxent2) { + new Float:mins1[3], Float:maxs1[3]; + pev(boxent1, pev_absmin, mins1); + pev(boxent1, pev_absmax, maxs1); + + new Float:mins2[3], Float:maxs2[3]; + pev(boxent2, pev_absmin, mins2); + pev(boxent2, pev_absmax, maxs2); + + return fm_boxes_distance(mins1, maxs1, mins2, maxs2); +} + +// projects a center of a player's feet base (originally by P34nut, improved) +stock Float:fm_distance_to_floor(index, ignoremonsters = 1) { + new Float:start[3], Float:dest[3], Float:end[3]; + pev(index, pev_origin, start); + dest[0] = start[0]; + dest[1] = start[1]; + dest[2] = -8191.0; + + engfunc(EngFunc_TraceLine, start, dest, ignoremonsters, index, 0); + get_tr2(0, TR_vecEndPos, end); + + pev(index, pev_absmin, start); + new Float:ret = start[2] - end[2]; + + return ret > 0 ? ret : 0.0; +} + +// potential to crash (?) if used on weaponbox+weapon_* entity pair (use fm_remove_weaponbox instead) +stock fm_kill_entity(index) { + set_pev(index, pev_flags, pev(index, pev_flags) | FL_KILLME); + + return 1; +} + +// if weapon index isn't passed then assuming that it's the current weapon +stock fm_get_user_weapon_entity(id, wid = 0) { + new weap = wid, clip, ammo; + if (!weap && !(weap = get_user_weapon(id, clip, ammo))) + return 0; + + new class[32]; + get_weaponname(weap, class, sizeof class - 1); + + return fm_find_ent_by_owner(-1, class, id); +} + +// only weapon index or its name can be passed, if neither is passed then the current gun will be stripped +stock bool:fm_strip_user_gun(index, wid = 0, const wname[] = "") { + new ent_class[32]; + if (!wid && wname[0]) + copy(ent_class, sizeof ent_class - 1, wname); + else { + new weapon = wid, clip, ammo; + if (!weapon && !(weapon = get_user_weapon(index, clip, ammo))) + return false; + + get_weaponname(weapon, ent_class, sizeof ent_class - 1); + } + + new ent_weap = fm_find_ent_by_owner(-1, ent_class, index); + if (!ent_weap) + return false; + + engclient_cmd(index, "drop", ent_class); + + new ent_box = pev(ent_weap, pev_owner); + if (!ent_box || ent_box == index) + return false; + + dllfunc(DLLFunc_Think, ent_box); + + return true; +} + +// only weapon index or its name can be passed, if neither is passed then the current gun will be transferred +stock bool:fm_transfer_user_gun(index1, index2, wid = 0, const wname[] = "") { + new ent_class[32]; + if (!wid && wname[0]) + copy(ent_class, sizeof ent_class - 1, wname); + else { + new weapon = wid, clip, ammo; + if (!weapon && !(weapon = get_user_weapon(index1, clip, ammo))) + return false; + + get_weaponname(weapon, ent_class, sizeof ent_class - 1); + } + + new ent_weap = fm_find_ent_by_owner(-1, ent_class, index1); + if (!ent_weap) + return false; + + engclient_cmd(index1, "drop", ent_class); + + new ent_box = pev(ent_weap, pev_owner); + if (!ent_box || ent_box == index1) + return false; + + set_pev(ent_box, pev_flags, pev(ent_box, pev_flags) | FL_ONGROUND); + dllfunc(DLLFunc_Touch, ent_box, index2); + if (pev(ent_weap, pev_owner) != index2) + return false; + + return true; +} + +stock bool:fm_is_ent_visible(index, entity, ignoremonsters = 0) { + new Float:start[3], Float:dest[3]; + pev(index, pev_origin, start); + pev(index, pev_view_ofs, dest); + xs_vec_add(start, dest, start); + + pev(entity, pev_origin, dest); + engfunc(EngFunc_TraceLine, start, dest, ignoremonsters, index, 0); + + new Float:fraction; + get_tr2(0, TR_flFraction, fraction); + if (fraction == 1.0 || get_tr2(0, TR_pHit) == entity) + return true; + + return false; +} + +// ported from AMXX's core get_user_origin(..., 3) (suggested by Greenberet) +stock fm_get_aim_origin(index, Float:origin[3]) { + new Float:start[3], Float:view_ofs[3]; + pev(index, pev_origin, start); + pev(index, pev_view_ofs, view_ofs); + xs_vec_add(start, view_ofs, start); + + new Float:dest[3]; + pev(index, pev_v_angle, dest); + engfunc(EngFunc_MakeVectors, dest); + global_get(glb_v_forward, dest); + xs_vec_mul_scalar(dest, 9999.0, dest); + xs_vec_add(start, dest, dest); + + engfunc(EngFunc_TraceLine, start, dest, 0, index, 0); + get_tr2(0, TR_vecEndPos, origin); + + return 1; +} + +stock bool:fm_get_user_longjump(index) { + new value[2]; + engfunc(EngFunc_GetPhysicsKeyValue, index, "slj", value, 1); + switch (value[0]) { + case '1': return true; + } + + return false; +} + +stock fm_set_user_longjump(index, bool:longjump = true, bool:tempicon = true) { + if (longjump == fm_get_user_longjump(index)) + return; + + if (longjump) { + engfunc(EngFunc_SetPhysicsKeyValue, index, "slj", "1"); + if (tempicon) { + static msgid_itempickup; + if (!msgid_itempickup) + msgid_itempickup = get_user_msgid("ItemPickup"); + + message_begin(MSG_ONE, msgid_itempickup, _, index); + write_string("item_longjump"); + message_end(); + } + } + else + engfunc(EngFunc_SetPhysicsKeyValue, index, "slj", "0"); +} + +#define WEAPON_SUIT 31 + +stock bool:fm_get_user_suit(index) { + return bool:(!(!(pev(index, pev_weapons) & (1<_lv/_addon/_/_hd + * and itself + * GAMECONFIG The default writable directory () + * GAMEDOWNLOAD The download directory (_download) + * GAME_FALLBACK All paths related to fallback game, same as GAME + * DEFAULTGAME All paths related to the default game which is "valve", same as GAME + * BASE The base path where server is installed + * + * Note that some paths are non-writable. It includes all _* (expect _download) + * and DEFAULTGAME. Any file inside a non-writable path will be ignored if you try to open + * it in writing mode. + * + * @param filename File to open + * @param mode Open mode + * @param use_valve_fs If true, the Valve file system will be used instead + * This can be used to finred files existing in valve + * search paths, rather than solely files existing directly + * in the gamedir. + * @param valve_path_id If use_valve_fs, a search path from gameinfo or NULL_STRING for all search paths + * + * @return A file handle, or null if the file could not be opened. + */ +native fopen(const filename[], const mode[], bool:use_valve_fs = false, const valve_path_id[] = "GAME"); + +/** + * Closes a file handle. + * + * @param file File handle + */ +native fclose(file); + +/** + * Reads a single binary data from a file. + * + * @param file Handle to the file + * @param data Variable to store item read + * @param mode Size of each element, in bytes, to be read + * See BLOCK_* constants + * + * @return Number of elements read + */ +native fread(file, &any:data, mode); + +/** + * Reads binary data from a file. + * + * @param file Handle to the file + * @param data Array to store each item read + * @param blocks Number of items to read into the array + * @param mode Size of each element, in bytes, to be read + * Valid sizes are 1, 2, or 4. See BLOCK_* constants. + * + * @return Number of elements read + */ +native fread_blocks(file, any:data[], blocks, mode); + +/** + * Reads raw binary data from a file. + * + * @param file Handle to the file + * @param stream Array to store each item read + * @param blocksize Number of items to read into the array + * @param blocks Size of each element, in bytes. The data is read directly. + * That is, in 1 or 2-byte mode, the lower byte(s) in + * each cell are used directly, rather than performing + * any casts from a 4-byte number to a smaller number. + * + * @return Number of elements read + */ +native fread_raw(file, any:stream[], blocksize, blocks); + +/** + * Writes a single binary data to a file. + * + * @param file Handle to the file + * @param data Item to write + * @param mode Size of each item in the array in bytes + * Valid sizes are 1, 2, or 4. See BLOCK_* constants + * + * @return Number of elements written + */ +native fwrite(file, any:data, mode); + +/** + * Writes binary data to a file. + * + * @param file Handle to the file + * @param data Array of items to write + * @param blocks Number of items in the array + * @param mode Size of each item in the array in bytes + * Valid sizes are 1, 2, or 4. See BLOCK_* constants + * + * @return Number of elements written + */ +native fwrite_blocks(file, const any:data[], blocks, mode); + +/** + * Writes raw binary data to a file. + * + * @param file Handle to the file. + * @param stream Array of items to write. The data is written directly. + * That is, in 1 or 2-byte mode, the lower byte(s) in + * each cell are used directly, rather than performing + * any casts from a 4-byte number to a smaller number. + * @param blocks Size of each item in the array in bytes. + * @param mode Number of items in the array. + * + * @return Number of elements written + */ +native fwrite_raw(file, const any:stream[], blocks, mode); + +/** + * Tests if the end of file has been reached. + * + * @param file Handle to the file + * + * @return 1 if end of file has been reached, 0 otherwise. + */ +native feof(file); + +/** + * Reads a line from a text file. + * + * @param file Handle to the file. + * @param buffer String buffer to hold the line + * @param maxlength Maximum size of string buffer + * + * @return Total number of characters written on success, 0 otherwise + */ +native fgets(file, buffer[], maxlength); + +/** + * Writes a line of text to a text file. + * + * @param file Handle to the file + * @param text String to write + * @param null_term True to append NULL terminator, false otherwise + * + * @return 0 on success, -1 otherwise + */ +native fputs(file, const text[], bool:null_term = false); + +/** + * Writes a line of formatted text to a text file. + * + * @param file Handle to the file + * @param format Formatting rules + * @param ... Variable number of format parameters + * + * @return Total number of characters written on success, 0 otherwise + */ +native fprintf(file, const fmt[], any:...); + +/** + * Sets the file position indicator. + * + * @param file Handle to the file + * @param position Position relative to what is specified in whence + * @param start SEEK_ constant value of where to see from + * + * @return 0 on success, a non-zero value otherwise + */ +native fseek(file, position, start); + +/** + * Gets current position in the file. + * + * @param file Handle to the file + * + * @return Value for the file position indicator + */ +native ftell(file); + +/** + * Gets character from file. + * + * @param file Handle to the file + * + * @return Character read on success, -1 otherwise + */ +native fgetc(file); + +/** + * Writes character to file + * + * @param file Handle to the file + * @param data Character to put + * + * @return Character written on success, -1 otherwise + */ +native fputc(file, data); + +/** + * Ungets character from file. + * + * @param file Handle to the file + * @param data Character to unget + * + * @return On success, the character put back is returned, -1 otherwise + */ +native fungetc(file, data); + +/** + * Flushes a buffered output stream. + * + * @param file File handle, or 0 for all open streams + * + * @return 0 on success, -1 on failure + */ +native fflush(file); + +/** + * Gets the formatted file size in bytes. + * + * @param filename Path to the file + * @param ... Variable number of format parameters + * + * @return File size in bytes, otherwise -1 if file not found + */ +native filesize(const filename[], any:...); + +/** + * Removes a directory. + * + * @note On most Operating Systems you cannot remove a directory which has files inside it. + * + * @param path Path to the directory + * + * @return 1 on success, 0 otherwise + */ +native rmdir(const path[]); + +/** + * Creates a directory. + * + * @param path Path to create + * @param mode Permissions (default is o=rx,g=rx,u=rwx). Note that folders must have + * the execute bit set on Linux. On Windows, the mode is ignored. + * @param use_valve_fs If true, the Valve file system will be used instead + * This can be used to create folders in the game's + * Valve search paths, rather than directly in the gamedir. + * @param valve_path_id If use_valve_fs, a search path from gameinfo or NULL_STRING for default + * In this case, mode is ignored + * + * @return 0 on success, -1 otherwise + */ +native mkdir(const dirname[], mode = FPERM_DIR_DEFAULT, bool:use_valve_fs = false, const valve_path_id[] = "GAMECONFIG"); + +/** + * Deletes a file (delete_file macro) + * + * @param filename Path of the file to delete + * @param use_valve_fs If true, the Valve file system will be used instead. + * This can be used to delete files existing in the Valve + * search path, rather than solely files existing directly + * in the gamedir. + * @param valve_path_id If use_valve_fs, a search path from gameinfo or NULL_STRING for all search paths + * + * @return 1 on success, 0 on failure or if file not immediately removed + */ +native unlink(const filename[], bool:use_valve_fs = false, const valve_path_id[] = "GAMECONFIG"); + +/** + * Opens a directory/folder for contents enumeration. + * + * @note Directories are closed with close_dir(). + * + * @param dir Path to open. + * @param firstfile String buffer to hold first file name + * @param length Maximum size of the string buffer + * @param type Optional variable to store the file type + * @param use_valve_fs If true, the Valve file system will be used instead. + * This can be used to find files existing in any of + * the Valve search paths, rather than solely files + * existing directly in the gamedir. + * @param valve_path_id If use_valve_fs, a search path from gameinfo or NULL_STRING for all search paths. + * + * @return Handle to the directory, 0 otherwise + */ +native open_dir(dir[], firstfile[], length, &FileType:type = FileType_Unknown, bool:use_valve_fs = false, const valve_path_id[] = "GAME"); + +/** + * Reads the next directory entry as a local filename. + * + * @note Contents of buffers are undefined when returning false. + * @note Both the '.' and '..' automatic directory entries will be retrieved for Windows and Linux. + * + * @param dirh Handle to a directory + * @param buffer String buffer to hold directory name + * @param length Maximum size of string buffer + * @param type Optional variable to store the file type. FileType_* constants + * + * @return 1 on success, 0 if there are no more files to read. + */ +native next_file(dirh, buffer[], length, &FileType:type = FileType_Unknown); + +/** + * Closes the directory. + * + * @param dirh Handle to a directory + */ +native close_dir(dirh); + +/** + * Loads a file using the LoadFileForMe engine function. + * + * The data is truncated if there is not enough space. No null-terminator + * is applied; the data is the raw contents of the file. + * + * @param file File to load (may be a file from the GCF) + * @param buffer Buffer to store file contents + * @param maxlength Maximum size of the file buffer + * @param length Variable to store the file length. This may return + * a number larger than the buffer size + * @return -1 if the file could not be loaded. Otherwise, + * the number of cells actually written to the buffer + * are returned. + */ +native LoadFileForMe(const file[], buffer[], maxlength, &length = 0); + +/** + * Returns a file timestamp as a unix timestamp. + * + * @param file File name + * @param tmode Time mode, see FileTime_* constants + * + * @return Returns a file timestamp as a unix timestamp + */ +native GetFileTime(const file[], FileTimeType:tmode); + +/** + * Changes a file or directories permissions. + * + * @param path Path to the file + * @param mode Permissions to set, see FPERM_* constants + * + * @return True on success, false otherwise + */ +native bool:SetFilePermissions(const path[], mode); + +/** + * Reads a single int8 (byte) from a file. The returned value is sign- + * extended to an int32. + * + * @param file Handle to the file + * @param data Variable to store the data read + * + * @return True on success, false on failure + */ +native bool:FileReadInt8(file, &any:data); + +/** + * Reads a single uint8 (unsigned byte) from a file. The returned value is + * zero-extended to an int32. + * + * @param file Handle to the file + * @param data Variable to store the data read + * + * @return True on success, false on failure + */ +native bool:FileReadUint8(file, &any:data); + +/** + * Reads a single int16 (short) from a file. The value is sign-extended to + * an int32. + * + * @param file Handle to the file + * @param data Variable to store the data read + * + * @return True on success, false on failure + */ +native bool:FileReadInt16(file, &any:data); + +/** + * Reads a single unt16 (unsigned short) from a file. The value is zero- + * extended to an int32. + * + * @param file Handle to the file + * @param data Variable to store the data read + * + * @return True on success, false on failure + */ +native bool:FileReadUint16(file, &any:data); + +/** + * Reads a single int32 (int/cell) from a file. + * + * @param file Handle to the file + * @param data Variable to store the data read + * + * @return True on success, false on failure + */ +native bool:FileReadInt32(file, &any:data); + +/** + * Writes a single int8 (byte) to a file. + * + * @param file Handle to the file + * @param data Data to write (truncated to an int8) + * + * @return True on success, false on failure + */ +native bool:FileWriteInt8(file, any:data); + +/** + * Writes a single int16 (short) to a file. + * + * @param file Handle to the file + * @param data Data to write (truncated to an int16) + * + * @return True on success, false on failure + */ +native bool:FileWriteInt16(file, any:data); + +/** + * Writes a single int32 (int/cell) to a file. + * + * @param file Handle to the file + * @param data Data to write + * + * @return True on success, false on failure + */ +native bool:FileWriteInt32(file, any:data); + diff --git a/bin/amxxdump/includes/amxmodx/file.inc.temp b/bin/amxxdump/includes/amxmodx/file.inc.temp new file mode 100644 index 0000000..e5d9e54 --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/file.inc.temp @@ -0,0 +1,84 @@ +#if defined _file_included +#endinput +#endif +#define _file_included +#define PLATFORM_MAX_PATH 256 +enum FileType +{ +FileType_Unknown, +FileType_Directory, +FileType_File, +}; +enum FileTimeType +{ +FileTime_LastAccess, +FileTime_Created, +FileTime_LastChange, +}; +#define SEEK_SET 0 +#define SEEK_CUR 1 +#define SEEK_END 2 +#define FSOPT_BYTES_COUNT 0 +#define FSOPT_LINES_COUNT 1 +#define FSOPT_END_WITH_LF 2 +#define BLOCK_INT 4 +#define BLOCK_SHORT 2 +#define BLOCK_CHAR 1 +#define BLOCK_BYTE 1 +#define FPERM_U_READ 0x0100 +#define FPERM_U_WRITE 0x0080 +#define FPERM_U_EXEC 0x0040 +#define FPERM_U_RWX FPERM_U_READ | FPERM_U_WRITE | FPERM_U_EXEC +#define FPERM_G_READ 0x0020 +#define FPERM_G_WRITE 0x0010 +#define FPERM_G_EXEC 0x0008 +#define FPERM_G_RWX FPERM_G_READ | FPERM_G_WRITE | FPERM_G_EXEC +#define FPERM_O_READ 0x0004 +#define FPERM_O_WRITE 0x0002 +#define FPERM_O_EXEC 0x0001 +#define FPERM_O_RWX FPERM_O_READ | FPERM_O_WRITE | FPERM_O_EXEC +#define FPERM_DIR_DEFAULT FPERM_U_RWX | FPERM_G_RWX | FPERM_O_RWX +native read_dir(const dirname[], pos, output[], len, &outlen = 0); +native read_file(const file[], line, text[], len, &txtlen = 0); +native write_file(const file[], const text[], line = -1); +native delete_file(const file[], bool:use_valve_fs = false, const valve_path_id[] = "GAMECONFIG"); +native file_exists(const file[], bool:use_valve_fs = false); +native rename_file(const oldname[], const newname[], relative = 0); +native dir_exists(const dir[], bool:use_valve_fs = false); +native file_size(const file[], flag = FSOPT_BYTES_COUNT, bool:use_valve_fs = false, const valve_path_id[] = "GAME"); +native fopen(const filename[], const mode[], bool:use_valve_fs = false, const valve_path_id[] = "GAME"); +native fclose(file); +native fread(file, &any:data, mode); +native fread_blocks(file, any:data[], blocks, mode); +native fread_raw(file, any:stream[], blocksize, blocks); +native fwrite(file, any:data, mode); +native fwrite_blocks(file, const any:data[], blocks, mode); +native fwrite_raw(file, const any:stream[], blocks, mode); +native feof(file); +native fgets(file, buffer[], maxlength); +native fputs(file, const text[], bool:null_term = false); +native fprintf(file, const fmt[], any:...); +native fseek(file, position, start); +native ftell(file); +native fgetc(file); +native fputc(file, data); +native fungetc(file, data); +native fflush(file); +native filesize(const filename[], any:...); +native rmdir(const path[]); +native mkdir(const dirname[], mode = FPERM_DIR_DEFAULT, bool:use_valve_fs = false, const valve_path_id[] = "GAMECONFIG"); +native unlink(const filename[], bool:use_valve_fs = false, const valve_path_id[] = "GAMECONFIG"); +native open_dir(dir[], firstfile[], length, &FileType:type = FileType_Unknown, bool:use_valve_fs = false, const valve_path_id[] = "GAME"); +native next_file(dirh, buffer[], length, &FileType:type = FileType_Unknown); +native close_dir(dirh); +native LoadFileForMe(const file[], buffer[], maxlength, &length = 0); +native GetFileTime(const file[], FileTimeType:tmode); +native bool:SetFilePermissions(const path[], mode); +native bool:FileReadInt8(file, &any:data); +native bool:FileReadUint8(file, &any:data); +native bool:FileReadInt16(file, &any:data); +native bool:FileReadUint16(file, &any:data); +native bool:FileReadInt32(file, &any:data); +native bool:FileWriteInt8(file, any:data); +native bool:FileWriteInt16(file, any:data); +native bool:FileWriteInt32(file, any:data); diff --git a/bin/amxxdump/includes/amxmodx/float.inc b/bin/amxxdump/includes/amxmodx/float.inc new file mode 100644 index 0000000..a731ffb --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/float.inc @@ -0,0 +1,422 @@ +/* Float arithmetic +* +* (c) Copyright 1999, Artran, Inc. +* Written by Greg Garner (gmg@artran.com) +* Modified in March 2001 to include user defined +* operators for the floating point functions. +* +* This file is provided as is (no warranties). +*/ + +#if defined _float_included + #endinput +#endif +#define _float_included + +#pragma rational Float + +/** + * Different methods of rounding + */ +enum floatround_method { + floatround_round = 0, + floatround_floor, + floatround_ceil, + floatround_tozero +}; + +/** + * Different units of measurement for angles + */ +enum anglemode { + radian = 0, + degrees, + grades +}; + +/** + * Converts an integer into a floating point value. + * + * @param value Value to be converted + * + * @return Converted value + */ +native Float:float(value); + +/** + * Converts a string into a floating point value. + * + * @param string Input string to be converted + * + * @return Converted value + */ +native Float:floatstr(const string[]); + +/** + * Returns the fractional part of a floating point value + * + * @param string Floating point value to get the fractional part from + * + * @return The fractional part + */ +native Float:floatfract(Float:value); + +/** + * Rounds a floating point value to an integer value + * + * @note For the list of available rounding methods look at + * floatround_method enumeration. + * + * @param value Floating point value to be rounded + * @param method Rounding method + * + * @return Converted value + */ +native floatround(Float:value, floatround_method:method=floatround_round); + +/** + * Compares two floating point values. + * + * @param fOne First value to be compared + * @param fTwo Second value to be compared + * + * @return If arguments are equal, returns 0. + * If the first one is greater, returns 1. + * If the second one is greater, returns -1. + */ +native floatcmp(Float:fOne, Float:fTwo); + +/** + * Returns the square root of a floating point value + * + * @note Same as floatpower(value, 0.5) + * + * @param value Floating point value to get square root from + * + * @return Square root of the input value + */ +native Float:floatsqroot(Float:value); + +/** + * Returns the value raised to the power of the exponent + * + * @param value Floating point value to be raised + * @param exponent The exponent + * + * @return Value raised to the power of the exponent + */ +native Float:floatpower(Float:value, Float:exponent); + +/** + * Returns the logarithm of value + * + * @param value Floating point value to calculate the logarithm for + * @param base The optional logarithmic base to use. + * Defaults to 10, or the natural logarithm + * + * @return Square root of the input value + */ +native Float:floatlog(Float:value, Float:base=10.0); + +/** + * Returns the sine of a given angle + * + * @note For available units of measurements(modes) look at the anglemode enum + * + * @param value The angle to calculate the sine from + * @param mode What unit of measurement is the angle specified in + * Defaults to radians + * + * @return The sine of a given angle + */ +native Float:floatsin(Float:value, anglemode:mode=radian); + +/** + * Returns the cosine of a given angle + * + * @note For available units of measurements(modes) look at the anglemode enum + * + * @param value The angle to calculate the cosine from + * @param mode What unit of measurement is the angle specified in + * Defaults to radians + * + * @return The cosine of a given angle + */ +native Float:floatcos(Float:value, anglemode:mode=radian); + +/** + * Returns the tangent of a given angle + * + * @note For available units of measurements(modes) look at the anglemode enum + * + * @param value The angle to calculate the tangent from + * @param mode What unit of measurement is the angle specified in + * Defaults to radians + * + * @return The tangent of a given angle + */ +native Float:floattan(Float:value, anglemode:mode=radian); + +/** + * Returns the hyperbolic sine of a given angle + * + * @note For available units of measurements(modes) look at the anglemode enum + * + * @param value The angle to calculate the hyperbolic sine from + * @param mode What unit of measurement is the angle specified in + * Defaults to radians + * + * @return The hyperbolic sine of a given angle + */ +native Float:floatsinh(Float:angle, anglemode:mode=radian); + +/** + * Returns the hyperbolic cosine of a given angle + * + * @note For available units of measurements(modes) look at the anglemode enum + * + * @param value The angle to calculate the hyperbolic cosine from + * @param mode What unit of measurement is the angle specified in + * Defaults to radians + * + * @return The hyperbolic cosine of a given angle + */ +native Float:floatcosh(Float:angle, anglemode:mode=radian); + +/** + * Returns the hyperbolic tangent of a given angle + * + * @note For available units of measurements(modes) look at the anglemode enum + * + * @param value The angle to calculate the hyperbolic tangent from + * @param mode What unit of measurement is the angle specified in + * Defaults to radians + * + * @return The hyperbolic tangent of a given angle + */ +native Float:floattanh(Float:angle, anglemode:mode=radian); + +/** + * Returns the absolute value of a floating point value + * + * @param value The floating point value to get the absolute value from + * + * @return The absolute value + */ +native Float:floatabs(Float:value); + +/* Return the angle of a sine, cosine or tangent. + * The output angle may be in radians, degrees, or grades. */ + +/** + * Returns the angle of the given tangent + * + * @note For available units of measurements(modes) look at the anglemode enum + * + * @param value The tangent to calculate the angle from + * @param mode What unit of measurement should the output angle be in + * + * @return The angle of a tangent + */ +native Float:floatatan(Float:angle, {anglemode,_}:radix); + +/** + * Returns the angle of the given cosine + * + * @note For available units of measurements(modes) look at the anglemode enum + * + * @param value The cosine to calculate the angle from + * @param mode What unit of measurement should the output angle be in + * + * @return The angle of a cosine + */ +native Float:floatacos(Float:angle, {anglemode,_}:radix); + +/** + * Returns the angle of the given sine + * + * @note For available units of measurements(modes) look at the anglemode enum + * + * @param value The sine to calculate the angle from + * @param mode What unit of measurement should the output angle be in + * + * @return The angle of a sine + */ +native Float:floatasin(Float:angle, {anglemode,_}:radix); + +/** + * Computes the principal value of arctangent of y/x + * + * @note Someone should verify this native, not sure what it actually does. + * @note For available units of measurements(modes) look at the anglemode enum + * + * @param x Value representing the proportion of the x-coordinate. + * @param y Value representing the proportion of the x-coordinate. + * @param mode What unit of measurement should the output angle be in + * + * @return Arctangent of y/x + */ +native Float:floatatan2(Float:x, Float:y, {anglemode,_}:radix); + + + +/* Multiply two floats together */ +native Float:floatmul(Float:oper1, Float:oper2); + +/* Divide the dividend float by the divisor float */ +native Float:floatdiv(Float:dividend, Float:divisor); + +/* Add two floats together */ +native Float:floatadd(Float:dividend, Float:divisor); + +/* Subtract oper2 float from oper1 float */ +native Float:floatsub(Float:oper1, Float:oper2); + +/* user defined operators */ +native Float:operator*(Float:oper1, Float:oper2) = floatmul; +native Float:operator/(Float:oper1, Float:oper2) = floatdiv; +native Float:operator+(Float:oper1, Float:oper2) = floatadd; +native Float:operator-(Float:oper1, Float:oper2) = floatsub; + +stock Float:operator++(Float:oper) + return oper+1.0; + +stock Float:operator--(Float:oper) + return oper-1.0; + +stock Float:operator-(Float:oper) + return oper^Float:cellmin; /* IEEE values are sign/magnitude */ + +stock Float:operator*(Float:oper1, oper2) + return floatmul(oper1, float(oper2)); /* "*" is commutative */ + +stock Float:operator/(Float:oper1, oper2) + return floatdiv(oper1, float(oper2)); + +stock Float:operator/(oper1, Float:oper2) + return floatdiv(float(oper1), oper2); + +stock Float:operator+(Float:oper1, oper2) + return floatadd(oper1, float(oper2)); /* "+" is commutative */ + +stock Float:operator-(Float:oper1, oper2) + return floatsub(oper1, float(oper2)); + +stock Float:operator-(oper1, Float:oper2) + return floatsub(float(oper1), oper2); + +stock bool:operator==(Float:oper1, Float:oper2) + return floatcmp(oper1, oper2) == 0; + +stock bool:operator==(Float:oper1, oper2) + return floatcmp(oper1, float(oper2)) == 0; /* "==" is commutative */ + +stock bool:operator!=(Float:oper1, Float:oper2) + return floatcmp(oper1, oper2) != 0; + +stock bool:operator!=(Float:oper1, oper2) + return floatcmp(oper1, float(oper2)) != 0; /* "==" is commutative */ + +stock bool:operator>(Float:oper1, Float:oper2) + return floatcmp(oper1, oper2) > 0; + +stock bool:operator>(Float:oper1, oper2) + return floatcmp(oper1, float(oper2)) > 0; + +stock bool:operator>(oper1, Float:oper2) + return floatcmp(float(oper1), oper2) > 0; + +stock bool:operator>=(Float:oper1, Float:oper2) + return floatcmp(oper1, oper2) >= 0; + +stock bool:operator>=(Float:oper1, oper2) + return floatcmp(oper1, float(oper2)) >= 0; + +stock bool:operator>=(oper1, Float:oper2) + return floatcmp(float(oper1), oper2) >= 0; + +stock bool:operator<(Float:oper1, Float:oper2) + return floatcmp(oper1, oper2) < 0; + +stock bool:operator<(Float:oper1, oper2) + return floatcmp(oper1, float(oper2)) < 0; + +stock bool:operator<(oper1, Float:oper2) + return floatcmp(float(oper1), oper2) < 0; + +stock bool:operator<=(Float:oper1, Float:oper2) + return floatcmp(oper1, oper2) <= 0; + +stock bool:operator<=(Float:oper1, oper2) + return floatcmp(oper1, float(oper2)) <= 0; + +stock bool:operator<=(oper1, Float:oper2) + return floatcmp(float(oper1), oper2) <= 0; + +stock bool:operator!(Float:oper) + return (_:oper & ((-1)/2)) == 0; /* -1 = all bits to 1; /2 = remove most significant bit (sign) + works on both 32bit and 64bit systems; no constant required */ +/* forbidden operations */ +forward operator%(Float:oper1, Float:oper2); +forward operator%(Float:oper1, oper2); +forward operator%(oper1, Float:oper2); + + +/** + * Returns whichever value is the smaller one + * + * @param ValueA The first value + * @param ValueB The second value + * + * @return ValueA if it is smaller than ValueB, and vice versa + */ +stock Float:floatmin(Float:ValueA, Float:ValueB) +{ + if (ValueA<=ValueB) + { + return ValueA; + } + + return ValueB; +} + +/** + * Returns whichever value is the greater one + * + * @param ValueA The first value + * @param ValueB The second value + * + * @return ValueA if it is greater than ValueB, and vice versa + */ +stock Float:floatmax(Float:ValueA, Float:ValueB) +{ + if (ValueA>=ValueB) + { + return ValueA; + } + + return ValueB; +} + +/** + * Clamps a value between a minimum and a maximum floating point value + * + * @param Value The value to be clamped + * @param MinValue Minimum value + * @param MaxValue Maximum value + * + * @return The Value clamped between MinValue and MaxValue + */ +stock Float:floatclamp(Float:Value, Float:MinValue, Float:MaxValue) +{ + if (Value<=MinValue) + { + return MinValue; + } + if (Value>=MaxValue) + { + return MaxValue; + } + + return Value; +} \ No newline at end of file diff --git a/bin/amxxdump/includes/amxmodx/float.inc.temp b/bin/amxxdump/includes/amxmodx/float.inc.temp new file mode 100644 index 0000000..13051c8 --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/float.inc.temp @@ -0,0 +1,124 @@ +#if defined _float_included +#endinput +#endif +#define _float_included +#pragma rational Float +enum floatround_method { +floatround_round = 0, +floatround_floor, +floatround_ceil, +floatround_tozero +}; +enum anglemode { +radian = 0, +degrees, +grades +}; +native Float:float(value); +native Float:floatstr(const string[]); +native Float:floatfract(Float:value); +native floatround(Float:value, floatround_method:method=floatround_round); +native floatcmp(Float:fOne, Float:fTwo); +native Float:floatsqroot(Float:value); +native Float:floatpower(Float:value, Float:exponent); +native Float:floatlog(Float:value, Float:base=10.0); +native Float:floatsin(Float:value, anglemode:mode=radian); +native Float:floatcos(Float:value, anglemode:mode=radian); +native Float:floattan(Float:value, anglemode:mode=radian); +native Float:floatsinh(Float:angle, anglemode:mode=radian); +native Float:floatcosh(Float:angle, anglemode:mode=radian); +native Float:floattanh(Float:angle, anglemode:mode=radian); +native Float:floatabs(Float:value); +native Float:floatatan(Float:angle, {anglemode,_}:radix); +native Float:floatacos(Float:angle, {anglemode,_}:radix); +native Float:floatasin(Float:angle, {anglemode,_}:radix); +native Float:floatatan2(Float:x, Float:y, {anglemode,_}:radix); +native Float:floatmul(Float:oper1, Float:oper2); +native Float:floatdiv(Float:dividend, Float:divisor); +native Float:floatadd(Float:dividend, Float:divisor); +native Float:floatsub(Float:oper1, Float:oper2); +native Float:operator*(Float:oper1, Float:oper2) = floatmul; +native Float:operator/(Float:oper1, Float:oper2) = floatdiv; +native Float:operator+(Float:oper1, Float:oper2) = floatadd; +native Float:operator-(Float:oper1, Float:oper2) = floatsub; +stock Float:operator++(Float:oper) +return oper+1.0; +stock Float:operator--(Float:oper) +return oper-1.0; +stock Float:operator-(Float:oper) +return oper^Float:cellmin; +stock Float:operator*(Float:oper1, oper2) +return floatmul(oper1, float(oper2)); +stock Float:operator/(Float:oper1, oper2) +return floatdiv(oper1, float(oper2)); +stock Float:operator/(oper1, Float:oper2) +return floatdiv(float(oper1), oper2); +stock Float:operator+(Float:oper1, oper2) +return floatadd(oper1, float(oper2)); +stock Float:operator-(Float:oper1, oper2) +return floatsub(oper1, float(oper2)); +stock Float:operator-(oper1, Float:oper2) +return floatsub(float(oper1), oper2); +stock bool:operator==(Float:oper1, Float:oper2) +return floatcmp(oper1, oper2) == 0; +stock bool:operator==(Float:oper1, oper2) +return floatcmp(oper1, float(oper2)) == 0; +stock bool:operator!=(Float:oper1, Float:oper2) +return floatcmp(oper1, oper2) != 0; +stock bool:operator!=(Float:oper1, oper2) +return floatcmp(oper1, float(oper2)) != 0; +stock bool:operator>(Float:oper1, Float:oper2) +return floatcmp(oper1, oper2) > 0; +stock bool:operator>(Float:oper1, oper2) +return floatcmp(oper1, float(oper2)) > 0; +stock bool:operator>(oper1, Float:oper2) +return floatcmp(float(oper1), oper2) > 0; +stock bool:operator>=(Float:oper1, Float:oper2) +return floatcmp(oper1, oper2) >= 0; +stock bool:operator>=(Float:oper1, oper2) +return floatcmp(oper1, float(oper2)) >= 0; +stock bool:operator>=(oper1, Float:oper2) +return floatcmp(float(oper1), oper2) >= 0; +stock bool:operator<(Float:oper1, Float:oper2) +return floatcmp(oper1, oper2) < 0; +stock bool:operator<(Float:oper1, oper2) +return floatcmp(oper1, float(oper2)) < 0; +stock bool:operator<(oper1, Float:oper2) +return floatcmp(float(oper1), oper2) < 0; +stock bool:operator<=(Float:oper1, Float:oper2) +return floatcmp(oper1, oper2) <= 0; +stock bool:operator<=(Float:oper1, oper2) +return floatcmp(oper1, float(oper2)) <= 0; +stock bool:operator<=(oper1, Float:oper2) +return floatcmp(float(oper1), oper2) <= 0; +stock bool:operator!(Float:oper) +forward operator%(Float:oper1, Float:oper2); +forward operator%(Float:oper1, oper2); +forward operator%(oper1, Float:oper2); +stock Float:floatmin(Float:ValueA, Float:ValueB) +{ +if (ValueA<=ValueB) +{ +return ValueA; +} +return ValueB; +} +stock Float:floatmax(Float:ValueA, Float:ValueB) +{ +if (ValueA>=ValueB) +{ +return ValueA; +} +return ValueB; +} +stock Float:floatclamp(Float:Value, Float:MinValue, Float:MaxValue) +{ +if (Value<=MinValue) +{ +return MinValue; +} +if (Value>=MaxValue) +{ +return MaxValue; +} +return Value; diff --git a/bin/amxxdump/includes/amxmodx/fun.inc b/bin/amxxdump/includes/amxmodx/fun.inc new file mode 100644 index 0000000..0dd35eb --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/fun.inc @@ -0,0 +1,333 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Fun Functions +// + +#if defined _fun_included + #endinput +#endif +#define _fun_included + +#pragma reqlib fun +#if !defined AMXMODX_NOAUTOLOAD + #pragma loadlib fun +#endif + + +/** + * Parts of body for hits, for use with set_user_hitzones(). + */ +const HITZONE_GENERIC = (1 << HIT_GENERIC); // 1 +const HITZONE_HEAD = (1 << HIT_HEAD); // 2 +const HITZONE_CHEST = (1 << HIT_CHEST); // 4 +const HITZONE_STOMACH = (1 << HIT_STOMACH); // 8 +const HITZONE_LEFTARM = (1 << HIT_LEFTARM); // 16 +const HITZONE_RIGHTARM = (1 << HIT_RIGHTARM); // 32 +const HITZONE_LEFTLEG = (1 << HIT_LEFTLEG); // 64 +const HITZONE_RIGHTLEG = (1 << HIT_RIGHTLEG); // 128 +const HITZONES_DEFAULT = HITZONE_GENERIC | HITZONE_HEAD | HITZONE_CHEST | HITZONE_STOMACH | + HITZONE_LEFTARM | HITZONE_RIGHTARM | HITZONE_LEFTLEG | HITZONE_RIGHTLEG; // 255 + +/** + * Tells whether receiver hears sender via voice communication. + * + * @param receiver Receiver + * @param sender Sender + * + * @return 1 if receiver hears the sender, 0 otherwise. + * @error If receiver or sender are not connected or not + * within the range of 1 to MaxClients + */ +native get_client_listen(receiver, sender); + +/** + * Sets who can listen who. + * + * @param receiver Receiver + * @param sender Sender + * @param listen 1 if receiver should be able to hear sender, 0 if not + * + * @return 0 if the setting can't be done for some reason + * @error If receiver or sender are not connected or not + * within the range of 1 to MaxClients. + */ +native set_client_listen(receiver, sender, listen); + +/** + * Sets player's godmode. + * + * @param index Client index + * @param godmode 1 to enable godmode, 0 to disable + * + * @noreturn + * @error If player is not connected or not within the range + * of 1 to MaxClients. + */ +native set_user_godmode(index, godmode = 0); + +/** + * Tells whether a player has godmode on. + * + * @param index Client index + * + * @return 1 if player has godmode on, 0 if not + * @error If player is not connected or not within the range + * of 1 to MaxClients. + */ +native get_user_godmode(index); + +/** + * Sets player's armor amount. + * + * @param index Client index + * @param armor The armor amount to set + * + * @noreturn + * @error If player is not connected or not within the range + * of 1 to MaxClients. + */ +native set_user_armor(index, armor); + +/** + * Sets player's health amount. + * + * @param index Client index + * @param health The health amount to set + * + * @noreturn + * @error If player is not connected or not within the range + * of 1 to MaxClients. + */ +native set_user_health(index, health); + +/** + * Moves a player to the given origin. + * + * @param index Client index + * @param origin Origin to move a player to + * + * @noreturn + * @error If player is not connected or not within the range + * of 1 to MaxClients. + */ +native set_user_origin(index, const origin[3]); + +/** + * Sets player's rendering mode. + * + * @note A really useful render modes reference: + * https://sites.google.com/site/svenmanor/rendermodes + * + * @param index Client index + * @param fx Rendering effects. One of kRenderFx* constants + * @param r The amount of red color (0 to 255) + * @param g The amount of green color (0 to 255) + * @param b The amount of blue color (0 to 255) + * @param render Render mode. One of kRender* constants + * @param amount Render amount (0 to 255) + * + * @noreturn + * @error If player is not connected or not within the range + * of 1 to MaxClients. + */ +native set_user_rendering(index, fx = kRenderFxNone, r = 0, g = 0, b = 0, render = kRenderNormal, amount = 0); + +/** + * Gets player's rendering mode. + * + * @note A really useful render modes reference: + * https://sites.google.com/site/svenmanor/rendermodes + * + * @param index Client index + * @param fx Variable to store the rendering effect + * @param r Variable to store the amount of red color + * @param g Variable to store the amount of green color + * @param b Variable to store the amount of blue color + * @param render Variable to store the render mode + * @param amount Variable to store the render amount + * + * @noreturn + * @error If player is not connected or not within the range + * of 1 to MaxClients. + */ +native get_user_rendering(index, &fx = kRenderFxNone, &r = 0, &g = 0, &b = 0, &render = kRenderNormal, &amount = 0); + +/** + * Gives an item to a player. + * + * @param index Client index + * @param item Classname of the item to give. Should start with either + * "weapon_", "ammo_", "item_" or "tf_weapon_" + * + * @return Item entity index. If an invalid item name is + * given or the item failed to create, it will return 0. + * If the item was removed, it will return -1 + * @error If player is not connected or not within the range + * of 1 to MaxClients or item creation fails. + */ +native give_item(index, const item[]); + +/** + * Sets (adds, removes) hit zones for a player. + * + * @note This actually sets rules of how any player can hit any other. + * Example: set_user_hitzones(id, target, 2) - makes @id able to + * hit @target only in the head. + * + * @param index Client index + * @param target The target player + * @param body A bitsum of the body parts that can/can't be shot. See HITZONE* constants. + * + * @noreturn + * @error If player is not connected or not within the range + * of 1 to MaxClients. + */ +native set_user_hitzones(index = 0, target = 0, body = HITZONES_DEFAULT); + +/** + * Gets the set of hit zone "rules" between @index and @target players. + * + * @note For the body part bitsum, see HITZONE* constants. + * + * @param index Client index + * @param target The target player + * + * @return The bitsum of @target's body parts @index is able to hit + * @error If player is not connected or not within the range + * of 1 to MaxClients. + */ +native get_user_hitzones(index, target); + +/** + * Sets player's maximum movement speed. + * + * @param index Client index + * @param speed The maximum speed player will be able to run at + * + * @noreturn + * @error If player is not connected or not within the range + * of 1 to MaxClients. + */ +native set_user_maxspeed(index, Float:speed = -1.0); + +/** + * Gets player's maximum movement speed. + * + * @param index Client index + * + * @return Player's maximum movement speed + * @error If player is not connected or not within the range + * of 1 to MaxClients. + */ +native Float:get_user_maxspeed(index); + +/** + * Sets player's gravity. + * + * @param index Client index + * @param gravity Gravity value to set, 1.0 being normal gravity (800) + * + * @noreturn + * @error If player is not connected or not within the range + * of 1 to MaxClients. + */ +native set_user_gravity(index, Float:gravity = 1.0); + +/** + * Gets player's gravity. + * + * @param index Client index + * + * @return Player's gravity value, 1.0 being normal gravity (800) + * @error If player is not connected or not within the range + * of 1 to MaxClients. + */ +native Float:get_user_gravity(index); + +/** + * Spawns an entity. + * + * @param index Entity index + * + * @noreturn + * @error If player is not connected or not within the range + * of 1 to MaxClients. + */ +native spawn(index); + +/** + * Enables or disables player's noclip. + * + * @param index Client index + * @param noclip 1 to enable noclip, 0 to disable + * + * @noreturn + * @error If player is not connected or not within the range + * of 1 to MaxClients. + */ +native set_user_noclip(index, noclip = 0); + +/** + * Gets whether a player has noclip enabled or not. + * + * @param index Client index + * + * @return 1 if noclip is enabled, 0 if disabled + * @error If player is not connected or not within the range + * of 1 to MaxClients. + */ +native get_user_noclip(index); + +/** + * Tells whether a player has silent footsteps enabled. + * + * @param index Client index + * + * @return 1 if silent footsteps are enabled, 0 if not + * @error If player is not connected or not within the range + * of 1 to MaxClients. + */ +native get_user_footsteps(index); + +/** + * Enables or disables player's silent footsteps. + * + * @param index Client index + * @param set 1 if player should have silent footsteps, 0 otherwise + * + * @noreturn + * @error If player is not connected or not within the range + * of 1 to MaxClients. + */ +native set_user_footsteps(id, set = 1); + +/** + * Strips all weapons from a player, including their knife. + * + * @param index Client index + * + * @noreturn + * @error If player is not connected or not within the range + * of 1 to MaxClients. + */ +native strip_user_weapons(index); + +/** + * Sets player's frags amount. + * + * @param index Client index + * @param frags The amount of frags to set + * + * @noreturn + * @error If player is not connected or not within the range + * of 1 to MaxClients. + */ +native set_user_frags(index, frags); diff --git a/bin/amxxdump/includes/amxmodx/fun.inc.temp b/bin/amxxdump/includes/amxmodx/fun.inc.temp new file mode 100644 index 0000000..762c621 --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/fun.inc.temp @@ -0,0 +1,32 @@ +#if defined _fun_included +#endinput +#endif +#define _fun_included +#pragma reqlib fun +#if !defined AMXMODX_NOAUTOLOAD +#pragma loadlib fun +#endif +const HITZONE_GENERIC = (1 << HIT_GENERIC); const HITZONE_HEAD = (1 << HIT_HEAD); const HITZONE_CHEST = (1 << HIT_CHEST); const HITZONE_STOMACH = (1 << HIT_STOMACH); const HITZONE_LEFTARM = (1 << HIT_LEFTARM); const HITZONE_RIGHTARM = (1 << HIT_RIGHTARM); const HITZONE_LEFTLEG = (1 << HIT_LEFTLEG); const HITZONE_RIGHTLEG = (1 << HIT_RIGHTLEG); const HITZONES_DEFAULT = HITZONE_GENERIC | HITZONE_HEAD | HITZONE_CHEST | HITZONE_STOMACH | +HITZONE_LEFTARM | HITZONE_RIGHTARM | HITZONE_LEFTLEG | HITZONE_RIGHTLEG; native get_client_listen(receiver, sender); +native set_client_listen(receiver, sender, listen); +native set_user_godmode(index, godmode = 0); +native get_user_godmode(index); +native set_user_armor(index, armor); +native set_user_health(index, health); +native set_user_origin(index, const origin[3]); +native set_user_rendering(index, fx = kRenderFxNone, r = 0, g = 0, b = 0, render = kRenderNormal, amount = 0); +native get_user_rendering(index, &fx = kRenderFxNone, &r = 0, &g = 0, &b = 0, &render = kRenderNormal, &amount = 0); +native give_item(index, const item[]); +native set_user_hitzones(index = 0, target = 0, body = HITZONES_DEFAULT); +native get_user_hitzones(index, target); +native set_user_maxspeed(index, Float:speed = -1.0); +native Float:get_user_maxspeed(index); +native set_user_gravity(index, Float:gravity = 1.0); +native Float:get_user_gravity(index); +native spawn(index); +native set_user_noclip(index, noclip = 0); +native get_user_noclip(index); +native get_user_footsteps(index); +native set_user_footsteps(id, set = 1); +native strip_user_weapons(index); +native set_user_frags(index, frags); diff --git a/bin/amxxdump/includes/amxmodx/gameconfig.inc b/bin/amxxdump/includes/amxmodx/gameconfig.inc new file mode 100644 index 0000000..d3724e4 --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/gameconfig.inc @@ -0,0 +1,93 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Game Config Functions +// + +#if defined _gameconfigs_included + #endinput +#endif +#define _gameconfigs_included + +enum GameConfig +{ + Invalid_GameConfig = 0 +}; + +/** + * Loads a game config file. + * + * @note The file path must be relative to the 'gamedata' folder under the data folder + * and the extension should be omitted. + * + * @param file File to load + * + * @return A handle to the game config file + */ +native GameConfig:LoadGameConfigFile(const file[]); + +/** + * Returns an offset value. + * + * @param handle Game config handle + * @param key Key to retrieve from the offset section + * + * @return An offset, or -1 on failure + * @error Invalid game config handle + */ +native GameConfGetOffset(GameConfig:handle, const key[]); + +/** + * Returns an offset value given a classname. + * + * @param handle Game config handle + * @param classname Class name to match from the offset section + * @param key Key to retrieve from the offset section + * + * @return An offset, or -1 on failure + * @error Invalid game config handle + */ +native GameConfGetClassOffset(GameConfig:handle, const classname[], const key[]); + +/** + * Gets the value of a key from the "Keys" section. + * + * @param handle Game config handle + * @param key Key to retrieve from the Keys section + * @param buffer Destination string buffer + * @param maxlen Maximum length of output string buffer + * + * @return True if key existed, false otherwise + * @error Invalid game config handle + */ +native bool:GameConfGetKeyValue(GameConfig:handle, const key[], buffer[], maxlen); + +/** + * Finds an address calculation in a GameConfig file. + * + * @param handle Game config handle + * @param name Name of the property to find + * + * @return An address calculated on success, otherwise 0 on failure. + * @error Invalid game config handle + */ +native GameConfGetAddress(GameConfig:handle, const name[]); + +/** + * Destroys a game config and frees its memory. + * + * @note The function automatically sets the variable passed to it to 0 to aid + * in preventing accidental usage after destroy. + * + * @param handle Game config handle + * + * @return 1 on success, 0 if an invalid handle was passed in + */ +native CloseGameConfigFile(&GameConfig:handle); \ No newline at end of file diff --git a/bin/amxxdump/includes/amxmodx/geoip.inc b/bin/amxxdump/includes/amxmodx/geoip.inc new file mode 100644 index 0000000..9bc211f --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/geoip.inc @@ -0,0 +1,264 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// GeoIP Module Functions +// + +#if defined geoip_included + #endinput +#endif +#define _geoip_included + +#pragma reqlib geoip +#if !defined AMXMODX_NOAUTOLOAD + #pragma loadlib geoip +#endif + +/** + * @global IP addresses passed to these natives can contain ports, the ports will be ignored. + */ + +/** + * Look up the two character country code for a given IP address. + * e.g: "US", "CA", etc. + * + * @param ip The IP address to lookup. + * @param result The result buffer. If the lookup does not succeed, the buffer is not modified. + * + * @return true on a successful lookup, false on a failed lookup. + */ +native bool:geoip_code2_ex(const ip[], result[3]); + +/** + * Look up the three character country code for a given IP address. + * e.g: "USA", "cAN", etc. + * + * @param ip The IP address to lookup. + * @param result The result buffer. If the lookup does not succeed, the buffer is not modified. + * + * @return true on a successful lookup, false on a failed lookup. + */ +native bool:geoip_code3_ex(const ip[], result[4]); + +/** + * Lookup the two character country code for a given IP address. Sets the buffer to "error" on + * an unsuccessful lookup. + * + * @deprecated This native will overflow the buffer by one cell on an unknown ip lookup! + * Use geoip_code2_ex instead. + * + * @param ip The IP address to lookup. + * @param result The result buffer. + * + * @return The result length. + */ +#pragma deprecated Use geoip_code2_ex() instead. +native geoip_code2(const ip[], ccode[3]); + +/** + * Lookup the three character country code for a given IP address. Sets the buffer to "error" on + * an unsuccessful lookup. + * + * @deprecated This native will overflow the buffer by one cell on an unknown ip lookup! + * Use geoip_code3_ex instead. + * + * @param ip The IP address to lookup. + * @param result The result buffer. + * + * @return The result length. + */ +#pragma deprecated Use geoip_code3_ex() instead. +native geoip_code3(const ip[], result[4]); + +/** + * Lookup the full country name for the given IP address. Sets the buffer to "error" on + * an unsuccessful lookup. + * + * @param ip The IP address to lookup. + * @param result The result of the geoip lookup. + * @param len The maximum length of the result buffer. + * + * @return The result length. + */ +#pragma deprecated Use geoip_country_ex() instead. +native geoip_country(const ip[], result[], len = 45); + +/** + * Lookup the full country name for the given IP address. + * + * @param ip The IP address to lookup. + * @param result The result of the geoip lookup. + * @param len The maximum length of the result buffer. + * @param id An optional player's index in order to return the result + * in the player's language, if supported. + * -1: the default language, which is english. + * 0: the server language. You can use LANG_SERVER define. + * >=1: the player's language. + * + * @return The result length on successful lookup, 0 otherwise. + */ +native geoip_country_ex(const ip[], result[], len, id = -1); + +/** + * Look up the full city name for the given IP address. + * + * @note This native requires GeoIP City database, which can be retrieved from: + * http://dev.maxmind.com/geoip/geoip2/geolite2/ (MaxMind DB binary) + * + * @param ip The IP address to look up. + * @param result The result of the geoip look up. + * @param len The maximum length of the result buffer. + * @param id An optional player's index in order to return the result + * in the player's language, if supported. + * -1: the default language, which is english. + * 0: the server language. You can use LANG_SERVER define. + * >=1: the player's language. + * + * @return The result length on successful lookup, 0 otherwise. + */ +native geoip_city(const ip[], result[], len, id = -1); + +/** + * Look up the region/state code for the given IP address. + * e.g. "US-OH", "DE-HH", IT-82, "FR-U", etc. + * + * @note This native requires GeoIP City database, which can be retrieved from: + * http://dev.maxmind.com/geoip/geoip2/geolite2/ (MaxMind DB binary) + * + * @param ip The IP address to look up. + * @param result The result of the geoip look up. + * @param len The maximum length of the result buffer. + * + * @return The result length on successful lookup, 0 otherwise. + */ +native geoip_region_code(const ip[], result[], len); + +/** + * Look up the full region/state name for the given IP address. + * + * @note This native requires GeoIP City database, which can be retrieved from: + * http://dev.maxmind.com/geoip/geoip2/geolite2/ (MaxMind DB binary) + * + * @param ip The IP address to look up. + * @param result The result of the geoip look up. + * @param len The maximum length of the result buffer. + * @param id An optional player's index in order to return the result + * in the player's language, if supported. + * -1: the default language, which is english. + * 0: the server language. You can use LANG_SERVER define. + * >=1: the player's language. + * + * @return The result length on successful lookup, 0 otherwise. + */ +native geoip_region_name(const ip[], result[], len, id = -1); + +/** + * Look up the full time zone for the given IP address. + * e.g. America/Los_Angeles, Europe/Paris. + * + * @note This native requires GeoIP City database, which can be retrieved from: + * http://dev.maxmind.com/geoip/geoip2/geolite2/ (MaxMind DB binary) + * + * @param ip The IP address to look up. + * @param result The result of the geoip look up. + * @param len The maximum length of the result buffer. + * + * @return The result length on successful lookup, 0 otherwise. + */ +native geoip_timezone(const ip[], result[], len); + +/** + * Look up the city's latitude for the given IP address. + * + * @note This native requires GeoIP City database, which can be retrieved from: + * http://dev.maxmind.com/geoip/geoip2/geolite2/ (MaxMind DB binary) + * + * @param ip The IP address to look up. + * + * @return The result of the geoip look up, 0 if latitude is not found. + */ +native Float:geoip_latitude(const ip[]); + +/** + * Look up the city's longitude for the given IP address. + * + * @note This native requires GeoIP City database, which can be retrieved from: + * http://dev.maxmind.com/geoip/geoip2/geolite2/ (MaxMind DB binary) + * + * @param ip The IP address to look up. + * + * @return The result of the geoip look up, 0 if longitude is not found. + */ +native Float:geoip_longitude(const ip[]); + +/** + * Calculate the distance between geographical coordinates, latitude and longitude. + * + * @note This native requires GeoIP City database, which can be retrieved from: + * http://dev.maxmind.com/geoip/geoip2/geolite2/ (MaxMind DB binary) + * + * @param lat1 The first IP latitude. + * @param lon1 The first IP longitude. + * @param lat2 The second IP latitude. + * @param lon2 The second IP longitude. + * @param system The system of measurement, 0 = Metric(kilometers) or 1 = English(miles). + * + * @return The distance as result in specified system of measurement. + */ +#define SYSTEM_METRIC 0 // kilometers +#define SYSTEM_IMPERIAL 1 // statute miles + +native Float:geoip_distance(Float:lat1, Float:lon1, Float:lat2, Float:lon2, system = SYSTEM_METRIC); + +/** + * Look up the continent code for a given IP address. + * + * @note This native requires GeoIP City database, which can be retrieved from: + * http://dev.maxmind.com/geoip/geoip2/geolite2/ (MaxMind DB binary) + * @note The code can be retrieved as integer (See CONTINENT_* constants.) or string (2 characters). + * @note Possible continent codes are AF, AN, AS, EU, NA, OC, SA for + * Africa(1), Antarctica(2), Asia(3), Europe(4), North America(5), Oceania(6), South America(7). + * + * @param ip The IP address to look up. + * @param result The result of the geoip look up. + * + * @return The continent id on successful lookup, 0 otherwise. + */ +enum Continent +{ + CONTINENT_UNKNOWN = 0, + CONTINENT_AFRICA, + CONTINENT_ANTARCTICA, + CONTINENT_ASIA, + CONTINENT_EUROPE, + CONTINENT_NORTH_AMERICA, + CONTINENT_OCEANIA, + CONTINENT_SOUTH_AMERICA, +}; +native Continent:geoip_continent_code(const ip[], result[3]); + +/** + * Look up the full continent name for the given IP address. + * + * @note This native requires GeoIP City database, which can be retrieved from: + * http://dev.maxmind.com/geoip/geoip2/geolite2/ (MaxMind DB binary) + * + * @param ip The IP address to look up. + * @param result The result of the geoip look up. + * @param len The maximum length of the result buffer. + * @param id An optional player's index in order to return the result + * in the player's language, if supported. + * -1: the default language, which is english. + * 0: the server language. You can use LANG_SERVER define. + * >=1: the player's language. + * + * @return The result length on successful lookup, 0 otherwise. + */ +native geoip_continent_name(const ip[], result[], len, id = -1); diff --git a/bin/amxxdump/includes/amxmodx/geoip.inc.temp b/bin/amxxdump/includes/amxmodx/geoip.inc.temp new file mode 100644 index 0000000..387cea7 --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/geoip.inc.temp @@ -0,0 +1,37 @@ +#if defined geoip_included +#endinput +#endif +#define _geoip_included +#pragma reqlib geoip +#if !defined AMXMODX_NOAUTOLOAD +#pragma loadlib geoip +#endif +native bool:geoip_code2_ex(const ip[], result[3]); +native bool:geoip_code3_ex(const ip[], result[4]); +#pragma deprecated Use geoip_code2_ex() instead. +native geoip_code2(const ip[], ccode[3]); +#pragma deprecated Use geoip_code3_ex() instead. +native geoip_code3(const ip[], result[4]); +#pragma deprecated Use geoip_country_ex() instead. +native geoip_country(const ip[], result[], len = 45); +native geoip_country_ex(const ip[], result[], len, id = -1); +native geoip_city(const ip[], result[], len, id = -1); +native geoip_region_code(const ip[], result[], len); +native geoip_region_name(const ip[], result[], len, id = -1); +native geoip_timezone(const ip[], result[], len); +native Float:geoip_latitude(const ip[]); +native Float:geoip_longitude(const ip[]); +#define SYSTEM_METRIC 0 #define SYSTEM_IMPERIAL 1 native Float:geoip_distance(Float:lat1, Float:lon1, Float:lat2, Float:lon2, system = SYSTEM_METRIC); +enum Continent +{ +CONTINENT_UNKNOWN = 0, +CONTINENT_AFRICA, +CONTINENT_ANTARCTICA, +CONTINENT_ASIA, +CONTINENT_EUROPE, +CONTINENT_NORTH_AMERICA, +CONTINENT_OCEANIA, +CONTINENT_SOUTH_AMERICA, +}; +native Continent:geoip_continent_code(const ip[], result[3]); +native geoip_continent_name(const ip[], result[], len, id = -1); diff --git a/bin/amxxdump/includes/amxmodx/ham_const.inc b/bin/amxxdump/includes/amxmodx/ham_const.inc new file mode 100644 index 0000000..3d656c2 --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/ham_const.inc @@ -0,0 +1,4354 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Ham Sandwich Constants +// + +#if defined _ham_const_included + #endinput +#endif +#define _ham_const_included + +/** + * Ham return types. + * + * @note Return these from hooks to disable calling the target function. + * Numbers match up with fakemeta's FMRES_* for clarity. They are + * interchangable. 0 (or no return) is also interpretted as HAM_IGNORED. + */ +#define HAM_IGNORED 1 /**< Calls target function, returns normal value */ +#define HAM_HANDLED 2 /**< Tells the module you did something, still calls target function and returns normal value */ +#define HAM_OVERRIDE 3 /**< Still calls the target function, but returns whatever is set with SetHamReturn*() */ +#define HAM_SUPERCEDE 4 /**< Block the target call, and use your return value (if applicable) (Set with SetHamReturn*()) */ + +/** + * List of virtual functions made available through the hamsandwich module. + * + * @note Not all functions will do as you expect on all mods. If a function does + * not do what you would believe it should DO NOT file a bug report, you + * will be ignored. + * @note Passing invalid parameters has potential to crash the server, so be + * careful, and test carefully and adequately! + * @note All functions take (and pass) a "this" index as the first param. + * This is the entity from which the function is being executed on. + * @note All functions and forwards (eg: {Register,Execute}Ham[B]) require + * the mod to have the pev and base keys in addition to the function + * keys for the corresponding mod/operating system in hamdata.ini + * @note Some functions that return booleans may need to be logically ANDed + * to get the desired results because the mod will return the full integer + * value. E.g.: (ExecuteHam(Ham_TS_IsObjective, this) & 0x0000FFFF) != 0 + */ + +enum Ham +{ + /** + * Description: This is typically called whenever an entity is created. + * It is the virtual equivilent of spawn from the engine. + * Some mods call this on player spawns too. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_Spawn, this); + */ + Ham_Spawn = 0, + + /** + * Description: This is typically called on map change. + * This will typically precache all assets required by the entity. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_Precache, this); + */ + Ham_Precache, + + /** + * Description: Typically this is similar to an engine keyvalue call. + * Use the kvd natives from fakemeta to handle the kvd_handle passed. + * NOTE: Do not pass handle 0 to this! Use create_kvd() from fakemeta instead! + * Forward params: function(this, kvd_handle); + * Return type: None. + * Execute params: ExecuteHam(Ham_Keyvalue, this, kvd_handle); + */ + Ham_Keyvalue, + + /** + * Description: Returns flags for how an entity can be used. + * Forward params: function(this) + * Return type: Integer (FCAP_* constants, see hlsdk_const.inc). + * Execute params: ExecuteHam(Ham_ObjectCaps, this); + */ + Ham_ObjectCaps, + + /** + * Description: Usually called to activate some objects. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_Activate, this); + */ + Ham_Activate, + + /** + * Description: Usually called after the engine call with the same name. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_SetObjectCollisionBox, this); + */ + Ham_SetObjectCollisionBox, + + /** + * Description: Returns an integer number that corresponds with what type of entity this is. + * Forward params: function(this) + * Return type: Integer. + * Execute params: ExecuteHam(Ham_Classify, this); + */ + Ham_Classify, + + /** + * Description: Typically called when an entity dies to notify any children entities about the death. + * Forward params: function(this, idchild) + * Return type: None. + * Execute params: ExecuteHam(Ham_DeathNotice, this, idchild) + */ + Ham_DeathNotice, + + /** + * Description: Usually called whenever an entity gets attacked by a hitscan (such as a gun) weapon. + * Use the get/set tr2 natives in fakemeta to handle the traceresult data. + * Do not use a handle of 0 as a traceresult in execution, use create_tr2() from Fakemeta + * to pass a custom handle instead. (Don't forget to free the handle when you're done.) + * Forward params: function(this, idattacker, Float:damage, Float:direction[3], traceresult, damagebits) + * Return type: None. + * Execute params: ExecuteHam(Ham_TraceAttack, this, idattacker, Float:damage, Float:direction[3], tracehandle, damagebits); + */ + Ham_TraceAttack, + + /** + * Description: Usually called whenever an entity takes any kind of damage. + * Inflictor is the entity that caused the damage (such as a gun). + * Attacker is the entity that tirggered the damage (such as the gun's owner). + * Forward params: function(this, idinflictor, idattacker, Float:damage, damagebits); + * Return type: Integer. + * Execute params: ExecuteHam(Ham_TakeDamage, this, idinflictor, idattacker, Float:damage, damagebits); + */ + Ham_TakeDamage, + + /** + * Description: Usually called whenever an entity gets a form of a heal. + * Forward params: function(this, Float:health, damagebits); + * Return type: Integer. + * Execute params: ExecuteHam(Ham_TakeHealth, this, Float:health, damagebits); + */ + Ham_TakeHealth, + + /** + * Description: Normally called whenever an entity dies. + * For Team Fortress Classic mod, see Ham_TFC_Killed. + * Forward params: function(this, idattacker, shouldgib) + * Return type: None. + * Execute params: ExecuteHam(Ham_Killed, this, idattacker, shouldgib); + */ + Ham_Killed, + + /** + * Description: Normally returns the blood color of the entity. + * Forward params: function(this) + * Return type: Integer. + * Execute params: ExecuteHam(Ham_BloodColor, this) + */ + Ham_BloodColor, + + /** + * Description: Traces where blood should appear. + * Forward params: function(this, Float:Damage, Float:Direction[3], trace_handle, damagebits); + * Return type: None. + * Execute params: ExecuteHam(Ham_TraceBleed, this, Float:damage, Float:direction[3], trace_handle, damagebits); + */ + Ham_TraceBleed, + + /** + * Description: Returns whether an entity is activated. + * This function is not supported by Day Of Defeat. + * This function has different version for the following mods: + * Team Fortress Classic, see Ham_TFC_IsTriggered instead. + * Sven-Coop 5.0+, see Ham_SC_IsTriggered instead. + * Forward params: function(this, idActivator); + * Return type: Integer. + * Execute params: ExecuteHam(Ham_IsTriggered, this, idActivator); + */ + Ham_IsTriggered, + + /** + * Description: Returns the id of the entity if its class is derived off of CBaseMonster, -1 otherwise. + * Forward params: function(this) + * Return type: Entity. + * Execute params: ExecuteHam(Ham_MyMonsterPointer, this); + */ + Ham_MyMonsterPointer, + + /** + * Description: Returns the id of the entity if its class is derived off of CBaseSquadMonster, -1 otherwise. + * Forward params: function(this) + * Return type: Entity. + * Execute params: ExecuteHam(Ham_MySquadMonsterPointer, this); + */ + Ham_MySquadMonsterPointer, + + /** + * Description: Returns the toggle state of the entity. + * Forward params: function(this) + * Return type: Integer. + * Execute params: ExecuteHam(Ham_GetToggleState, this); + */ + Ham_GetToggleState, + + /** + * Description: Typically adds points to the entity. + * This function is not supported for the following mods: + * Team Fortress Classic. + * Sven-Coop 5.0-, see Ham_SC_AddPoints instead. + * Forward params: function(this, points, bool:cangonegative); + * Return type: None. + * Execute params: ExecuteHam(Ham_AddPoints, this, points, bool:cangonegative); + */ + Ham_AddPoints, + + /** + * Description: Typically adds points to everybody on the entity's team. + * This function is not supported for the following mods: + * Team Fortress Classic. + * Sven-Coop 5.0-, see Ham_SC_AddPointsToTeam instead. + * Forward params: function(this, points, bool:cangonegative); + * Return type: None. + * Execute params: ExecuteHam(Ham_AddPointsToTeam, this, points, bool:cangonegative); + */ + Ham_AddPointsToTeam, + + /** + * Description: Adds an item to the player's inventory. + * Forward params: function(this, idother); + * Return type: Integer. + * Execute params: ExecuteHam(Ham_AddPlayerItem, this, idother); + */ + Ham_AddPlayerItem, + + /** + * Description: Removes an item to the player's inventory. + * This function has different version for the following mods: + * Sven-Coop 5.0+, see Ham_SC_RemovePlayerItem instead. + * Return type: Integer. + * Execute params: ExecuteHam(Ham_RemovePlayerItem, this, idother); + */ + Ham_RemovePlayerItem, + + /** + * Description: Gives ammo to the entity. + * This function is not supported for the following mods: + * Earth's Special Forces. + * Sven-Coop 4.8+, see Ham_SC_GiveAmmo instead. + * Team Fortress Classic, see Ham_TFC_GiveAmmo instead. + * Forward params: function(this, Amount, const Name[], Max) + * Return type: Integer. + * Execute params: ExecuteHam(Ham_GiveAmmo, this, amount, "type", max); + */ + Ham_GiveAmmo, + + /** + * Description: Unsure, I believe this is the delay between activation for an entity. + * Forward params: function(this) + * Return type: Float. + * Execute params: ExecuteHam(Ham_GetDelay, this, Float:output) + */ + Ham_GetDelay, + + /** + * Description: Whether or not the entity is moving. + * This function has different version for the following mods: + * Sven-Coop 5.0+, see Ham_SC_IsMoving instead. + * Forward params: function(this); + * Return type: Integer. + * Execute params: ExecuteHam(Ham_IsMoving, this); + */ + Ham_IsMoving, + + /** + * Description: Unsure. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_OverrideReset, this) + */ + Ham_OverrideReset, + + /** + * Description: Returns the damage decal of the entity for the damage type. + * Forward params: function(this, damagebits) + * Return type: Integer. + * Execute params: ExecuteHam(Ham_DamageDecal, this); + */ + Ham_DamageDecal, + + /** + * Description: Sets the toggle state of the entity. + * Forward params: function(this, state) + * Return type: None. + * Execute params: ExecuteHam(Ham_SetToggleState, this, state); + */ + Ham_SetToggleState, + + /** + * Description: Not entirely sure what this does. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_StartSneaking, this); + */ + Ham_StartSneaking, + + /** + * Description: Not entirely sure what this does. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_StopSneaking, this); + */ + Ham_StopSneaking, + + /** + * Description: Not entirely sure. + * This function is not supported for the following mods: + * Sven-Coop 5.0+, see Ham_SC_OnControls instead. + * Forward params: function(this, idOn) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_OnControls, this, idOn); + */ + Ham_OnControls, + + /** + * Description: Whether or not the entity is sneaking. + * This function is not supported for the following mods: + * Sven-Coop 5.0+, see Ham_SC_IsSneaking instead. + * Forward params: function(this); + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_IsSneaking, this); + */ + Ham_IsSneaking, + + /** + * Description: Whether or not the entity is alive. + * This function is not supported for the following mods: + * Sven-Coop 5.0+, see Ham_SC_IsAlive instead. + * Forward params: function(this); + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_IsAlive, this); + */ + Ham_IsAlive, + + /** + * Description: Whether or not the entity uses a BSP model. + * This function is not supported for the following mods: + * Sven-Coop 5.0+, see Ham_SC_IsBSPModel instead. + * Forward params: function(this); + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_IsBSPModel, this); + */ + Ham_IsBSPModel, + + /** + * Description: Whether or not the entity can reflect gauss shots.. + * This function is not supported for the following mods: + * Sven-Coop 5.0+, see Ham_SC_ReflectGauss instead. + * Forward params: function(this); + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_ReflectGauss, this); + */ + Ham_ReflectGauss, + + /** + * Description: Whether or not the target is the same as the one passed. + * Note the strindex parameter is a string passed that has been allocated by the engine. + * Use fakemeta's EngFunc_SzFromIndex to convert to a normal string, or fakemeta's + * EngFunc_AllocString to create a new string. + * This function is not supported for the following mods: + * Sven-Coop 5.0+, see Ham_SC_HasTarget instead. + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_HasTarget, this, strindex); + */ + Ham_HasTarget, + + /** + * Description: Whether or not the entity is in the world. + * This function is not supported for the following mods: + * Sven-Coop 5.0+, see Ham_SC_IsInWorld instead. + * Forward params: function(this); + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_IsInWorld, this); + */ + Ham_IsInWorld, + + /** + * Description: Whether or not the entity is a player. + * This function is not supported for the following mods: + * Sven-Coop 5.0+, see Ham_SC_IsPlayer instead. + * Forward params: function(this); + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_IsPlayer, this); + */ + Ham_IsPlayer, + + /** + * Description: Whether or not the entity is a net client. + * This function is not supported for the following mods: + * Sven-Coop 5.0+, see Ham_SC_IsNetClient instead. + * Forward params: function(this); + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_IsNetClient, this); + */ + Ham_IsNetClient, + + /** + * Description: Get the entity's team id. + * This function is not supported by Team Fortress Classic mod. + * Forward params: function(this); + * Return type: String (string length returned and string byref'd in ExecuteHam). + * Execute params: ExecuteHam(Ham_TeamId, this, buffer[], size); + */ + Ham_TeamId, + + /** + * Description: Returns the next target of this. + * Forward params: function(this); + * Return type: Entity. + * Execute params: ExecuteHam(Ham_GetNextTarget, this); + */ + Ham_GetNextTarget, + + /** + * Description: Called whenever an entity thinks. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_Think, this); + */ + Ham_Think, + + /** + * Description: Called whenever two entities touch. + * Forward params: function(this, idother); + * Return type: None. + * Execute params: ExecuteHam(Ham_Touch, this, idother); + */ + Ham_Touch, + + /** + * Description: Called whenver one entity uses another. + * Forward params: function(this, idcaller, idactivator, use_type, Float:value) + * Return type: None. + * Execute params: ExecuteHam(Ham_Use, this, idcaller, idactivator, use_type, Float:value); + */ + Ham_Use, + + /** + * Description: Normally called whenever one entity blocks another from moving. + * Forward params: function(this, idother); + * Return type: None. + * Execute params: ExecuteHam(Ham_Blocked, this, idother); + */ + Ham_Blocked, + + /** + * Description: Normally called when a map-based item respawns, such as a health kit or something. + * Forward params: function(this); + * Return type: Entity. + * Execute params: ExecuteHam(Ham_Respawn, this); + */ + Ham_Respawn, + + /** + * Description: Used in Half-Life to update a monster's owner. + * Forward params: function(this); + * Return type: None. + * Execute params: ExecuteHam(Ham_UpdateOwner, this); + */ + Ham_UpdateOwner, + + /** + * Description: Normally called whenever a barnacle grabs the entity. + * This function has different version for the following mods: + * Sven-Coop 5.0+, see Ham_SC_FBecomeProne instead. + * Forward params: function(this); + * Return type: Integer. + * Execute params: ExecuteHam(Ham_FBecomeProne, this); + */ + Ham_FBecomeProne, + + /** + * Description: Returns the center of the entity. + * Forward params: function(this); + * Return type: Vector (byref'd in ExecuteHam). + * Execute params: ExecuteHam(Ham_Center, this, Float:output[3]); + */ + Ham_Center, + + /** + * Description: Returns the eye position of the entity. + * Forward params: function(this); + * Return type: Vector (byref'd in ExecuteHam). + * Execute params: ExecuteHam(Ham_EyePosition, this, Float:output[3]); + */ + Ham_EyePosition, + + /** + * Description: Returns the ear position of the entity. + * Forward params: function(this); + * Return type: Vector (byref'd in ExecuteHam). + * Execute params: ExecuteHam(Ham_EarPosition, this, Float:output[3]); + */ + Ham_EarPosition, + + /** + * Description: Position to shoot at. + * Forward params: function(this, Float:srcvector[3]); + * Return type: Vector (byref'd in ExecuteHam). + * Execute params: ExecuteHam(Ham_BodyTarget, Float:srcvector[3], Float:returnvector[3]) + */ + Ham_BodyTarget, + + /** + * Description: Returns the illumination of the entity. + * Forward params: function(this) + * Return type: Integer. + * Execute params: ExecuteHam(Ham_Illumination, this); + */ + Ham_Illumination, + + /** + * Description: Returns true if a line can be traced from the caller's eyes to the target. + * This function has different version for the following mods: + * Sven-Coop 5.0+, see Ham_SC_FVisible instead. + * Forward params: function(this, idOther); + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_FVisible, this, idOther); + */ + Ham_FVisible, + + /** + * Description: Returns true if a line can be traced from the caller's eyes to given vector. + * This function has different version for the following mods: + * Sven-Coop 5.0+, see Ham_SC_FVecVisible instead. + * Forward params: function(this, const Float:origin[3]); + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_FVecVisible, this, const Float:origin[3]); + */ + Ham_FVecVisible, + + + /** + * Players have all the attributes of normal entities, in addition to these. + */ + + /** + * Description: Typically called every frame when a player has jump held. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_Player_Jump, this); + */ + Ham_Player_Jump, + + /** + * Description: Typically called every frame when a player has duck held. + * This function is not supported in Earth's Special Forces mod. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_Player_Duck, this); + */ + Ham_Player_Duck, + + /** + * Description: Typically called every frame during PlayerPreThink engine call. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_Player_PreThink, this); + */ + Ham_Player_PreThink, + + /** + * Description: Typically called every frame during PlayerPostThink engine call. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_Player_PostThink, this); + */ + Ham_Player_PostThink, + + /** + * Description: Returns a vector that tells the gun position. + * This function is not supported by Team Fortress Classic. + * Forward params: function(this) + * Return type: Vector (byreffed in ExecuteHam);. + * Execute params: ExecuteHam(Ham_Player_GetGunPosition, this, Float:output[3]); + */ + Ham_Player_GetGunPosition, + + /** + * Description: Whether or not the player should fade on death. + * Forward param: function(this) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_Player_ShouldFadeOnDeath, this); + */ + Ham_Player_ShouldFadeOnDeath, + + /** + * Description: Called whenever an impulse command is executed. + * Forward param: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_Player_ImpulseComands, this); + */ + Ham_Player_ImpulseCommands, + + /** + * Description: Updates the client's data for hud changes (such as ammo). Usually called every frame. + * This function is not supported by Team Fortress Classic mod. + * Forward param: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_Player_UpdateClientData, this); + */ + Ham_Player_UpdateClientData, + + + /** + * Items have all the attributes of normal entities in addition to these. + */ + + /** + * Description: Adds the item to the player. + * This function has different version for the following mods: + * Sven-Coop 5.0+, see Ham_SC_Item_AddToPlayer instead. + * Forward params: function(this, idPlayer); + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_Item_AddToPlayer, this, idPlayer); + */ + Ham_Item_AddToPlayer, + + /** + * Description: Unsure. + * This function has different version for the following mods: + * Sven-Coop 5.0+, see Ham_SC_Item_AddDuplicate instead. + * Forward params: function(this, idOriginal); + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_Item_AddDuplicate, this, idOriginal); + */ + Ham_Item_AddDuplicate, + + /** + * Description: Whether or not this entity can be deployed. + * This function has different version for the following mods: + * Sven-Coop 5.0+, see Ham_SC_Item_CanDeploy instead. + * Forward params: function(this); + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_Item_CanDeploy, this); + */ + Ham_Item_CanDeploy, + + /** + * Description: Deploys the entity (usually a weapon). + * This function has different version for the following mods: + * Sven-Coop 5.0+, see Ham_SC_Item_Deploy instead. + * Forward params: function(this); + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_Item_Deploy, this); + */ + Ham_Item_Deploy, + + /** + * Description: Whether or not the entity can be holstered. + * This function has different version for the following mods: + * Sven-Coop 5.0+, see Ham_SC_Item_CanHolster instead. + * Forward params: function(this); + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_Item_CanHolster, this); + */ + Ham_Item_CanHolster, + + /** + * Description: Whether or not the entity (usually weapon) can be holstered. + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_Item_Holster, this); + */ + Ham_Item_Holster, + + /** + * Description: Updates the HUD info about this item. + * Forward params: function(this); + * Return type: None. + * Execute params: ExecuteHam(Ham_UpdateItemInfo, this); + */ + Ham_Item_UpdateItemInfo, + + /** + * Description: Called each frame for an item, normally only on active items. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_Item_PreFrame, this); + */ + Ham_Item_PreFrame, + + /** + * Description: Called each frame for an item, normally only on active items. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_Item_PostFrame, this); + */ + Ham_Item_PostFrame, + + /** + * Description: Called when an item gets dropped, normally on death only. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_Item_Drop, this); + */ + Ham_Item_Drop, + + /** + * Description: Normally called when an item gets deleted. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_Item_Kill, this); + */ + Ham_Item_Kill, + + /** + * Description: Called when an entity starts being attached to (normally invisible and "following") a player. + * Forward params: function(this, idPlayer) + * Return type: None. + * Execute params: ExecuteHam(Ham_Item_AttachToPlayer, this, idPlayer) + */ + Ham_Item_AttachToPlayer, + + /** + * Description: Returns the ammo index of the item. + * Forward params: function(this) + * Return type: Integer. + * Execute params: ExecuteHam(Ham_Item_PrimaryAmmoIndex, this); + */ + Ham_Item_PrimaryAmmoIndex, + + /** + * Description: Returns the secondary ammo index of the item. + * Forward params: function(this) + * Return type: Integer. + * Execute params: ExecuteHam(Ham_Item_SecondaryAmmoIndex, this); + */ + Ham_Item_SecondaryAmmoIndex, + + /** + * Description: Updates item data for the client. + * This function has different version for the following mods: + * Sven-Coop 5.0+, see Ham_SC_Item_UpdateClientData instead. + * Forward params: function(this, idPlayer) + * Return type: Integer. + * Execute params: ExecuteHam(Ham_Item_UpdateClientData, this, idPlayer); + */ + Ham_Item_UpdateClientData, + + /** + * Description: Returns the entity index if the item is a weapon, -1 otherwise. + * Forward params: function(this) + * Return type: Entity. + * Execute Params: ExecuteHam(Ham_Item_GetWeaponPtr, this) + */ + Ham_Item_GetWeaponPtr, + + /** + * Description: Returns the item slot for the item. + * Forward params: function(this) + * Return type: Integer. + * Execute Params: ExecuteHam(Ham_Item_ItemSlot, this) + */ + Ham_Item_ItemSlot, + + + /** + * Weapons have all the attributes to Ham_Item_*, in addition to these. + */ + + /** + * Description: Gets ammo from the target weapon. + * This function is not supported in Earth's Special Forces mod. + * Forward params: function(this, idTarget) + * Return type: Integer. + * Execute Params: ExecuteHam(Ham_Weapon_ExtractAmmo, this, idTarget) + */ + Ham_Weapon_ExtractAmmo, + + /** + * Description: Gets clip ammo from the target weapon. + * This function is not supported in Earth's Special Forces mod. + * Forward params: function(this, idTarget) + * Return type: Integer. + * Execute Params: ExecuteHam(Ham_Weapon_ExtractAmmo, this, idTarget) + */ + Ham_Weapon_ExtractClipAmmo, + + /** + * Description: Unsure. + * This function is not supported in Earth's Special Forces mod. + * This function has different version for the following mods: + * Sven-Coop 5.0+, see Ham_SC_Weapon_AddWeapon instead. + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_Weapon_AddWeapon, this); + */ + Ham_Weapon_AddWeapon, + + /** + * Description: Plays the weapon's empty sound. + * This function has different version for the following mods: + * Sven-Coop 5.0+, see Ham_SC_Weapon_PlayEmptySound instead. + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_Weapon_PlayEmptySound, this); + */ + Ham_Weapon_PlayEmptySound, + + /** + * Description: Sets the weapon so that it can play empty sound again. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_Weapon_ResetEmptySound, this); + */ + Ham_Weapon_ResetEmptySound, + + /** + * Description: Sends an animation event for the weapon. + * This function has different versions for the following mods: + * Counter-Strike: see Ham_CS_Weapon_SendWeaponAnim. + * Team Fortress Classic: see Ham_TFC_Weapon_SendWeaponAnim. + * Day Of Defeat: see Ham_DOD_Weapon_SendWeaponAnim. + * Forward params: function(this, iAnim, skiplocal, body); + * Return type: None. + * Execute params: ExecuteHam(Ham_Weapon_SendWeaponAnim, this, iAnim, skiplocal, body); + */ + Ham_Weapon_SendWeaponAnim, + + /** + * Description: Whether or not the weapon is usable (has ammo, etc.) + * This function is not supported in Earth's Special Forces mod. + * This function has different version for the following mods: + * Sven-Coop 5.0+, see Ham_SC_Weapon_IsUsable instead. + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_Weapon_IsUsable, this) + */ + Ham_Weapon_IsUsable, + + /** + * Description: Called when the main attack of a weapon is triggered. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_Weapon_PrimaryAttack, this); + */ + Ham_Weapon_PrimaryAttack, + + /** + * Description: Called when the secondary attack of a weapon is triggered. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_Weapon_SecondaryAttack, this); + */ + Ham_Weapon_SecondaryAttack, + + /** + * Description: Called when the weapon is reloaded. + * This function is not supported in Earth's Special Forces mod. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_Weapon_Reload, this); + */ + Ham_Weapon_Reload, + + /** + * Description: Displays the idle animation for the weapon. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_Weapon_WeaponIdle, this); + */ + Ham_Weapon_WeaponIdle, + + /** + * Description: There is no more ammo for this gun, so switch to the next best one. + * Forward params: function(this) + * Return type: None. + * ExecuteParams: ExecuteHam(Ham_Weapon_RetireWeapon, this) + */ + Ham_Weapon_RetireWeapon, + + /** + * Description: Whether or not the weapon should idle. + * This function has different version for the following mods: + * Sven-Coop 5.0+, see Ham_SC_Weapon_ShouldWeaponIdle instead. + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute Params: ExecuteHam(Ham_Weapon_ShouldWeaponIdle, this) + */ + Ham_Weapon_ShouldWeaponIdle, + + /** + * Description: Unsure. + * This function is not supported by Team Fortress Classic. + * This function has different version for the following mods: + * Sven-Coop 5.0+, see Ham_SC_Weapon_UseDecrement instead. + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_Weapon_UseDecrement, this); + */ + Ham_Weapon_UseDecrement, + + + /** + * The following functions are specific to The Specialists. + */ + + /** + * Description: - + * Forward params: function(this, someboolvalue) + * Return type: None. + * Execute params: ExecuteHam(Ham_TS_BreakableRespawn, this, someboolvalue); + */ + Ham_TS_BreakableRespawn, + + /** + * Description: - + * Forward params: function(this) + * Return type: Integer (boolean) + * Execute params: ExecuteHam(Ham_TS_CanUsedThroughWalls, this); + */ + Ham_TS_CanUsedThroughWalls, + + /** + * Description: Unsure - this was removed in TS 3.0 (and thus is deprecated). + * Forward params: function(this) + * Return type: Integer (I think...) + * Execute params: ExecuteHam(Ham_TS_RespawnWait, this); + */ + Ham_TS_RespawnWait, + + + /** + * The following functions are specific to Counter-Strike. + */ + + /** + * Description: This is called on a map reset for most map based entities. + * Forward params: function(this); + * Return type: None. + * Execute params: ExecuteHam(Ham_CS_Restart, this); + */ + Ham_CS_Restart, + + /** + * Description: Respawn function for players/bots only! Do not use this on non player/bot entities! + * Forward params: function(this); + * Return type: None. + * Execute params: ExecuteHam(Ham_CS_RoundRespawn, this); + */ + Ham_CS_RoundRespawn, + + /** + * Description: Whether or not the player can drop the specified item. + * Forward params: function(this) + * Return type: Integer. + * Execute params: ExecuteHam(Ham_CS_Item_CanDrop, this); + */ + Ham_CS_Item_CanDrop, + + /** + * Description: Gets the maximum speed for whenever a player has the item deployed. + * Forward params: function(this); + * Return type: Float (byref'd in ExecuteHam). + * Execute params: ExecuteHam(Ham_CS_Item_GetMaxSpeed, this, Float:output); + */ + Ham_CS_Item_GetMaxSpeed, + + + /** + * The following functions are specific to Day Of Defeat. + */ + + /** + * Description: I assume this spawns players at the start of a new round. + * Forward params: function(this) + * Return type: None. + * Execute Params: ExecuteHam(Ham_DOD_RoundRespawn, this); + */ + Ham_DOD_RoundRespawn, + + /** + * Description: I assume this spawns entities (like func_breakables) at the start of a new round. + * Forward params: function(this) + * Return type: None. + * Execute Params: ExecuteHam(Ham_DOD_RoundRespawnEnt, this); + */ + Ham_DOD_RoundRespawnEnt, + + /** + * Description: Unsure. + * Forward params: function(this) + * Return type: None, I think... + * Execute params: ExecuteHam(Ham_DOD_RoundStore, this); + */ + Ham_DOD_RoundStore, + + /** + * Description: Unsure. + * Forward params: function(this, someintegervalue) + * Return type: None. + * Execute params: ExecuteHam(Ham_DOD_AreaSetIndex, this, someintegervalue) + */ + Ham_DOD_AreaSetIndex, + + /** + * Description: Unsure. + * Forward params: function(this, idPlayer) + * Return type: None. + * Execute Params: ExecuteHam(Ham_DOD_AreaSendStatus, this, idPlayer); + */ + Ham_DOD_AreaSendStatus, + + /** + * Description: Unsure. + * Forward params: function(this) + * Return type: Integer. + * Execute Params: ExecuteHam(Ham_DOD_GetState, this); + */ + Ham_DOD_GetState, + + /** + * Description: Unsure. + * Forward params: function(this, idtarget) + * Return type: Integer. + * Execute Params: ExecuteHam(Ham_DOD_GetStateEnt, this, idtarget); + */ + Ham_DOD_GetStateEnt, + + /** + * Description: Whether or not a player can drop this item. + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute Params: ExecuteHam(Ham_DOD_Item_CanDrop, this); + */ + Ham_DOD_Item_CanDrop, + + + /** + * The following functions are specific to The Team Fortress Classic. + */ + + /** + * Description: Unsure. + * Forward params: function(this, playerId) + * Return type: Integer. + * Execute params: ExecuteHam(Ham_TFC_EngineerUse, this, playerId) + */ + Ham_TFC_EngineerUse, + + /** + * Description: Unsure. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_TFC_Finished, this); + */ + Ham_TFC_Finished, + + /** + * Description: Unsure. + * Forward params: function(this, grenId, Float:damage, Float:radius) + * Return type: None. + * Execute params: ExecuteHam(Ham_TFC_EmpExplode, this, grenId, Float:damage, Float:radius) + */ + Ham_TFC_EmpExplode, + + /** + * Description: Unsure. + * 'damage' and 'radius' are byref'd in ExecuteHam. + * Forward params: function(this, Float:damage, Float:radius) + * Return type: None. + * Execute params: ExecuteHam(Ham_TFC_CalcEmpDmgRad, this, Float:damage, Float:radius) + */ + Ham_TFC_CalcEmpDmgRad, + + /** + * Description: Unsure. + * Forward params: function(this, grenId) + * Return type: None. + * Execute params: ExecuteHam(Ham_TFC_TakeEmpBlast, this, grenId); + */ + Ham_TFC_TakeEmpBlast, + + /** + * Description: Unsure. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_TFC_EmpRemove, this); + */ + Ham_TFC_EmpRemove, + + /** + * Description: Unsure. + * Forward params: function(this, grenId, Float:bounceMax) + * Return type: None. + * Execute params: ExecuteHam(Ham_TFC_TakeConcussionBlast, this, grenId, Float:bounceMax); + */ + Ham_TFC_TakeConcussionBlast, + + /** + * Description: Unsure. + * Forward params: function(this, grenId) + * Return type: None. + * Execute params: ExecuteHam(Ham_TFC_Concuss, this, grenId); + */ + Ham_TFC_Concuss, + + + /** + * The following functions are specific to Earth's Special Forces. + */ + + /** + * Description: Unsure. + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_ESF_IsEnvModel, this); + */ + Ham_ESF_IsEnvModel, + + /** + * Description: Unsure. + * This is available only in ESF Open Beta. + * Forward params: function(this, entityida, entityidb, Float:floata, Float:floatb, dmgbits) + * Return type: Integer. + * Execute params: ExecuteHam(Ham_ESF_TakeDamage2, this, entityida, entityidb, Float:floata, Float:floatb, dmgbits); + */ + Ham_ESF_TakeDamage2, + + + /** + * The following functions are specific to Natural Selection. + */ + + /** + * Description: Returns how many points each entity is worth. + * Forward params: function(this) + * Return type: Integer. + * Execute params: ExecuteHam(Ham_NS_GetPointValue, this); + */ + Ham_NS_GetPointValue, + + /** + * Description: Unsure. Probably awards this with the killing of idvictim. + * Forward params: function(this, idvictim) + * Return type: None. + * Execute params: ExecuteHam(Ham_NS_AwardKill, this, idvictim); + */ + Ham_NS_AwardKill, + + /** + * Description: Unsure, probably whenever an entity resets after a new round. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_NS_ResetEntity, this); + */ + Ham_NS_ResetEntity, + + /** + * Description: Unsure. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_NS_UpdateOnRemove, this) + */ + Ham_NS_UpdateOnRemove, + + + /** + * The following functions are specific to The Specialists. + */ + + /** + * Description: Unsure. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_TS_GiveSlowMul, this) + */ + Ham_TS_GiveSlowMul, + + /** + * Description: Unsure. The second paramater is actually a char. + * Forward params: function(this, Float:someval, someotherval) + * Return type: None. + * Execute params: ExecuteHam(Ham_TS_GoSlow, this, Float:someval, someotherval) + */ + Ham_TS_GoSlow, + + /** + * Description: Probably returns true if the user is in slow mo. + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_TS_InSlow, this) + */ + Ham_TS_InSlow, + + /** + * Description: Returns true if the entity is an objective. + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_TS_IsObjective, this) + */ + Ham_TS_IsObjective, + + /** + * Description: Unsure. + * Forward params: function(this, bool:someval) + * Return type: None. + * Execute params: ExecuteHam(Ham_TS_EnableObjective, this, bool:someval) + */ + Ham_TS_EnableObjective, + + /** + * Description: Probably called when the engine call to OnEntFreePrivateData is called (the entity destructor.) + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_TS_OnEntFreePrivateData, this) + */ + Ham_TS_OnFreeEntPrivateData, + + /** + * Description: Probably called when the engine call to ShouldCollide is called. + * Forward params: function(this, otherEntity) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_TS_ShouldCollide, this, otherEntity) + */ + Ham_TS_ShouldCollide, + + + /** + * LATE ADDITIONS (2011) + */ + + /** + * Description: Turns a monster towards its ideal_yaw. + * Forward params: function(this, speed); + * Return type: Integer. + * Execute params: ExecuteHam(Ham_ChangeYaw, this, speed); + */ + Ham_ChangeYaw, + + /** + * Description: Returns if monster has human gibs. + * Forward params: function(this); + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_HasHumanGibs, this); + */ + Ham_HasHumanGibs, + + /** + * Description: Returns if monster has alien gibs. + * Forward params: function(this); + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_HasAlienGibs, this); + */ + Ham_HasAlienGibs, + + /** + * Description: Slowly fades a entity out, then removes it. + * Using this on player will crash your server. + * Forward params: function(this); + * Return type: None. + * Execute params: ExecuteHam(Ham_FadeMonster, this); + */ + Ham_FadeMonster, + + /** + * Description: Create some gore and get rid of a monster's model. + * Forward params: function(this); + * Return type: None. + * Execute params: ExecuteHam(Ham_GibMonster, this); + */ + Ham_GibMonster, + + /** + * Description: Called when monster dies and prepares its entity to become a corpse. + * Forward params: function(this); + * Return type: None. + * Execute params: ExecuteHam(Ham_BecomeDead, this); + */ + Ham_BecomeDead, + + /** + * Description: Checks relation ship between two monsters. + * Forward params: function(this, idother); + * Return type: Integer (R_* constants, see HLDSK). + * Execute params: ExecuteHam(Ham_IRelationship, this, idother); + */ + Ham_IRelationship, + + /** + * Description: Called when monster is about to emit pain sound. + * Not guaranteed to actually emit sound. (random, time, etc..) + * Forward params: function(this); + * Return type: None. + * Execute params: ExecuteHam(Ham_PainSound, this); + */ + Ham_PainSound, + + /** + * Description: Prints debug information about monster to console. (state, activity, and other) + * This function is called by impulse 103. + * Forward params: function(this); + * Return type: None. + * Execute params: ExecuteHam(Ham_ReportAIState, this); + */ + Ham_ReportAIState, + + /** + * Description: Called when monster has died. + * Forward params: function(this); + * Return type: None. + * Execute params: ExecuteHam(Ham_MonsterInitDead, this); + */ + Ham_MonsterInitDead, + + /** + * Description: Function to find enemies or food by sight. + * distance is maximum distance (in units) monster can see. + * Forward params: function(this, distance); + * Return type: None. + * Execute params: ExecuteHam(Ham_Look, this, distance); + */ + Ham_Look, + + /** + * Description: This functions searches the link list whose head is the caller's m_pLink field. + * Forward params: function(this); + * Return type: Integer (entity). + * Execute params: ExecuteHam(Ham_BestVisibleEnemy, this); + */ + Ham_BestVisibleEnemy, + + /** + * Description: Returns true if the passed ent is in the caller's forward view cone. + * The dot product is performed in 2d, making the view cone infinitely tall. + * Forward params: function(this, idOther); + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_FInViewCone, this, idOther); + */ + Ham_FInViewCone, + + /** + * Description: Returns true if the passed ent is in the caller's forward view cone. + * The dot product is performed in 2d, making the view cone infinitely tall. + * Forward params: function(this, const Float:origin[3]); + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_FVecInViewCone, this, const Float:origin[3]); + */ + Ham_FVecInViewCone, + + /** + * Description: Determines the best type of death animation to play. + * Forward params: function(this); + * Return type: Integer (ACT_* constants, see HLDSK. It might different depending the mod). + * Execute params: ExecuteHam(Ham_GetDeathActivity, this); + */ + Ham_GetDeathActivity, + + + /** + * The following functions are not supported by Counter-Strike, The Specialists and Natural Selection mods + */ + + /** + * Description: Runs core AI functions. + * This function is not supported by Counter-Strike, The Specialists and Natural Selection mods. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_RunAI, this); + */ + Ham_RunAI, + + /** + * Description: Calls out to core AI functions and handles this monster's specific animation events. + * This function is not supported by Counter-Strike, The Specialists and Natural Selection mods. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_MonsterThink, this); + */ + Ham_MonsterThink, + + /** + * Description: After a monster is spawned, it needs to be dropped into the world, checked for mobility problems + * and put on the proper path, if any. This function does all of those things after the monster spawns. + * Any initialization that should take place for all monsters goes here. + * This function is not supported by Counter-Strike, The Specialists and Natural Selection mods. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_MonsterInit, this); + */ + Ham_MonsterInit, + + /** + * Description: Check validity of a straight move through space. + * This function is not supported by Counter-Strike, The Specialists and Natural Selection mods. + * Forward params: function(this, const Float:start[3], const Float:end[3], target, Float:dist) + * Return type: Integer (See LOCALMOVE_* constants). + * Execute params: ExecuteHam(Ham_CheckLocalMove, this, const Float:start[3], const Float:end[3], target, Float:dist); + */ + Ham_CheckLocalMove, + + /** + * Description: Takes a single step towards the next ROUTE location. + * This function is not supported by Counter-Strike, The Specialists and Natural Selection mods. + * Forward params: function(this, Float:interval) + * Return type: None. + * Execute params: ExecuteHam(Ham_Move, this, Float:interval); + */ + Ham_Move, + + /** + * Description: - + * This function is not supported by Counter-Strike, The Specialists and Natural Selection mods. + * Forward params: function(this, targetEnt, const Float:dir[3], Float:interval) + * Return type: None. + * Execute params: ExecuteHam(Ham_MoveExecute, this, targetEnt, const Float:dir[3], Float:interval); + */ + Ham_MoveExecute, + + /** + * Description: - + * This function is not supported by Counter-Strike, The Specialists and Natural Selection mods. + * Forward params: function(this, Float:waypointDist) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_ShouldAdvanceRoute, this, Float:waypointDist); + */ + Ham_ShouldAdvanceRoute, + + /** + * Description: - + * This function is not supported by Counter-Strike, The Specialists and Natural Selection mods. + * Forward params: function(this) + * Return type: Integer (ACT_* constants, see HLDSK. It might different depending the mod). + * Execute params: ExecuteHam(Ham_GetStoppedActivity, this); + */ + Ham_GetStoppedActivity, + + /** + * Description: - + * This function is not supported by Counter-Strike, The Specialists and Natural Selection mods. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_Stop, this); + */ + Ham_Stop, + + /** + * Description: Surveys conditions and set appropriate conditions bits for attack types. + * This function is not supported by Counter-Strike, The Specialists and Natural Selection mods. + * Forward params: function(this, Float:dot, Float:dist) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_CheckRangeAttack1, this, Float:dot, Float:dist); + */ + Ham_CheckRangeAttack1, + + /** + * Description: Surveys conditions and set appropriate conditions bits for attack types. + * This function is not supported by Counter-Strike, The Specialists and Natural Selection mods. + * Forward params: function(this, Float:dot, Float:dist) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_CheckRangeAttack2, this, Float:dot, Float:dist); + */ + Ham_CheckRangeAttack2, + + /** + * Description: Surveys conditions and set appropriate conditions bits for attack types. + * This function is not supported by Counter-Strike, The Specialists and Natural Selection mods. + * Forward params: function(this, Float:dot, Float:dist) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_CheckMeleeAttack1, this, Float:dot, Float:dist); + */ + Ham_CheckMeleeAttack1, + + /** + * Description: Surveys conditions and set appropriate conditions bits for attack types. + * This function is not supported by Counter-Strike, The Specialists and Natural Selection mods. + * Forward params: function(this, Float:dot, Float:dist) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_CheckMeleeAttack2, this, Float:dot, Float:dist); + */ + Ham_CheckMeleeAttack2, + + /** + * Description: - + * This function is not supported by Counter-Strike, The Specialists and Natural Selection mods. + * Forward params: function(this, Float:dot, Float:dist) + * Return type: None. + * Execute params: ExecuteHam(Ham_ScheduleChange, this, Float:dot, Float:dist); + */ + Ham_ScheduleChange, + + /** + * Description: Determines whether or not the monster can play the scripted sequence or AI sequence that is + * trying to possess it. If DisregardState is set, the monster will be sucked into the script + * no matter what state it is in. ONLY Scripted AI ents should allow this. + * This function is not supported by Counter-Strike, The Specialists and Natural Selection mods. + * This function has different versions for the following mod: + * Sven Coop: see Ham_SC_CanPlaySequence + * Forward params: function(this, bool:disregardState, interruptLevel); + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_CanPlaySequence, this, bool:disregardState, interruptLevel); + */ + Ham_CanPlaySequence, + + /** + * Description: - + * This function is not supported by Counter-Strike, The Specialists and Natural Selection mods. + * This function has different versions for the following mod: + * Sven Coop: see Ham_SC_CanPlaySentence2 + * Forward params: function(this, bool:disregardState); + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_CanPlaySentence2, this, bool:disregardState); + */ + Ham_CanPlaySentence2, + + /** + * Description: - + * This function is not supported by Counter-Strike, The Specialists and Natural Selection mods. + * Forward params: function(this, const sentence[], Float:duration, Float:volume, Float:attenuation); + * Return type: None. + * Execute params: ExecuteHam(Ham_PlaySentence, this, const sentence[], Float:duration, Float:volume, Float:attenuation); + */ + Ham_PlaySentence, + + /** + * Description: - + * This function is not supported by Counter-Strike, The Specialists and Natural Selection mods. + * This function has different version for Sven Coop, see Ham_SC_PlayScriptedSentence instead. + * Forward params: function(this, const sentence[], Float:duration, Float:volume, Float:attenuation, bool:concurrent, idListener); + * Return type: None. + * Execute params: ExecuteHam(Ham_PlayScriptedSentence, this, const sentence[], Float:duration, Float:volume, Float:attenuation, bool:concurrent, idListener); + */ + Ham_PlayScriptedSentence, + + /** + * Description: - + * This function is not supported by Counter-Strike, The Specialists and Natural Selection mods. + * Forward params: function(this); + * Return type: None. + * Execute params: ExecuteHam(Ham_SentenceStop, this); + */ + Ham_SentenceStop, + + /** + * Description: Surveys the Conditions information available and finds the best new state for a monster. + * This function is not supported by Counter-Strike, The Specialists and Natural Selection mods. + * Forward params: function(this); + * Return type: Integer (MONSTERSTATE_* constants, see HLDSK). + * Execute params: ExecuteHam(Ham_GetIdealState, this); + */ + Ham_GetIdealState, + + /** + * Description: - + * This function is not supported by Counter-Strike, The Specialists and Natural Selection mods. + * Forward params: function(this, newActivity); + * Return type: None. + * Execute params: ExecuteHam(Ham_SetActivity, this, newActivity); + */ + Ham_SetActivity, + + /** + * Description: Part of the condition collection process gets and stores data and conditions + * pertaining to a monster's enemy. Returns TRUE if Enemy LKP was updated. + * This function is not supported by Counter-Strike, The Specialists and Natural Selection mods. + * Forward params: function(this, idEnemy); + * Return type: None. + * Execute params: ExecuteHam(Ham_CheckEnemy, this, idEnemy); + */ + Ham_CheckEnemy, + + /** + * Description: Tries to overcome local obstacles by triangulating a path around them. + * 'dist' is how far the obstruction that we are trying to triangulate around is from the monster. + * This function is not supported by Counter-Strike, The Specialists and Natural Selection mods. + * Forward params: function(this, const Float:start[3], const Float:end[3], Float:dist, targetEnt, Float:apex[3]); + * Return type: None. + * Execute params: ExecuteHam(Ham_FTriangulate, this, const Float:start[3], const Float:end[3], Float:dist, targetEnt, Float:apex[3]); + */ + Ham_FTriangulate, + + /** + * Description: Allows each sequence to have a different turn rate associated with it. + * This function is not supported by Counter-Strike, The Specialists and Natural Selection mods. + * Forward params: function(this); + * Return type: None. + * Execute params: ExecuteHam(Ham_SetYawSpeed, this); + */ + Ham_SetYawSpeed, + + /** + * Description: Tries to build a route as close to the target as possible, even if there isn't a path to the final point. + * If supplied, search will return a node at least as far away as MinDist from vecThreat, but no farther than minDist. + * If maxDist isn't supplied, it defaults to a reasonable value. + * This function is not supported by Counter-Strike, The Specialists and Natural Selection mods. + * Forward params: function(this, Float:threat[3], const Float:viewOffset[3], Float:minDist, Float:maxDist); + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_BuildNearestRoute, this, const Float:threat[3], const Float:viewOffset[3], Float:minDist, Float:maxDist); + */ + Ham_BuildNearestRoute, + + /** + * Description: Tries to find a nearby node that will hide the caller from its enemy. + * If supplied, search will return a node at least as far away as MinDist from vecThreat, but no farther than minDist. + * If maxDist isn't supplied, it defaults to a reasonable value. + * This function is not supported by Counter-Strike, The Specialists and Natural Selection mods. + * Forward params: function(this, Float:threat[3], const Float:viewOffset[3], Float:minDist, Float:maxDist); + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_FindCover, this, const Float:threat[3], const Float:viewOffset[3], Float:minDist, Float:maxDist); + */ + Ham_FindCover, + + /** + * Description: Default cover radius. + * This function is not supported by Counter-Strike, The Specialists and Natural Selection mods. + * Forward params: function(this); + * Return type: Float. + * Execute params: ExecuteHam(Ham_CoverRadius, this); + */ + Ham_CoverRadius, + + /** + * Description: Prequalifies a monster to do more fine checking of potential attacks. + * This function is not supported by Counter-Strike, The Specialists and Natural Selection mods. + * Forward params: function(this); + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_FCanCheckAttacks, this); + */ + Ham_FCanCheckAttacks, + + /** + * Description: - + * This function is not supported by Counter-Strike, The Specialists and Natural Selection mods. + * Forward params: function(this); + * Return type: None. + * Execute params: ExecuteHam(Ham_CheckAmmo, this); + */ + Ham_CheckAmmo, + + /** + * Description: Before a set of conditions is allowed to interrupt a monster's schedule, this function removes + * conditions that we have flagged to interrupt the current schedule, but may not want to interrupt + * the schedule every time. (Pain, for instance) + * This function is not supported by Counter-Strike, The Specialists and Natural Selection mods. + * Forward params: function(this); + * Return type: Integer. + * Execute params: ExecuteHam(Ham_IgnoreConditions, this); + */ + Ham_IgnoreConditions, + + /** + * Description: Tells use whether or not the monster cares about the type of Hint Node given. + * This function is not supported by Counter-Strike, The Specialists and Natural Selection mods. + * Forward params: function(this, hint); + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_FValidateHintType, this, hint); + */ + Ham_FValidateHintType, + + /** + * Description: - + * This function is not supported by Counter-Strike, The Specialists and Natural Selection mods. + * Forward params: function(this); + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_FValidateHintType, this); + */ + Ham_FCanActiveIdle, + + /** + * Description: Returns a bit mask indicating which types of sounds this monster regards. + * In the base class implementation, monsters care about all sounds, but no scents. + * This function is not supported by Counter-Strike, The Specialists and Natural Selection mods. + * Forward params: function(this); + * Return type: Integer. + * Execute params: ExecuteHam(Ham_ISoundMask, this); + */ + Ham_ISoundMask, + + /** + * Description: - + * This function is not supported by Counter-Strike, The Specialists and Natural Selection mods. + * Forward params: function(this); + * Return type: Float. + * Execute params: ExecuteHam(Ham_HearingSensitivity, this); + */ + Ham_HearingSensitivity, + + /** + * Description: Called by Barnacle victims when the barnacle pulls their head into its mouth. + * This function is not supported by Counter-Strike, The Specialists and Natural Selection mods. + * Forward params: function(this, idBarnacle); + * Return type: Float. + * Execute params: ExecuteHam(Ham_BarnacleVictimBitten, this, idBarnacle); + */ + Ham_BarnacleVictimBitten, + + /** + * Description: Called by barnacle victims when the host barnacle is killed. + * This function is not supported by Counter-Strike, The Specialists and Natural Selection mods. + * Forward params: function(this); + * Return type: Float. + * Execute params: ExecuteHam(Ham_BarnacleVictimReleased, this); + */ + Ham_BarnacleVictimReleased, + + /** + * Description: Runs after conditions are collected and before scheduling code is run. + * This function is not supported by Counter-Strike, The Specialists and Natural Selection mods. + * Forward params: function(this); + * Return type: None. + * Execute params: ExecuteHam(Ham_PrescheduleThink, this); + */ + Ham_PrescheduleThink, + + /** + * Description: Plays death sounds. + * This function is not supported by Counter-Strike, The Specialists and Natural Selection mods. + * Forward params: function(this); + * Return type: None. + * Execute params: ExecuteHam(Ham_DeathSound, this); + */ + Ham_DeathSound, + + /** + * Description: Plays alert sounds. + * This function is not supported by Counter-Strike, The Specialists and Natural Selection mods. + * Forward params: function(this); + * Return type: None. + * Execute params: ExecuteHam(Ham_AlertSound, this); + */ + Ham_AlertSound, + + /** + * Description: Plays idle sounds. + * This function is not supported by Counter-Strike, The Specialists and Natural Selection mods. + * Forward params: function(this); + * Return type: None. + * Execute params: ExecuteHam(Ham_IdleSound, this); + */ + Ham_IdleSound, + + /** + * Description: This should stop a monster following a target. + * Forward params: function(this, bool:clearSchedule) + * Return type: None. + * Execute Params: ExecuteHam(Ham_StopFollowing, this, bool:clearSchedule); + */ + Ham_StopFollowing, + + + /** + * The following functions are specific to Counter-Strike. + */ + + /** + * Description: Sends an animation event for the weapon. skiplocal is 1 if client is predicting weapon animations. + * Forward params: function(this, anim, skiplocal); + * Return type: None. + * Execute params: ExecuteHam(Ham_CS_Weapon_SendWeaponAnim, this, anim, skiplocal); + */ + Ham_CS_Weapon_SendWeaponAnim, + + /** + * Description: Resets the player's max speed. + * Forward params: function(this); + * Return type: None. + * Execute params: ExecuteHam(Ham_CS_Player_ResetMaxSpeed, this); + */ + Ham_CS_Player_ResetMaxSpeed, + + /** + * Description: Whether or not the player is a bot. + * Forward params: function(this); + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_CS_Player_IsBot, this); + */ + Ham_CS_Player_IsBot, + + /** + * Description: Returns a vector that tells the autoaim direction. + * Set crosshair position to point to enemey if sv_aim is 1. + * Forward params: function(this, Float:delta) + * Return type: Vector, byreffed in execute. + * Execute params: ExecuteHam(Ham_CS_Player_GetAutoaimVector, this, Float:delta, Float:output[3]); + */ + Ham_CS_Player_GetAutoaimVector, + + /** + * Description: Whether or not the player is being flashing. (flashbang grenade explosion) + * blindTime is the time you are considered as being blind. (holdTime * 0.33). + * Forward params: function(this, Float:blindTime, Float:duration, Float:holdTime, alpha); + * Return type: None. + * Execute params: ExecuteHam(Ham_CS_Player_Blind, this, Float:blindTime, Float:duration, Float:holdTime, alpha); + */ + Ham_CS_Player_Blind, + + /** + * Description: Whether or not the player is touching a weapon on the ground. + * Forward params: function(this, entityid); + * Return type: None. + * Execute params: ExecuteHam(Ham_CS_Player_OnTouchingWeapon, this, entityid); + */ + Ham_CS_Player_OnTouchingWeapon, + + + /** + * The following functions are specific to Day Of Defeat. + */ + + /** + * Description: - + * Forward params: function(this) + * Return type: Integer. + * Execute Params: ExecuteHam(Ham_DOD_SetScriptReset, this); + */ + Ham_DOD_SetScriptReset, + + /** + * Description: - + * Forward params: function(this) + * Return type: Integer. + * Execute Params: ExecuteHam(Ham_DOD_Item_SpawnDeploy, this); + */ + Ham_DOD_Item_SpawnDeploy, + + /** + * Description: - + * Forward params: function(this, Float:someValue) + * Return type: None. + * Execute Params: ExecuteHam(Ham_DOD_Item_SetDmgTime, this, Float:someValue); + */ + Ham_DOD_Item_SetDmgTime, + + /** + * Description: - + * Forward params: function(this) + * Return type: None. + * Execute Params: ExecuteHam(Ham_DOD_Item_DropGren, this); + */ + Ham_DOD_Item_DropGren, + + /** + * Description: - + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute Params: ExecuteHam(Ham_DOD_Weapon_IsUseable, this); + */ + Ham_DOD_Weapon_IsUseable, + + /** + * Description: - + * Forward params: function(this, Float:accuracyFactor, idother, shared_rand) + * Return type: Vector, byreffed in execute. + * Execute Params: ExecuteHam(Ham_DOD_Weapon_Aim, this, Float:accuracyFactor, idother, shared_rand, Float:output[3]); + */ + Ham_DOD_Weapon_Aim, + + /** + * Description: - + * Forward params: function(this, Float:accuracyFactor, idother) + * Return type: Float. + * Execute Params: ExecuteHam(Ham_DOD_Weapon_flAim, this, Float:accuracyFactor, idother); + */ + Ham_DOD_Weapon_flAim, + + /** + * Description: - + * Forward params: function(this, Float:amount, targetEnt) + * Return type: None. + * Execute Params: ExecuteHam(Ham_DOD_Weapon_RemoveStamina, this, Float:amount, targetEnt); + */ + Ham_DOD_Weapon_RemoveStamina, + + /** + * Description: - + * Forward params: function(this, fov) + * Return type: Integer. + * Execute Params: ExecuteHam(Ham_DOD_Weapon_ChangeFOV, this, fov); + */ + Ham_DOD_Weapon_ChangeFOV, + + /** + * Description: - + * Forward params: function(this) + * Return type: Integer. + * Execute Params: ExecuteHam(Ham_DOD_Weapon_ZoomOut, this); + */ + Ham_DOD_Weapon_ZoomOut, + + /** + * Description: - + * Forward params: function(this) + * Return type: Integer. + * Execute Params: ExecuteHam(Ham_DOD_Weapon_ZoomIn, this); + */ + Ham_DOD_Weapon_ZoomIn, + + /** + * Description: - + * Forward params: function(this) + * Return type: Integer. + * Execute Params: ExecuteHam(Ham_DOD_Weapon_GetFOV, this); + */ + Ham_DOD_Weapon_GetFOV, + + /** + * Description: - + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute Params: ExecuteHam(Ham_DOD_Weapon_IsWaterSniping, this); + */ + Ham_DOD_Weapon_PlayerIsWaterSniping, + + /** + * Description: - + * Forward params: function(this) + * Return type: None. + * Execute Params: ExecuteHam(Ham_DOD_Weapon_UpdateZoomSpeed, this); + */ + Ham_DOD_Weapon_UpdateZoomSpeed, + + /** + * Description: - + * Forward params: function(this) + * Return type: None. + * Execute Params: ExecuteHam(Ham_DOD_Weapon_Special, this); + */ + Ham_DOD_Weapon_Special, + + + /** + * The following functions are specific to Team Fortress Classic. + */ + + /** + * Description: Get the item name. + * Forward params: function(this, const buffer[]); + * Return type: String (string length returned and string byref'd in ExecuteHam). + * Execute params: ExecuteHam(Ham_TFC_DB_GetItemName, this, buffer[], size); + */ + Ham_TFC_DB_GetItemName, + + /** + * Description: This entity is exploding, or otherwise needs to inflict damage upon entities within a certain range. + * Forward params: function(this, inflictorId, attackerId, Float:damage, classIgnore, bitsDamageType) + * Return type: None. + * Execute params: ExecuteHam(Ham_TFC_RadiusDamage, this, inflictorId, attackerId, Float:damage, classIgnore, bitsDamageType); + */ + Ham_TFC_RadiusDamage, + + /** + * Description: This entity is exploding, or otherwise needs to inflict damage upon entities within a certain range. + * Forward params: function(this, const Float:source[3], inflictorId, attackerId, Float:damage, classIgnore, bitsDamageType) + * Return type: None. + * Execute params: ExecuteHam(Ham_TFC_RadiusDamage2, this, const Float:source[3], inflictorId, attackerId, Float:damage, classIgnore, bitsDamageType); + */ + Ham_TFC_RadiusDamage2, + + + /** + * The following functions are specific to Earth's Special Forces. + */ + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_ESF_IsFighter, this); + */ + Ham_ESF_IsFighter, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_ESF_IsBuddy, this); + */ + Ham_ESF_IsBuddy, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this, const char sample[], somevalue) + * Return type: None. + * Execute params: ExecuteHam(Ham_ESF_EmitSound, this, const sample[], somevalue); + */ + Ham_ESF_EmitSound, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this somevalue) + * Return type: None. + * Execute params: ExecuteHam(Ham_ESF_EmitNullSound, this, somevalue); + */ + Ham_ESF_EmitNullSound, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this, someentid, somevalue) + * Return type: None. + * Execute params: ExecuteHam(Ham_ESF_IncreaseStrength, this, someentid, somevalue); + */ + Ham_ESF_IncreaseStrength, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this somevalue) + * Return type: None. + * Execute params: ExecuteHam(Ham_ESF_IncreasePL, this, somevalue); + */ + Ham_ESF_IncreasePL, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this somevalue) + * Return type: None. + * Execute params: ExecuteHam(Ham_ESF_SetPowerLevel, this, somevalue); + */ + Ham_ESF_SetPowerLevel, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this, somevalue) + * Return type: None. + * Execute params: ExecuteHam(Ham_ESF_SetMaxPowerLevel, this, somevalue); + */ + Ham_ESF_SetMaxPowerLevel, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this, anim) + * Return type: None. + * Execute params: ExecuteHam(Ham_ESF_StopAniTrigger, this, anim); + */ + Ham_ESF_StopAniTrigger, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_ESF_StopFly, this); + */ + Ham_ESF_StopFly, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_ESF_HideWeapon, this); + */ + Ham_ESF_HideWeapon, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this, somevalue) + * Return type: None. + * Execute params: ExecuteHam(Ham_ESF_HideWeapon, this, somevalue); + */ + Ham_ESF_ClientRemoveWeapon, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this, const model[]) + * Return type: None. + * Execute params: ExecuteHam(Ham_ESF_SendClientsCustomModel, this, const model[]); + */ + Ham_ESF_SendClientsCustomModel, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_ESF_CanTurbo, this); + */ + Ham_ESF_CanTurbo, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_ESF_CanPrimaryFire, this); + */ + Ham_ESF_CanPrimaryFire, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_ESF_CanSecondaryFire, this); + */ + Ham_ESF_CanSecondaryFire, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_ESF_CanStopFly, this); + */ + Ham_ESF_CanStopFly, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_ESF_CanBlock, this); + */ + Ham_ESF_CanBlock, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_ESF_CanRaiseKi, this); + */ + Ham_ESF_CanRaiseKi, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_ESF_CanRaiseStamina, this); + */ + Ham_ESF_CanRaiseStamina, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_ESF_CanTeleport, this); + */ + Ham_ESF_CanTeleport, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_ESF_CanStartFly, this); + */ + Ham_ESF_CanStartFly, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_ESF_CanStartPowerup, this); + */ + Ham_ESF_CanStartPowerup, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_ESF_CanJump, this); + */ + Ham_ESF_CanJump, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_ESF_CanWallJump, this); + */ + Ham_ESF_CanWallJump, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_ESF_IsSuperJump, this); + */ + Ham_ESF_IsSuperJump, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_ESF_IsMoveBack, this); + */ + Ham_ESF_IsMoveBack, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: Integer. + * Execute params: ExecuteHam(Ham_ESF_CheckWallJump, this); + */ + Ham_ESF_CheckWallJump, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this, const Float:somevalue[3]) + * Return type: None. + * Execute params: ExecuteHam(Ham_ESF_EnableWallJump, this, const Float:somevalue[3]); + */ + Ham_ESF_EnableWallJump, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_ESF_DisableWallJump, this); + */ + Ham_ESF_DisableWallJump, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_ESF_ResetWallJumpVars, this); + */ + Ham_ESF_ResetWallJumpVars, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this, const value[], const Float:somevalue[3], const someothervalue[]) + * Return type: None. + * Execute params: ExecuteHam(Ham_ESF_GetWallJumpAnim, const value[], const Float:somevalue[3], const someothervalue[]); + */ + Ham_ESF_GetWallJumpAnim, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this, const somevalue[], const someothervalue[]) + * Return type: None. + * Execute params: ExecuteHam(Ham_ESF_GetWallJumpAnim2, this, const somevalue[], const someothervalue[]); + */ + Ham_ESF_GetWallJumpAnim2, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_ESF_SetFlyMoveType, this); + */ + Ham_ESF_SetWallJumpAnimation, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_ESF_SetFlyMoveType, this); + */ + Ham_ESF_SetFlyMoveType, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_ESF_IsFlyMoveType, this); + */ + Ham_ESF_IsFlyMoveType, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_ESF_IsWalkMoveType, this); + */ + Ham_ESF_IsWalkMoveType, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_ESF_SetWalkMoveType, this); + */ + Ham_ESF_SetWalkMoveType, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this, somevalue) + * Return type: None. + * Execute params: ExecuteHam(Ham_ESF_DrawChargeBar, this, somevalue); + */ + Ham_ESF_DrawChargeBar, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_ESF_StartBlock, this); + */ + Ham_ESF_StartBlock, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_ESF_StopBlock, this); + */ + Ham_ESF_StopBlock, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_ESF_StartFly, this); + */ + Ham_ESF_StartFly, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this, Float:value) + * Return type: Float. + * Execute params: ExecuteHam(Ham_ESF_GetMaxSpeed, this, Float:value); + */ + Ham_ESF_GetMaxSpeed, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this, anim) + * Return type: None. + * Execute params: ExecuteHam(Ham_ESF_SetAnimation, this, anim); + */ + Ham_ESF_SetAnimation, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_ESF_PlayAnimation, this); + */ + Ham_ESF_PlayAnimation, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: Integer. + * Execute params: ExecuteHam(Ham_ESF_GetMoveForward, this); + */ + Ham_ESF_GetMoveForward, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: Integer. + * Execute params: ExecuteHam(Ham_ESF_GetMoveRight, this); + */ + Ham_ESF_GetMoveRight, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: Integer. + * Execute params: ExecuteHam(Ham_ESF_GetMoveUp, this); + */ + Ham_ESF_GetMoveUp, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_ESF_AddBlindFX, this); + */ + Ham_ESF_AddBlindFX, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_ESF_RemoveBlindFX, this); + */ + Ham_ESF_RemoveBlindFX, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_ESF_DisablePSBar, this); + */ + Ham_ESF_DisablePSBar, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this, somevalue) + * Return type: None. + * Execute params: ExecuteHam(Ham_ESF_AddBeamBoxCrosshair, this, somevalue); + */ + Ham_ESF_AddBeamBoxCrosshair, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_ESF_RemoveBeamBoxCrosshair, this); + */ + Ham_ESF_RemoveBeamBoxCrosshair, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_ESF_DrawPSWinBonus, this); + */ + Ham_ESF_DrawPSWinBonus, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this, Float:value, Float:othervalue) + * Return type: None. + * Execute params: ExecuteHam(Ham_ESF_DrawPSBar, this, Float:value, Float:othervalue); + */ + Ham_ESF_DrawPSBar, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_ESF_LockCrosshair, this); + */ + Ham_ESF_LockCrosshair, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_ESF_UnLockCrosshair, this); + */ + Ham_ESF_UnLockCrosshair, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_ESF_RotateCrosshair, this); + */ + Ham_ESF_RotateCrosshair, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_ESF_UnRotateCrosshair, this); + */ + Ham_ESF_UnRotateCrosshair, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_ESF_WaterMove, this); + */ + Ham_ESF_WaterMove, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_ESF_CheckTimeBasedDamage, this); + */ + Ham_ESF_CheckTimeBasedDamage, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_ESF_DoesSecondaryAttack, this); + */ + Ham_ESF_DoesSecondaryAttack, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_ESF_DoesPrimaryAttack, this); + */ + Ham_ESF_DoesPrimaryAttack, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_ESF_RemoveSpecialModes, this); + */ + Ham_ESF_RemoveSpecialModes, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_ESF_StopTurbo, this); + */ + Ham_ESF_StopTurbo, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_ESF_TakeBean, this); + */ + Ham_ESF_TakeBean, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_ESF_GetPowerLevel, this); + */ + Ham_ESF_GetPowerLevel, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_ESF_RemoveAllOtherWeapons, this); + */ + Ham_ESF_RemoveAllOtherWeapons, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_ESF_StopSwoop, this); + */ + Ham_ESF_StopSwoop, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_ESF_SetDeathAnimation, this); + */ + Ham_ESF_SetDeathAnimation, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_ESF_SetModel, this); + */ + Ham_ESF_SetModel, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_ESF_AddAttacks, this); + */ + Ham_ESF_AddAttacks, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this, const value[], const othervalue[], somevalue) + * Return type: None. + * Execute params: ExecuteHam(Ham_ESF_EmitClassSound, this, const value[], const othervalue[], somevalue); + */ + Ham_ESF_EmitClassSound, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_ESF_CheckLightning, this); + */ + Ham_ESF_CheckLightning, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_ESF_FreezeControls, this); + */ + Ham_ESF_FreezeControls, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_ESF_UnFreezeControls, this); + */ + Ham_ESF_UnFreezeControls, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_ESF_UpdateKi, this); + */ + Ham_ESF_UpdateKi, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_ESF_UpdateHealth, this); + */ + Ham_ESF_UpdateHealth, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: Vector. + * Execute params: ExecuteHam(Ham_ESF_GetTeleportDir, this, output[3]); + */ + Ham_ESF_GetTeleportDir, + + /** + * Description: Unsure. + * Forward params: function(this) + * Return type: Integer. + * Execute params: ExecuteHam(Ham_ESF_Weapon_HolsterMeleed, this); + */ + Ham_ESF_Weapon_HolsterWhenMeleed, + + + /** + * The following functions are specific to Natural Selection. + */ + + /** + * Description: - + * Forward params: function(this, controller, Float:value) + * Return type: Float. + * Execute params: ExecuteHam(Ham_SetBoneController, this, controller, Float:value) + */ + Ham_NS_SetBoneController, + + /** + * Description: - + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_NS_SaveDataForReset, this) + */ + Ham_NS_SaveDataForReset, + + /** + * Description: - + * Forward params: function(this) + * Return type: Integer. + * Execute params: ExecuteHam(Ham_NS_GetHull, this) + */ + Ham_NS_GetHull, + + /** + * Description: - + * Forward params: function(this) + * Return type: Float. + * Execute params: ExecuteHam(Ham_NS_GetMaxWalkSpeed, this) + */ + Ham_NS_GetMaxWalkSpeed, + + /** + * Description: - + * Forward params: function(this, const teamID[]) + * Return type: String (string length returned and string byref'd in ExecuteHam). + * Execute params: ExecuteHam(Ham_NS_SetTeamID, this, const teamID[]) + */ + Ham_NS_SetTeamID, + + /** + * Description: - + * Forward params: function(this) + * Return type: Integer. + * Execute params: ExecuteHam(Ham_NS_GetPlayerClass, this) + */ + Ham_NS_GetEffectivePlayerClass, + + /** + * Description: - + * Forward params: function(this) + * Return type: Integer. + * Execute params: ExecuteHam(Ham_NS_GetAuthenticationMask, this) + */ + Ham_NS_GetAuthenticationMask, + + /** + * Description: - + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_NS_EffectivePlayerClassChanged, this) + */ + Ham_NS_EffectivePlayerClassChanged, + + /** + * Description: - + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_NS_NeedsTeamUpdate, this) + */ + Ham_NS_NeedsTeamUpdate, + + /** + * Description: - + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_NS_SendTeamUpdate, this) + */ + Ham_NS_SendTeamUpdate, + + /** + * Description: - + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_NS_SendWeaponUpdate, this) + */ + Ham_NS_SendWeaponUpdate, + + /** + * Description: - + * Forward params: function(this, idOther) + * Return type: None. + * Execute params: ExecuteHam(Ham_NS_InitPlayerFromSpawn, this, idOther) + */ + Ham_NS_InitPlayerFromSpawn, + + /** + * Description: - + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_NS_PackDeadPlayerItems, this) + */ + Ham_NS_PackDeadPlayerItems, + + /** + * Description: Gets sequence name based on index. + * animationName are passed by reference in ExecuteHam. outputLength is the max output length. + * Forward params: function(this, activity, const animationName[], bool:somevalue) + * Return type: None. + * Execute params: ExecuteHam(Ham_NS_GetAnimationForActivity, this, activity, output[], bool:somevalue, outputLength) + */ + Ham_NS_GetAnimationForActivity, + + /** + * Description: - + * Forward params: function(this, const Float:position[3], const Float:viewAngles[3]) + * Return type: None. + * Execute params: ExecuteHam(Ham_NS_StartObserver, this, const Float:position[3], const Float:viewAngles[3]) + */ + Ham_NS_StartObserver, + + /** + * Description: - + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_NS_StopObserver, this) + */ + Ham_NS_StopObserver, + + /** + * Description: - + * Forward params: function(this) + * Return type: Float. + * Execute params: ExecuteHam(Ham_NS_GetAdrenalineFactor, this) + */ + Ham_NS_GetAdrenalineFactor, + + /** + * Description: - + * Forward params: function(this, const name[], bool:showpickup)) + * Return type: None. + * Execute params: ExecuteHam(Ham_NS_GiveNamedItem, this, const name[], bool:showpickup) + */ + Ham_NS_GiveNamedItem, + + /** + * Description: - + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_NS_Suicide, this) + */ + Ham_NS_Suicide, + + /** + * Description: - + * Forward params: function(this) + * Return type: Integer. + * Execute params: ExecuteHam(Ham_NS_GetCanUseWeapon, this) + */ + Ham_NS_GetCanUseWeapon, + + /** + * Description: - + * Forward params: function(this) + * Return type: Float. + * Execute params: ExecuteHam(Ham_NS_Weapon_GetWeapPrimeTime, this) + */ + Ham_NS_Weapon_GetWeaponPrimeTime, + + /** + * Description: - + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_NS_Weapon_PrimeWeapon, this) + */ + Ham_NS_Weapon_PrimeWeapon, + + /** + * Description: - + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_NS_Weapon_GetIsWeaponPrimed, this) + */ + Ham_NS_Weapon_GetIsWeaponPrimed, + + /** + * Description: - + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_NS_Weapon_GetIsWeapPriming, this) + */ + Ham_NS_Weapon_GetIsWeaponPriming, + + /** + * Description: - + * Forward params: function(this, const viewModel[], const weaponModel[], anim, const animExt[], skiplocal, body) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_NS_Weapon_DefaultDeploy, this, const viewModel[], const weaponModel[], anim, const animExt[], skiplocal, body) + */ + Ham_NS_Weapon_DefaultDeploy, + + /** + * Description: - + * Forward params: function(this, clipsize, anim, Float:delay, body) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_NS_Weapon_DefaultReload, this, clipsize, anim, Float:delay, body) + */ + Ham_NS_Weapon_DefaultReload, + + /** + * Description: - + * Forward params: function(this) + * Return type: Float. + * Execute params: ExecuteHam(Ham_NS_Weapon_GetDeployTime, this) + */ + Ham_NS_Weapon_GetDeployTime, + + + /** + * The following functions are specific to Sven Co-op. + */ + + /** + * Description: Returns the type of group (i.e, "houndeye", or "human military" + * so that monsters with different classnames still realize that they are teammates. + * (overridden for monsters that form groups) + * Classes list: + * CLASS_NONE 0 + * CLASS_MACHINE 1 + * CLASS_PLAYER 2 + * CLASS_HUMAN_PASSIVE 3 + * CLASS_HUMAN_MILITARY 4 + * CLASS_ALIEN_MILITARY 5 + * CLASS_ALIEN_PASSIVE 6 + * CLASS_ALIEN_MONSTER 7 + * CLASS_ALIEN_PREY 8 + * CLASS_ALIEN_PREDATOR 9 + * CLASS_INSECT 10 + * CLASS_PLAYER_ALLY 11 + * CLASS_PLAYER_BIOWEAPON 12 + * CLASS_ALIEN_BIOWEAPON 13 + * CLASS_XRACE_PITDRONE 14 + * CLASS_XRACE_SHOCK 15 + * CLASS_BARNACLE 99 + * Forward params: function(this, class) + * Return type: Integer. + * Execute params: ExecuteHam(Ham_SC_GetClassification, this, class) + */ + Ham_SC_GetClassification, + + /** + * Description: Whether entity is a monter. + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_IsMonster, this) + */ + Ham_SC_IsMonster, + + /** + * Description: (!) This function is no more available in the mod. + * Whether entity uses PhysX feature. + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_IsPhysX, this) + */ + Ham_SC_IsPhysX, + + /** + * Description: Whether this is a point entity. + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_IsPointEntity, this) + */ + Ham_SC_IsPointEntity, + + /** + * Description: Whether entity is a machine. + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_IsMachine, this) + */ + Ham_SC_IsMachine, + + /** + * Description: Removes the entity and all its content in critical situation. + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_CriticalRemove, this) + */ + Ham_SC_CriticalRemove, + + /** + * Description: Updates global tables that need to know about entities being removed. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(UpdateOnRemove, this) + */ + Ham_SC_UpdateOnRemove, + + /** + * Description: Returns true if a line can be traced from the caller's eyes to the target vector. + * Forward params: function(this, entity, bool:ignoreGlass) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_FVisible, this, entity, bool:ignoreGlass) + */ + Ham_SC_FVisible, + + /** + * Description: Returns true if a line can be traced from the given point to the target point. + * Forward params: function(this, const Float:target[3], const Float:start[3]) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_FVisibleFromPos, this, const Float:target[3], const Float:start[3]) + */ + Ham_SC_FVisibleFromPos, + + /** + * Description: Returns true if passed in entity is facing current entity. + * Some examples of dotProduct value : + * VIEW_FIELD_FULL -1.0 + * VIEW_FIELD_WIDE -0.7 + * VIEW_FIELD_NARROW 0.7 + * VIEW_FIELD_ULTRA_NARROW 0.9 + * Forward params: function(this, entTest, Float:dotProduct) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_IsFacing, this, entTest, Float:dotProduct) + */ + Ham_SC_IsFacing, + + /** + * Description: Gets points without killing an entity. + * Forward params: function(this, Float:damage) + * Return type: Float. + * Execute params: ExecuteHam(Ham_SC_GetPointsForDamage, this, Float:damage) + */ + Ham_SC_GetPointsForDamage, + + /** + * Description: Gets points for making some damage. + * Forward params: function(this, attacker, inflictor, Float:damage) + * Return type: None. + * Execute params: ExecuteHam(Ham_SC_GetDamagePoints, this, attacker, inflictor, Float:damage) + */ + Ham_SC_GetDamagePoints, + + /** + * Description: Constructor. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_SC_OnCreate, this) + */ + Ham_SC_OnCreate, + + /** + * Description: Desctructor. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_SC_OnDestroy, this) + */ + Ham_SC_OnDestroy, + + /** + * Description: (!) This function is no more available in the mod. + * Returns false if the entity is somehow invalid. + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_IsValidEntity, this) + */ + Ham_SC_IsValidEntity, + + /** + * Description: Checks if this monster should fade out. + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_ShouldFadeOnDeath, this) + */ + Ham_SC_ShouldFadeOnDeath, + + /** + * Description: Sets up a friendly monster. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_SC_SetupFriendly, this) + */ + Ham_SC_SetupFriendly, + + /** + * Description: (!) This function is no more available in the mod. + * Tries to revive a monster. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_SC_ReviveThink, this) + */ + Ham_SC_ReviveThink, + + /** + * Description: Revives a monster. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_SC_Revive, this) + */ + Ham_SC_Revive, + + /** + * Description: Final bit of initization before a monster is turned over to the AI. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_SC_StartMonster, this) + */ + Ham_SC_StartMonster, + + /** + * Description: Surveys conditions and set appropriate conditions bits for attack types. + * Forward params: function(this, Float:dot, Float:dist) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_CheckRangeAttack1_Move, this, Float:dot, Float:dist) + */ + Ham_SC_CheckRangeAttack1_Move, + + /** + * Description: Surveys conditions and set appropriate conditions bits for attack types. + * Forward params: function(this, Float:dot, Float:dist) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_CheckRangeAttack2_Move, this, Float:dot, Float:dist) + */ + Ham_SC_CheckRangeAttack2_Move, + + /** + * Description: Surveys conditions and set appropriate conditions bits for attack types. + * Forward params: function(this, Float:dot, Float:dist) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_CheckMeleeAttack1_Move, this, Float:dot, Float:dist) + */ + Ham_SC_CheckMeleeAttack1_Move, + + /** + * Description: Surveys conditions and set appropriate conditions bits for attack types. + * Forward params: function(this, Float:dot, Float:dist) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_CheckMeleeAttack2_Move, this, Float:dot, Float:dist) + */ + Ham_SC_CheckMeleeAttack2_Move, + + /** + * Description: Checks tank usage. + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_CheckTankUsage, this) + */ + Ham_SC_CheckTankUsage, + + /** + * Description: Sets a monster's gait activity. + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_SetGaitActivity, this) + */ + Ham_SC_SetGaitActivity, + + /** + * Description: Tries to overcome local obstacles by triangulating a path around them. + * Forward params: function(this, const Float:start[3], const Float:end[3], Float:dist, targetEnt, Float:apex[3], Float:apex2[3], bool:coverPath) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_FTriangulate, this, const Float:start[3], const Float:end[3], Float:dist, targetEnt, Float:apex[3], Float:apex2[3], bool:coverPath ) + */ + Ham_SC_FTriangulate, + + /** + * Description: Tries to overcome local obstacles by triangulating a path around them. + * Forward params: function(this, const Float:start[3], const Float:end[3], Float:dist, targetEnt, Float:apex[3]) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_FTriangulateExtension, this, const Float:start[3], const Float:end[3], Float:dist, targetEnt, Float:apex[3]) + */ + Ham_SC_FTriangulateExtension, + + /** + * Description: Tries to find a nearby node that will hide the caller from its enemy. + * If supplied, search will return a node at least as far away as minDist, but no farther than maxDist. + * If maxDist isn't supplied, it defaults to a reasonable value. + * Forward params: function(this, const Float:threat[3], const Float:viewOffset[3], Float:minDist, Float:maxDist) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_FindCoverGrenade, this, const Float:threat[3], const Float:viewOffset[3], Float:minDist, Float:maxDist) + */ + Ham_SC_FindCoverGrenade, + + /** + * Description: Tries to find a nearby node that will hide the caller from its enemy. + * If supplied, search will return a node at least as far away as minDist, but no farther than maxDist. + * If maxDist isn't supplied, it defaults to a reasonable value. + * Forward params: function(this, const Float:threat[3], const Float:viewOffset[3], Float:minDist, Float:maxDist) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_FindCoverDistance, this, const Float:threat[3], const Float:viewOffset[3], Float:minDist, Float:maxDist) + */ + Ham_SC_FindCoverDistance, + + /** + * Description: Tries to find a nearby node that will hide the caller from its enemy. + * If supplied, search will return a node at least as far away as minDist, but no farther than maxDist. + * If maxDist isn't supplied, it defaults to a reasonable value. + * Forward params: function(this, const Float:threat[3], const Float:viewOffset[3], Float:minDist, Float:maxDist) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_FindAttackPoint, this, const Float:threat[3], const Float:viewOffset[3], Float:minDist, Float:maxDist) + */ + Ham_SC_FindAttackPoint, + + /** + * Description: Determines whether or not the chosen cover location is a good one to move to. + * Currently based on proximity to others in the squad. + * Forward params: function(this, const Float:coverLocation[3]) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_FValidateCover, this, const Float:coverLocation[3]) + */ + Ham_SC_FValidateCover, + + /** + * Description: Checks for possibility of friendly fire. + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_NoFriendlyFire, this) + */ + Ham_SC_NoFriendlyFire1, + + /** + * Description: Checks for possibility of friendly fire. + * Forward params: function(this, const Float:pos[3]) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_NoFriendlyFire2, this, const Float:pos[3]) + */ + Ham_SC_NoFriendlyFire2, + + /** + * Description: Checks for possibility of friendly fire. + * Forward params: function(this, const Float:pos[3], targetEnt) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_NoFriendlyFire3, this, const Float:pos[3], targetEnt) + */ + Ham_SC_NoFriendlyFire3, + + /** + * Description: Checks for possibility of friendly fire from the calling monster's origin to toPos. + * Forward params: function(this, const Float:toPos[3]) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_NoFriendlyFireToPos, this, const Float:toPos[3]) + */ + Ham_SC_NoFriendlyFireToPos, + + /** + * Description: Same as FVisible but from gun position. + * Forward params: function(this, entity, Float:pos[3]) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_FVisibleGunPos, this, entity, Float:pos[3]) + */ + Ham_SC_FVisibleGunPos, + + /** + * Description: Checks for monsters in this generic cone. + * Forward params: function(this, entity, const Float:pos[3]) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_FInBulletCone, this, entity, const Float:pos[3]) + */ + Ham_SC_FInBulletCone, + + /** + * Description: - + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_SC_CallGibMonster, this) + */ + Ham_SC_CallGibMonster, + + /** + * Description: - + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_SC_CheckTimeBasedDamage, this) + */ + Ham_SC_CheckTimeBasedDamage, + + /** + * Description: - + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_IsMoving, this) + */ + Ham_SC_IsMoving, + + /** + * Description: - + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_IsPlayerFollowing, this) + */ + Ham_SC_IsPlayerFollowing, + + /** + * Description: - + * Forward params: function(this, idleader, bool:noSound) + * Return type: None. + * Execute params: ExecuteHam(Ham_SC_StartPlayerFollowing, this, idleader, bool:noSound) + */ + Ham_SC_StartPlayerFollowing, + + /** + * Description: - + * Forward params: function(this, bool:clearSchedule, bool:noSound) + * Return type: None. + * Execute params: ExecuteHam(Ham_SC_StopPlayerFollowing, this, bool:clearSchedule, bool:noSound) + */ + Ham_SC_StopPlayerFollowing, + + /** + * Description: - + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_SC_UseSound, this) + */ + Ham_SC_UseSound, + + /** + * Description: - + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_SC_UnUseSound, this) + */ + Ham_SC_UnUseSound, + + /** + * Description: - + * Forward params: function(this, idOther) + * Return type: None. + * Execute params: ExecuteHam(Ham_SC_RideMonster, this, idOther) + */ + Ham_SC_RideMonster, + + /** + * Description: - + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_SC_CheckAndApplyGenericAttacks, this) + */ + Ham_SC_CheckAndApplyGenericAttacks, + + /** + * Description: - + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_CheckScared, this) + */ + Ham_SC_CheckScared, + + /** + * Description: - + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_SC_CheckCreatureDanger, this) + */ + Ham_SC_CheckCreatureDanger, + + /** + * Description: - + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_SC_CheckFallDamage, this) + */ + Ham_SC_CheckFallDamage, + + /** + * Description: - + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_SC_CheckRevival, this) + */ + Ham_SC_CheckRevival, + + /** + * Description: (!) This function is no more available in the mod. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_SC_MedicCallSound, this) + */ + Ham_SC_MedicCallSound, + + + /** + * Description: (!) This function is no more available in the mod. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_SC_Player_MenuInputPerformed, this) + */ + Ham_SC_Player_MenuInputPerformed, + + /** + * Description: - + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_SC_Player_IsMenuInputDone, this) + */ + Ham_SC_Player_IsMenuInputDone, + + /** + * Description: - + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_SC_Player_SpecialSpawn, this) + */ + Ham_SC_Player_SpecialSpawn, + + /** + * Description: - + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_Player_IsValidInfoEntity, this) + */ + Ham_SC_Player_IsValidInfoEntity, + + /** + * Description: - + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_SC_Player_LevelEnd, this) + */ + Ham_SC_Player_LevelEnd, + + /** + * Description: - + * Forward params: function(this, voteType) + * Return type: None. + * Execute params: ExecuteHam(Ham_SC_Player_VoteStarted, this, voteType) + */ + Ham_SC_Player_VoteStarted, + + /** + * Description: - + * Forward params: function(this, voteType) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_Player_CanStartNextVote, this, voteType) + */ + Ham_SC_Player_CanStartNextVote, + + /** + * Description: - + * Forward params: function(this, voteInput) + * Return type: None. + * Execute params: ExecuteHam(Ham_SC_Player_Vote, this, voteInput) + */ + Ham_SC_Player_Vote, + + /** + * Description: - + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_Player_HasVoted, this) + */ + Ham_SC_Player_HasVoted, + + /** + * Description: - + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_SC_Player_ResetVote, this) + */ + Ham_SC_Player_ResetVote, + + /** + * Description: - + * Forward params: function(this) + * Return type: Integer. + * Execute params: ExecuteHam(Ham_SC_Player_LastVoteInput, this) + */ + Ham_SC_Player_LastVoteInput, + + /** + * Description: - + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_SC_Player_InitVote, this) + */ + Ham_SC_Player_InitVote, + + /** + * Description: - + * Forward params: function(this) + * Return type: Float. + * Execute params: ExecuteHam(Ham_SC_Player_StartNextVote, this) + */ + Ham_SC_Player_TimeToStartNextVote, + + /** + * Description: - + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_SC_Player_ResetView, this) + */ + Ham_SC_Player_ResetView, + + /** + * Description: - + * Forward params: function(this) + * Return type: Float. + * Execute params: ExecuteHam(Ham_SC_Player_GetLogFrequency, this) + */ + Ham_SC_Player_GetLogFrequency, + + /** + * Description: - + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_Player_LogPlayerStats, this) + */ + Ham_SC_Player_LogPlayerStats, + + /** + * Description: (!) This function is no more available in the mod. + * Forward params: function(this, idPlayer, Float:time) + * Return type: None. + * Execute params: ExecuteHam(Ham_SC_Player_DisableCollision, this, idPlayer, Float:time) + */ + Ham_SC_Player_DisableCollisionWithPlayer, + + /** + * Description: (!) This function is no more available in the mod. + * Forward params: function(this, idPlayer, bool:testIntersection) + * Return type: None. + * Execute params: ExecuteHam(Ham_SC_Player_EnableCollision, this, idPlayer, bool:testIntersection) + */ + Ham_SC_Player_EnableCollisionWithPlayer, + + /** + * Description: (!) This function is no more available in the mod. + * Forward params: function(this, idPlayer) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_Player_CanTouchPlayer, this, idPlayer) + */ + Ham_SC_Player_CanTouchPlayer, + + + /** + * Description: - + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_SC_Item_Materialize, this) + */ + Ham_SC_Item_Materialize, + + + /** + * Description: - + * Forward params: function(this, const Float:moving[3], const Float:standing[3], const Float:crouched[3]) + * Return type: Vector, byreffed in execute. + * Execute params: ExecuteHam(Ham_SC_Weapon_BulletAccuracy, this, const Float:moving[3], const Float:standing[3], const Float:crouched[3], Float:output[3]) + */ + Ham_SC_Weapon_BulletAccuracy, + + /** + * Description: - + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_SC_Weapon_TertiaryAttack, this) + */ + Ham_SC_Weapon_TertiaryAttack, + + /** + * Description: - + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_SC_Weapon_BurstSupplement, this) + */ + Ham_SC_Weapon_BurstSupplement, + + /** + * Description: - + * Forward params: function(this, const alternative[] = "") + * Return type: String (string length returned and string byref'd in ExecuteHam). + * Execute params: ExecuteHam(Ham_SC_Weapon_GetP_Model, this, const alternative[] = "", buffer[], size) + */ + Ham_SC_Weapon_GetP_Model, + + /** + * Description: - + * Forward params: function(this, const alternative[] = "") + * Return type: String (string length returned and string byref'd in ExecuteHam). + * Execute params: ExecuteHam(Ham_SC_Weapon_GetW_Model, this, const alternative[] = "", buffer[], size) + */ + Ham_SC_Weapon_GetW_Model, + + /** + * Description: - + * Forward params: function(this, const alternative[] = "") + * Return type: String (string length returned and string byref'd in ExecuteHam). + * Execute params: ExecuteHam(Ham_SC_Weapon_GetV_Model, this, const alternative[] = "", buffer[], size) + */ + Ham_SC_Weapon_GetV_Model, + + /** + * Description: - + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_SC_Weapon_PrecacheCustomMdl, this) + */ + Ham_SC_Weapon_PrecacheCustomModels, + + /** + * Description: - + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_Weapon_IsMultiplayer, this) + */ + Ham_SC_Weapon_IsMultiplayer, + + /** + * Description: - + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_Weapon_FRunfuncs, this) + */ + Ham_SC_Weapon_FRunfuncs, + + /** + * Description: - + * Forward params: function(this, fov) + * Return type: None. + * Execute params: ExecuteHam(Ham_SC_Weapon_SetFOV, this, fov) + */ + Ham_SC_Weapon_SetFOV, + + /** + * Description: - + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_Weapon_FCanRun, this) + */ + Ham_SC_Weapon_FCanRun, + + /** + * Description: - + * Forward params: function(this, Float:frametime) + * Return type: None. + * Execute params: ExecuteHam(Ham_SC_Weapon_CustomDecrement, this, Float:frametime) + */ + Ham_SC_Weapon_CustomDecrement, + + /** + * Description: - + * Forward params: function(this, const model[]) + * Return type: None. + * Execute params: ExecuteHam(Ham_SC_Weapon_SetV_Model, this, const model[]) + */ + Ham_SC_Weapon_SetV_Model, + + /** + * Description: - + * Forward params: function(this, const model[]) + * Return type: None. + * Execute params: ExecuteHam(Ham_SC_Weapon_SetP_Model, this, const model[]) + */ + Ham_SC_Weapon_SetP_Model, + + /** + * Description: - + * Forward params: function(this, skin) + * Return type: None. + * Execute params: ExecuteHam(Ham_SC_Weapon_ChangeWeaponSkin, this, skin) + */ + Ham_SC_Weapon_ChangeWeaponSkin, + + + /** + * LATE ADDITIONS (2013) + */ + + /** + * Description: Normally called whenever an entity dies. + * Forward params: function(this, idinflictor, idattacker, shouldgib) + * Return type: None. + * Execute params: ExecuteHam(Ham_TFC_Killed, this, idinflictor, idattacker, shouldgib); + */ + Ham_TFC_Killed, + + /** + * Description: Returns whether an entity is activated. + * Forward params: function(this, idActivator); + * Return type: Integer. + * Execute params: ExecuteHam(Ham_IsTriggered, this, idActivator); + */ + Ham_TFC_IsTriggered, + + /** + * Description: Sends an animation event for the weapon. skiplocal is 1 if client is predicting weapon animations. + * Forward params: function(this, anim, skiplocal); + * Return type: None. + * Execute params: ExecuteHam(Ham_TFC_Weapon_SendWeaponAnim, this, anim, skiplocal); + */ + Ham_TFC_Weapon_SendWeaponAnim, + + /** + * Description: Gets next attack delay. + * Forward params: function(this, Float:delay) + * Return type: Float (byref'd in ExecuteHam). + * Execute params: ExecuteHam(Ham_TFC_Weapon_GetNextAttackDelay, this, Float:delay, Float:output); + */ + Ham_TFC_Weapon_GetNextAttackDelay, + + + /** + * Description: Usually called whenever an entity gets a form of a heal. + * Forward params: function(this, Float:health, damagebits, health_cap); + * Return type: Integer. + * Execute params: ExecuteHam(Ham_SC_TakeHealth, this, Float:health, damagebits, health_cap); + */ + Ham_SC_TakeHealth, + + /** + * Description: Usually called whenever an entity gets a form of armor. + * Forward params: function(this, Float:armor, damagebits, armor_cap); + * Return type: Integer. + * Execute params: ExecuteHam(Ham_SC_TakeArmor, this, Float:armor, damagebits, armor_cap); + */ + Ham_SC_TakeArmor, + + /** + * Description: Gives ammo to the entity. + * Forward params: function(this, amount, const name[], max, const bool:fromPlayer) + * Return type: Integer. + * Execute params: ExecuteHam(Ham_SC_GiveAmmo, this, amount, "type", max, fromPlayer); + */ + Ham_SC_GiveAmmo, + + /** + * Description: Determines if we should ignore damage. + * Forward params: function(this, idattacker); + * Return type: Integer. + * Execute params: ExecuteHam(Ham_SC_CheckAttacker, this, idattacker); + */ + Ham_SC_CheckAttacker, + + /** + * Description: Determines if a player is connected. + * Forward params: function(this); + * Return type: Integer. + * Execute params: ExecuteHam(Ham_SC_Player_IsConnected, this); + */ + Ham_SC_Player_IsConnected, + + + /** + * Description: Sends an animation event for the weapon. skiplocal is 1 if client is predicting weapon animations. + * Forward params: function(this, anim, skiplocal); + * Return type: None. + * Execute params: ExecuteHam(Ham_DOD_Weapon_SendWeaponAnim, this, anim, skiplocal); + */ + Ham_DOD_Weapon_SendWeaponAnim, + + + /** + * Description: - + * Forward params: function(this); + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_CS_Item_IsWeapon, this); + */ + Ham_CS_Item_IsWeapon, + + + /** + * Description: Returns the id of the entity if its class is derived off of CBaseSquadTalkMonster, -1 otherwise. + * Forward params: function(this) + * Return type: Entity. + * Execute params: ExecuteHam(Ham_OPF_MySquadTalkMonsterPointer, this); + */ + Ham_OPF_MySquadTalkMonsterPointer, + + /** + * Description: - + * Forward params: function(this) + * Return type: Float (byref'd in ExecuteHam). + * Execute params: ExecuteHam(Ham_OPF_WeaponTimeBase, this); + */ + Ham_OPF_WeaponTimeBase, + + + /** + * Description: Called when the alternate attack of a weapon is triggered. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_TS_Weapon_AlternateAttack, this); + */ + Ham_TS_Weapon_AlternateAttack, + + + /** + * Description: Gets item infos. + * Forward params: function(this, iteminfo_handle); + * Return type: Integer. + * Execute params: ExecuteHam(Ham_Item_GetItemInfo, this, iteminfo_handle); + * Use CreateHamItemInfo() to pass a new ItemInfo handle. + */ + Ham_Item_GetItemInfo, + + + /** + * LATE ADDITIONS (2017) + */ + + /** + * Description: Performs checks that must occur before Spawn itself is called. Always call baseclass version first. + * Forward params: function(this); + * Return type: None. + * Execute params: ExecuteHam(Ham_SC_PreSpawn, this); + */ + Ham_SC_PreSpawn, + + /** + * Description: Performs checks that must occur after Spawn itself is called. Always call baseclass version first. + * Forward params: function(this); + * Return type: None. + * Execute params: ExecuteHam(Ham_SC_PostSpawn, this); + */ + Ham_SC_PostSpawn, + + /** + * Description: - + * Forward params: function(this, key); + * Return type: None. + * Execute params: ExecuteHam(Ham_SC_PostSpawn, this, const key[]); + */ + Ham_SC_OnKeyValueUpdate, + + /** + * Description: - + * Forward params: function(this, classification); + * Return type: None. + * Execute params: ExecuteHam(Ham_SC_SetClassification, this, classification); + */ + Ham_SC_SetClassification, + + /** + * Description: Returns whether an entity is activated. + * This function is not supported by Day Of Defeat. + * This function has different version for Team Fortress Classic, see Ham_TFC_IsTriggered instead. + * Forward params: function(this, idActivator); + * Return type: Integer. + * Execute params: ExecuteHam(Ham_SC_IsTriggered, this, idActivator); + */ + Ham_SC_IsTriggered, + + /** + * Description: Returns the id of the entity if its class is derived off of ICustomEntity, -1 otherwise. + * Forward params: function(this) + * Return type: Entity. + * Execute params: ExecuteHam(Ham_SC_MyCustomPointer, this); + */ + Ham_SC_MyCustomPointer, + + /** + * Description: Returns the id of the entity if its class is derived off of CBasePlayerItem, -1 otherwise. + * Forward params: function(this) + * Return type: Entity. + * Execute params: ExecuteHam(Ham_SC_MyItemPointer, this); + */ + Ham_SC_MyItemPointer, + + /** + * Description: Typically adds points to the entity. + * Forward params: function(this, points, bool:cangonegative); + * Return type: None. + * Execute params: ExecuteHam(Ham_AddPoints, this, points, bool:cangonegative); + */ + Ham_SC_AddPoints, + + /** + * Description: Typically adds points to everybody on the entity's team. + * Forward params: function(this, points, bool:cangonegative); + * Return type: None. + * Execute params: ExecuteHam(Ham_AddPointsToTeam, this, points, bool:cangonegative); + */ + Ham_SC_AddPointsToTeam, + + /** + * Description: Removes an item to the player's inventory. + * Forward params: function(this, idother); + * Return type: Integer. + * Execute params: ExecuteHam(Ham_SC_RemovePlayerItem, this, idother); + */ + Ham_SC_RemovePlayerItem, + + /** + * Description: Not entirely sure. + * Forward params: function(this, idOn) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_OnControls, this, idOn); + */ + Ham_SC_OnControls, + + /** + * Description: Whether or not the entity is sneaking. + * Forward params: function(this); + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_IsSneaking, this); + */ + Ham_SC_IsSneaking, + + /** + * Description: Whether or not the entity is alive. + * Forward params: function(this); + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_IsAlive, this); + */ + Ham_SC_IsAlive, + + /** + * Description: Whether or not the entity uses a BSP model. + * Forward params: function(this); + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_IsBSPModel, this); + */ + Ham_SC_IsBSPModel, + + /** + * Description: Whether or not the entity can reflect gauss shots. + * Forward params: function(this); + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_ReflectGauss, this); + */ + Ham_SC_ReflectGauss, + + /** + * Description: Whether or not the target is the same as the one passed. + * Note the strindex parameter is a string passed that has been allocated by the engine. + * Use fakemeta's EngFunc_SzFromIndex to convert to a normal string, or fakemeta's + * EngFunc_AllocString to create a new string. + * Forward params: function(this, strindex). + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_HasTarget, this, strindex); + */ + Ham_SC_HasTarget, + + /** + * Description: Whether or not the entity is in the world. + * Forward params: function(this); + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_IsInWorld, this); + */ + Ham_SC_IsInWorld, + + /** + * Description: Whether or not the entity is a player. + * Forward params: function(this); + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_Sc_IsPlayer, this); + */ + Ham_Sc_IsPlayer, + + /** + * Description: Whether or not the entity is a net client. + * Forward params: function(this); + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_IsNetClient, this); + */ + Ham_SC_IsNetClient, + + /** + * Description: Whether or not the entity is a brush entity breakable. + * Forward params: function(this); + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_IsBreakable, this); + */ + Ham_SC_IsBreakable, + + /** + * Description: - + * Forward params: function(this, idActivator, useType, value); + * Return type: None. + * Execute params: ExecuteHam(Ham_SC_SUB_UseTargets, this, idActivator, useType, value); + */ + Ham_SC_SUB_UseTargets, + + /** + * Description: - + * Forward params: function(this); + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_IsLockedByMaster, this); + */ + Ham_SC_IsLockedByMaster, + + /** + * Description: Normally called whenever a barnacle grabs the entity. + * Forward params: function(this, idOther); + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_FBecomeProne, this, idOther); + */ + Ham_SC_FBecomeProne, + + /** + * Description: Returns true if a line can be traced from the caller's eyes to given vector. + * Forward params: function(this, const Float:origin[3]); + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_FVecVisible, this, const Float:origin[3]); + */ + Ham_SC_FVecVisible, + + /** + * Description: Sets the player ally state + * Forward params: function(this, bool:state); + * Return type: None. + * Execute params: ExecuteHam(Ham_SC_SetPlayerAlly, this, bool:state); + */ + Ham_SC_SetPlayerAlly, + + /** + * Description: Callback after trigger_setorigin has moved the entity. + * Forward params: function(this); + * Return type: None. + * Execute params: ExecuteHam(Ham_SC_OnSetOriginByMap, this); + */ + Ham_SC_OnSetOriginByMap, + + /** + * Description: Return true if you want to be revivable. + * Forward params: function(this); + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_IsRevivable, this); + */ + Ham_SC_IsRevivable, + + /** + * Description: - + * timeUntilRevive is the time until the actual revive event occurs. + * Forward params: function(this, Float:timeUntilRevive); + * Return type: None. + * Execute params: ExecuteHam(Ham_SC_BeginRevive, Float:timeUntilRevive); + */ + Ham_SC_BeginRevive, + + /** + * Description: - + * timeUntilRevive is the time before the monster is supposed to be revived + * Forward params: function(this, Float:timeUntilRevive); + * Return type: None. + * Execute params: ExecuteHam(Ham_SC_EndRevive, Float:timeUntilRevive); + */ + Ham_SC_EndRevive, + + /** + * Description: Determines whether or not the monster can play the scripted sequence or AI sequence that is + * trying to possess it. If DisregardState is set, the monster will be sucked into the script + * no matter what state it is in. ONLY Scripted AI ents should allow this. + * Forward params: function(this, bool:disregardState, interruptLevel); + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_CanPlaySequence, this, bool:disregardState, interruptLevel); + */ + Ham_SC_CanPlaySequence, + + /** + * Description: - + * Forward params: function(this, bool:disregardState); + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_CanPlaySentence2, this, bool:disregardState); + */ + Ham_SC_CanPlaySentence2, + + /** + * Description: - + * Forward params: function(this, const sentence[], Float:duration, Float:volume, Float:attenuation, bool:concurrent, idListener); + * Return type: None. + * Execute params: ExecuteHam(Ham_PlayScriptedSentence, this, const sentence[], Float:duration, Float:volume, Float:attenuation, bool:concurrent, idListener); + */ + Ham_SC_PlayScriptedSentence, + + + /** + * Items have all the attributes of normal entities in addition to these. + */ + + /** + * Description: Adds the item to the player. + * Forward params: function(this, idPlayer); + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_Item_AddToPlayer, this, idPlayer); + */ + Ham_SC_Item_AddToPlayer, + + /** + * Description: Returns true if you want your duplicate removed from world. + * Forward params: function(this, idOriginal); + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_Item_AddDuplicate, this, idOriginal); + */ + Ham_SC_Item_AddDuplicate, + + /** + * Description: - + * Forward params: function(this, idOther); + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_Item_AddAmmoFromItem, this, idOther); + */ + Ham_SC_Item_AddAmmoFromItem, + + /** + * Description: - + * Forward params: function(this) + * Return type: String (string length returned and string byref'd in ExecuteHam). + * Execute params: ExecuteHam(Ham_SC_Item_GetPickupSound, this) + */ + Ham_SC_Item_GetPickupSound, + + /** + * Description: - + * Collect Types: + * COLLECT_TOUCH 0 + * COLLECT_USE_DIRECT 1 + * COLLECT_USE_INDIRECT 2 + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_Item_CanCollect, this, idOther, collectType); + */ + Ham_SC_Item_CanCollect, + + /** + * Description: - + * Forward params: function(this, idOther, collectType); + * Collect Types: + * COLLECT_TOUCH 0 + * COLLECT_USE_DIRECT 1 + * COLLECT_USE_INDIRECT 2 + * Return type: None. + * Execute params: ExecuteHam(Ham_SC_Item_Collect, this, idOther, collectType); + */ + Ham_SC_Item_Collect, + + /** + * Description: Gets item infos. + * Forward params: function(this, iteminfo_handle); + * Return type: Integer. + * Execute params: ExecuteHam(Ham_SC_Item_GetItemInfo, this, iteminfo_handle); + * Use CreateHamItemInfo() to pass a new ItemInfo handle. + */ + Ham_SC_Item_GetItemInfo, + + /** + * Description: Whether or not this entity can be deployed. + * Forward params: function(this); + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_Item_CanDeploy, this); + */ + Ham_SC_Item_CanDeploy, + + /** + * Description: Deploys the entity (usually a weapon). + * Forward params: function(this); + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_Item_Deploy, this); + */ + Ham_SC_Item_Deploy, + + /** + * Description: Whether or not the entity can be holstered. + * Forward params: function(this); + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_Item_CanHolster, this); + */ + Ham_SC_Item_CanHolster, + + /** + * Description: Called each frame by the player PreThink if inactive. + * Forward params: function(this); + * Return type: None. + * Execute params: ExecuteHam(Ham_SC_Item_InactiveItemPreFrame, this); + */ + Ham_SC_Item_InactiveItemPreFrame, + + /** + * Description: Called each frame by the player PostThink if inactive. + * Forward params: function(this); + * Return type: None. + * Execute params: ExecuteHam(Ham_SC_Item_InactiveItemPostFrame, this); + */ + Ham_SC_Item_InactiveItemPostFrame, + + /** + * Description: - + * Forward params: function(this); + * Return type: None. + * Execute params: ExecuteHam(Ham_SC_Item_DetachFromPlayer, this); + */ + Ham_SC_Item_DetachFromPlayer, + + /** + * Description: Updates item data for the client. + * Forward params: function(this, idPlayer) + * Return type: Integer. + * Execute params: ExecuteHam(Ham_SC_Item_UpdateClientData, this, idPlayer); + */ + Ham_SC_Item_UpdateClientData, + + /** + * Description: - + * Forward params: function(this) + * Return type: Float. + * Execute params: ExecuteHam(Ham_SC_Item_GetRespawnTime, this); + */ + Ham_SC_Item_GetRespawnTime, + + /** + * Description: - + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_Item_CanHaveDuplicates, this); + */ + Ham_SC_Item_CanHaveDuplicates, + + + /** + * Weapons have all the attributes to Ham_Item_*, in addition to these. + */ + + /** + * Description: - + * Forward params: function(this, idOriginal) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_Weapon_ExtractAmmoFromItem, idOriginal); + */ + Ham_SC_Weapon_ExtractAmmoFromItem, + + /** + * Description: Unsure. + * This function is not supported in Earth's Special Forces mod. + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_Weapon_AddWeapon, this); + */ + Ham_SC_Weapon_AddWeapon, + + /** + * Description: - + * Forward params: function(this) + * Return type: Integer. + * Execute params: ExecuteHam(Ham_SC_Weapon_GetAmmo1Drop); + */ + Ham_SC_Weapon_GetAmmo1Drop, + + /** + * Description: - + * Forward params: function(this) + * Return type: Integer. + * Execute params: ExecuteHam(Ham_SC_Weapon_GetAmmo2Drop, idOriginal); + */ + Ham_SC_Weapon_GetAmmo2Drop, + + /** + * Description: Plays the weapon's empty sound. + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_Weapon_PlayEmptySound, this); + */ + Ham_SC_Weapon_PlayEmptySound, + + /** + * Description: Whether or not the weapon is usable (has ammo, etc.) + * This function is not supported in Earth's Special Forces mod. + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_Weapon_IsUsable, this) + */ + Ham_SC_Weapon_IsUsable, + + /** + * Description: - + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_SC_Weapon_FinishReload, idOriginal); + */ + Ham_SC_Weapon_FinishReload, + + /** + * Description: - + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_Weapon_ShouldReload, idOriginal); + */ + Ham_SC_Weapon_ShouldReload, + + /** + * Description: Whether or not the weapon should idle. + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute Params: ExecuteHam(Ham_SC_Weapon_ShouldWeaponIdle, this) + */ + Ham_SC_Weapon_ShouldWeaponIdle, + + /** + * Description: Unsure. + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_Weapon_UseDecrement, this); + */ + Ham_SC_Weapon_UseDecrement, + + + /** + * Players have all the attributes of normal entities, in addition to these. + */ + + /** + * Description: - + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_SC_Player_EnteredObserver, this); + */ + Ham_SC_Player_EnteredObserver, + + /** + * Description: - + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_SC_Player_LeftObserver, this); + */ + Ham_SC_Player_LeftObserver, + + /** + * Description: - + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_Player_IsObserver, this); + */ + Ham_SC_Player_IsObserver, + + + /** + * DONT USE ME LOL + */ + HAM_LAST_ENTRY_DONT_USE_ME_LOL +}; + +/** + * Ham error types. + */ +enum HamError +{ + HAM_OK = 0, + + HAM_INVALID_FUNC, // The function is not valid + HAM_FUNC_NOT_CONFIGURED, // This function is not configured in hamdata.ini + HAM_FUNC_NOT_AVAILABLE, // This function is not more available in the mod + + HAM_ERR_END +}; + +/** + * Constants for usage with [Get|Set]HamItemInfo + */ +enum HamItemInfo +{ + Ham_ItemInfo_iSlot, + Ham_ItemInfo_iPosition, + Ham_ItemInfo_pszAmmo1, + Ham_ItemInfo_iMaxAmmo1, + Ham_ItemInfo_pszAmmo2, + Ham_ItemInfo_iMaxAmmo2, + Ham_ItemInfo_pszName, + Ham_ItemInfo_iMaxClip, + Ham_ItemInfo_iId, + Ham_ItemInfo_iFlags, + Ham_ItemInfo_iWeight +}; + diff --git a/bin/amxxdump/includes/amxmodx/hamsandwich.inc b/bin/amxxdump/includes/amxmodx/hamsandwich.inc new file mode 100644 index 0000000..162475d --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/hamsandwich.inc @@ -0,0 +1,439 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Ham Sandwich Functions +// + +/** + * Ham Sandwich is a module that is used to hook and call virtual functions of + * entities. + * Virtual functions are mod-specific functions. This means that in order + * for this to work on a mod, it needs to be configured with the hamdata.ini + * file. + * Be very careful with parameter passing to these functions. + */ + +#if defined _hamsandwich_included + #endinput +#endif +#define _hamsandwich_included + +#include + +#pragma reqlib hamsandwich +#if !defined AMXMODX_NOAUTOLOAD + #pragma loadlib hamsandwich +#endif + +/** + * Hooks the virtual table for the specified entity class. + * An example would be: RegisterHam(Ham_TakeDamage, "player", "player_hurt"); + * Look at the Ham enum for parameter lists. + * + * @param function The function to hook. + * @param EntityClass The entity classname to hook. + * @param callback The forward to call. + * @param post Whether or not to forward this in post. + * @param specialbot Whether or not to enable support for bot without "player" classname. + * @return Returns a handle to the forward. Use EnableHamForward/DisableHamForward to toggle the forward on or off. + */ +native HamHook:RegisterHam(Ham:function, const EntityClass[], const Callback[], Post=0, bool:specialbot = false); + +/** + * Hooks the virtual table for the player class. + * An example would be: RegisterHam(Ham_TakeDamage, "player_hurt"); + * Look at the Ham enum for parameter lists. + * + * @param function The function to hook. + * @param callback The forward to call. + * @param post Whether or not to forward this in post. + * @return Returns a handle to the forward. Use EnableHamForward/DisableHamForward to toggle the forward on or off. + */ +stock HamHook:RegisterHamPlayer(Ham:function, const Callback[], Post=0) +{ + return RegisterHam(function, "player", Callback, Post, true); +} + +/** + * Hooks the virtual table for the specified entity's class. + * An example would be: RegisterHam(Ham_TakeDamage, id, "player_hurt"); + * Look at the Ham enum for parameter lists. + * Note: This will cause hooks for the entire internal class that the entity is + * not exclusively for the provided entity. + * + * @param function The function to hook. + * @param EntityId The entity classname to hook. + * @param callback The forward to call. + * @param post Whether or not to forward this in post. + * @return Returns a handle to the forward. Use EnableHamForward/DisableHamForward to toggle the forward on or off. + */ +native HamHook:RegisterHamFromEntity(Ham:function, EntityId, const Callback[], Post=0); + + +/** + * Stops a ham forward from triggering. + * Use the return value from RegisterHam as the parameter here! + * + * @param fwd The forward to stop. + */ +native DisableHamForward(HamHook:fwd); + +/** + * Starts a ham forward back up. + * Use the return value from RegisterHam as the parameter here! + * + * @param fwd The forward to re-enable. + */ +native EnableHamForward(HamHook:fwd); + +/** + * Executes the virtual function on the entity. + * Look at the Ham enum for parameter lists. + * + * @param function The function to call. + * @param id The id of the entity to execute it on. + */ +native ExecuteHam(Ham:function, this, any:...); + +/** + * Executes the virtual function on the entity, this will trigger all hooks on that function. + * Be very careful about recursion! + * Look at the Ham enum for parameter lists. + * + * @param function The function to call. + * @param id The id of the entity to execute it on. + */ +native ExecuteHamB(Ham:function, this, any:...); + +/** + * Gets the return status of the current hook. + * This is useful to determine what return natives to use. + * + * @return The current status of the hook (such as HAM_SUPERCEDE). + */ +native GetHamReturnStatus(); + +/** + * Gets the return value of a hook for hooks that return integers or booleans. + * + * @param output The variable to store the value in. + */ +native GetHamReturnInteger(&output); + +/** + * Gets the return value of a hook for hooks that return float. + * + * @param output The variable to store the value in. + */ +native GetHamReturnFloat(&Float:output); + +/** + * Gets the return value of a hook for hooks that return Vectors. + * + * @param output The variable to store the value in. + */ +native GetHamReturnVector(Float:output[3]); + +/** + * Gets the return value of a hook for hooks that return entities. + * + * @param output The variable to store the value in. Will be -1 on null. + */ +native GetHamReturnEntity(&output); + +/** + * Gets the return value of a hook for hooks that return strings. + * + * @param output The buffer to store the string in. + * @param size The string size of the buffer. + */ +native GetHamReturnString(output[], size); + +/** + * Gets the original return value of a hook for hooks that return integers or booleans. + * + * @param output The variable to store the value in. + */ +native GetOrigHamReturnInteger(&output); + +/** + * Gets the original return value of a hook for hooks that return floats. + * + * @param output The variable to store the value in. + */ +native GetOrigHamReturnFloat(&Float:output); + +/** + * Gets the original return value of a hook for hooks that return Vectors. + * + * @param output The variable to store the value in. + */ +native GetOrigHamReturnVector(Float:output[3]); + +/** + * Gets the original return value of a hook for hooks that return entities. + * + * @param output The variable to store the value in. -1 on null. + */ +native GetOrigHamReturnEntity(&output); + +/** + * Gets the original return value of a hook for hooks that return strings. + * + * @param output The buffer to store the string in. + * @param size The size of the buffer. + */ +native GetOrigHamReturnString(output[], size); + + +/** + * Sets the return value of a hook that returns an integer or boolean. + * This needs to be used in conjunction with HAM_OVERRIDE or HAM_SUPERCEDE. + * + * @param value The value to set the return to. + */ +native SetHamReturnInteger(value); + +/** + * Sets the return value of a hook that returns a float. + * This needs to be used in conjunction with HAM_OVERRIDE or HAM_SUPERCEDE. + * + * @param value The value to set the return to. + */ +native SetHamReturnFloat(Float:value); + +/** + * Sets the return value of a hook that returns a Vector. + * This needs to be used in conjunction with HAM_OVERRIDE or HAM_SUPERCEDE. + * + * @param value The value to set the return to. + */ +native SetHamReturnVector(const Float:value[3]); + +/** + * Sets the return value of a hook that returns an entity. Set to -1 for null. + * This needs to be used in conjunction with HAM_OVERRIDE or HAM_SUPERCEDE. + * + * @param value The value to set the return to. + */ +native SetHamReturnEntity(value); + +/** + * Sets the return value of a hook that returns a string. + * This needs to be used in conjunction with HAM_OVERRIDE or HAM_SUPERCEDE. + * + * @param value The value to set the return to. + */ +native SetHamReturnString(const value[]); + + +/** + * Sets a parameter on the fly of the current hook. This has no effect in post hooks. + * Use this on parameters that are integers. + * + * @param which Which parameter to change. Starts at 1, and works up from the left to right. 1 is always "this". + * @param value The value to change it to. + */ +native SetHamParamInteger(which, value); + +/** + * Sets a parameter on the fly of the current hook. This has no effect in post hooks. + * Use this on parameters that are floats. + * + * @param which Which parameter to change. Starts at 1, and works up from the left to right. 1 is always "this". + * @param value The value to change it to. + */ +native SetHamParamFloat(which, Float:value); + +/** + * Sets a parameter on the fly of the current hook. This has no effect in post hooks. + * Use this on parameters that are Vectors. + * + * @param which Which parameter to change. Starts at 1, and works up from the left to right. 1 is always "this". + * @param value The value to change it to. + */ +native SetHamParamVector(which, const Float:value[3]); + +/** + * Sets a parameter on the fly of the current hook. This has no effect in post hooks. + * Use this on parameters that are entities. + * + * @note Due to a historical bug, the changes made by this native are not reflected in the corresponding post forward + * for backward compatibility reasons. Use SetHamParamEntity2 if this is required. + * + * @param which Which parameter to change. Starts at 1, and works up from the left to right. 1 is always "this". + * @param value The value to change it to. + */ +native SetHamParamEntity(which, value); + +/** + * Sets a parameter on the fly of the current hook. This has no effect in post hooks. + * Use this on parameters that are entities. + * + * @note Same as SetHamParamEntity except the changes made by this native are reflected in the corresponding post forward. + * + * @param which Which parameter to change. Starts at 1, and works up from the left to right. 1 is always "this". + * @param value The value to change it to. + */ +native SetHamParamEntity2(which, value); + +/** + * Sets a parameter on the fly of the current hook. This has no effect in post hooks. + * Use this on parameters that are strings. + * + * @param which Which parameter to change. Starts at 1, and works up from the left to right. 1 is always "this". + * @param ouput The value to change it to. + */ +native SetHamParamString(which, const output[]); + +/** + * Sets a parameter on the fly of the current hook. This has no effect in post hooks. + * Use this on parameters that are trace result handles. + * + * @param which Which parameter to change. Starts at 1, and works up from the left to right. 1 is always "this". + * @param tr_handle The value to change it to. + */ +native SetHamParamTraceResult(which, tr_handle); + +/** + * Sets a parameter on the fly of the current hook. This has no effect in post hooks. + * Use this on parameters that are trace result handles. + * + * @param which Which parameter to change. Starts at 1, and works up from the left to right. 1 is always "this". + * @param iteminfo_handle The value to change it to. + */ +native SetHamParamItemInfo(which, iteminfo_handle); + + +/** + * Gets a parameter on the fly of the current hook. + * Use this on parameters that are iteminfo result handles. + * + * @param iteminfo_handle Item info handle. + * @param type Item info type. See HamItemInfo constants. + */ +native GetHamItemInfo(iteminfo_handle, HamItemInfo:type, any:...); + +/** + * Sets a parameter on the fly of the current hook. + * Use this on parameters that are iteminfo result handles. + * + * @param iteminfo_handle Item info handle. + * @param type Item info type. See HamItemInfo_ constants. + */ +native SetHamItemInfo(iteminfo_handle, HamItemInfo:type, any:...); + +/** + * Creates an ItemInfo handle. This value should never be altered. + * The handle can be used in Get/SetHamItemInfo. + * + * NOTE: You must call FreeHamItemInfo() on every handle made with CreateHamItemInfo(). + * + * @return A new ItemInfo handle. + */ +native CreateHamItemInfo(); + +/** + * Frees an ItemIndo handle created with CreateHamItemInfo(). Do not call + * this more than once per handle, or on handles not created through + * CreateHamItemInfo(). + * + * @param itemInfo_handle ItemInfo handle created via CreateHamItemInfo(). + * @noreturn + */ +native FreeHamItemInfo(itemInfo_handle); + + +/** + * Returns whether or not the function for the specified Ham is valid. + * Things that would make it invalid would be bounds (an older module version + * may not have all of the functions), and the function not being found in + * the mod's hamdata.ini file. + * + * @param function The function to look up. + * @return true if the function is valid, false otherwise. + */ +native bool:IsHamValid(Ham:function); + +/** + * This is used to compliment fakemeta's {get,set}_pdata_{int,float,string}. + * This requires the mod to have the pev and base fields set in hamdata.ini. + * Note this dereferences memory! Improper use of this will crash the server. + * This will return an index of the corresponding cbase field in private data. + * Returns -1 on a null entry. + * + * @param id The entity to examine the private data. + * @param offset The windows offset of the data. + * @param linuxdiff The linux difference of the data. + * @param macdiff The mac os x difference of the data. + * @return The index of the corresponding pdata field. -1 for none set. + */ +native get_pdata_cbase(id, offset, linuxdiff=5, macdiff=5); + +/** + * This is used to compliment fakemeta's {get,set}_pdata_{int,float,string}. + * This requires the mod to have the pev and base fields set in hamdata.ini. + * This will set the corresponding cbase field in private data with the index. + * Pass -1 to null the entry. + * + * @param id The entity to examine the private data. + * @param offset The windows offset of the data. + * @param value The index to store, -1 for invalid + * @param linuxdiff The linux difference of the data. + * @param macdiff The mac os x difference of the data. + */ +native set_pdata_cbase(id, offset, value, linuxdiff=5, macdiff=5); + +/** + * This is similar to the get_pdata_cbase, however it does not dereference memory. + * This is many times slower than get_pdata_cbase, and this should only be used + * for testing and finding of offsets, not actual release quality plugins. + * This will return an index of the corresponding cbase field in private data. + * Returns -1 on a null entry. -2 on an invalid entry. + * + * @param id Entry to examine the private data. + * @param offset The windows offset of the data. + * @param linuxdiff The linux difference of the data. + * @param macdiff The mac os x difference of the data. + * @return The index of the corresponding pdata field, -1 for null, -2 for invalid. + */ +native get_pdata_cbase_safe(id, offset, linuxdiff=5, macdiff=5); + + + + +// This is the callback from the module, this handles any fatal errors. +// This will in turn call the "HamFilter(Ham:id, HamError:err, const reason[])" public, if it exists. +// Return PLUGIN_HANDLED from within the HamFilter to stop the plugin from failing. +// Any other return value will fail the plugin. +// You do not need to have a HamFilter, if there is none, all fatal errors will fail the plugin. +// Do not modify this! +public __fatal_ham_error(Ham:id, HamError:err, const reason[]) +{ + + new func=get_func_id("HamFilter", -1); + new bool:fail=true; + + if (func != -1 && callfunc_begin_i(func, -1)==1) + { + callfunc_push_int(_:id); + callfunc_push_int(_:err); + callfunc_push_str(reason, false); + if (callfunc_end()==PLUGIN_HANDLED) + { + fail=false; + } + } + if (fail) + { + set_fail_state(reason); + } + +} diff --git a/bin/amxxdump/includes/amxmodx/hlsdk_const.inc b/bin/amxxdump/includes/amxmodx/hlsdk_const.inc new file mode 100644 index 0000000..f9b8cfa --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/hlsdk_const.inc @@ -0,0 +1,808 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Half-Life SDK Constants +// + +#if defined _hlsdk_const_included + #endinput +#endif +#define _hlsdk_const_included + +/** + * pev(entity, pev_button) or pev(entity, pev_oldbuttons) values + */ +#define IN_ATTACK (1<<0) +#define IN_JUMP (1<<1) +#define IN_DUCK (1<<2) +#define IN_FORWARD (1<<3) +#define IN_BACK (1<<4) +#define IN_USE (1<<5) +#define IN_CANCEL (1<<6) +#define IN_LEFT (1<<7) +#define IN_RIGHT (1<<8) +#define IN_MOVELEFT (1<<9) +#define IN_MOVERIGHT (1<<10) +#define IN_ATTACK2 (1<<11) +#define IN_RUN (1<<12) +#define IN_RELOAD (1<<13) +#define IN_ALT1 (1<<14) +#define IN_SCORE (1<<15) // Used by client.dll for when scoreboard is held down + +/** + * pev(entity, pev_flags) values + */ +#define FL_FLY (1<<0) // Changes the SV_Movestep() behavior to not need to be on ground +#define FL_SWIM (1<<1) // Changes the SV_Movestep() behavior to not need to be on ground (but stay in water) +#define FL_CONVEYOR (1<<2) +#define FL_CLIENT (1<<3) +#define FL_INWATER (1<<4) +#define FL_MONSTER (1<<5) +#define FL_GODMODE (1<<6) +#define FL_NOTARGET (1<<7) +#define FL_SKIPLOCALHOST (1<<8) // Don't send entity to local host, it's predicting this entity itself +#define FL_ONGROUND (1<<9) // At rest / on the ground +#define FL_PARTIALGROUND (1<<10) // Not all corners are valid +#define FL_WATERJUMP (1<<11) // Player jumping out of water +#define FL_FROZEN (1<<12) // Player is frozen for 3rd person camera +#define FL_FAKECLIENT (1<<13) // JAC: fake client, simulated server side; don't send network messages to them +#define FL_DUCKING (1<<14) // Player flag -- Player is fully crouched +#define FL_FLOAT (1<<15) // Apply floating force to this entity when in water +#define FL_GRAPHED (1<<16) // Worldgraph has this ent listed as something that blocks a connection +#define FL_IMMUNE_WATER (1<<17) +#define FL_IMMUNE_SLIME (1<<18) +#define FL_IMMUNE_LAVA (1<<19) +#define FL_PROXY (1<<20) // This is a spectator proxy +#define FL_ALWAYSTHINK (1<<21) // Brush model flag -- call think every frame regardless of nextthink - ltime (for constantly changing velocity/path) +#define FL_BASEVELOCITY (1<<22) // Base velocity has been applied this frame (used to convert base velocity into momentum) +#define FL_MONSTERCLIP (1<<23) // Only collide in with monsters who have FL_MONSTERCLIP set +#define FL_ONTRAIN (1<<24) // Player is _controlling_ a train, so movement commands should be ignored on client during prediction. +#define FL_WORLDBRUSH (1<<25) // Not moveable/removeable brush entity (really part of the world, but represented as an entity for transparency or something) +#define FL_SPECTATOR (1<<26) // This client is a spectator, don't run touch functions, etc. +#define FL_CUSTOMENTITY (1<<29) // This is a custom entity +#define FL_KILLME (1<<30) // This entity is marked for death -- This allows the engine to kill ents at the appropriate time +#define FL_DORMANT (1<<31) // Entity is dormant, no updates to client + +/** + * engfunc(EngFunc_WalkMove, entity, Float:yaw, Float:dist, iMode) iMode values + */ +#define WALKMOVE_NORMAL 0 // Normal walkmove +#define WALKMOVE_WORLDONLY 1 // Doesn't hit ANY entities, no matter what the solid type +#define WALKMOVE_CHECKONLY 2 // Move, but don't touch triggers + +/** + * engfunc(EngFunc_MoveToOrigin, entity, Float:goal[3], Float:distance, moveType) moveType values + */ +#define MOVE_NORMAL 0 // normal move in the direction monster is facing +#define MOVE_STRAFE 1 // moves in direction specified, no matter which way monster is facing + +/** + * pev(entity, pev_movetype) values + */ +#define MOVETYPE_NONE 0 // Never moves +#define MOVETYPE_WALK 3 // Player only - moving on the ground +#define MOVETYPE_STEP 4 // Gravity, special edge handling -- monsters use this +#define MOVETYPE_FLY 5 // No gravity, but still collides with stuff +#define MOVETYPE_TOSS 6 // Gravity/Collisions +#define MOVETYPE_PUSH 7 // No clip to world, push and crush +#define MOVETYPE_NOCLIP 8 // No gravity, no collisions, still do velocity/avelocity +#define MOVETYPE_FLYMISSILE 9 // Extra size to monsters +#define MOVETYPE_BOUNCE 10 // Just like Toss, but reflect velocity when contacting surfaces +#define MOVETYPE_BOUNCEMISSILE 11 // Bounce w/o gravity +#define MOVETYPE_FOLLOW 12 // Track movement of aiment +#define MOVETYPE_PUSHSTEP 13 // BSP model that needs physics/world collisions (uses nearest hull for world collision) + +/** + * pev(entity, pev_solid) values + * + * @note Some movetypes will cause collisions independent of SOLID_NOT and + * SOLID_TRIGGER when the entity moves. SOLID only effects OTHER entities + * colliding with this one when they move - UGH! + */ +#define SOLID_NOT 0 // No interaction with other objects +#define SOLID_TRIGGER 1 // Touch on edge, but not blocking +#define SOLID_BBOX 2 // Touch on edge, block +#define SOLID_SLIDEBOX 3 // Touch on edge, but not an onground +#define SOLID_BSP 4 // BSP clip, touch on edge, block + +/** + * pev(entity, pev_deadflag) values + */ +#define DEAD_NO 0 // Alive +#define DEAD_DYING 1 // Playing death animation or still falling off of a ledge waiting to hit ground +#define DEAD_DEAD 2 // Dead, lying still +#define DEAD_RESPAWNABLE 3 +#define DEAD_DISCARDBODY 4 + +/** + * new Float:takedamage, pev(entity, pev_takedamage, takedamage) values + */ +#define DAMAGE_NO 0.0 +#define DAMAGE_YES 1.0 +#define DAMAGE_AIM 2.0 + +/** + * pev(entity, pev_effects) values + */ +#define EF_BRIGHTFIELD 1 // Swirling cloud of particles +#define EF_MUZZLEFLASH 2 // Single frame ELIGHT on entity attachment 0 +#define EF_BRIGHTLIGHT 4 // DLIGHT centered at entity origin +#define EF_DIMLIGHT 8 // Player flashlight +#define EF_INVLIGHT 16 // Get lighting from ceiling +#define EF_NOINTERP 32 // Don't interpolate the next frame +#define EF_LIGHT 64 // Rocket flare glow sprite +#define EF_NODRAW 128 // Don't draw entity + +/** + * Spectating camera mode constants + * + * @note These constants are linked to different camera modes available when you + * are spectating (either dead or when in spectator team). Usually this is + * stored in the pev_iuser1 field in Counter-Strike and Half-Life games. + */ +#define OBS_NONE 0 +#define OBS_CHASE_LOCKED 1 // Locked Chase Cam +#define OBS_CHASE_FREE 2 // Free Chase Cam +#define OBS_ROAMING 3 // Free Look +#define OBS_IN_EYE 4 // First Person +#define OBS_MAP_FREE 5 // Free Overview +#define OBS_MAP_CHASE 6 // Chase Overview + +/** + * engfunc(EngFunc_PointContents, Float:origin) return values + */ +#define CONTENTS_EMPTY -1 +#define CONTENTS_SOLID -2 +#define CONTENTS_WATER -3 +#define CONTENTS_SLIME -4 +#define CONTENTS_LAVA -5 +#define CONTENTS_SKY -6 +#define CONTENTS_ORIGIN -7 // Removed at csg time +#define CONTENTS_CLIP -8 // Changed to contents_solid +#define CONTENTS_CURRENT_0 -9 +#define CONTENTS_CURRENT_90 -10 +#define CONTENTS_CURRENT_180 -11 +#define CONTENTS_CURRENT_270 -12 +#define CONTENTS_CURRENT_UP -13 +#define CONTENTS_CURRENT_DOWN -14 +#define CONTENTS_TRANSLUCENT -15 +#define CONTENTS_LADDER -16 +#define CONTENT_FLYFIELD -17 +#define CONTENT_GRAVITY_FLYFIELD -18 +#define CONTENT_FOG -19 + +/** + * Instant damage values for use with the 3rd parameter of the "Damage" client + * message. + */ +#define DMG_GENERIC 0 // Generic damage was done +#define DMG_CRUSH (1<<0) // Crushed by falling or moving object +#define DMG_BULLET (1<<1) // Shot +#define DMG_SLASH (1<<2) // Cut, clawed, stabbed +#define DMG_BURN (1<<3) // Heat burned +#define DMG_FREEZE (1<<4) // Frozen +#define DMG_FALL (1<<5) // Fell too far +#define DMG_BLAST (1<<6) // Explosive blast damage +#define DMG_CLUB (1<<7) // Crowbar, punch, headbutt +#define DMG_SHOCK (1<<8) // Electric shock +#define DMG_SONIC (1<<9) // Sound pulse shockwave +#define DMG_ENERGYBEAM (1<<10) // Laser or other high energy beam +#define DMG_NEVERGIB (1<<12) // With this bit OR'd in, no damage type will be able to gib victims upon death +#define DMG_ALWAYSGIB (1<<13) // With this bit OR'd in, any damage type can be made to gib victims upon death. +#define DMG_DROWN (1<<14) // Drowning +#define DMG_PARALYZE (1<<15) // Slows affected creature down +#define DMG_NERVEGAS (1<<16) // Nerve toxins, very bad +#define DMG_POISON (1<<17) // Blood poisioning +#define DMG_RADIATION (1<<18) // Radiation exposure +#define DMG_DROWNRECOVER (1<<19) // Drowning recovery +#define DMG_ACID (1<<20) // Toxic chemicals or acid burns +#define DMG_SLOWBURN (1<<21) // In an oven +#define DMG_SLOWFREEZE (1<<22) // In a subzero freezer +#define DMG_MORTAR (1<<23) // Hit by air raid (done to distinguish grenade from mortar) +#define DMG_GRENADE (1<<24) // Counter-Strike only - Hit by HE grenade +#define DMG_TIMEBASED (~(0x3fff)) // Mask for time-based damage + +/** +* Gib values used on client kill based on instant damage values +*/ +#define GIB_NORMAL 0 // Gib if entity was overkilled +#define GIB_NEVER 1 // Never gib, no matter how much death damage is done ( freezing, etc ) +#define GIB_ALWAYS 2 // Always gib ( Houndeye Shock, Barnacle Bite ) +#define GIB_TRY_HEALTH -9000 // Gib players if their health is under this value. (GIB_NEVER overrides this value) + +/** + * Valid constants for fNoMonsters parameter of EngFunc_TraceLine, + * EngFunc_TraceMonsterHull, EngFunc_TraceHull and EngFunc_TraceSphere. + */ +#define DONT_IGNORE_MONSTERS 0 +#define IGNORE_MONSTERS 1 +#define IGNORE_MISSILE 2 +#define IGNORE_GLASS 0x100 + +/** + * The hullnumber paramater of EngFunc_TraceHull, EngFunc_TraceModel and + * DLLFunc_GetHullBounds + */ +#define HULL_POINT 0 +#define HULL_HUMAN 1 +#define HULL_LARGE 2 +#define HULL_HEAD 3 + +/** + * global_get(glb_trace_flags) + */ +#define FTRACE_SIMPLEBOX (1<<0) // Traceline with a simple box + +/** + * Used with get/set_es(es_handle, ES_eFlags, ...) (entity_state data structure) + */ +#define EFLAG_SLERP 1 // Do studio interpolation of this entity + +/** + * @section pev(entity, pev_spawnflags) values + */ + +/** + * func_train + */ +#define SF_TRAIN_WAIT_RETRIGGER 1 +#define SF_TRAIN_START_ON 4 // Train is initially moving +#define SF_TRAIN_PASSABLE 8 // Train is not solid -- used to make water trains + +/** + * func_wall_toggle + */ +#define SF_WALL_START_OFF 0x0001 +#define SF_WALL_NOTSOLID 0x0008 + +/** + * func_converyor + */ +#define SF_CONVEYOR_VISUAL 0x0001 +#define SF_CONVEYOR_NOTSOLID 0x0002 + +/** + * func_button + */ +#define SF_BUTTON_DONTMOVE 1 +#define SF_BUTTON_TOGGLE 32 // Button stays pushed until reactivated +#define SF_BUTTON_SPARK_IF_OFF 64 // Button sparks in OFF state +#define SF_BUTTON_TOUCH_ONLY 256 // Button only fires as a result of USE key. + +/** + * func_rot_button + */ +#define SF_ROTBUTTON_NOTSOLID 1 +#define SF_ROTBUTTON_BACKWARDS 2 + +/** + * env_global + */ +#define SF_GLOBAL_SET 1 // Set global state to initial state on spawn + +/** + * multisource + */ +#define SF_MULTI_INIT 1 + +/** + * momentary_rot_button + */ +#define SF_MOMENTARY_DOOR 0x0001 + +/** + * button_target + */ +#define SF_BTARGET_USE 0x0001 +#define SF_BTARGET_ON 0x0002 + +/** + * func_door, func_water, func_door_rotating, momementary_door + */ +#define SF_DOOR_ROTATE_Y 0 +#define SF_DOOR_START_OPEN 1 +#define SF_DOOR_ROTATE_BACKWARDS 2 +#define SF_DOOR_PASSABLE 8 +#define SF_DOOR_ONEWAY 16 +#define SF_DOOR_NO_AUTO_RETURN 32 +#define SF_DOOR_ROTATE_Z 64 +#define SF_DOOR_ROTATE_X 128 +#define SF_DOOR_USE_ONLY 256 // Door must be opened by player's use button +#define SF_DOOR_NOMONSTERS 512 // Monster can't open +#define SF_DOOR_TOUCH_ONLY_CLIENTS 1024 // Only clients can touch +#define SF_DOOR_SILENT 0x80000000 // This bit marks that func_door are actually func_water + +/** + * gibshooter + */ +#define SF_GIBSHOOTER_REPEATABLE 1 // Allows a gibshooter to be refired + +/** + * env_funnel + */ +#define SF_FUNNEL_REVERSE 1 // Funnel effect repels particles instead of attracting them + +/** + * env_bubbles + */ +#define SF_BUBBLES_STARTOFF 0x0001 + +/** + * env_blood + */ +#define SF_BLOOD_RANDOM 0x0001 +#define SF_BLOOD_STREAM 0x0002 +#define SF_BLOOD_PLAYER 0x0004 +#define SF_BLOOD_DECAL 0x0008 + +/** + * env_shake + */ +#define SF_SHAKE_EVERYONE 0x0001 // Don't check radius +#define SF_SHAKE_DISRUPT 0x0002 // Disrupt controls +#define SF_SHAKE_INAIR 0x0004 // Shake players in air + +/** + * env_fade + */ +#define SF_FADE_IN 0x0001 // Fade in, not out +#define SF_FADE_MODULATE 0x0002 // Modulate, don't blend +#define SF_FADE_ONLYONE 0x0004 + +/** + * env_beam, env_lightning + */ +#define SF_BEAM_STARTON 0x0001 +#define SF_BEAM_TOGGLE 0x0002 +#define SF_BEAM_RANDOM 0x0004 +#define SF_BEAM_RING 0x0008 +#define SF_BEAM_SPARKSTART 0x0010 +#define SF_BEAM_SPARKEND 0x0020 +#define SF_BEAM_DECALS 0x0040 +#define SF_BEAM_SHADEIN 0x0080 +#define SF_BEAM_SHADEOUT 0x0100 +#define SF_BEAM_TEMPORARY 0x8000 + +/** + * env_sprite + */ +#define SF_SPRITE_STARTON 0x0001 +#define SF_SPRITE_ONCE 0x0002 +#define SF_SPRITE_TEMPORARY 0x8000 + +/** + * env_message + */ +#define SF_MESSAGE_ONCE 0x0001 // Fade in, not out +#define SF_MESSAGE_ALL 0x0002 // Send to all clients + +/** + * env_explosion + */ +#define SF_ENVEXPLOSION_NODAMAGE (1<<0) // When set, ENV_EXPLOSION will not actually inflict damage +#define SF_ENVEXPLOSION_REPEATABLE (1<<1) // Can this entity be refired? +#define SF_ENVEXPLOSION_NOFIREBALL (1<<2) // Don't draw the fireball +#define SF_ENVEXPLOSION_NOSMOKE (1<<3) // Don't draw the smoke +#define SF_ENVEXPLOSION_NODECAL (1<<4) // Don't make a scorch mark +#define SF_ENVEXPLOSION_NOSPARKS (1<<5) // Don't make a scorch mark + +/** + * func_tank + */ +#define SF_TANK_ACTIVE 0x0001 +#define SF_TANK_PLAYER 0x0002 +#define SF_TANK_HUMANS 0x0004 +#define SF_TANK_ALIENS 0x0008 +#define SF_TANK_LINEOFSIGHT 0x0010 +#define SF_TANK_CANCONTROL 0x0020 +#define SF_TANK_SOUNDON 0x8000 + +/** + * grenade + */ +#define SF_DETONATE 0x0001 + +/** + * item_suit + */ +#define SF_SUIT_SHORTLOGON 0x0001 + +/** + * game_score + */ +#define SF_SCORE_NEGATIVE 0x0001 +#define SF_SCORE_TEAM 0x0002 + +/** + * game_text + */ +#define SF_ENVTEXT_ALLPLAYERS 0x0001 + +/** + * game_team_master + */ +#define SF_TEAMMASTER_FIREONCE 0x0001 +#define SF_TEAMMASTER_ANYTEAM 0x0002 + +/** + * game_team_set + */ +#define SF_TEAMSET_FIREONCE 0x0001 +#define SF_TEAMSET_CLEARTEAM 0x0002 + +/** + * game_player_hurt + */ +#define SF_PKILL_FIREONCE 0x0001 + +/** + * game_counter + */ +#define SF_GAMECOUNT_FIREONCE 0x0001 +#define SF_GAMECOUNT_RESET 0x0002 + +/** + * game_player_equip + */ +#define SF_PLAYEREQUIP_USEONLY 0x0001 + +/** + * game_player_team + */ +#define SF_PTEAM_FIREONCE 0x0001 +#define SF_PTEAM_KILL 0x0002 +#define SF_PTEAM_GIB 0x0004 + +/** + * func_trackchange + */ +#define SF_PLAT_TOGGLE 0x0001 +#define SF_TRACK_ACTIVATETRAIN 0x00000001 +#define SF_TRACK_RELINK 0x00000002 +#define SF_TRACK_ROTMOVE 0x00000004 +#define SF_TRACK_STARTBOTTOM 0x00000008 +#define SF_TRACK_DONT_MOVE 0x00000010 + +/** + * func_tracktrain + */ +#define SF_TRACKTRAIN_NOPITCH 0x0001 +#define SF_TRACKTRAIN_NOCONTROL 0x0002 +#define SF_TRACKTRAIN_FORWARDONLY 0x0004 +#define SF_TRACKTRAIN_PASSABLE 0x0008 +#define SF_PATH_DISABLED 0x00000001 +#define SF_PATH_FIREONCE 0x00000002 +#define SF_PATH_ALTREVERSE 0x00000004 +#define SF_PATH_DISABLE_TRAIN 0x00000008 +#define SF_PATH_ALTERNATE 0x00008000 +#define SF_CORNER_WAITFORTRIG 0x001 +#define SF_CORNER_TELEPORT 0x002 +#define SF_CORNER_FIREONCE 0x004 + +/** +* func_plat +*/ +#define SF_PLAT_TOGGLE 0x0001 + +/** +* path_track +*/ +#define SF_PATH_DISABLED 0x00000001 +#define SF_PATH_FIREONCE 0x00000002 +#define SF_PATH_ALTREVERSE 0x00000004 +#define SF_PATH_DISABLE_TRAIN 0x00000008 +#define SF_PATH_ALTERNATE 0x00008000 + +/** +* path_corner +*/ +#define SF_CORNER_WAITFORTRIG 0x001 +#define SF_CORNER_TELEPORT 0x002 +#define SF_CORNER_FIREONCE 0x004 + +/** + * trigger_push + */ +#define SF_TRIGGER_PUSH_START_OFF 2 // Spawnflag that makes trigger_push spawn turned OFF + +/** + * trigger_hurt + */ +#define SF_TRIGGER_HURT_TARGETONCE 1 // Only fire hurt target once +#define SF_TRIGGER_HURT_START_OFF 2 // Spawnflag that makes trigger_push spawn turned OFF +#define SF_TRIGGER_HURT_NO_CLIENTS 8 // Spawnflag that makes trigger_push spawn turned OFF +#define SF_TRIGGER_HURT_CLIENTONLYFIRE 16 // Trigger hurt will only fire its target if it is hurting a client +#define SF_TRIGGER_HURT_CLIENTONLYTOUCH 32 // Only clients may touch this trigger + +/** + * trigger_auto + */ +#define SF_AUTO_FIREONCE 0x0001 +#define SF_AUTO_NORESET 0x0002 + +/** + * trigger_relay + */ +#define SF_RELAY_FIREONCE 0x0001 + +/** + * multi_manager + */ +#define SF_MULTIMAN_CLONE 0x80000000 +#define SF_MULTIMAN_THREAD 0x00000001 + +/** + * env_render + * @note These are flags to indicate masking off various render parameters that + * are usually copied to the targets + */ +#define SF_RENDER_MASKFX (1<<0) +#define SF_RENDER_MASKAMT (1<<1) +#define SF_RENDER_MASKMODE (1<<2) +#define SF_RENDER_MASKCOLOR (1<<3) + +/** + * trigger_changelevel + */ +#define SF_CHANGELEVEL_USEONLY 0x0002 + +/** + * trigger_endsection + */ +#define SF_ENDSECTION_USEONLY 0x0001 + +/** + * trigger_camera + */ +#define SF_CAMERA_PLAYER_POSITION 1 +#define SF_CAMERA_PLAYER_TARGET 2 +#define SF_CAMERA_PLAYER_TAKECONTROL 4 + +/** + * func_rotating + */ +#define SF_BRUSH_ROTATE_Y_AXIS 0 +#define SF_BRUSH_ROTATE_INSTANT 1 +#define SF_BRUSH_ROTATE_BACKWARDS 2 +#define SF_BRUSH_ROTATE_Z_AXIS 4 +#define SF_BRUSH_ROTATE_X_AXIS 8 +#define SF_PENDULUM_AUTO_RETURN 16 +#define SF_PENDULUM_PASSABLE 32 +#define SF_BRUSH_ROTATE_SMALLRADIUS 128 +#define SF_BRUSH_ROTATE_MEDIUMRADIUS 256 +#define SF_BRUSH_ROTATE_LARGERADIUS 512 + +/** + * triggers + */ +#define SF_TRIGGER_ALLOWMONSTERS 1 // Monsters allowed to fire this trigger +#define SF_TRIGGER_NOCLIENTS 2 // Players not allowed to fire this trigger +#define SF_TRIGGER_PUSHABLES 4 // Only pushables can fire this trigger + +#define SF_TRIG_PUSH_ONCE 1 + +/** +* trigger_multiple +*/ +#define SF_TRIGGER_MULTIPLE_NOTOUCH 0x0001 + +/** +* trigger_counter +*/ +#define SF_TRIGGER_COUNTER_NOMESSAGE 0x0001 + +/** + * func_breakable + */ +#define SF_BREAK_TRIGGER_ONLY 1 // May only be broken by trigger +#define SF_BREAK_TOUCH 2 // Can be 'crashed through' by running player (plate glass) +#define SF_BREAK_PRESSURE 4 // Can be broken by a player standing on it +#define SF_BREAK_CROWBAR 256 // Instant break if hit with crowbar + +/** + * func_pushable (also func_breakable, so don't collide with those flags) + */ +#define SF_PUSH_BREAKABLE 128 + +/** + * light_spawn + */ +#define SF_LIGHT_START_OFF 1 +#define SPAWNFLAG_NOMESSAGE 1 +#define SPAWNFLAG_NOTOUCH 1 +#define SPAWNFLAG_DROIDONLY 4 +#define SPAWNFLAG_USEONLY 1 // Can't be touched, must be used (buttons) + +/** + * Monster Spawnflags + */ +#define SF_MONSTER_WAIT_TILL_SEEN 1 // Spawnflag that makes monsters wait until player can see them before attacking +#define SF_MONSTER_GAG 2 // No idle noises from this monster +#define SF_MONSTER_HITMONSTERCLIP 4 +#define SF_MONSTER_PRISONER 16 // Monster won't attack anyone, no one will attacke him +#define SF_MONSTER_WAIT_FOR_SCRIPT 128 // Spawnflag that makes monsters wait to check for attacking until the script is done or they've been attacked +#define SF_MONSTER_PREDISASTER 256 // This is a predisaster scientist or barney; influences how they speak +#define SF_MONSTER_FADECORPSE 512 // Fade out corpse after death +#define SF_MONSTER_FALL_TO_GROUND 0x80000000 +#define SF_MONSTER_TURRET_AUTOACTIVATE 32 +#define SF_MONSTER_TURRET_STARTINACTIVE 64 +#define SF_MONSTER_WAIT_UNTIL_PROVOKED 64 // Don't attack the player unless provoked + +/** + * info_decal + */ +#define SF_DECAL_NOTINDEATHMATCH 2048 + +/** + * worldspawn + */ +#define SF_WORLD_DARK 0x0001 // Fade from black at startup +#define SF_WORLD_TITLE 0x0002 // Display game title at startup +#define SF_WORLD_FORCETEAM 0x0004 // Force teams + +/** + * Set this bit on guns and stuff that should never respawn + */ +#define SF_NORESPAWN (1<<30) + +/** + * @endsection + */ + +/** + * Train status values + */ +#define TRAIN_ACTIVE 0x80 +#define TRAIN_NEW 0xc0 + +#define TRAIN_OFF 0x00 +#define TRAIN_NEUTRAL 0x01 +#define TRAIN_SLOW 0x02 +#define TRAIN_MEDIUM 0x03 +#define TRAIN_FAST 0x04 +#define TRAIN_BACK 0x05 + +/** + * Valve Mod Weapon Constants + */ +#define HLI_HEALTHKIT 1 +#define HLI_ANTIDOTE 2 +#define HLI_SECURITY 3 +#define HLI_BATTERY 4 + +#define HLW_NONE 0 +#define HLW_CROWBAR 1 +#define HLW_GLOCK 2 +#define HLW_PYTHON 3 +#define HLW_MP5 4 +#define HLW_CHAINGUN 5 +#define HLW_CROSSBOW 6 +#define HLW_SHOTGUN 7 +#define HLW_RPG 8 +#define HLW_GAUSS 9 +#define HLW_EGON 10 +#define HLW_HORNETGUN 11 +#define HLW_HANDGRENADE 12 +#define HLW_TRIPMINE 13 +#define HLW_SATCHEL 14 +#define HLW_SNARK 15 +#define HLW_SUIT 31 +#define HLW_ALLWEAPONS (~(1< 256) applied to world brush + * + * @note + * write_byte(TE_WORLDDECALHIGH) + * write_coord(position.x) decal position (center of texture in world) + * write_coord(position.y) + * write_coord(position.z) + * write_byte(texture index of precached decal texture name - 256) + */ +#define TE_WORLDDECALHIGH 117 + +/** + * Same as TE_DECAL, but the texture index was greater than 256 + * + * @note + * write_byte(TE_DECALHIGH) + * write_coord(position.x) decal position (center of texture in world) + * write_coord(position.y) + * write_coord(position.z) + * write_byte(texture index of precached decal texture name - 256) + * write_short(entity index) + */ +#define TE_DECALHIGH 118 + +/** + * Makes a projectile (like a nail) (this is a high-priority tent) + * + * @note + * write_byte(TE_PROJECTILE) + * write_coord(position.x) + * write_coord(position.y) + * write_coord(position.z) + * write_coord(velocity.x) + * write_coord(velocity.y) + * write_coord(velocity.z) + * write_short(modelindex) + * write_byte(life) + * write_byte(owner) projectile won't collide with owner (if owner == 0, projectile will hit any client). + */ +#define TE_PROJECTILE 119 + +/** + * Throws a shower of sprites or models + * + * @note + * write_byte(TE_SPRAY) + * write_coord(position.x) + * write_coord(position.y) + * write_coord(position.z) + * write_coord(direction.x) + * write_coord(direction.y) + * write_coord(direction.z) + * write_short(modelindex) + * write_byte(count) + * write_byte(speed) + * write_byte(noise) + * write_byte(rendermode) + */ +#define TE_SPRAY 120 + +/** + * Sprites emit from a player's bounding box (ONLY use for players!) + * + * @note + * write_byte(TE_PLAYERSPRITES) + * write_short(playernum) + * write_short(sprite modelindex) + * write_byte(count) + * write_byte(variance) (0 = no variance in size) (10 = 10% variance in size) + */ +#define TE_PLAYERSPRITES 121 + +/** + * Very similar to lavasplash + * + * @note + * write_byte(TE_PARTICLEBURST) + * write_coord(origin) + * write_short(radius) + * write_byte(particle color) + * write_byte(duration * 10) (will be randomized a bit) + */ +#define TE_PARTICLEBURST 122 + +/** + * Makes a field of fire + * + * @note + * write_byte(TE_FIREFIELD) + * write_coord(origin) + * write_short(radius) (fire is made in a square around origin. -radius, -radius to radius, radius) + * write_short(modelindex) + * write_byte(count) + * write_byte(flags) + * write_byte(duration (in seconds) * 10) (will be randomized a bit) + */ +#define TE_FIREFIELD 123 + +/** + * Flags for the TE_FIREFIELD effect, controlling its performance and aesthetic + * features + */ +#define TEFIRE_FLAG_ALLFLOAT 1 // All sprites will drift upwards as they animate +#define TEFIRE_FLAG_SOMEFLOAT 2 // Some of the sprites will drift upwards. (50% chance) +#define TEFIRE_FLAG_LOOP 4 // If set, sprite plays at 15 fps, otherwise plays at whatever rate stretches the animation over the sprite's duration. +#define TEFIRE_FLAG_ALPHA 8 // If set, sprite is rendered alpha blended at 50% else, opaque +#define TEFIRE_FLAG_PLANAR 16 // If set, all fire sprites have same initial Z instead of randomly filling a cube. + +/** + * Attaches a TENT to a player (this is a high-priority tent) + * + * @note + * write_byte(TE_PLAYERATTACHMENT) + * write_byte(entity index of player) + * write_coord(vertical offset) (attachment origin.z = player origin.z + vertical offset) + * write_short(model index) + * write_short(life * 10 ) + */ +#define TE_PLAYERATTACHMENT 124 + +/** + * Will expire all TENTS attached to a player. + * + * @note + * write_byte(TE_KILLPLAYERATTACHMENTS) + * write_byte(entity index of player) + */ +#define TE_KILLPLAYERATTACHMENTS 125 + +/** + * Much more compact shotgun message + * + * @note This message is used to make a client approximate a 'spray' of gunfire. + * Any weapon that fires more than one bullet per frame and fires in a bit + * of a spread is a good candidate for MULTIGUNSHOT use. (shotguns) + * @note This effect makes the client do traces for each bullet, these client + * traces ignore entities that have studio models.Traces are 4096 long. + * @note + * write_byte(TE_MULTIGUNSHOT) + * write_coord(origin.x) + * write_coord(origin.y) + * write_coord(origin.z) + * write_coord(direction.x) + * write_coord(direction.y) + * write_coord(direction.z) + * write_coord(x noise * 100) + * write_coord(y noise * 100) + * write_byte(count) + * write_byte(bullethole decal texture index) + */ +#define TE_MULTIGUNSHOT 126 + + +/** + * Larger message than the standard tracer, but allows some customization. + * + * @note + * write_byte(TE_USERTRACER) + * write_coord(origin.x) + * write_coord(origin.y) + * write_coord(origin.z) + * write_coord(velocity.x) + * write_coord(velocity.y) + * write_coord(velocity.z) + * write_byte(life * 10) + * write_byte(color) this is an index into an array of color vectors in the engine. (0 - ) + * write_byte(length * 10) + */ +#define TE_USERTRACER 127 + +/** + * @endsection + */ + +/** + * From hltv.h from the HLSDK, these are used in conjunction with SVC_DIRECTOR + * sub commands of svc_director + */ +#define DRC_CMD_NONE 0 // NULL director command +#define DRC_CMD_START 1 // start director mode +#define DRC_CMD_EVENT 2 // informs about director command +#define DRC_CMD_MODE 3 // switches camera modes +#define DRC_CMD_CAMERA 4 // sets camera registers +#define DRC_CMD_TIMESCALE 5 // sets time scale +#define DRC_CMD_MESSAGE 6 // send HUD centerprint +#define DRC_CMD_SOUND 7 // plays a particular sound +#define DRC_CMD_STATUS 8 // status info about broadcast +#define DRC_CMD_BANNER 9 // banner file name for HLTV gui +#define DRC_CMD_FADE 10 // send screen fade command +#define DRC_CMD_SHAKE 11 // send screen shake command +#define DRC_CMD_STUFFTEXT 12 // like the normal svc_stufftext but as director command + +#define DRC_CMD_LAST 12 + +/** + * HLTV_EVENT event flags + */ +#define DRC_FLAG_PRIO_MASK 0x0F // priorities between 0 and 15 (15 most important) +#define DRC_FLAG_SIDE (1<<4) // +#define DRC_FLAG_DRAMATIC (1<<5) // is a dramatic scene +#define DRC_FLAG_SLOWMOTION (1<<6) // would look good in SloMo +#define DRC_FLAG_FACEPLAYER (1<<7) // player is doning something (reload/defuse bomb etc) +#define DRC_FLAG_INTRO (1<<8) // is a introduction scene +#define DRC_FLAG_FINAL (1<<9) // is a final scene +#define DRC_FLAG_NO_RANDOM (1<<10) // don't randomize event data + +#define MAX_DIRECTOR_CMD_PARAMETERS 4 +#define MAX_DIRECTOR_CMD_STRING 128 diff --git a/bin/amxxdump/includes/amxmodx/message_stocks.inc b/bin/amxxdump/includes/amxmodx/message_stocks.inc new file mode 100644 index 0000000..a916194 --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/message_stocks.inc @@ -0,0 +1,161 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Message Stocks +// + +#if defined _message_stocks_included + #endinput +#endif +#define _message_stocks_included + +/** + * Sends a death message. + * + * @param killer Killer id + * @param victim Victim id + * @param weaponNUM Weapon index + * + * @noreturn + */ +stock dod_make_deathmsg(killer, victim, weaponNUM) +{ + static msgid = 0; + if (!msgid) + { + msgid = get_user_msgid("DeathMsg"); + } + message_begin(MSG_ALL, msgid, {0,0,0}, 0); + write_byte(killer); + write_byte(victim); + write_byte(weaponNUM); + message_end(); + + return 1; +} + +/** + * Kills a user without a message. + * + * @param index Client index + * @param flag If nonzero, the death will not affect the client's score + * + * @noreturn + */ +stock user_silentkill(index, flag = 1) +{ + static msgid = 0; + new msgblock; + if (!msgid) + { + msgid = get_user_msgid("DeathMsg"); + } + msgblock = get_msg_block(msgid); + set_msg_block(msgid, BLOCK_ONCE); + user_kill(index, flag); + set_msg_block(msgid, msgblock); + + return 1; +} + +/** + * Creates a death message. + * + * @param killer Killer id + * @param victim Victim id + * @param headshot Headshot + * @param weapon Weapon + * + * @noreturn + */ +stock make_deathmsg(killer, victim, headshot, const weapon[]) +{ + static msgid = 0; + if (!msgid) + { + msgid = get_user_msgid("DeathMsg"); + } + message_begin(MSG_ALL, msgid, {0,0,0}, 0); + write_byte(killer); + write_byte(victim); + + new mod_name[32]; + get_modname(mod_name, 31); + if (equal(mod_name, "cstrike") || equal(mod_name, "czero") || equal(mod_name, "csv15") || equal(mod_name, "cs13")) + write_byte(headshot); + write_string(weapon); + message_end(); + + return 1; +} + +/** + * Sends a predefined text message to player. + * Predefined texts are default game messages which will be translated + * to player's game language, e.g. #Game_join_ct. + * + * @note Set index to 0 to send text globally. + * + * @note There does not necessarily have to be a total of 6 arguments. + * It will depend if message takes arguments, e.g.: + * client_printex(id, print_chat, "#Game_join_ct", "Pimp Daddy") + * client_printex(id, print_chat, "1", "#Game_radio", "Pimp Daddy", "Hello world!") + * + * @param index Index of the player, use 0 to send to all players. + * @param type The message destination. See print_* constants. + * @param msg_name The custom or predefined message to send. + * @param msg_param1 Optional message argument. + * @param msg_param2 Optional message argument. + * @param msg_param3 Optional message argument. + * @param msg_param4 Optional message argument. + * + * @noreturn + */ +stock client_printex(index, type, const msg_name[], const msg_param1[] = "", const msg_param2[] = "", const msg_param3[] = "", const msg_param4[] = "") +{ + new ch = msg_name[0]; + + // If not a predefined message, we don't care about it and forward directly to client_print. + // Special case for radio message. msg_name is an index, msg_param1 #Game_radio*, etc. Checking index should be enough. + if (ch != '#' && (type != print_radio || !strtol(msg_name))) + { + return client_print(index, type, msg_name, msg_param1, msg_param2, msg_param3, msg_param4); + } + + // Even if message starts with '#', we should check its length for safety. + new length = strlen(msg_name); + + // If string is larger than expected, we forward to client_print which will cut message properly. + // This means also this can't be a predefined game message. + // Max console length: 128 = \n (126) + \0 (127) + // Max SayText length: 192 = \n (190) + \0 (191) + if ((length > 126 && (print_notify <= type <= print_console)) + || ( length > 190 && (print_chat <= type <= print_radio))) + { + return client_print(index, type, msg_name, msg_param1, msg_param2, msg_param3, msg_param4); + } + + static msgTextMsg; + if (!msgTextMsg) + { + msgTextMsg = get_user_msgid("TextMsg"); + } + + message_begin(index > 0 ? MSG_ONE_UNRELIABLE : MSG_BROADCAST, msgTextMsg, {0,0,0}, index); + write_byte(type); + write_string(msg_name); + if (msg_param1[0]) { write_string(msg_param1); } + if (msg_param2[0]) { write_string(msg_param2); } + if (msg_param3[0]) { write_string(msg_param3); } + if (msg_param4[0]) { write_string(msg_param4); } + message_end(); + + return 1; +} diff --git a/bin/amxxdump/includes/amxmodx/messages.inc b/bin/amxxdump/includes/amxmodx/messages.inc new file mode 100644 index 0000000..c0ef156 --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/messages.inc @@ -0,0 +1,604 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Message Functions +// + +#if defined _coremsg_included + #endinput +#endif +#define _coremsg_included + +#include + +/** + * Marks the beginning of a client message. + * + * @note You may generate menus, smoke, shockwaves, thunderlights, + * intermission and many other messages. + * @note For a list of HL game events, visit https://wiki.alliedmods.net/Half-Life_1_Game_Events + * @note For a list of HL engine messages, visit https://wiki.alliedmods.net/Half-Life_1_Engine_Messages + * @note You may also refer to the messages_const.inc file for examples. + * @note Each message starts with a message_begin() or message_begin_f() function + * and ends with message_end(). The specific message arguments go in between + * these two by using the write_*() functions found in messages.inc. + * + * @param dest Destination type (see MSG_* constants in messages_const.inc) + * @param msg_type Message id + * @param origin Message origin + * @param player Client index receiving the message or 0 for all clients + * + * @noreturn + * @error If an invalid message id is specified or an invalid number + * of parameters is passed, an error will be thrown. + */ +native message_begin(dest, msg_type, const origin[3] = {0,0,0}, player = 0); + +/** + * Marks the beginning of a client message. + * + * @note You may generate menus, smoke, shockwaves, thunderlights, + * intermission and many other messages. + * @note For a list of HL game events, visit https://wiki.alliedmods.net/Half-Life_1_Game_Events + * @note For a list of HL engine messages, visit https://wiki.alliedmods.net/Half-Life_1_Engine_Messages + * @note You may also refer to the messages_const.inc file for examples. + * @note This function is the same as message_begin(), but the origin + * argument accepts only float values in this one. + * @note Each message starts with a message_begin() or message_begin_f() function + * and ends with message_end(). The specific message arguments go in between + * these two by using the write_*() functions found in messages.inc. + * + * @param dest Destination type (see MSG_* constants in messages_const.inc) + * @param msg_type Message id + * @param origin Message origin + * @param player Client index receiving the message or 0 for all clients + * + * @noreturn + * @error If an invalid message id is specified or an invalid number + * of parameters is passed, an error will be thrown. + */ +native message_begin_f(dest, msg_type, const Float:origin[3] = {0.0,0.0,0.0}, player = 0); + +/** + * Ends a message that was started with message_begin() or message_begin_f(). + * + * @note If the function is called without using message_begin() or + * message_begin_f() first, the server will crash immediately. + * + * @noreturn + */ +native message_end(); + +/** + * Writes a single byte to a message. + * + * @note This function should only be used in between a message_begin() + * or message_begin_f() and a message_end() function. Trying to use + * it outside of these functions will crash the server immediately. + * + * @param x Byte to write + * + * @noreturn + */ +native write_byte(x); + +/** + * Writes a single character to a message. + * + * @note This function should only be used in between a message_begin() + * or message_begin_f() and a message_end() function. Trying to use + * it outside of these functions will crash the server immediately. + * + * @param x Character to write + * + * @noreturn + */ +native write_char(x); + +/** + * Writes a single number to a message (short). + * + * @note This function should only be used in between a message_begin() + * or message_begin_f() and a message_end() function. Trying to use + * it outside of these functions will crash the server immediately. + * + * @param x Number to write + * + * @noreturn + */ +native write_short(x); + +/** + * Writes a single number to a message (long). + * + * @note This function should only be used in between a message_begin() + * or message_begin_f() and a message_end() function. Trying to use + * it outside of these functions will crash the server immediately. + * + * @param x Number to write + * + * @noreturn + */ +native write_long(x); + +/** + * Writes an entity index to a message. + * + * @note This function should only be used in between a message_begin() + * or message_begin_f() and a message_end() function. Trying to use + * it outside of these functions will crash the server immediately. + * + * @param x Entity index to write + * + * @noreturn + */ +native write_entity(x); + +/** + * Writes an angle entry to a message. + * + * @note This function should only be used in between a message_begin() + * or message_begin_f() and a message_end() function. Trying to use + * it outside of these functions will crash the server immediately. + * + * @param x Angle to write + * + * @noreturn + */ +native write_angle(x); + +/** + * Writes an angle entry to a message using a float value. + * + * @note This function should only be used in between a message_begin() + * or message_begin_f() and a message_end() function. Trying to use + * it outside of these functions will crash the server immediately. + * + * @param x Angle to write + * + * @noreturn + */ +native write_angle_f(Float:x); + +/** + * Writes a coordinate entry to a message. + * + * @note This function should only be used in between a message_begin() + * or message_begin_f() and a message_end() function. Trying to use + * it outside of these functions will crash the server immediately. + * + * @param x Coordinate to write + * + * @noreturn + */ +native write_coord(x); + +/** + * Writes a coordinate entry to a message using a float value. + * + * @note This function should only be used in between a message_begin() + * or message_begin_f() and a message_end() function. Trying to use + * it outside of these functions will crash the server immediately. + * + * @param x Coordinate to write + * + * @noreturn + */ +native write_coord_f(Float:x); + +/** + * Writes a string to a message. + * + * @note This function should only be used in between a message_begin() + * or message_begin_f() and a message_end() function. Trying to use + * it outside of these functions will crash the server immediately. + * + * @param x String to write + * + * @noreturn + */ +native write_string(const x[]); + +/** + * Marks the beginning of a client message. + * + * @note You may generate menus, smoke, shockwaves, thunderlights, + * intermission and many other messages. + * @note For a list of HL game events, visit https://wiki.alliedmods.net/Half-Life_1_Game_Events + * @note For a list of HL engine messages, visit https://wiki.alliedmods.net/Half-Life_1_Engine_Messages + * @note You may also refer to the messages_const.inc file for examples. + * @note This function is the same as message_begin(), except that the messages + * sent with this one are also sent to all other AMXX and Metamod plugins. + * This means that if you send one of these messages, other plugins will + * be notified of that message, which was previously impossible. + * @note BE CAREFUL! Using this incorrectly, or not for its intended purpose, + * could cause infinite recursion or something just as bad! + * @note Each message starts with a emessage_begin() or emessage_begin_f() function + * and ends with emessage_end(). The specific message arguments go in between + * these two by using the ewrite_*() functions found in messages.inc. + * + * @param dest Destination type (see MSG_* constants in messages_const.inc) + * @param msg_type Message id + * @param origin Message origin + * @param player Client index receiving the message or 0 for all clients + * + * @noreturn + * @error If an invalid message id is specified or an invalid number + * of parameters is passed, an error will be thrown. + */ +native emessage_begin(dest, msg_type, const origin[3] = {0,0,0}, player = 0); + +/** + * Marks the beginning of a client message. + * + * @note You may generate menus, smoke, shockwaves, thunderlights, + * intermission and many other messages. + * @note For a list of HL game events, visit https://wiki.alliedmods.net/Half-Life_1_Game_Events + * @note For a list of HL engine messages, visit https://wiki.alliedmods.net/Half-Life_1_Engine_Messages + * @note You may also refer to the messages_const.inc file for examples. + * @note This function is the same as message_begin_f(), except that the messages + * sent with this one are also sent to all other AMXX and Metamod plugins. + * This means that if you send one of these messages, other plugins will + * be notified of that message, which was previously impossible. + * @note BE CAREFUL! Using this incorrectly, or not for its intended purpose, + * could cause infinite recursion or something just as bad! + * @note This function is the same as emessage_begin(), but the origin + * argument accepts only float values in this one. + * @note Each message starts with a emessage_begin() or emessage_begin_f() function + * and ends with emessage_end(). The specific message arguments go in between + * these two by using the ewrite_*() functions found in messages.inc. + * + * @param dest Destination type (see MSG_* constants in messages_const.inc) + * @param msg_type Message id + * @param origin Message origin + * @param player Client index receiving the message or 0 for all clients + * + * @noreturn + * @error If an invalid message id is specified or an invalid number + * of parameters is passed, an error will be thrown. + */ +native emessage_begin_f(dest, msg_type, const Float:origin[3] = {0.0,0.0,0.0}, player = 0); + +/** + * Ends a message that was started with emessage_begin() or emessage_begin_f(). + * + * @note If the function is called without using emessage_begin() or + * emessage_begin_f() first, the server will crash immediately. + * + * @noreturn + */ +native emessage_end(); + +/** + * Writes a single byte to a message. + * + * @note This function should only be used in between a emessage_begin() + * or emessage_begin_f() and a emessage_end() function. Trying to use + * it outside of these functions will crash the server immediately. + * + * @param x Byte to write + * + * @noreturn + */ +native ewrite_byte(x); + +/** + * Writes a single character to a message. + * + * @note This function should only be used in between a emessage_begin() + * or emessage_begin_f() and a emessage_end() function. Trying to use + * it outside of these functions will crash the server immediately. + * + * @param x Character to write + * + * @noreturn + */ +native ewrite_char(x); + +/** + * Writes a single number to a message (short). + * + * @note This function should only be used in between a emessage_begin() + * or emessage_begin_f() and a emessage_end() function. Trying to use + * it outside of these functions will crash the server immediately. + * + * @param x Number to write + * + * @noreturn + */ +native ewrite_short(x); + +/** + * Writes a single number to a message (long). + * + * @note This function should only be used in between a emessage_begin() + * or emessage_begin_f() and a emessage_end() function. Trying to use + * it outside of these functions will crash the server immediately. + * + * @param x Number to write + * + * @noreturn + */ +native ewrite_long(x); + +/** + * Writes an entity index to a message. + * + * @note This function should only be used in between a emessage_begin() + * or emessage_begin_f() and a emessage_end() function. Trying to use + * it outside of these functions will crash the server immediately. + * + * @param x Entity index to write + * + * @noreturn + */ +native ewrite_entity(x); + +/** + * Writes an angle entry to a message. + * + * @note This function should only be used in between a emessage_begin() + * or emessage_begin_f() and a emessage_end() function. Trying to use + * it outside of these functions will crash the server immediately. + * + * @param x Angle to write + * + * @noreturn + */ +native ewrite_angle(x); + +/** + * Writes an angle entry to a message using a float value. + * + * @note This function should only be used in between a emessage_begin() + * or emessage_begin_f() and a emessage_end() function. Trying to use + * it outside of these functions will crash the server immediately. + * + * @param x Angle to write + * + * @noreturn + */ +native ewrite_angle_f(Float:x); + +/** + * Writes a coordinate entry to a message. + * + * @note This function should only be used in between a emessage_begin() + * or emessage_begin_f() and a emessage_end() function. Trying to use + * it outside of these functions will crash the server immediately. + * + * @param x Coordinate to write + * + * @noreturn + */ +native ewrite_coord(x); + +/** + * Writes a coordinate entry to a message using a float value. + * + * @note This function should only be used in between a emessage_begin() + * or emessage_begin_f() and a emessage_end() function. Trying to use + * it outside of these functions will crash the server immediately. + * + * @param x Coordinate to write + * + * @noreturn + */ +native ewrite_coord_f(Float:x); + +/** + * Writes a string to a message. + * + * @note This function should only be used in between a emessage_begin() + * or emessage_begin_f() and a emessage_end() function. Trying to use + * it outside of these functions will crash the server immediately. + * + * @param x String to write + * + * @noreturn + */ +native ewrite_string(const x[]); + +/** + * Sets whether or not an engine message will be blocked. + * + * @note For a list of message flags, have a look at the BLOCK_* constants + * in message_const.inc. + * + * @param iMessage Message id + * @param iMessageFlags BLOCK_* constant + * + * @noreturn + * @error If an invalid message id is specified, an error + * will be thrown. + */ +native set_msg_block(iMessage, iMessageFlags); + +/** + * Gets whether or not an engine message is blocked. + * + * @param iMessage Message id + * + * @return BLOCK_* constant + * @error If an invalid message id is specified, an error + * will be thrown. + */ +native get_msg_block(iMessage); + +/** + * Lets you directly hook a message in the engine. + * + * @note The function is called in the following manner: + * msg_id - Message id + * msg_dest - Destination type (see MSG_* constants in messages_const.inc) + * msg_entity - Entity receiving the message + * + * @note You can overwrite the message before anything happens by using the + * set_msg_arg_* functions and either let the message continue by + * returning PLUGIN_CONTINUE or fully block it with PLUGIN_HANDLED. + * @note If you hook a message, the message is stored but not sent. You have + * the opportunity to not only execute code, but to get/set the contents + * of the message before you choose to either block it or let it go on + * its way. + * @note The return value can be passed to unregister_message() in order to + * stop the message from being hooked. + * + * @param iMsgId Message id + * @param szFunction Function that will be called + * + * @return Id that can be passed to unregister_message() on + * success, or 0 if an invalid message id is passed + * @error If the specified function can't be found, an + * error will be thrown. + */ +native register_message(iMsgId, const szFunction[]); + +/** + * Unregisters a message hook previously created with register_message(). + * + * @note You must pass the proper message id and return value from the + * message to unregister the message successfully. + * + * @param iMsgId Message id + * @param registeredmsg Registered message id + * + * @return Id that can again be passed to register_message() on + * success, or 0 if an invalid message id is passed + * @error If an invalid registered message handle is passed, an + * error will be thrown. + */ +native unregister_message(iMsgId, registeredmsg); + +/** + * Gets number of arguments that were passed to a message. + * + * @note This function will fail if used outside a hooked message scope, thus + * it should never be used unless inside a registered message function. + * + * @return Number of arguments + */ +native get_msg_args(); + +/** + * Gets the argument type of a specified argument. + * + * @note This function will fail if used outside a hooked message scope, thus + * it should never be used unless inside a registered message function. + * + * @param argn Argument number + * + * @return Argument type (see ARG_* constants in message_const.inc) + */ +native get_msg_argtype(argn); + +/** + * Gets the integer value of a specified argument. + * + * @note This function will fail if used outside a hooked message scope, thus + * it should never be used unless inside a registered message function. + * + * @param argn Argument number + * + * @return Argument value as an integer + * @error If an invalid message argument is passed, an + * error will be thrown. + */ +native get_msg_arg_int(argn); + +/** + * Gets the float value of a specified argument. + * + * @note This function will fail if used outside a hooked message scope, thus + * it should never be used unless inside a registered message function. + * + * @param argn Argument number + * + * @return Argument value as a float + * @error If an invalid message argument is passed, an + * error will be thrown. + */ +native Float:get_msg_arg_float(argn); + +/** + * Gets the string value from a specified argument. + * + * @note This function will fail if used outside a hooked message scope, thus + * it should never be used unless inside a registered message function. + * + * @param argn Argument number + * @param szReturn Buffer to store the value in + * @param iLength Maximum buffer length + * + * @return String length + * @error If an invalid message argument is passed, an + * error will be thrown. + */ +native get_msg_arg_string(argn, szReturn[], iLength); + +/** + * Sets the integer value of a specified argument. + * + * @note This function will fail if used outside a hooked message scope, thus + * it should never be used unless inside a registered message function. + * + * @param argn Argument number + * @param argtype Argument type (see ARG_* constants in message_const.inc) + * @param iValue Argument value + * + * @noreturn + * @error If an invalid message argument is passed, an + * error will be thrown. + */ +native set_msg_arg_int(argn, argtype, iValue); + +/** + * Sets the float value of a specified argument. + * + * @note This function will fail if used outside a hooked message scope, thus + * it should never be used unless inside a registered message function. + * + * @param argn Argument number + * @param argtype Argument type (see ARG_* constants in message_const.inc) + * @param fValue Argument value + * + * @noreturn + * @error If an invalid message argument is passed, an + * error will be thrown. + */ +native set_msg_arg_float(argn, argtype, Float:fValue); + +/** + * Sets the string value of a specified argument. + * + * @note This function will fail if used outside a hooked message scope, thus + * it should never be used unless inside a registered message function. + * + * @param argn Argument number + * @param szString Argument value + * + * @noreturn + * @error If an invalid message argument is passed, an + * error will be thrown. + */ +native set_msg_arg_string(argn, const szString[]); + +/** + * Gets the origin of a message. + * + * @note This function will fail if used outside a hooked message scope, thus + * it should never be used unless inside a registered message function. + * + * @param _Origin Array to store the origin in + * + * @noreturn + * @error If the function is used outside a message hook, an + * error will be thrown. + */ +native get_msg_origin(const Float:_Origin[3]); diff --git a/bin/amxxdump/includes/amxmodx/messages.inc.temp b/bin/amxxdump/includes/amxmodx/messages.inc.temp new file mode 100644 index 0000000..e4b8432 --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/messages.inc.temp @@ -0,0 +1,44 @@ +#if defined _coremsg_included +#endinput +#endif +#define _coremsg_included +#include +native message_begin(dest, msg_type, const origin[3] = {0,0,0}, player = 0); +native message_begin_f(dest, msg_type, const Float:origin[3] = {0.0,0.0,0.0}, player = 0); +native message_end(); +native write_byte(x); +native write_char(x); +native write_short(x); +native write_long(x); +native write_entity(x); +native write_angle(x); +native write_angle_f(Float:x); +native write_coord(x); +native write_coord_f(Float:x); +native write_string(const x[]); +native emessage_begin(dest, msg_type, const origin[3] = {0,0,0}, player = 0); +native emessage_begin_f(dest, msg_type, const Float:origin[3] = {0.0,0.0,0.0}, player = 0); +native emessage_end(); +native ewrite_byte(x); +native ewrite_char(x); +native ewrite_short(x); +native ewrite_long(x); +native ewrite_entity(x); +native ewrite_angle(x); +native ewrite_angle_f(Float:x); +native ewrite_coord(x); +native ewrite_coord_f(Float:x); +native ewrite_string(const x[]); +native set_msg_block(iMessage, iMessageFlags); +native get_msg_block(iMessage); +native register_message(iMsgId, const szFunction[]); +native unregister_message(iMsgId, registeredmsg); +native get_msg_args(); +native get_msg_argtype(argn); +native get_msg_arg_int(argn); +native Float:get_msg_arg_float(argn); +native get_msg_arg_string(argn, szReturn[], iLength); +native set_msg_arg_int(argn, argtype, iValue); +native set_msg_arg_float(argn, argtype, Float:fValue); +native set_msg_arg_string(argn, const szString[]); +native get_msg_origin(const Float:_Origin[3]); diff --git a/bin/amxxdump/includes/amxmodx/mysqlt.inc b/bin/amxxdump/includes/amxmodx/mysqlt.inc new file mode 100644 index 0000000..c197b27 --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/mysqlt.inc @@ -0,0 +1,243 @@ +#if defined _mysqlt_included + #endinput +#endif +#define _mysqlt_included +#if AMXX_VERSION_NUM >= 175 + #pragma reqclass mysqlt + #if !defined AMXMODX_NOAUTOLOAD + #pragma defclasslib mysqlt mysqlt + #endif +#endif + +//#define OLDNATIVES_COMPACTIBILITY + + +#if !defined _sqlx_included +enum +{ + TQUERY_CONNECT_FAILED=-2, + TQUERY_QUERY_FAILED=-1, + TQUERY_SUCCESS=0, +}; + +enum Handle +{ + Empty_Handle +}; + +#endif + +/* +[Configura la performance del ThreadsQuery] + -collect_time: + Tiempo en milisegundos en el que se recolectan los datos listos + -th_think_time: + Tiempo en milisegundos para el proximo frame del Thread + -threads_per_frame: + Cantidad de Threads simultaneamente +*/ +native mysql_performance(collect_time=100, th_think_time=100, threads_per_frame=1); + + +/* +[Realiza una consulta] + -cn_handler: + El handler devuelto por mysql_makehost o mysql_connect. + -handler: + La funcion que sera llamada al finalizar la consulta + -query: + La consulta + -data: + Array para pasar algun dato a la funcion handler + -datasize: + Tamao del array data +---------------------------------------------------------------------------------- +La funcion handler tiene este formato: +*public query_handler(failstate, error[], errnum, data[], size, Float:queuetime) + -failstate: + Estado de la consulta: + TQUERY_CONNECT_FAILED: Fallo la conexin + TQUERY_QUERY_FAILED: Fallo la consulta + TQUERY_SUCCESS: Todo OK :P + -error: + String del error + -errnum: + Codigo del error + -data: + Datos pasados desde mysql_query + -size: + Tamao del array data + -queuetime: + Tiempo transcurrido desde que se creo la consulta hasta que finalizo + +*/ +native mysql_query(Handle:cn_handler, const handler[], const query[], const data[]="", datasize=0); + +/* +[Crea un identificador a un Host] + return: Devuelve el Handle de un Host +*/ +native Handle:mysql_makehost(const host[], const user[], const pass[], const db[], timeout=0); + +/*[Libera el Handle de un Host o de una Conexin]*/ +native mysql_free(Handle:_handle); + +/* +[Crea una conexin permanente con el servidor MySQL] + return: Devuelve el Handle de la Conexin +*/ +native Handle:mysql_connect(Handle:host_handler, &errcode, error[], maxlength); + +/* +[Comprueba si hay mas resultados] + return: Devuelve true si hay mas resultados,de lo contrario false +*/ +native mysql_more_results(); + +/* +[Comprueba si una columna no tiene un valor] + return: Devuelve true si no tiene un valor,de lo contrario false +*/ +native mysql_isnull(column); + +/* +[Obtiene los datos de una columna(ID)] + -column: + El id de la columna + + Ejemplo: + -Para numeros: + new num = mysql_read_result(0) + + -Para Float: + new Float:num2 + mysql_read_result(1, num2) + -Para String: + new str[32] + mysql_read_result(2, str, 31) +*/ +native mysql_read_result(column, {Float,_}:...); + +/* +[Obtiene los datos de una columna(Name)] + -name: + El nombre de la columna + + Ejemplo: + -Para numeros: + new num = mysql_read_result2("columna1") + + -Para Float: + new Float:num2 + mysql_read_result2("columna2", num2) + -Para String: + new str[32] + mysql_read_result2("columna3", str, 31) +*/ +native mysql_read_result2(name[], {Float,_}:...); + +/*[Avanza al siguiente resultado]*/ +native mysql_next_row(); + +/*[Devuelve el numero de campos afectados]*/ +native mysql_affected_rows(); + +/*[Devuelve el numero de resultados]*/ +native mysql_num_results(); + +/*[Devuelve el numero de columnas]*/ +native mysql_num_columns(); + +/*[Se obtiene el nombre de una columna]*/ +native mysql_fieldnumtoname(num, name[], maxlength); + +/*[Se obtiene el id de una columna]*/ +native mysql_fieldnametonum(const name[]); + +/*[Se obtiene el ID del autoincrement si se inserto un campo nuevo]*/ +native mysql_get_insert_id(); + +/*[Se obtiene la consulta del ThreadsQuery]*/ +native mysql_get_query(buffer[], maxlength); + +/*[Vuelve atras un resultado]*/ +native mysql_rewind(); + + +native mysql_next_result_set(); + +native mysql_escape_string(buffer[], buflen, const string[]); +native mysql_escape_string2(buffer[], buflen, const fmt[], any:...); + + + + +#if !defined _sqlx_included && defined OLDNATIVES_COMPACTIBILITY +#define SQL_ThreadQuery mysql_query +#define SQL_MakeDbTuple mysql_makehost +#define SQL_FreeHandle mysql_free +#define SQL_Connect mysql_connect +stock SQL_MoreResults(Handle:query) + mysql_more_results() +stock SQL_IsNull(Handle:query, column) + mysql_isnull(column) +stock SQL_NextRow(Handle:query) + mysql_next_row() +stock SQL_AffectedRows(Handle:query) + mysql_affected_rows() +stock SQL_NumResults(Handle:query) + mysql_num_results() +stock SQL_NumRows(Handle:query) + mysql_num_results() +stock SQL_NumColumns(Handle:query) + mysql_num_columns() +stock SQL_FieldNumToName(Handle:query, num, name[], maxlength) + mysql_fieldnumtoname(num, name, maxlength) +stock SQL_FieldNameToNum(Handle:query, const name[]) + mysql_fieldnametonum(name) +stock SQL_GetInsertId(Handle:query) + mysql_get_insert_id() +stock SQL_GetQueryString(Handle:query, buffer[], maxlength) + mysql_get_query(buffer, maxlength) +stock SQL_Rewind(Handle:query) + mysql_rewind() +stock SQL_NextResultSet(Handle:query) + mysql_next_result_set() +stock SQL_QuoteString(Handle:db, buffer[], buflen, const string[]) + mysql_escape_string(buffer, buflen, string) +stock SQL_QuoteStringFmt(Handle:db, buffer[], buflen, const fmt[], any:...) + set_fail_state("SQL_QuoteStringFmt: This function is deprecated") +stock SQL_ReadResult(Handle:query, column, {Float,_}:...) +{ + new args = numargs() + + if(args == 2) return mysql_read_result(column) + if(args == 3) + { + new Float:value + mysql_read_result(column, value) + setarg(2, _, _:value) + return 1 + } + else { + new string[512], len = getarg(3) + + mysql_read_result(column, string, 511) + + len = min(getarg(3), strlen(string)) + new cell + while(cell < len) + { + if(!setarg(2, cell, string[cell])) break + cell++ + } + setarg(2, len, 0) + return len + } + + return 0 +} +#endif +/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE +*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang11274\\ f0\\ fs16 \n\\ par } +*/ diff --git a/bin/amxxdump/includes/amxmodx/newmenus.inc b/bin/amxxdump/includes/amxmodx/newmenus.inc new file mode 100644 index 0000000..9485ab2 --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/newmenus.inc @@ -0,0 +1,379 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +#if defined _newmenus_included + #endinput +#endif +#define _newmenus_included + +/** + * @section Menu properties for using in menu_setprop + */ + +/** + * Menu will have an exit option (default) + */ +#define MEXIT_ALL 1 + +/** + * Menu will have an exit option, even when pagination is disabled. + * There have to be less than 10 items in the menu or it won't appear. The exit + * option will be appended to the last item with no extra slot padding. If you + * want it in the 10th slot you have to pad it manually with menu_addblank2 + */ +#define MEXIT_FORCE 2 + +/** + * Menu will not have an exit option + */ +#define MEXIT_NEVER -1 + +/** + * Number of items per page (param1 = number, 0=no paginating, 7=default) + */ +#define MPROP_PERPAGE 1 + +/** + * Name of the back button (param1 = string) + */ +#define MPROP_BACKNAME 2 + +/** + * Name of the next button (param1 = string) + */ +#define MPROP_NEXTNAME 3 + +/** + * Name of the exit button (param1 = string) + */ +#define MPROP_EXITNAME 4 + +/** + * Menu title text (param1 = string) + */ +#define MPROP_TITLE 5 + +/** + * Exit functionality (param1 = number, see MEXIT constants) + */ +#define MPROP_EXIT 6 + +/** + * Sets whether colors are not auto (param1 = number, 0=default) + */ +#define MPROP_NOCOLORS 8 + +/** + * Color indicator to use for numbers (param1 = string, "\r"=default) + */ +#define MPROP_NUMBER_COLOR 10 + +/** + * Function to be called on Back and Next (param1 = string) + * public function(id, status); where status is either MENU_BACK or MENU_MORE + * Pass NULL_STRING to disable the callback + */ +#define MPROP_PAGE_CALLBACK 11 + +/** + * Whether to show the page number in menu title (param1 = bool, true = default) + */ +#define MPROP_SHOWPAGE 12 + +/** + * @deprecated + */ +#define MEXIT_NORMAL 0 /* DEPRECATED, do not use (has no effect) */ +#define MENUPAD_NONE 0 /* DEPRECATED, do not use (has no effect) */ +#define MENUPAD_PAGE 1 /* DEPRECATED, do not use (has no effect) */ +#define MPROP_ORDER 7 /* DEPRECATED, do not use (has no effect) */ +#define MPROP_PADMENU 9 /* DEPRECATED, do not use (has no effect) */ + +/** @endsection */ + +/** + * @brief Creates a new menu object. + * + * The handler function should be prototyped as: + * + * public (id, menu, item) + * id - Client the menu is being acted upon. + * menu - Menu resource identifier. + * item - Item the client selected. If less than 0, the menu was + * cancelled and the item is a status code. menu_display + * should never be called immediately if the item is a status + * code, for re-entrancy reasons. + * + * The handler function should always return PLUGIN_HANDLED to block + * any old menu handlers from potentially feeding on the menu, unless + * that is the desired functionality. + * + * @param title Title the menu should use. + * @param handler Name of the handler function. The function will be invoked + * once and only once to every menu_display() call. + * @param ml Unused (should be 0). + * @return Menu resource identifier which must be destroyed via + * menu_destroy(). All menus are destroyed when the plugin + * unloads. + * @error Function name not found. + */ +native menu_create(const title[], const handler[], ml=0); + +/** + * Creates a menu item callback handler. + * + * The handler function should be prototyped as: + * + * public (id, menu, item) + * id - Client index being displayed to. + * menu - Menu resource identifier. + * item - Item being drawn. + * - ITEM_IGNORE to use the default functionality. ITEM_ENABLED to + * explicitly enable or ITEM_DISABLED to explicitly disable. + * + * @param function Function name. + * @return Menu callback ID. + */ +native menu_makecallback(const function[]); + +/** + * Adds an menu to a menu. + * + * @param menu Menu resource identifier. + * @param name Item text to display. + * @param info Item info string for internal information. + * @param paccess Access required by the player viewing the menu. + * @param callback If set to a valid ID from menu_makecallback(), the + * callback will be invoked before drawing the item. + * @noreturn + * @error Invalid menu resource. + */ +native menu_additem(menu, const name[], const info[]="", paccess=0, callback=-1); + +/** + * Returns the number of pages in a menu. + * + * @param menu Menu resource identifier. + * @return Number of pages in the menu. + * @error Invalid menu resource. + */ +native menu_pages(menu); + +/** + * Returns the number of items in a menu. + * + * @param menu Menu resource identifier. + * @return Number of items in the menu. + * @error Invalid menu resource. + */ +native menu_items(menu); + +/** + * Displays a menu to one client. This should never be called from a handler + * when the item is less than 0 (i.e. calling this from a cancelled menu will + * result in an error). + * + * Starting with 1.8.3 this allows to specify a menu timeout similar to the + * show_menu native. If the menu exists on the client past the timeout *any* + * further action will send the MENU_TIMEOUT status code to the menu handler. + * That includes actions which would otherwise send MENU_EXIT, such as the + * client selecting an item or disconnecting and calling menu_cancel or + * menu_destroy on a live menu. + * + * @param id Client index. + * @param menu Menu resource identifier. + * @param page Page to start from (starting from 0). + * @param time If >=0 menu will timeout after this many seconds + * @noreturn + * @error Invalid menu resource or client index. + */ +native menu_display(id, menu, page=0, time=-1); + +/** + * Given a page on a menu and a keypress on that page, returns the item id selected. + * If the item is less than 0, a special option was chosen (such as MENU_EXIT). + * + * @param menu Menu resource identifier. + * @param page Page on the menu. + * @param key Key pressed (from 1 to 10). + * @return Item identifier, or <0 for a special selection code. + * @error Invalid menu resource. + */ +native menu_find_id(menu, page, key); + +/** + * Retrieves info about a menu item. + * + * @param menu Menu resource identifier. + * @param item Item identifier. + * @param access Variable to store access value. + * @param info Buffer to store item info. + * @param infolen Item info buffer length. + * @param name Buffer to store item display text. + * @param namelen Item name buffer length. + * @param callback Callback ID. + * @return 1 on success, 0 on failure. + * @error Invalid menu resource. + */ +native menu_item_getinfo(menu, item, &access = 0, info[] = "", infolen = 0, name[]="", namelen=0, &callback = 0); + +/** + * Sets an item's display text. + * + * @param menu Menu resource identifier. + * @param item Item identifier. + * @param name New item display text. + * @return 1 on success, 0 on failure. + * @error Invalid menu resource. + */ +native menu_item_setname(menu, item, const name[]); + +/** + * Sets an item's info string. + * + * @param menu Menu resource identifier. + * @param item Item identifier. + * @param info New item info string. + * @return 1 on success, 0 on failure. + * @error Invalid menu resource. + */ +native menu_item_setcmd(menu, item, const info[]); + +/** + * Sets an item's callback. + * + * @param menu Menu resource identifier. + * @param item Item identifier. + * @param callback New callback from menu_makecallback(), or -1 to clear. + * @return 1 on success, 0 on failure. + * @error Invalid menu resource. + */ +native menu_item_setcall(menu, item, callback=-1); + +/** + * Destroys a menu. Player menus will be cancelled (although may still linger + * on the HUD), and future attempts to access the menu resource will result in + * an error. + * + * This must be called if you create menus dynamically, otherwise you will + * leak memory. For normal dynamic menus, you will destroy the menu in the + * handler function (remembering to handle the case of a menu being cancelled, + * it must still be destroyed). + * + * @param menu Menu resource identifier. + * @noreturn + * @error Invalid menu resource. + */ +native menu_destroy(menu); + +/** + * Returns information about a menu (if any) the client is currently viewing. + * + * If newmenu is valid, then the menu will refer to the menuid associated with + * the title. If newmenu is not valid, and the menu is valid, then the player + * is viewing a menu displayed with show_menu(). + * + * Both may be invalid if the player is not viewing a menu. + * + * @param id Client index. + * @param menu Variable to store old menu id. If none, then <1 will be + * stored. + * @param newmenu Variable to store new menu id. If none, then -1 will be + * stored. + * @param menupage Variable to store current page of the new menu, if any. + * @return 1 if the player is viewing a menu, 0 otherwise. + * @error Invalid client. + */ +native player_menu_info(id, &menu, &newmenu, &menupage=0); + +/** + * Adds a blank line to a menu. + * + * When using slot=1 this might break your menu. To achieve this functionality + * menu_addblank2 should be used. + * + * @param menu Menu resource identifier. + * @param slot 1 (default) if the line should shift the numbering down. + * 0 if the line should be a visual shift only. + * @noreturn + * @error Invalid menu resource. + */ +native menu_addblank(menu, slot=1); + +/** + * Adds a text line to a menu. Only available in amxmodx 1.8.1 and above. + * + * When using slot=1 this might break your menu. To achieve this functionality + * menu_addtext2 should be used. + * + * @param menu Menu resource identifier. + * @param text Text to add. + * @param slot 1 (default) if the line should shift the numbering down. + * 0 if the line should be a visual shift only. + * @noreturn + * @error Invalid menu resource. + */ +native menu_addtext(menu, const text[], slot=1); + +/** + * Adds a blank line to a menu, always shifting the numbering down. + * + * This will add a special item to create a blank line. It will affect the menu + * item count and pagination. These items can be modified later but will ignore + * access and item callback results. + * + * Only available in 1.8.3 and above. + * + * @param menu Menu resource identifier. + * + * @return 1 on success, 0 on failure. + * @error Invalid menu resource. + * Too many items on non-paginated menu (max is 10) + */ +native menu_addblank2( menu ); + +/** + * Adds a text line to a menu, always shifting the numbering down. + * + * This will add a special item to create a blank line. It will affect the menu + * item count and pagination. These items can be modified later but will ignore + * access and item callback results. + * + * Only available in 1.8.3 and above. + * + * @param menu Menu resource identifier. + * @param text Text to add. + * + * @return 1 on success, 0 on failure. + * @error Invalid menu resource. + * Too many items on non-paginated menu (max is 10) + */ +native menu_addtext2( menu, const text[] ); + +/** + * Sets a menu property. + * + * @param menu Menu resource identifier. + * @param prop MPROP_ constant. + * @param ... Property parameters. + * @return 1 on success, 0 on failure. + * @error Invalid menu resource or property. + */ +native menu_setprop(menu, prop, ...); + +/** + * Cancels a player's menu, effectively forcing the player to select MENU_EXIT. + * The menu will still exist on their screen but any results are invalidated, + * and the callback is invoked. + * + * @param player Client index. + * @noreturn + * @error Invalid client index. + */ +native menu_cancel(player); diff --git a/bin/amxxdump/includes/amxmodx/ns.inc b/bin/amxxdump/includes/amxmodx/ns.inc new file mode 100644 index 0000000..75f1b5b --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/ns.inc @@ -0,0 +1,754 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Natural Selection Module Functions +// + +#if defined NS_INC + #endinput +#endif +#define NS_INC + +#pragma reqlib ns +#if !defined AMXMODX_NOAUTOLOAD + #pragma loadlib ns +#endif + +#include + + +/** + * Called whenever the client's class is changed. + * + * @param id The index of the player who changed. + * @param newclass The class the client changed to. Check the class enum in ns_const.inc. + * @param oldclass The class the client changed from. Check the class enum in ns_const.inc. + * @noreturn + */ +forward client_changeclass(id, newclass, oldclass); + +/** + * Called whenever the client builds a structure. + * + * @param idPlayer The player index who triggered the building. + * @param idStructure The structure index that was created. + * @param type The type of structure that was built (1 for marine, 2 for alien). + * @param impulse The impulse command that was issued to build this structure. + * @noreturn + */ +forward client_built(idPlayer, idStructure, type, impulse); + +/** + * Tell whether or not the map is combat. + * + * @return 1 if combat, 0 otherwise. + */ +native ns_is_combat(); + +/** + * Returns the gameplay type for the currently active map. + * Refer to ns_const.inc's NSGameplay enum for details. + * + * @note The earliest this is guaranteed to be accurate is during plugin_init(). It needs + * the info_gameplay entity to be properly set within the map, or it will return "Unknown", + * or "Cantfind". + * + * @return Return the gameplay mode, as accurate as the module can tell. + */ +native NSGameplay:ns_get_gameplay(); + +/** + * Exact syntax as get_user_team, but should be more accurate. + * + * @param id Player id. + * @param buff Buffer to store team name in. + * @param len Buffer length. + * @return The pev_team setting for the player. + */ +native ns_get_user_team(id, buff[], len); + +/** + * Send an NS-style popup message. + * + * @param target The client to receive the message. Set to 0 to send to everybody. + * @param szMsg The message to send, 180 characters max. + * @param ah Whether to only display the message on clients who have the cvar "cl_autohelp" set to 1. + * @noreturn + */ +native ns_popup(target, const szMsg[180], ah=0); + +/** + * Sets a player model. Omit the second parameter to return to default + * + * @note The model does not revert on death, teamswitch, gestation, etc. + * + * @param id The player id to change. + * @param szModel The model to change to. + * @noreturn + */ +native ns_set_player_model(id, const szModel[]=""); + +/** + * Sets a player skin. Omit the second parameter to return to default + * + * @note The skin does not revert on death, teamswitch, gestation, etc. + * + * @param id The player id to change. + * @param skin The skin number to change to. + * @noreturn + */ +native ns_set_player_skin(id, skin=-1); + +/** + * Sets a player body. Omit the second parameter to return to default + * + * @note The body does not revert on death, teamswitch, gestation, etc. + * + * @param id The player id to change. + * @param body The body number to change to. + * @noreturn + */ +native ns_set_player_body(id, body=-1); + +/** + * Set this to modify the player's speed by a certain amount. + * + * @note The speed does not revert on death, teamswitch, gestation, etc. + * + * @param id The player id to change. + * @param speedchange The speed to modify the player speed by. Set to 0 to revert to default speed. + * @noreturn + */ +native ns_set_speedchange(id, speedchange=0); + +/** + * Returns a client's current speed modifier. + * + * @param id The client id to check. + * @return The module's current speed modifier for the client. + */ +native ns_get_speedchange(id); + +/** + * Returns a client's maxspeed before the speed change modifier is factored in. + * + * @param id The client id to check. + * @return The maxspeed for the client. + */ +native ns_get_maxspeed(id); + +/* Returns whether or not this mask is set from the entity's iuser4 field. Use the "mask" enum for reference. */ +native ns_get_mask(id,mask); + +/* Sets or removes the mask from the entity's iuser4 field. Set "value" to 1 to turn the mask on, 0 to turn it off. */ +native ns_set_mask(id,mask,value); + +/* Returns built/unbuilt structures. + If: + builtOnly is 1 (default): + Only fully built structures are counted. + builtOnly is 0: + Any structure meeting the classname is counted. + + Number is 0 (default): + The total number of matching structures is returned. + Number is any other value: + The index of the #th matching structure is returned. +*/ +native ns_get_build(const classname[],builtOnly=1,Number=0); + +/* Returns if the player has the weapon or not in their pev->weapons field. + set "setweapon" to 0 to turn the bit off, set to 1 to turn it on. Or omit it to just return the value. */ +native ns_has_weapon(id,weapon,setweapon=-1); + +/* Gets spawn point for specified team (type). + If: + Team is equal to 0: + Ready room spawns are returned. + Team is greater than 0: + Spawns for the team are returned. + + Number is equal to 0: + Total number of spawns is returned. + Number is greater than 0: + The location of the specified spawn is returned. +*/ +native ns_get_spawn(team,number=0,Float:ret[3]); + +/* Returns the class of the player. Look in the classes enum in ns_const.inc for the value's meaning. */ +native ns_get_class(id); + +/** + * Gets the player's jetpack fuel reserve. + * + * @param id The player to get fuel from. + * @return The amount of fuel in the player's reserve. (0.0 through 100.0) + */ +native Float:ns_get_jpfuel(id); + +/** + * Sets the player's jetpack fuel reserve. + * + * @param id The player to set fuel. + * @param fuel The amount of fuel to set, as a percentage (0.0 through 100.0) + * @noreturn + */ +native ns_set_jpfuel(id, Float:fuel); + +/** + * Adds to the player's jetpack fuel reserve. + * + * @param id The player to add fuel to. + * @param amount The amount of fuel to add, as a percentage (0.0 through 100.0) + * @return The new amount of fuel in the player's reserve. (0.0 through 100.0) + */ +native Float:ns_add_jpfuel(id, Float:amount); + +/** + * Gets the player's energy percentage. + * + * @param id The player to get the energy from. + * @return The amount of energy the player has (0.0 through 100.0) + */ +native Float:ns_get_energy(id); + +/** + * Sets the player's energy percentage. + * + * @param id The player to set the energy on. + * @param energy The amount of energy to set (0.0 through 100.0) + * @noreturn + */ +native ns_set_energy(id, Float:energy); + +/** + * Adds to the player's energy percentage. + * + * @param id The player to add the energy to. + * @param amount The amount of energy to add to the player. + * @return The new amount of energy the player has (0.0 through 100.0) + */ +native Float:ns_add_energy(id, Float:amount); + + +/** + * Returns a player's resources. + * + * @note This is only for alien players. + * @param id The id of the player to check. + * @return Amount of resources this player has. + */ +native Float:ns_get_res(id); + +/** + * Sets a player's resources. + * + * @note This is only for alien players. + * @param id The id of the player to set. + * @param res Amount of resources to set on this player. + * @noreturn + */ +native ns_set_res(id, Float:res); + +/** + * Adds an amount of resources to the player. + * + * @note This is only for alien players. + * @param id The id of the player to add resources to. + * @param amount The amount to add to the player. + * @return The new amount of resources the player has. + */ +native Float:ns_add_res(id, Float:amount); + +/** + * Returns the team's resources. + * + * @param Team 1 for teama, 2 for teamb. (eg: in MvA maps, 1 is marines, + 2 is aliens. In mvm, 1 is marine1, 2 is marine2) + * @return The amount of resources in this team's resource pool. + */ +native Float:ns_get_teamres(Team); + +/** + * Sets the team's resources in the resource pool. + * + * @note If this is used on an alien team, the resources will be + * distributed between all of the players who need resources. + * @param Team 1 for teama, 2 for teamb. (eg: in MvA maps, 1 is marines, + * 2 is aliens. In mvm, 1 is marine1, 2 is marine2) + * @param value The amount to set the resources to set to. + * @noreturn + */ +native ns_set_teamres(Team, Float:value); + +/** + * Adds to the team's resources in the resource pool. + * + * @note If this is used on an alien team, the resources will be + * distributed between all of the players who need resources. + * @param Team 1 for teama, 2 for teamb. (eg: in MvA maps, 1 is marines, + * 2 is aliens. In mvm, 1 is marine1, 2 is marine2) + * @param value The amount to set the resources to add to the pool + * @return The new amount of resources in the resource pool. + */ +native Float:ns_add_teamres(Team,Float:value); + + +/** + * Returns the player's experience. + * + * @note Combat only. + * @param id The player to get experience value from. + * @return The amount of experience this player has. + */ +native Float:ns_get_exp(id); + +/** + * Sets the player's experience. + * + * @note Combat only. + * @param id The player to set experience value on. + * @param exp The amount of experience this player will have. + * @noreturn + */ +native ns_set_exp(id,Float:exp); + +/** + * Adds to the player's experience. + * + * @note Combat only. + * @param id The player to add experience value to. + * @param value The amount of experience this player will receive. + * @return The new amount of experience this player has. + */ +native Float:ns_add_exp(id, Float:value); + +/** + * Gets the player's points spent count in combat. + * + * @param id The player to check. + * @return The amount of points this player has spent. + */ +native ns_get_points(id); + +/** + * Sets the player's points spent count in combat. + * + * @param id The player to set this on. + * @param points The amount to set this to. + * @noreturn + */ +native ns_set_points(id, points); + +/** + * Adds to the player's points spent count in combat. + * + * @param id The player to add this to. + * @param value The value to add to the points spent. + * @return The new value of the points spent variable. + */ +native ns_add_points(id,points); + +/** + * Gets the damage for this weapon. + * + * @note Use weapon index, not player index! + * @param idWeapon The entity index of the weapon to check. + * @return The damage this weapon does. + */ +native Float:ns_get_weap_dmg(idWeapon); + +/** + * Sets the damage for this weapon. + * + * @note Use weapon index, not player index! + * @param idWeapon The entity index of the weapon to set. + * @param damage The damage to make this weapon cause. + * @noreturn + */ +native ns_set_weap_dmg(idWeapon, Float:damage); + +/** + * Gets the maximum range for this weapon. + * + * @note Use weapon index, not player index! + * @param idWeapon The entity index of the weapon to check. + * @return The maximum range this weapon has. + */ +native Float:ns_get_weap_range(idWeapon); + +/** + * Sets the maximum range for this weapon. + * + * @note Use weapon index, not player index! + * @param idWeapon The entity index of the weapon to set. + * @param range The maximum range this weapon will have. + * @noreturn + */ +native ns_set_weap_range(idWeapon, Float:range); + +/** + * Gets the weapon's clip ammo. + * + * @note Use weapon index, not player index! + * @param idWeapon The weapon to get the clip ammo from. + * @return The amount of ammunition in the weapon's clip. + */ +native ns_get_weap_clip(idWeapon); + +/** + * Sets the weapon's ammo in the clip. + * + * @note Use weapon index, not player index! + * @param idWeapon The weapon to set the clip ammo on. + * @param clipsize The amount of ammunition to set in the weapon's clip. + * @noreturn + */ +native ns_set_weap_clip(idWeapon, clipsize); + +/** + * Gets the player's weapon reserve (backpack ammo) for the specified + * type of weapon. + * + * @note Use player index, not weapon index! + * @param id The player id to check ammo count on. + * @param weapon The weapon type to check ammo count for. + * @return The ammunition count in the player's reserve. + */ +native ns_get_weap_reserve(id,weapon); + +/** + * Sets the player's weapon reserve (backpack ammo) for the specified + * type of weapon. + * + * @note Use player index, not weapon index! + * @param id The player id to set ammo count on. + * @param weapon The weapon type to set ammo count for. + * @param ammo The ammunition count to set. + * @noreturn + */ +native ns_set_weap_reserve(id,weapon,ammo); + +/** + * Gets the player's score. + * + * @note The score from level is automatically factored into the scoreboard in combat. + * @param idPlayer The player to get the score for. + * @return The player's score. + */ +native ns_get_score(idPlayer); + +/** + * Sets the player's score. + * + * @note The score from level is automatically factored into the scoreboard in combat. + * @param idPlayer The player to get the score for. + * @param score What to set the player's score as. + * @noreturn + */ +native ns_set_score(idPlayer, score); + +/* Adds to a player's score + * Returns the new score on success + */ +native ns_add_score(idPlayer,score); + +/* Gets a player's death count. */ +native ns_get_deaths(idPlayer); + +/* Sets a player's death count. */ +native ns_set_deaths(idPlayer,numdeaths); + +/* Adds to a player's death count + * Returns the new death count on success + */ +native ns_add_deaths(idPlayer,numdeaths); + +/* Gets the index of the owner of a structure. -1 for no owner. */ +native ns_get_struct_owner(idStructsure); + +/* Sets the index of the owner of a structure. -1 for no owner. */ +native ns_set_struct_owner(idStructure,indexOwner); + +/* Gets the trait type tied to the hive. Look at the hivetrait enum for the values. */ +native ns_get_hive_trait(idHive); + +/* Sets the trait type tied to the hive. Look at the hivetrait enum for the values. */ +native ns_set_hive_trait(idHive,trait); + +/* Sets the players field of view, set "_fov" to 0.0 (or omit it) to return to normal. FOV change will persist until disconnect unless reset by a plugin */ +native ns_set_fov(idPlayer,Float:_fov=0.0); + +/** + * Give the player an item. + * + * @param id The player to give the item to. + * @param class The map-classname of the entity to give to the player. + * @noreturn + */ +native ns_give_item(id, const class[]); + +/** + * Returns 1 if a player has the hive ability number. + * If ability is 0, it will return the number of active hives. + * + * @param idPlayer The player index to look up. + * @param ability The ability number to check, set to 0 to get number of active hives. + * @return If ability is != 0, returns 1 or 0 depending on if the client has the ability. + * If ability is 0, returns the number of active hives. + */ +native ns_get_hive_ability(idPlayer, ability=0); + +/** + * Triggered whenever a client's pev->team changes. + * + * @param id The id of the client. + * @param newteam The team number of the new team. + * @param oldteam The team number of the old team. + * @noreturn + */ +forward client_changeteam(id, newteam, oldteam); + +/** + * Triggered whenever a client's pev->deadflag changes from >0 to 0. + * + * @param id The id of the client. + * @noreturn + */ +forward client_spawn(id); + +/** + * Calls NS's private damage routine on the victim entity. + * + * @deprecated + * @note This is provided for backwards compatibility with peachy's module. + * It is suggested to use hamsandwich for this action instead. + * + * @param IDVictim The victim that is taking the damage. + * @param IDInflictor The entity that is causing the damage (weapon, etc). + * @param IDAttacker The attacker who is triggering the damage (person shooting). + * @param Damage The amount of damage being done. + * @param DamageType The damage type being done (bitmask). + */ +#pragma deprecated It is suggested to use hamsandwich for this action instead. +native ns_takedamage(IDVictim, IDInflictor, IDAttacker, Float:Damage, DamageType); + +/** + * Attempts to unstick a player. + * + * @param id Player to unstick. + * @param StartDistance Distance to start from the player to check for a new location. + * @param MaxAttempts How many attempts to try to find a new spot before giving up. + * @return 1 on success, 0 on cannot find a place to move player to, + * -1 on invalid state (stunned/webbed), -2 on invalid class (comm/egg) + * -3 if the player is dead or a spectator, -4 on invalid player, + * -5 if the player is not connected. + */ +native ns_unstick_player(id, StartDistance=32, MaxAttempts=128); + +/** + * Whether or not there is a game in progress. + * + * @return true if a game is in progress, false otherwise. + */ +native bool:ns_round_in_progress(); + +/** + * Called at the approximate time that a round is started. + * + * @noreturn + */ +forward round_start(); + +/** + * Called immediately when a round ends + * + * @param roundtime The length of the round in seconds. + * @noreturn + */ +forward round_end(Float:roundtime); + +forward map_reset(isload); + +native ns_get_weapon(idPlayer,weaponid,&weapontype=0); + +/* Returns the location name of the provided x/y position + * (z origin is ignored; can't have location over location) + * - + * Note that as of NS 3.2 beta 2, on the following maps + * the returned string should be passed through ns_lookup_title + * to be human readable: + * ns_bast, ns_hera, ns_nothing, ns_tanith, + * ns_nancy, ns_caged, ns_eclipse, ns_veil + * + * Passing the 5th parameter as non zero will auto look up + * the title if it exists. + */ +native ns_get_locationname(Float:x, Float:y, name[], len, titlelookup=0); + +/* Looks up a key from titles.txt + * Returns -1 if the key is not found + * Otherwise it returns the length of the output + */ +native ns_lookup_title(const KeyName[], Output[], length); + +/* Forces the structure to fully build + * Removes the ghost state from marine structures. + * Do not use this on hives! It wont work. + */ +native ns_build_structure(idStructure); + +/* Forces the structure to begin recycling + * Passing an index other than a marine structure will + * have undefined results! + * - + * Note: This calls a private NS function! + * Be careful when using this! + */ +native ns_recycle(idStructure); + +/* Forces the weldable to trigger + * Passing an index other than a weldable + * will have undefined results! + * - + * NS renames func_weldable to avhweldable + * at map load. + * - + * Note: This calls a private NS function! + * Be careful when using this! + */ +native ns_finish_weldable(idWeldable); + +/* Gets the total time needed to weld this + * func_weldable shut. + * Note: NS renames "func_weldable"s to "avhweldable"s + * at run time! + */ +native Float:ns_get_weld_time(idWeldable); + +/* Sets the total time needed to weld this + * func_weldable shut. + */ +native ns_set_weld_time(idWeldable,Float:value); + +/* Adds to the weldable's time required to open. + * Returns the new required time on success. + * Note this native clamps the low value to 0. + */ +native Float:ns_add_weld_time(idWeldable,Float:value); + +/* Gets the total time this func_weldable + * has been welded. + */ +native Float:ns_get_weld_done(idWeldable); + +/* Sets the total time this func_weldable + * has been welded. + */ +native ns_set_weld_done(idWeldable,Float:value); + +/* Adds to the total time this func_weldable + * has been welded. Returns the new value. + * Note this native clamps the low value to 0.0 + */ +native Float:ns_add_weld_done(idWeldable,Float:value); + +/* Gets/sets/adds to the energy pool of this observatory. */ +native Float:ns_get_obs_energy(idObs); +native ns_set_obs_energy(idObs,Float:value); +native Float:ns_add_obs_energy(idObs,Float:value); + +/** + * Removes an upgrade from the player's bought and active upgrade lists. + * This will not refund the points spent on the upgrade, nor will it + * immediately strip the upgrade if the player is alive. Rather, it will + * make it so the player no longer receives the upgrade on spawn. + * + * @note This only works in combat. + * @params idPlayer The player index to change upgrades for. + * @params ugprade The impulse number for the upgrade to strip. + * @return 2 for upgrade removed from player's bought and active list. + * 1 for upgrade removed from player's bought list only. + * 3 for upgrade removed from player's active list only (shouldn't happen, just incase.) + * 0 for the player didn't have the upgrade in either list. + */ +native ns_remove_upgrade(idPlayer, upgrade); + +/** + * Particle system natives + * - + * The particle system emulates a map-based custom particle system. + * Familiarity with the keyvalues from the map-based particle systems + * is recommended! You will be lost otherwise! + * - + * prsearle's NSPEdit is also recommended for designing the systems: + * http://homepage.ntlworld.com/pr.searle/NSPSEdit/NSPSEdit.html + */ + +/* Creates a handle to the a particle system to configure + * - + * Note! this is not a particle system you can pass to + * ns_fire_ps()! + */ +native RawPS:ns_create_ps(); + +/* Sets the name of the particle system. + * - + * This is used for things like ns_get_ps_id() + * and through calling another particle system + * through the "ps_to_gen" field + */ +native ns_set_ps_name(RawPS:system, const name[]); + +/* Sets the sprite to use for the particle system + * - + * You do NOT have to precache the sprite, BUT + * the sprite must obviously be on the client to + * display. + */ +native ns_set_ps_sprite(RawPS:system, const sprite[]); + +/* Finalizes the particle system. Do not configure it after this. + * A usable particle system handle is returned. + */ +native Particle:ns_spawn_ps(RawPS:system); + +/* Draws a particle system at the given origin (and angles) + * Flags are the FEV_* defines from hlsdk_const.inc + * Only use handles returned by ns_spawn_ps or ns_get_ps_id here! + */ +native ns_fire_ps(Particle:system,const Float:origin[3],const Float:angles[3]={0.0,0.0,0.0}, flags=0); + +/* Looks up a particle system by name + * Returns a usable particle system handle. + */ +native Particle:ns_get_ps_id(const Name[]); + +/* The following are the parameters for configuring the + * particle system. Look through the fgd and NSPSEdit + * for details! + */ +native ns_set_ps_genrate(RawPS:system, genrate); +native ns_set_ps_genshape(RawPS:system, NSPS_GenShape:genshape); +native ns_set_ps_genshape_params(RawPS:system, const params[]); +native ns_set_ps_spriteframes(RawPS:system, spriteframes); +native ns_set_ps_numparticles(RawPS:system, numparticles); +native ns_set_ps_size(RawPS:system, Float:size); +native ns_set_ps_vel_params(RawPS:system, const params[]); +native ns_set_ps_vel_shape(RawPS:system, NSPS_VelShape:shape); +native ns_set_ps_sys_life(RawPS:system, Float:lifetime); +native ns_set_ps_particle_life(RawPS:system, Float:lifetime); +native ns_set_ps_rendermode(RawPS:system, NSPS_RenderMode:rendermode); +native ns_set_ps_to_gen(RawPS:system, const name[]); +native ns_set_ps_anim_speed(RawPS:system, speed); +native ns_set_ps_spawn_flags(RawPS:system, NSPS_Flags:flags); +native ns_set_ps_base_color(RawPS:system, const colors[]); +native ns_set_ps_scale(RawPS:system, Float:scale); +native ns_set_ps_max_alpha(RawPS:system, Float:maxalpha); diff --git a/bin/amxxdump/includes/amxmodx/ns.inc.temp b/bin/amxxdump/includes/amxmodx/ns.inc.temp new file mode 100644 index 0000000..8ce14b8 --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/ns.inc.temp @@ -0,0 +1,114 @@ +#if defined NS_INC +#endinput +#endif +#define NS_INC +#pragma reqlib ns +#if !defined AMXMODX_NOAUTOLOAD +#pragma loadlib ns +#endif +#include +forward client_changeclass(id, newclass, oldclass); +forward client_built(idPlayer, idStructure, type, impulse); +native ns_is_combat(); +native NSGameplay:ns_get_gameplay(); +native ns_get_user_team(id, buff[], len); +native ns_popup(target, const szMsg[180], ah=0); +native ns_set_player_model(id, const szModel[]=""); +native ns_set_player_skin(id, skin=-1); +native ns_set_player_body(id, body=-1); +native ns_set_speedchange(id, speedchange=0); +native ns_get_speedchange(id); +native ns_get_maxspeed(id); +native ns_get_mask(id,mask); +native ns_set_mask(id,mask,value); +native ns_get_build(const classname[],builtOnly=1,Number=0); +native ns_has_weapon(id,weapon,setweapon=-1); +native ns_get_spawn(team,number=0,Float:ret[3]); +native ns_get_class(id); +native Float:ns_get_jpfuel(id); +native ns_set_jpfuel(id, Float:fuel); +native Float:ns_add_jpfuel(id, Float:amount); +native Float:ns_get_energy(id); +native ns_set_energy(id, Float:energy); +native Float:ns_add_energy(id, Float:amount); +native Float:ns_get_res(id); +native ns_set_res(id, Float:res); +native Float:ns_add_res(id, Float:amount); +native Float:ns_get_teamres(Team); +native ns_set_teamres(Team, Float:value); +native Float:ns_add_teamres(Team,Float:value); +native Float:ns_get_exp(id); +native ns_set_exp(id,Float:exp); +native Float:ns_add_exp(id, Float:value); +native ns_get_points(id); +native ns_set_points(id, points); +native ns_add_points(id,points); +native Float:ns_get_weap_dmg(idWeapon); +native ns_set_weap_dmg(idWeapon, Float:damage); +native Float:ns_get_weap_range(idWeapon); +native ns_set_weap_range(idWeapon, Float:range); +native ns_get_weap_clip(idWeapon); +native ns_set_weap_clip(idWeapon, clipsize); +native ns_get_weap_reserve(id,weapon); +native ns_set_weap_reserve(id,weapon,ammo); +native ns_get_score(idPlayer); +native ns_set_score(idPlayer, score); +native ns_add_score(idPlayer,score); +native ns_get_deaths(idPlayer); +native ns_set_deaths(idPlayer,numdeaths); +native ns_add_deaths(idPlayer,numdeaths); +native ns_get_struct_owner(idStructsure); +native ns_set_struct_owner(idStructure,indexOwner); +native ns_get_hive_trait(idHive); +native ns_set_hive_trait(idHive,trait); +native ns_set_fov(idPlayer,Float:_fov=0.0); +native ns_give_item(id, const class[]); +native ns_get_hive_ability(idPlayer, ability=0); +forward client_changeteam(id, newteam, oldteam); +forward client_spawn(id); +#pragma deprecated It is suggested to use hamsandwich for this action instead. +native ns_takedamage(IDVictim, IDInflictor, IDAttacker, Float:Damage, DamageType); +native ns_unstick_player(id, StartDistance=32, MaxAttempts=128); +native bool:ns_round_in_progress(); +forward round_start(); +forward round_end(Float:roundtime); +forward map_reset(isload); +native ns_get_weapon(idPlayer,weaponid,&weapontype=0); +native ns_get_locationname(Float:x, Float:y, name[], len, titlelookup=0); +native ns_lookup_title(const KeyName[], Output[], length); +native ns_build_structure(idStructure); +native ns_recycle(idStructure); +native ns_finish_weldable(idWeldable); +native Float:ns_get_weld_time(idWeldable); +native ns_set_weld_time(idWeldable,Float:value); +native Float:ns_add_weld_time(idWeldable,Float:value); +native Float:ns_get_weld_done(idWeldable); +native ns_set_weld_done(idWeldable,Float:value); +native Float:ns_add_weld_done(idWeldable,Float:value); +native Float:ns_get_obs_energy(idObs); +native ns_set_obs_energy(idObs,Float:value); +native Float:ns_add_obs_energy(idObs,Float:value); +native ns_remove_upgrade(idPlayer, upgrade); +native RawPS:ns_create_ps(); +native ns_set_ps_name(RawPS:system, const name[]); +native ns_set_ps_sprite(RawPS:system, const sprite[]); +native Particle:ns_spawn_ps(RawPS:system); +native ns_fire_ps(Particle:system,const Float:origin[3],const Float:angles[3]={0.0,0.0,0.0}, flags=0); +native Particle:ns_get_ps_id(const Name[]); +native ns_set_ps_genrate(RawPS:system, genrate); +native ns_set_ps_genshape(RawPS:system, NSPS_GenShape:genshape); +native ns_set_ps_genshape_params(RawPS:system, const params[]); +native ns_set_ps_spriteframes(RawPS:system, spriteframes); +native ns_set_ps_numparticles(RawPS:system, numparticles); +native ns_set_ps_size(RawPS:system, Float:size); +native ns_set_ps_vel_params(RawPS:system, const params[]); +native ns_set_ps_vel_shape(RawPS:system, NSPS_VelShape:shape); +native ns_set_ps_sys_life(RawPS:system, Float:lifetime); +native ns_set_ps_particle_life(RawPS:system, Float:lifetime); +native ns_set_ps_rendermode(RawPS:system, NSPS_RenderMode:rendermode); +native ns_set_ps_to_gen(RawPS:system, const name[]); +native ns_set_ps_anim_speed(RawPS:system, speed); +native ns_set_ps_spawn_flags(RawPS:system, NSPS_Flags:flags); +native ns_set_ps_base_color(RawPS:system, const colors[]); +native ns_set_ps_scale(RawPS:system, Float:scale); +native ns_set_ps_max_alpha(RawPS:system, Float:maxalpha); diff --git a/bin/amxxdump/includes/amxmodx/ns_const.inc b/bin/amxxdump/includes/amxmodx/ns_const.inc new file mode 100644 index 0000000..b1eb945 --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/ns_const.inc @@ -0,0 +1,196 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Natural Selection Module Constants +// + +#if defined NS_CONST_INC + #endinput +#endif +#define NS_CONST_INC + + +enum NSGameplay +{ + NSGame_CantTell, /**< It is too soon to tell (can't find avhgameplay + entity or it doesn't have private data) */ + + NSGame_MarineVAlien, /**< Marine vs Aliens (standard) gameplay */ + NSGame_MarineVMarine, /**< Marine vs Marine */ + NSGame_AlienVAlien, /**< Alien vs Alien */ + + NSGame_Unknown, /**< Can find the gameplay entity, but can't + determine gameplay type. */ +}; + +// entity pev->iuser4 fields +enum { + MASK_NONE = 0, + MASK_SIGHTED = 1, + MASK_DETECTED = 2, + MASK_BUILDABLE = 4, + MASK_BASEBUILD0 = 8, // Base build slot #0 + MASK_WEAPONS1 = 8, // Marine weapons 1 + MASK_CARAPACE = 8, // Alien carapace + MASK_WEAPONS2 = 16, // Marines weapons 2 + MASK_REGENERATION = 16, // Alien regeneration + MASK_BASEBUILD1 = 16, // Base build slot #1 + MASK_WEAPONS3 = 32, // Marine weapons 3 + MASK_REDEMPTION = 32, // Alien redemption + MASK_BASEBUILD2 = 32, // Base build slot #2 + MASK_ARMOR1 = 64, // Marine armor 1 + MASK_CELERITY = 64, // Alien celerity + MASK_BASEBUILD3 = 64, // Base build slot #3 + MASK_ARMOR2 = 128, // Marine armor 2 + MASK_ADRENALINE = 128, // Alien adrenaline + MASK_BASEBUILD4 = 128, // Base build slot #4 + MASK_ARMOR3 = 256, // Marine armor 3 + MASK_SILENCE = 256, // Alien silence + MASK_BASEBUILD5 = 256, // Base build slot #5 + MASK_JETPACK = 512, // Marine jetpacks + MASK_CLOAKING = 512, // Alien cloaking + MASK_BASEBUILD6 = 512, // Base build slot #6 + MASK_FOCUS = 1024, // Alien focus + MASK_MOTION = 1024, // Marine motion tracking + MASK_BASEBUILD7 = 1024, // Base build slot #7 + MASK_SCENTOFFEAR = 2048, // Alien scent of fear + MASK_DEFENSE2 = 4096, // Defense level 2 + MASK_DEFENSE3 = 8192, // Defense level 3 + MASK_ELECTRICITY = 8192, // Electricy + MASK_MOVEMENT2 = 16384, // Movement level 2, + MASK_MOVEMENT3 = 32768, // Movement level 3 + MASK_HEAVYARMOR = 32768, // Marine heavy armor + MASK_SENSORY2 = 65536, // Sensory level 2 + MASK_SENSORY3 = 131072, // Sensory level 3 + MASK_ALIEN_MOVEMENT = 262144, // Onos is charging + MASK_WALLSTICKING = 524288, // Flag for wall-sticking + MASK_PRIMALSCREAM = 1048576, // Alien is in range of active primal scream + MASK_UMBRA = 2097152, // In umbra + MASK_DIGESTING = 4194304, // When set on a visible player, player is digesting. When set on invisible player, player is being digested + MASK_RECYCLING = 8388608, // Building is recycling + MASK_TOPDOWN = 16777216, // Commander view + MASK_PLAYER_STUNNED = 33554432, // Player has been stunned by stomp + MASK_ENSNARED = 67108864, // Webbed + MASK_ALIEN_EMBRYO = 134217728, // Gestating + MASK_SELECTABLE = 268435456, // ??? + MASK_PARASITED = 536870912, // Parasite flag + MASK_SENSORY_NEARBY = 1073741824 // Sensory chamber in range +}; + + +enum { + CLASS_UNKNOWN = 0, + CLASS_SKULK, + CLASS_GORGE, + CLASS_LERK, + CLASS_FADE, + CLASS_ONOS, + CLASS_MARINE, + CLASS_JETPACK, + CLASS_HEAVY, + CLASS_COMMANDER, + CLASS_GESTATE, + CLASS_DEAD, + CLASS_NOTEAM +}; + +enum { + WEAPON_NONE = 0, + WEAPON_CLAWS, + WEAPON_SPIT, + WEAPON_SPORES, + WEAPON_SPIKE, + WEAPON_BITE, + WEAPON_BITE2, + WEAPON_SWIPE, + WEAPON_WEBSPINNER, + WEAPON_METABOLIZE, + WEAPON_PARASITE, + WEAPON_BLINK, + WEAPON_DIVINEWIND, + WEAPON_KNIFE, + WEAPON_PISTOL, + WEAPON_LMG, + WEAPON_SHOTGUN, + WEAPON_HMG, + WEAPON_WELDER, + WEAPON_MINE, + WEAPON_GRENADE_GUN, + WEAPON_LEAP, + WEAPON_CHARGE, + WEAPON_UMBRA, + WEAPON_PRIMALSCREAM, + WEAPON_BILEBOMB, + WEAPON_ACIDROCKET, + WEAPON_HEALINGSPRAY, + WEAPON_GRENADE, + WEAPON_STOMP, + WEAPON_DEVOUR, + WEAPON_MAX +}; + +enum { + HIVETRAIT_NONE = 0, + HIVETRAIT_DC = 92, + HIVETRAIT_SC = 93, + HIVETRAIT_MC = 94 +}; + +enum NSPS_VelShape +{ + NSPS_VS_POINT = 1, + NSPS_VS_BOX, + NSPS_VS_SPHERE, + NSPS_VS_BLOB +}; + +/* Genshape used in ns_set_ps_genshape + * NOTE: The following are in the ns.ps file but + * are not listed in the .fgd file. Use + * at your own risk! + * Line, Triangle, Plane, Cylinder, + * Cone, Disc, Rectangle and None + */ +enum NSPS_GenShape +{ + NSPS_GS_POINT = 0, + NSPS_GS_LINE, + NSPS_GS_TRIANGLE, + NSPS_GS_PLANE, + NSPS_GS_BOX, + NSPS_GS_CYLINDER, + NSPS_GS_CONE, + NSPS_GS_BLOB, + NSPS_GS_DISC, + NSPS_GS_RECTANGLE, + NSPS_GS_NONE +}; +enum NSPS_RenderMode +{ + NSPS_R_NORMAL = 0, + NSPS_R_TRANSCOLOR, + NSPS_R_TRANSTEXTURE, + NSPS_R_GLOW, + NSPS_R_TRANSALPHA, + NSPS_R_ADDITIVE +}; +enum NSPS_Flags +{ + NSPS_FL_START_ON = 1, + NSPS_FL_PARTICLE_DENSITY = 2, + NSPS_FL_FADE_IN = 4, + NSPS_FL_FADE_OUT = 8, + NSPS_FL_USE_GRAVITY = 16, + NSPS_FL_USE_TRI = 32, + NSPS_FL_CONSTRAIN_PITCH = 128, + NSPS_FL_COLLIDE = 256, + NSPS_FL_HI_DETAIL = 512, + NSPS_FL_FACE_UP = 1024 +}; diff --git a/bin/amxxdump/includes/amxmodx/nvault.inc b/bin/amxxdump/includes/amxmodx/nvault.inc new file mode 100644 index 0000000..4c025c1 --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/nvault.inc @@ -0,0 +1,154 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// NVault Functions +// + +#if defined _nvault_included + #endinput +#endif +#define _nvault_included + +#pragma reqlib nvault +#if !defined AMXMODX_NOAUTOLOAD + #pragma loadlib nvault +#endif + +/** + * @global All timestamps are in UNIX epoch form. + */ + +/** + * Opens a vault by name. Creates a vault if it doesn't exist yet. + * + * @param name Name of the vault. The vault will be created in + * ${amxx_datadir}/vault directory. + * + * @return The vault handle to be used in other natives. + * INVALID_HANDLE (-1) if not successfully opened. + */ +native nvault_open(const name[]); + +/** + * Retrieves a value from the given key. + * + * @note An example of retrieving a string: + * nvault_get(vaultHandle, "myKey", myString, charsmax(myString)); + * + * @param vault A vault handle returned from nvault_open() + * @param key A key to get the value from + * @param ... If three argument are given, gets a float value and + * puts it in the third argument by reference. + * If four arguments are given, gets a string from the + * vault and copies it to the third argument, up to + * 4th argument characters. + * + * @return Result as integer if only the first two arguments + * of the function are used. + * 1 if only the first three arguments are used. + * String length if all four parameters are used. + * @error On invalid vault handle. + */ +native nvault_get(vault, const key[], any:...); + +/** + * Retrieves full information about a vault entry. + * + * @param vault A vault handle returned from nvault_open() + * @param key A key to get information from + * @param value A string where the value should be stored + * @param maxlen Maximum length of the @value string + * @param timestamp The timestamp of the entry + * + * @return 1 if an entry was found, 0 otherwise. + * @error On invalid vault handle. + */ +native nvault_lookup(vault, const key[], value[], maxlen, ×tamp); + +/** + * Sets value of a vault entry and updates the timestamp. + * + * @note A new entry is created if one with the given key doesn't exist. + * + * @param vault A vault handle returned from nvault_open() + * @param key A key to set the value for + * @param value A value to set + * + * @noreturn + * @error On invalid vault handle. + */ +native nvault_set(vault, const key[], const value[]); + +/** + * Sets value of a vault entry and makes it permanent (non-erasable with nvault_prune()). + * + * @note A new entry is created if one with the given key doesn't exist. + * @note Permanent entries have no timestamp. + * + * @param vault A vault handle returned from nvault_open() + * @param key A key to set the permanent value for + * @param value A permanent value to set + * + * @noreturn + * @error On invalid vault handle. + */ +native nvault_pset(vault, const key[], const value[]); + +/** + * Prunes the vault for entries that are within the given timestamps. + * + * @note This will not erase values set with nvault_pset(). + * @note An example of pruning all entries that are older than 24 hours: + * nvault_prune(vaultHandle, 0, get_systime() - (60 * 60 * 24)); + * + * @param vault A vault handle returned from nvault_open() + * @param start The timestamp to start erasing from + * @param end The timestamp to erase to + * + * @return Number of erased values. + * @error On invalid vault handle. + */ +native nvault_prune(vault, start, end); + +/** + * Closes a vault. + * + * @param vault A vault handle returned from nvault_open() + * + * @noreturn + * @error On invalid vault handle. + */ +native nvault_close(vault); + +/** + * Removes an entry from the vault by its key. + * + * @param vault A vault handle returned from nvault_open() + * @param key The key to remove from the vault + * + * @noreturn + * @error On invalid vault handle. + */ +native nvault_remove(vault, const key[]); + +/** + * "Touches" an entry in the vault, updating its timestamp. + * + * @note If timestamp is equal to -1, it will use the current time. + * @note An empty entry is created if one with the given key doesn't exist. + * + * @param vault A vault handle returned from nvault_open() + * @param key The key to search for + * @param timestamp Update an entry's timestamp to this one. Default is -1. + * + * @noreturn + * @error On invalid vault handle. + */ +native nvault_touch(vault, const key[], timestamp=-1); diff --git a/bin/amxxdump/includes/amxmodx/nvault.inc.temp b/bin/amxxdump/includes/amxmodx/nvault.inc.temp new file mode 100644 index 0000000..d111a3d --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/nvault.inc.temp @@ -0,0 +1,17 @@ +#if defined _nvault_included +#endinput +#endif +#define _nvault_included +#pragma reqlib nvault +#if !defined AMXMODX_NOAUTOLOAD +#pragma loadlib nvault +#endif +native nvault_open(const name[]); +native nvault_get(vault, const key[], any:...); +native nvault_lookup(vault, const key[], value[], maxlen, ×tamp); +native nvault_set(vault, const key[], const value[]); +native nvault_pset(vault, const key[], const value[]); +native nvault_prune(vault, start, end); +native nvault_close(vault); +native nvault_remove(vault, const key[]); +native nvault_touch(vault, const key[], timestamp=-1); diff --git a/bin/amxxdump/includes/amxmodx/oldmenu.inc b/bin/amxxdump/includes/amxmodx/oldmenu.inc new file mode 100644 index 0000000..e665281 --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/oldmenu.inc @@ -0,0 +1,205 @@ +#if defined _oldmenu_included + #endinput +#endif +#define _oldmenu_included + +#if !defined _fakemeta_included + #include +#endif + +/* VERSION 1.2 2016 */ + +#define MAX_MENU_STRING 512 +#define MAX_ITEM_LEN 200 + + +stock const oldmenuhandler[] = "oldmenu_handler" +stock const oldmenulog[] = "oldmenu_error.log" + +enum _:_OLDMENU_DATA +{ + _MENU[MAX_MENU_STRING+1], + _FUNCID, + _KEYS, + _LEN, + _ITEMS[10], + _MENUID +} + +stock g_oldmenu[_OLDMENU_DATA] +stock g_olmenu_player[33][12] + +stock oldmenu_register() +{ + g_oldmenu[_MENUID] = register_menuid(oldmenuhandler, 0) + register_menucmd(g_oldmenu[_MENUID], 1023, oldmenuhandler) +} + +stock oldmenu_current_menu(id) +{ + new menu, newmenu + player_menu_info(id, menu, newmenu, _) + + if(newmenu != -1 || (menu && menu != g_oldmenu[_MENUID])) + return -1 + if(menu < 1) + return 0 + + return (g_olmenu_player[id][10] + 1) +} + +stock oldmenu_create(const handler[], const title[], any:...) +{ + if(title[0]) + { + if(numargs() == 2) + g_oldmenu[_LEN] = formatex(g_oldmenu[_MENU], MAX_MENU_STRING, "%s^n^n", title) + else { + vformat(g_oldmenu[_MENU], MAX_MENU_STRING, title, 3) + g_oldmenu[_LEN] = add(g_oldmenu[_MENU], MAX_MENU_STRING, "^n^n") + } + } + else g_oldmenu[_LEN] = 0 + + g_oldmenu[_KEYS] = 0 + g_oldmenu[_FUNCID] = get_func_id(handler) + if(g_oldmenu[_FUNCID] == -1) + log_to_file(oldmenulog, "public %s() is invalid", handler) + + return (g_oldmenu[_FUNCID] + 1) +} + +stock oldmenu_additem(itemnum, value, const item[], any:...) +{ + new len = min(MAX_ITEM_LEN, MAX_MENU_STRING-g_oldmenu[_LEN]) + + if(numargs() == 3) + g_oldmenu[_LEN] += formatex(g_oldmenu[_MENU][g_oldmenu[_LEN]], len, "%s^n", item) + else { + vformat(g_oldmenu[_MENU][g_oldmenu[_LEN]], len, item, 4) + g_oldmenu[_LEN] = add(g_oldmenu[_MENU], MAX_MENU_STRING, "^n") + } + + if(itemnum != -1) + { + if(itemnum > 9 || itemnum <= 0) itemnum = 9 + else itemnum-- + + g_oldmenu[_ITEMS][itemnum] = value + g_oldmenu[_KEYS] |= (1<= MAX_MENU_STRING) + log_to_file(oldmenulog, "WARNING: Length of the menu exceeds MAX_MENU_STRING(%d) - menu: [%s]", MAX_MENU_STRING, g_oldmenu[_MENU]) + + if(!id) + { + new players[32], count, k + get_players(players, count, "ch") + + for(new i = 0; i < count; i++) + { + for(k=0; k <= 9; k++) g_olmenu_player[players[i]][k] = g_oldmenu[_ITEMS][k] + g_olmenu_player[players[i]][10] = g_oldmenu[_FUNCID] + g_olmenu_player[players[i]][11] = page + + oldmenu_pdata_fix(id) + } + } + else { + for(new k=0; k <= 9; k++) g_olmenu_player[id][k] = g_oldmenu[_ITEMS][k] + g_olmenu_player[id][10] = g_oldmenu[_FUNCID] + g_olmenu_player[id][11] = page + + oldmenu_pdata_fix(id) + } + + show_menu(id, g_oldmenu[_KEYS], g_oldmenu[_MENU], display_time, oldmenuhandler) +} + +stock oldmenu_pdata_fix(id) +{ + // m_iMenu: 205 -- OFFSET_LINUX: 5 + if(pev_valid(id) == 2) + set_pdata_int(id, 205, 0, 5) +} + +public oldmenu_handler(id, key) +{ + new itemnum = (key+1) + if(itemnum > 9) itemnum = 0 + + callfunc_begin_i(g_olmenu_player[id][10], -1) + callfunc_push_int(id) + callfunc_push_int(itemnum) + callfunc_push_int(g_olmenu_player[id][key]) + callfunc_push_int(g_olmenu_player[id][11]) + callfunc_end + + return PLUGIN_HANDLED +} + +stock oldmenu_maxpages(maxitems, perpage=7) +{ + new p = 1, i = perpage + while(maxitems > i) + { + i += perpage + p++ + } + return p +} + +stock oldmenu_calculate_pages(&maxpages, &start, &end, &page, const maxitems, const perpage=7, const start_offset=0) +{ + maxpages = oldmenu_maxpages(maxitems, perpage) + + if(page < 1) page=1 + else if(page > maxpages) page=maxpages + + start = ((page-1)*perpage)+start_offset + end = min(start+perpage, maxitems) +} + +stock oldmenu_pagination(page, maxpages, separation=true) +{ + if(maxpages != 1) + { + if(page > 1) oldmenu_additem(8, -1, "^n\r8. \wAtras") + else oldmenu_additem(-1, 0, "^n\d8. Atras") + if(page < maxpages) oldmenu_additem(9, 1, "\r9. \wSiguiente") + else oldmenu_additem(-1, 0, "\d9. Siguiente") + } + else if(separation) oldmenu_additem(-1, 0, "^n") + + oldmenu_additem(0, 0, "\r0. \wSalir") +} + +stock oldmenu_pagination_y(page, maxpages, separation=true) +{ + if(maxpages != 1) + { + if(page > 1) oldmenu_additem(8, -1, "^n\r8. \yAtras") + else oldmenu_additem(-1, 0, "^n\d8. Atras") + if(page < maxpages) oldmenu_additem(9, 1, "\r9. \ySiguiente") + else oldmenu_additem(-1, 0, "\d9. Siguiente") + } + else if(separation) oldmenu_additem(-1, 0, "^n") + + oldmenu_additem(0, 0, "\r0. \ySalir") +} diff --git a/bin/amxxdump/includes/amxmodx/orpheu.inc b/bin/amxxdump/includes/amxmodx/orpheu.inc new file mode 100644 index 0000000..760ea63 --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/orpheu.inc @@ -0,0 +1,220 @@ + +#if defined _orpheu_included + #endinput +#endif +#define _orpheu_included + +#include + +/** + * Retrieves a function based on a function name + * The name must be the same as the one in the file where the function is defined + * + * @param libFunctionName The name of the function as it is in the file where the function is defined + * @param className The name of the class if the function belongs to one + * + * @return A handler to the function + */ +native OrpheuFunction:OrpheuGetFunction(const libFunctionName[],const className[]="") + +/** + * Hooks a function + * + * @param function A handler to the function + * @param hookFunctionName The function name in the plugin that shall be called upon interception of the original function + * @param phase The phase of the hook. It can have two values. Pre means "right before the original function is called". Post means "right after the original function is called" + * + * @return A handler to the hook + */ +native OrpheuHook:OrpheuRegisterHook(OrpheuFunction:function,const hookFunctionName[],OrpheuHookPhase:phase = OrpheuHookPre) + +/** + * Unregisters a hook (stops it) + * + * @param hook A handler to the hook + */ +native OrpheuUnregisterHook(OrpheuHook:hook) + +/** + * Calls a function without triggering its hooks + * + * @param function A handler to the function + * @param any The arguments of the function + */ +native OrpheuCall(OrpheuFunction:function,any:...) + +/** + * Calls a function and triggers its hooks + * + * @param function A handler to the function + * @param any The arguments of the function + */ +native OrpheuCallSuper(OrpheuFunction:function,any:...) + +/** + * Gets the return value of a function (To be used in hooks Post) + * + * @param any In case the value is multi cell (string or vector), an holder to receive them by ref + * @return In case the value is uni cell, the value itself + */ +native any:OrpheuGetReturn(any:...) + +/** + * Sets the return value of a function + * + * @param any Depending on the type of the return of the function, a value to be used as the return as the original hooked function + */ +native OrpheuSetReturn(any:...) + +/** + * Sets the value of an argument + * + * @param num The number of the argument. The first argument would be the number "1" + * @param any Depending on the type of the argument, a value to be replace it to change the behaviour of the hooked function + */ +native OrpheuSetParam(num,any:...) + +/** + * Creates a struct + * + * @param structType The type of the struct + * + * @return A handler to the struct + */ +native OrpheuStruct:OrpheuCreateStruct(OrpheuStructType:structType) + +/** + * Retrieves the value of a member of a struct given the argument number the struct is and the member name + * + * @param num The number of the argument. The first argument would be the number "1" + * @param memberName The name of the member of the struct we want to deal with + * @param any If the member is multi cell, + * + * @return In case the value is uni cell, the value itself + */ +native OrpheuGetParamStructMember(num,const memberName[],any:...) + +/** + * Sets the value of member of a struct given the argument number the struct is and the member name + * + * @param num The number of the argument. The first argument would be the number "1" + * @param memberName The name of the member of the struct we want to deal with + * @param any The new value + */ +native OrpheuSetParamStructMember(num,const memberName[],any:...) + +/** + * Gets a struct handler for a struct received as an argument + * Beware that if the original struct gets destroyed or changed these effects will reflect on your use of it. + * + * @param num The number of the argument. The first argument would be the number "1" + * + * @return A handler to the struct + */ +native OrpheuStruct:OrpheuGetStructFromParam(num) + +/** + * Creates a struct equal to one received as an argument + * + * @param num The number of the argument. The first argument would be the number "1" + * + * @return A handler to the struct + */ +native OrpheuStruct:OrpheuCloneStructFromParam(num) + +/** + * Sets the value of a member of a struct given a struct handler and the member name + * + * @param struct A handler to the struct + * @param memberName The name of the member of the struct we want to deal with + * @param any The new value + */ +native OrpheuSetStructMember(OrpheuStruct:struct,const memberName[],any:...) + +/** + * Retrieves the value of a member of a struct given a struct handler and the member name + * + * @param struct A handler to the struct + * @param memberName The name of the member of the struct we want to deal with + * @param any In case the value is multi cell (string or vector), an holder to receive them by ref + * + * @return In case the value is uni cell, the value itself + */ +native OrpheuGetStructMember(OrpheuStruct:struct,const memberName[],any:...) + +/** + * Retrieves a handler to a struct that hold the addresses of the engine functions + * By retrieving addresses from the struct is possible to hook them. + * A easier way to achieve the same thing is by using the stock OrpheuGetEngineFunction + + * @return A handler to a struct that holds the engine functions + */ +native OrpheuStruct:OrpheuGetEngineFunctionsStruct() + +/** + * Retrieves a handler to a struct that hold the addresses of the dll functions + * By retrieving addresses from the struct is possible to hook them. + * A easier way to achieve the same thing is by using the stock OrpheuGetDllFunction + + * @return A handler to a struct that holds the dll functions + */ +native OrpheuStruct:OrpheuGetDLLFunctionsStruct() + +/** + * Retrieves a handler to a function given a classname, the function name and the classname + * This function is a virtual function (a function defined in abase class and implemented + * differently by each extender class) + * For example: every class that extends CBaseEntity has a Spawn function. That function is defined in CBaseEntity + * and implemented differently by each class derived from CBaseEntity + * + * @param entityClassName A class related to the object that holds the function wanted to be hooked. Example: "player" + * @param libFunctionName The library function name as it is in the file created to define the function + * @param libClassName The library function name as it is in the file created to define the function + * @return A handler to the function + */ +native OrpheuFunction:OrpheuGetFunctionFromClass(const entityClassName[],const libFunctionName[],const libClassName[]) + +/** + * Retrieves a handler to a function given the ID of an entity, the function name and the classname + * This function is a virtual function (a function defined in abase class and implemented + * differently by each extender class) + * For example: every class that extends CBaseEntity has a Spawn function. That function is defined in CBaseEntity + * and implemented differently by each class derived from CBaseEntity + * + * @param id The id of the entity + * @param libFunctionName The library function name as it is in the file created to define the function + * @param libClassName The library function name as it is in the file created to define the function + * @return A handler to the function + */ +native OrpheuFunction:OrpheuGetFunctionFromEntity(id,const libFunctionName[],const libClassName[]) + +/** + * Retrieves a handler to a function given an object, the function name and the classname + * This function is a virtual function (a function defined in abase class and implemented + * differently by each extender class) + * For example: every class that extends CBaseEntity has a Spawn function. That function is defined in CBaseEntity + * and implemented differently by each class derived from CBaseEntity + * + * @param object An object. More precisely, the address of a C++ object. This should be used for classes that are not entities + * @param libFunctionName The library function name as it is in the file created to define the function + * @param libClassName The library function name as it is in the file created to define the function + * @return A handler to the function + */ +native OrpheuFunction:OrpheuGetFunctionFromObject(object,const libFunctionName[],const libClassName[]) + +/** + * Retrieves a handler to a function given the id of a monster of monstermod, the function name and the classname + * This function is a virtual function (a function defined in abase class and implemented + * differently by each extender class) + * For example: every class that extends CBaseEntity has a Spawn function. That function is defined in CBaseEntity + * and implemented differently by each class derived from CBaseEntity + * + * This function goes against the spirit of orpheu of hardcoding the less possible but without it would be much + * more complex to use virtual functions + * + * @param id The id of a monster from monstermod + * @param libFunctionName The library function name as it is in the file created to define the function + * @param libClassName The library function name as it is in the file created to define the function + * @return A handler to the function + */ +native OrpheuFunction:OrpheuGetFunctionFromMonster(id, const libFunctionName[], const libClassName[]) diff --git a/bin/amxxdump/includes/amxmodx/orpheu_advanced.inc b/bin/amxxdump/includes/amxmodx/orpheu_advanced.inc new file mode 100644 index 0000000..5ce3c39 --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/orpheu_advanced.inc @@ -0,0 +1,77 @@ + +#if defined _orpheu_advanced_included + #endinput +#endif +#define _orpheu_advanced_included + +#include + +/** + * Gets the bytes found at an address + * + * @param address The direct address in memory + * @param bytes An array to hold the bytes + * @param count The number of bytes to get + */ +native OrpheuGetBytesAtAddress(address,bytes[],count) + +/** + * Gets the address in memory of a function given a handler to it + * + * @param function A handler to the function + * + * @return The address o the function + */ +native OrpheuGetFunctionAddress(OrpheuFunction:function) + +/** + * Gets a handle to a struct given an address in memory + * + * @param structType The type of the struct + * @param address The address where the struct is in + * + * @return A handler to the struct + */ +native OrpheuStruct:OrpheuGetStructFromAddress(OrpheuStructType:structType,address) + +/** + * Gets the handler to a function given its address and the name that you give it in the file where you define the function + * + * @param address The address where the function is + * @param libFunctionName The name of the function as it is in the file where the function is defined + * @param className The name of the class if the function belongs to one + * + * @return A handler to the function + */ +native OrpheuFunction:OrpheuCreateFunction(address,const libFunctionName[],const classname[]="") + +/** + * Gets the offset of the adress where the function is located to the base address of its library + * + * @param function A handler to the function + * + * @return The offset + */ +native OrpheuGetFunctionOffset(OrpheuFunction:function) + +/** + * Gets the adress of a library + * + * @param libraryName The name of the library. For the mod library (cstrike,czero,etc) use "mod" + * + * @return The address + */ +native OrpheuGetLibraryAddress(const libraryName[]) + +/** + * This native should retrieve the address of functions called from an address + * For example by passing the address of the function X, and 1 as n, it should retrieve the address of the first + * function called in X. It isn't confirmed to work on every condition and it should be use for experiments only + * to help retrieving functions on Windows + * + * @param address The address to start the search at + * @param number The number of the the call starting at 1 from the address + * + * @return The address of the function called + */ +native OrpheuGetNextCallAtAddress(address,number) diff --git a/bin/amxxdump/includes/amxmodx/orpheu_const.inc b/bin/amxxdump/includes/amxmodx/orpheu_const.inc new file mode 100644 index 0000000..1e8bceb --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/orpheu_const.inc @@ -0,0 +1,49 @@ + +#if defined _orpheu_const_included + #endinput +#endif +#define _orpheu_const_included + +#if AMXX_VERSION_NUM >= 175 + #pragma reqlib orpheu + #if !defined AMXMODX_NOAUTOLOAD + #pragma loadlib orpheu + #endif +#else + #pragma library orpheu +#endif + +const OrpheuFunction:OrpheuInvalidFunction = OrpheuFunction:0 + +enum OrpheuHookReturn +{ + OrpheuIgnored, + OrpheuOverride, + OrpheuSupercede +} + +enum OrpheuHookPhase +{ + OrpheuHookPre, + OrpheuHookPost +} + +enum OrpheuStructType +{ + OrpheuStructMovevars, + OrpheuStructUsercmd, + OrpheuStructMonsterEvent, + OrpheuStructDLL_FUNCTIONS, + OrpheuStructPlayerMove, + OrpheuStructEngineFuncs, + OrpheuStructTraceResult, + OrpheuStructPhysent, + OrpheuStructPmplane, + OrpheuStructPmtrace, + OrpheuStructWeaponData, + OrpheuStructAmmoInfo, + OrpheuStructItemInfo, + OrpheuStructTask, + OrpheuStructSchedule, + OrpheuStructKeyValueData +} diff --git a/bin/amxxdump/includes/amxmodx/orpheu_memory.inc b/bin/amxxdump/includes/amxmodx/orpheu_memory.inc new file mode 100644 index 0000000..0da278f --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/orpheu_memory.inc @@ -0,0 +1,98 @@ + +#if defined _orpheu_memory_included + #endinput +#endif +#define _orpheu_memory_included + +#include + +/* +* To use this functionality you must build files that identify memory locations +* This files go on the folder "configs/orpheu/memory" +* More instructions on Orpheu thread +*/ + +/** + * Replaces data in memory in the full extent of a library + * + * @param memoryDataName The name of the block that qualifies memory as defined in a file at "configs/orpheu/memory" + * @param count The number of occurences to replace. 0 = infinite + * @param any A pair "to be replaced" - "replacement". Pair members must be of the same type + * + * @return The number of replacements made + * + * Example: + * + * Replacing the value 16000 by 100000 in a library + * + * OrpheuMemoryReplace("name",0,16000,100000) (where name should be related to a block of data that qualifies the memory as holding a long value) + * + * Replacing the string "weapon_smokegrenade","weapon_flashbang" + * + * OrpheuMemoryReplace("name",0,"weapon_smokegrenade","weapon_flashbang") (where name should be related to a block of data that qualifies the memory as holding a string) + */ +native OrpheuMemoryReplace(const memoryDataName[],count,any:...) + +/** + * Replaces data in memory.It works like OrpheuMemoryReplace but starts at a given address + * + * @param address The address to start at + * @param memoryDataName The name of the block that qualifies memory as defined in a file at "configs/orpheu/memory" + * @param count The number of occurence. 0 = infinite + * @param any A pair "to be replaced" - "replacement". Pair members must be of the same type + * + * @return The number of replacements made + */ +native OrpheuMemoryReplaceAtAddress(address,const memoryDataNameName[],count,any:...) + + +/** + * Retrieves data in memory. The block of data that qualifies memory must also identify it by having identifier blocks, + * Memory can be located given an offset or a signature + * + * @param memoryDataName The name of the block that qualifies memory as defined in a file at "configs/orpheu/memory" + * @param any If the type of the memory location is passed by ref, the variables needed to get the value + * You can give an extra argument to retrieve the address where the data retrieved lies + * + * @return If the type of the memory location is not passed by ref, its value + */ +native OrpheuMemoryGet(const memoryDataName[],any:...) + +/** + * Retrieves data in memory. It works like OrpheuMemoryGet but starts at a given address + * + * @param address The address to start at + * @param memoryDataName The name of the block that qualifies memory as defined in a file at "configs/orpheu/memory" + * @param any If the type of the memory location is passed by ref, the variables needed to get the value + * You can give an extra argument to retrieve the address where the data retrieved lies + * + * @return If the type of the memory location is not passed by ref, its value + */ +native OrpheuMemoryGetAtAddress(address,const memoryDataName[],any:...) + +/** + * Alters data in memory. The block of data that qualifies memory must also identify it by having identifier blocks. + * Memory can be located given an offset or a signature + * + * @param memoryDataName The name of the block that qualifies memory as defined in a file at "configs/orpheu/memory" + * @param count The number of occurences to alter. 0 = infinite + * @param any The value to use as replacement + * You can give an extra argument to retrieve the address where the data retrieved lies + * + * @return Number of occurences replaced + */ +native OrpheuMemorySet(const memoryDataName[],count,any:...) + +/** + * Alters data in memory. It works like OrpheuMemorySet but starts at a given address + * + * @param address The address to start at + * @param memoryDataName The name of the block that qualifies memory as defined in a file at "configs/orpheu/memory" + * @param count The number of occurences to alter. 0 = infinite + * @param any The value to use as replacement + * You can give an extra argument to retrieve the address where the data retrieved lies + * + * @return Number of occurences replaced + */ +native OrpheuMemorySetAtAddress(address,const memoryDataName[],count,any:...) + diff --git a/bin/amxxdump/includes/amxmodx/orpheu_stocks.inc b/bin/amxxdump/includes/amxmodx/orpheu_stocks.inc new file mode 100644 index 0000000..1fff708 --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/orpheu_stocks.inc @@ -0,0 +1,75 @@ + +#if defined _orpheu_stocks_included + #endinput +#endif +#define _orpheu_stocks_included + +#include +#include +#include + + +/** + * Retrieves an engine function handler by having its name as a member of the struct that hold + * engine functions and the name that you give it in the file where you define the function + * The name must be the same as the one in the file where the function is defined + * + * @param memberName The name of the member of the struct that holds the address of the function + * Example: pfnPrecacheModel + * The struct representation can be seen in hlsdk at multiplayer/engine/eiface.h with the name "enginefuncs_s" + * + * @param libFunctionName The name of the function as it is in the file where the function is defined + * + * @return A handler to the function + */ +stock OrpheuFunction:OrpheuGetEngineFunction(const memberName[],const libFunctionName[]) +{ + static OrpheuStruct:engineFunctions + + if(!engineFunctions) + { + engineFunctions = OrpheuGetEngineFunctionsStruct() + } + + return OrpheuCreateFunction( OrpheuGetStructMember(engineFunctions,memberName),libFunctionName ) +} + +/** + * Retrieves a dll function handler by having its name as a member of the struct that hold + * dll functions and the name that you give it in the file where you define the function + * The name must be the same as the one in the file where the function is defined + * + * @param memberName The name of the member of the struct that holds the address of the function + * Example: pfnGameInit + * The struct representation can be seen in hlsdk at multiplayer/engine/eiface.h with the name "DLL_FUNCTIONS" + * + * @param libFunctionName The name of the function as it is in the file where the function is defined + * + * @return A handler to the function + */ +stock OrpheuFunction:OrpheuGetDLLFunction(const memberName[],const libFunctionName[]) +{ + static OrpheuStruct:OrpheuDLLFunctions + + if(!OrpheuDLLFunctions) + { + OrpheuDLLFunctions = OrpheuGetDLLFunctionsStruct() + } + + return OrpheuCreateFunction( OrpheuGetStructMember(OrpheuDLLFunctions,memberName),libFunctionName ) +} + +stock OrpheuHook:OrpheuRegisterHookFromClass(const entityClassName[],const libFunctionName[],const libClassName[],const hookFunctionName[],OrpheuHookPhase:phase = OrpheuHookPre) +{ + return OrpheuRegisterHook(OrpheuGetFunctionFromClass(entityClassName,libFunctionName,libClassName),hookFunctionName,phase) +} + +stock OrpheuHook:OrpheuRegisterHookFromEntity(id,const libFunctionName[],const libClassName[],const hookFunctionName[],OrpheuHookPhase:phase = OrpheuHookPre) +{ + return OrpheuRegisterHook(OrpheuGetFunctionFromEntity(id,libFunctionName,libClassName),hookFunctionName,phase) +} + +stock OrpheuHook:OrpheuRegisterHookFromObject(object,const libFunctionName[],const libClassName[],const hookFunctionName[],OrpheuHookPhase:phase = OrpheuHookPre) +{ + return OrpheuRegisterHook(OrpheuGetFunctionFromObject(object,libFunctionName,libClassName),hookFunctionName,phase) +} diff --git a/bin/amxxdump/includes/amxmodx/reapi.inc b/bin/amxxdump/includes/amxmodx/reapi.inc new file mode 100644 index 0000000..1616029 --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/reapi.inc @@ -0,0 +1,328 @@ +#if defined _reapi_included + #endinput +#endif + +#define _reapi_included + +#if AMXX_VERSION_NUM >= 175 + #pragma reqlib reapi + #if !defined AMXMODX_NOAUTOLOAD + #pragma loadlib reapi + #endif +#else + #pragma library reapi +#endif + +enum hooks_tables_e +{ + ht_engine, + ht_gamedll, + ht_animating, + ht_player, + ht_gamerules, + ht_rechecker, + ht_grenade, + ht_weaponbox, + ht_weapon, + ht_gib, + ht_cbaseentity, + ht_botmanager +}; + +enum members_tables_e +{ + mt_gamerules, + mt_base, + mt_animating, + mt_basemonster, + mt_player, + mt_entvars, + mt_playermove, + mt_movevars, + mt_usercmd, + mt_pmtrace, + mt_csplayer, + mt_baseitem, + mt_baseweapon, + mt_weaponbox, + mt_armoury, + mt_grenade, + mt_p228, + mt_scout, + mt_hegrenade, + mt_xm1014, + mt_c4, + mt_mac10, + mt_aug, + mt_smokegrenade, + mt_elite, + mt_fiveseven, + mt_ump45, + mt_sg550, + mt_galil, + mt_famas, + mt_usp, + mt_glock18, + mt_awp, + mt_mp5n, + mt_m249, + mt_m3, + mt_m4a1, + mt_tmp, + mt_g3sg1, + mt_deagle, + mt_sg552, + mt_ak47, + mt_knife, + mt_p90, + mt_shield, + mt_rebuystruct, + mt_mapinfo, + mt_csplayerweapon, + mt_gib, + mt_netadr, + mt_csentity, + mt_netchan +}; + +#define ReAPIFunc {EngineFunc, GamedllFunc, GamedllFunc_CBaseAnimating, GamedllFunc_CBasePlayer, GamedllFunc_CSGameRules, GamedllFunc_CGrenade, GamedllFunc_CWeaponBox, ReCheckerFunc, GamedllFunc_CBasePlayerWeapon, GamedllFunc_CGib, GamedllFunc_CBaseEntity, GamedllFunc_CBotManager} + +// Is like FNullEnt +#define is_nullent(%0) (%0 == 0 || is_entity(%0) == false) + +#define MAX_REGION_RANGE 1024 + +#define BEGIN_FUNC_REGION(%0) (any:MAX_REGION_RANGE * hooks_tables_e:ht_%0) +#define BEGIN_MEMBER_REGION(%0) (any:MAX_REGION_RANGE * members_tables_e:mt_%0) + +#include + +#include +#include // @note: only for ReHLDS +#include // @note: only for gamedll Counter-Strike (ReGameDLL_CS) + +// If you want to use s/get_member unsafe version, +// then macro MEMBER_UNSAFE must be defined before including header reapi.inc +#if !defined(MEMBER_UNSAFE) + #define set_member set_member_s + #define get_member get_member_s +#endif + +// addons +#include +#include +#include + +/** +* Hookchain return types +*/ +enum +{ + HC_CONTINUE = 0, // Plugin didn't take any action + HC_SUPERCEDE, // Skip real function, use my return value + HC_BREAK // Skip all forwards and real function, use my return value + // @note Warning: Be very careful, using this type of return will skip calls for all following AMXX plugins +}; + +/** +* Hookchain argument types +*/ +enum AType +{ + ATYPE_INTEGER = 0, + ATYPE_FLOAT, + ATYPE_STRING, + ATYPE_CLASSPTR, + ATYPE_EDICT, + ATYPE_EVARS, + ATYPE_BOOL, + ATYPE_VECTOR, + ATYPE_TRACE +}; + +enum HookChain +{ + INVALID_HOOKCHAIN = 0 +}; + +/* +* Hook API function that are available into enum. +* Look at the enums for parameter lists. +* +* @param function The function to hook +* @param callback The forward to call +* @param post Whether or not to forward this in post +* +* @return Returns a hook handle. Use EnableHookChain/DisableHookChain to toggle the forward on or off +*/ +native HookChain:RegisterHookChain(ReAPIFunc:function_id, const callback[], post = 0); + +/* +* Stops a hook from triggering. +* Use the return value from RegisterHookChain as the parameter here! +* +* @param hook The hook to stop +* +*/ +native bool:DisableHookChain(HookChain:hook); + +/* +* Starts a hook back up. +* Use the return value from RegisterHookChain as the parameter here! +* +* @param hook The hook to re-enable +* +* @return Returns true if the function is successfully executed, otherwise false +*/ +native bool:EnableHookChain(HookChain:hook); + +/* +* Sets the return value of a hookchain. +* +* @param type To specify the ATYPE_* parameter, look at the enum AType +* @param value The value to set the return to +* +*/ +native SetHookChainReturn(AType:type, any:...); + +/* +* Gets the return value of the current hookchain. +* This has no effect in pre hookchain. +* +* @param type To specify the ATYPE_* parameter, look at the enum AType +* @param [maxlen] Max length of string (optional) +* +* @return If an integer or boolean or one byte or float, array or everything else is passed via 1st argument and more +*/ +native any:GetHookChainReturn(AType:type, any:...); + +/* +* Set hookchain argument. +* This has no effect in post hookchain. +* +* @param number Number of argument +* @param value New value +* @param [maxlen] Max length of string (optional) +* +* @return Returns true if the function is successfully executed, otherwise false +*/ +native SetHookChainArg(number, AType:type, any:...); + +/* +* Return call state of original API function (that are available into enum). +* Look at the enums for parameter lists. +* +* @param func The function to get state +* +* @return Returns true if the original function was called, otherwise false +*/ +native bool:IsReapiHookOriginalWasCalled(ReAPIFunc:function_id); + +/* +* Returns the current hookchain handle. +* +* @return Returns the hook handle +*/ +native HookChain:GetCurrentHookChainHandle(); + +/* +* Compares the entity to a specified classname. +* @note This native also checks the validity of an entity. +* +* @return true/false +*/ +native bool:FClassnameIs(const entityIndex, const className[]); + +/* +* To get WeaponIdType from grenade entity +* +* @param entity Grenade entity +* +* @return return enum's of WeaponIdType +*/ +native WeaponIdType:GetGrenadeType(const entityIndex); + +/* +* Sets the view entity on a client. +* This allows pfnSetView able to hooks. +* +* @param index Client index +* @param viewEntity Entity index +* +*/ +native engset_view(const index, const viewEntity); + +/* +* Gets the return index of the current view entity on a client. +* +* @param index Client index +* +*/ +native get_viewent(const index); + +/* +* Check if the entity is valid. +* +* @return true/false +*/ +native bool:is_entity(const entityIndex); + +/* +* Check if ReHLDS is available. +* +* @return true/false +*/ +native bool:is_rehlds(); + +/* +* Check if ReGameDLL is available. +* +* @return true/false +*/ +native bool:is_regamedll(); + +/* +* Check if Reunion is available. +* +* @return true/false +* +*/ +native bool:has_reunion(); + +/* +* Check if VTC is available. +* +* @return true/false +*/ +native bool:has_vtc(); + +/* +* Check if Rechecker is available. +* +* @return true/false +*/ +native bool:has_rechecker(); + +/* +* This is the callback from the module that gives major/minor versions for verifying compatibility for ReAPI versions. +* If an AMXX plugin gets a failure, then you do need to upgrade to the latest version of the ReAPI module or update the files included for AMXX plugins. +* Do not modify this! +*/ +public __reapi_version_check(const majorVersion, const minorVersion) +{ + if (majorVersion != REAPI_VERSION_MAJOR) + { + new temp[512]; + formatex(temp, sizeof temp - 1, "[ReAPI]: Api major version mismatch; expected %d, real %d", REAPI_VERSION_MAJOR, majorVersion); + set_fail_state(temp); + return; + } + + if (minorVersion < REAPI_VERSION_MINOR) + { + new temp[512]; + formatex(temp, sizeof temp - 1, "[ReAPI]: Api minor version mismatch; expected at least %d, real %d", REAPI_VERSION_MINOR, minorVersion); + set_fail_state(temp); + return; + } +} diff --git a/bin/amxxdump/includes/amxmodx/reapi_engine.inc b/bin/amxxdump/includes/amxmodx/reapi_engine.inc new file mode 100644 index 0000000..be36a7d --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/reapi_engine.inc @@ -0,0 +1,459 @@ +#if defined _reapi_engine_included + #endinput +#endif + +#define _reapi_engine_included + +#include + +/* +* Sets entvars data for an entity. +* Use the var_* EntVars enum +*/ +native set_entvar(const index, const EntVars:var, any:...); + +/* +* Returns entvar data from an entity. +* Use the var_* EntVars enum +*/ +native any:get_entvar(const index, const EntVars:var, any:...); + +/* +* Sets usercmd data. +* Use the ucmd_* UCmd enum +*/ +native set_ucmd(const ucmd, const UCmd:var, any:...); + +/* +* Returns usercmd data from an entity. +* Use the ucmd_* UCmd enum +*/ +native any:get_ucmd(const ucmd, const UCmd:var, any:...); + +/* +* Sets netchan data. +* Use the net_* NetChan enum +*/ +native set_netchan(const index, const NetChan:var, any:...); + +/* +* Returns metchan data from an client. +* Use the net_* NetChan enum +*/ +native any:get_netchan(const index, const NetChan:var, any:...); + +/* +* Sets a NetAdr var. +* +* @param var The specified mvar, look at the enum NetAdrVars +* +* @return 1 on success. +*/ +native set_netadr(const adr, const NetAdrVars:var, any:...); + +/* +* Returns a NetAdr var +* +* @param var The specified mvar, look at the enum NetAdrVars +* +* @return If an integer or boolean or one byte, array or everything else is passed via the 3rd argument and more, look at the argument list for the specified mvar +*/ +native any:get_netadr(const adr, const NetAdrVars:var, any:...); + +/* +* Gets value for key in buffer +* +* @param pbuffer Pointer to buffer +* @param key Key string +* @param value Buffer to copy value to +* @param maxlen Maximum size of the buffer +* +* @return Number of cells written to buffer +* @error If invalid buffer handler provided, an error will be thrown. +*/ +native get_key_value(const pbuffer, const key[], const value[], const maxlen); + +/* +* Sets value for key in buffer +* +* @param pbuffer Pointer to buffer +* @param key Key string +* @param value Value to set +* +* @noreturn +* @error If invalid buffer handler provided, an error will be thrown. +*/ +native set_key_value(const pbuffer, const key[], const value[]); + +/* +* Gets an AMXX string buffer from a infobuffer pointer +* +* @param buffer Info string pointer +* @param value String to copy value to +* @param maxlen Maximum size of the output buffer +* +* @return Returns a string buffer on infobuffer pointer +*/ +native get_key_value_buffer(const pbuffer, const output[], const maxlen); + +/* +* Sets value string to entire buffer +* +* @param buffer Pointer to buffer +* @param value Value to set +* @param maxlen Maximum size of the value buffer to set, -1 means copy all characters +* +* @return 1 on success, 0 otherwise +*/ +native set_key_value_buffer(const pbuffer, const value[], const maxlen = -1); + +/* +* Gets the position of the bone +* +* @param entity Entity index +* @param bone Number of the bone +* @param vecOrigin Array to store origin in +* @param vecAngles Array to store angles in +* +* @return 1 on success, 0 otherwise +* @error If the index is not within the range of 1 to maxEntities or +* the entity is not valid, an error will be thrown. +*/ +native GetBonePosition(const entity, const bone, Float:vecOrigin[3], Float:vecAngles[3] = {0.0, 0.0, 0.0}); + +/* +* Gets the position of the attachment +* +* @param entity Entity index +* @param attachment Number of the attachment +* @param vecOrigin Array to store origin in +* @param vecAngles Array to store angles in +* +* @return 1 on success, 0 otherwise +* @error If the index is not within the range of 1 to maxEntities or +* the entity is not valid, an error will be thrown. +*/ +native GetAttachment(const entity, const attachment, Float:vecOrigin[3], Float:vecAngles[3] = {0.0, 0.0, 0.0}); + +/* +* Sets body group value based on entity's model group +* +* @param entity Entity index +* @param group Number of entity's model group index +* @param value Value to assign +* +* @return 1 on success, 0 otherwise +* @error If the index is not within the range of 1 to maxEntities or +* the entity is not valid, an error will be thrown. +* +*/ +native SetBodygroup(const entity, const group, const value); + +/* +* Gets body group value based on entity's model group +* +* @param entity Entity index +* @param group Number of entity's model group index +* +* @return Body group value +* @error If the index is not within the range of 1 to maxEntities or +* the entity is not valid, an error will be thrown. +* +*/ +native GetBodygroup(const entity, const group); + +/* +* Gets sequence information based on entity's model current sequence index +* +* @param entity Entity index +* @param piFlags Sequence flags (1 = sequence loops) +* @param pflFrameRate Sequence framerate +* @param pflGroundSpeed Sequence ground speed +* +* @return True on success, false otherwise +* @error If the index is not within the range of 1 to maxEntities or +* the entity is not valid, an error will be thrown. +* +*/ +native bool:GetSequenceInfo(const entity, &piFlags, &Float:pflFrameRate, &Float:pflGroundSpeed); + +/* +* Test visibility of an entity from a given origin using either PVS or PAS +* +* @param entity Entity index +* @param origin Vector representing the origin from which visibility is checked +* @param type Type of visibility check: VisibilityInPVS (Potentially Visible Set) or VisibilityInPAS (Potentially Audible Set) +* +* @return 0 - Not visible +* 1 - Visible, passed by a leafnum +* 2 - Visible, passed by a headnode +* +* @remarks This function checks the visibility of the specified entity from the given origin, using either +* the Potentially Visible Set (PVS) or the Potentially Audible Set (PAS) depending on the provided type +*/ +native CheckVisibilityInOrigin(const ent, Float:origin[3], CheckVisibilityType:type = VisibilityInPVS); + +/* +* Sets the name of the map. +* +* @param mapname New map name. +* +* @noreturn +*/ +native rh_set_mapname(const mapname[]); + +/* +* Gets the name of the map. +* +* @param output Buffer to copy map name to +* @param len Maximum buffer size +* @param type MNT_SET will return the name of the current map +* MNT_TRUE will return the original map name independant of the name set with via rh_set_mapname +* +* @noreturn +*/ +native rh_get_mapname(output[], len, MapNameType:type = MNT_SET); + +/* +* Reverts back the original map name. +* +* @noreturn +*/ +native rh_reset_mapname(); + +/* +* Emits a sound from an entity from the engine. +* +* @param entity Entity index or use 0 to emit from worldspawn at the specified position +* @param recipient Recipient index or use 0 to make all clients hear it +* @param channel Channel to emit from +* @param sample Sound file to emit +* @param vol Volume in percents +* @param attn Sound attenuation +* @param flags Emit flags +* @param pitch Sound pitch +* @param emitFlags Additional Emit2 flags, look at the defines like SND_EMIT2_* +* @param origin Specify origin and only on "param" entity worldspawn that is 0 +* +* @return true if the emission was successfull, false otherwise +*/ +native bool:rh_emit_sound2(const entity, const recipient, const channel, const sample[], Float:vol = VOL_NORM, Float:attn = ATTN_NORM, const flags = 0, const pitch = PITCH_NORM, emitFlags = 0, const Float:origin[3] = {0.0,0.0,0.0}); + +/* +* Forces an userinfo update +* +* @param index Client index +* +* @noreturn +*/ +native rh_update_user_info(const index); + +/* +* Kicks a client from server with message +* +* @param index Client index +* @param message Message that will be sent to client when it is deleted from server +* +* @noreturn +* +*/ +native rh_drop_client(const index, const message[] = ""); + +/* +* - +* +* @param output Buffer to copy the ip address +* @param len Maximum buffer size +* +* @noreturn +* +*/ +native rh_get_net_from(output[], len); + +/* +* Returns client's netchan playing time in seconds. +* +* @param index Client index +* +* @return Netchan connection time in seconds or 0 if client index is invalid or client is not connected +*/ +native rh_get_client_connect_time(const index); + +/* +* Checks if a specific entity is fully packed in a given frame for a host client. +* +* @param index Client index for whom we are checking the entity. +* @param entity Entity index to find in the table of entities for the given frame. +* @param frame Frame index where to look. Default is -1, which checks the previous frame. +* @note To check in the current frame, this native should be called at the end of the server frame. +* +* @return Returns true if the entity is fully packed and ready to be sent to all clients in the given frame, otherwise false. +*/ +native bool:rh_is_entity_fullpacked(const host, const entity, const frame = -1); + +/* +* Get real game time throughout the entire server lifecycle. +* +* @return Real game time +*/ +native Float:rh_get_realtime(); + +enum MessageHook +{ + INVALID_MESSAGEHOOK = 0 +}; + +/** +* Registers a callback function to be called when a game message with the specified ID is received. +* +* @param msg_id The ID of the message to register the callback for. +* @param callback The name of the callback function. +* @param post Whether the callback should be invoked before or after processing the message. (optional) +* +* @note The callback arguments have: +* msg_id - Message id +* msg_dest - Destination type (see MSG_* constants in messages_const.inc) +* msg_entity - Entity receiving the message +* +* @note You can modify the message content using SetMessageData native before the original function is invoked. +* Also can reading the message content using GetMessageData native. +* +* In the callback function, use the return values from Hookchain return types, such as HC_CONTINUE, HC_SUPERCEDE, etc. +* to control the flow of message processing. +* +* @return Returns a handle to the registered message hook. +*/ +native MessageHook:RegisterMessage(const msg_id, const callback[], post = 0); + +/** +* Unregisters a game message hook identified by the specified handle. +* +* @param handle The handle of the message hook to unregister. +* +* @return Returns true if the message hook is successfully unregistered, otherwise false. +*/ +native bool:UnregisterMessage(const MessageHook:handle); + +/** +* Enables a game message hook identified by the specified handle. +* +* @param handle The handle of the message hook to enable. +* +* @return Returns true if the message hook is successfully enabled, otherwise false. +*/ +native bool:EnableHookMessage(const MessageHook:handle); + +/** +* Disables a game message hook identified by the specified handle. +* +* @param handle The handle of the message hook to disable. +* +* @return Returns true if the message hook is successfully disabled, otherwise false. +*/ +native bool:DisableHookMessage(const MessageHook:handle); + +/** +* Sets the message data in the current game message. +* +* @param type The type of the message data that can be changed +* @param ... Additional args depending on the type of the message argument being retrieved (For more details, look at the enum MsgArgType) +* +* @return Returns true if the message data is successfully set, otherwise false. +*/ +native bool:SetMessageData(const MsgDataType:type, any:...); + +/** +* Gets the message data value in the current game message +* +* @param type The type of message data that can be get +* @param ... Additional args depending on the type of the message argument being retrieved (For more details, look at the enum MsgArgType) +* +* @return Returns value of argument in the current message +*/ +native any:GetMessageData(const MsgDataType:type, any:...); + +/** +* Gets the message data original value in the current game message. +* +* @param type The type of message data that can be get +* @param ... Additional args depending on the type of the message argument being retrieved (For more details, look at the enum MsgArgType) +* +* @return Returns original value of argument in the current message +*/ +native any:GetMessageOrigData(const MsgDataType:type, any:...); + +/** +* Retrieves the type of the argument at the specified number in the current game message. +* +* @param number The number of the argument to retrieve the type for. +* +* @return Returns the type of the argument, look at the enum MsgArgType +*/ +native MsgArgType:GetMessageArgType(const number); + +/** +* Retrieves the number of argument in the current game message. +* +* @return Returns the number of argument in the current game message. +*/ +native GetMessageArgsNum(); + +/** +* Sets the block type for the specified message ID. +* +* @param msgid The ID of the message to set the block type for. +* @param type The type of block to set for the message, look at the enum MsgBlockType +* +* @return Returns true if the block type is successfully set, otherwise false. +*/ +native bool:SetMessageBlock(const msgid, MsgBlockType:type); + +/** +* Retrieves the block type for the specified message ID. +* +* @param msgid The ID of the message to retrieve the block type for. +* +* @return Returns the block type of the specified message, look at the enum MsgBlockType +*/ +native MsgBlockType:GetMessageBlock(const msgid); + +/** +* Checks if the specified type of message data has been modified +* +* This native allows you to check if any part of the message data, such as its +* destination, type, origin, receiver, or any the specific argument of the message, has been modified +* +* @param type The type of the data to check for modification +* This can be one of the following: +* - MsgAny: Check if any part of the message has been modified +* - MsgDest: Check if the destination has been modified +* - MsgIndex: Check if the message ID has been modified +* - MsgOrigin: Check if the origin has been modified +* - MsgTargetId: Check if the index of the recipient client has been modified +* - MsgArg: Check if a specific argument of the message has been modified +* +* @param number The number of the argument to check for modification (used only when type is MsgDataType:MsgArg) +* Default value is -1, which means the argument number is not applicable +* +* @return Returns true if the specified data type has been modified, false otherwise +*/ +native bool:IsMessageDataModified(MsgDataType:type = MsgAny, const number = -1); + +/** +* Resets a specific type of message data to its original value +* +* @param type The type of the data to check for modification +* This can be one of the following: +* - MsgAny: Reset all modified message data to its original values +* - MsgDest: Reset the destination to its original value +* - MsgIndex: Reset the message ID to its original value +* - MsgOrigin: Reset the origin to its original value +* - MsgTargetId: Reset the index of the recipient client to its original value +* - MsgArg: Reset a specific argument of the message to its original value +* +* @param number The number of the argument to reset (used only when type is MsgDataType:MsgArg) +* Default value is -1, which means all arguments will be reset. +* +* @return Returns true if the modified data type was reset, otherwise false. +*/ +native bool:ResetModifiedMessageData(MsgDataType:type = MsgAny, const number = -1); diff --git a/bin/amxxdump/includes/amxmodx/reapi_engine_const.inc b/bin/amxxdump/includes/amxmodx/reapi_engine_const.inc new file mode 100644 index 0000000..eee1f36 --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/reapi_engine_const.inc @@ -0,0 +1,1538 @@ +#if defined _reapi_engine_const_included + #endinput +#endif + +#define _reapi_engine_const_included + +/** +* For native rh_get_mapname +*/ +enum MapNameType +{ + MNT_TRUE, // return the original map name independant of the name set with via rh_set_mapname + MNT_SET // return the name of the current map +}; + +/** +* For native CheckVisibilityInOrigin +*/ +enum CheckVisibilityType +{ + VisibilityInPVS = 0, // Check in Potentially Visible Set (PVS) + VisibilityInPAS // Check in Potentially Audible Set (PAS) +}; + +/** +* For RH_SV_AddResource hook +*/ +enum ResourceType_t +{ + t_sound = 0, + t_skin, + t_model, + t_decal, + t_generic, + t_eventscript, + t_world, // Fake type for world, is really t_model + rt_unk, + + rt_max +}; + +/** +* rh_emit_sound2 flags +*/ +#define SND_EMIT2_NOPAS BIT(0) // Never to check PAS +#define SND_EMIT2_INVOKER BIT(1) // Do not send to the client invoker + +/** +* enum EngineFunc +*/ +enum EngineFunc +{ + /* + * Description: - + * Params: (const recipients, const entity, const channel, const sample[], const volume, Float:attenuation, const fFlags, const pitch) + */ + RH_SV_StartSound = BEGIN_FUNC_REGION(engine), + + /* + * Description: - + * Params: (const client, bool:crash, const fmt[]) + */ + RH_SV_DropClient, + + /* + * Description: - + * Params: (const runPhysics) + */ + RH_SV_ActivateServer, + + /* + * Description: - + * Params: (pcvar, const value[]) + */ + RH_Cvar_DirectSet, + + /* + * Description: Receiver is player index or 0 when update will be sended to all. + * Params: (const client, buffer, const receiver) + */ + RH_SV_WriteFullClientUpdate, + + /* + * Description: - + * Params: (const classname[]) + */ + RH_GetEntityInit, + + /* + * Description: Called after processing a client connection request. + * Params: (const client) + */ + RH_ClientConnected, + + /* + * Description: Called when processing a 'connect' client connectionless packet. + * Params: () + */ + RH_SV_ConnectClient, + + /* + * Description: Called when client it's in the scoreboard + * Params: (const client) + */ + RH_SV_EmitPings, + + /* + * Description: Called when an entity is created. + * Return type: Edict * (Entity index) + * Params: () + */ + RH_ED_Alloc, + + /* + * Description: Called when an entity is removed (freed from server). + * Params: (const entity) + */ + RH_ED_Free, + + /* + * Description: Called when a message is being sent to the server's console. + * Params: (const string[]) + */ + RH_Con_Printf, + + /* + * Description: Called when a player's userinfo is being checked. + * Params: (adr, buffer, bool:reconnect, reconnectSlot, name[]) + * + * @note Param adr is unused, guaranteed to return nothing also, don't send anything through it. + * @note In order for param name work, hook needs to be registered as Post. + */ + RH_SV_CheckUserInfo, + + /* + * Description: Called when a generic resource is being added to generic precache list. + * Return type: int + * Params: (const string[]) + */ + RH_PF_precache_generic_I, + + /* + * Description: Called when a model is being added to model precache list. + * Return type: int + * Params: (const string[]) + */ + RH_PF_precache_model_I, + + /* + * Description: Called when a sound is being added to sound precache list. + * Return type: int + * Params: (const string[]) + */ + RH_PF_precache_sound_I, + + /* + * Description: Called when an event is being added to event precache list. + * Return type: int + * Params: (const string[]) + */ + RH_EV_Precache, + + /* + * Description: Called when a resource is being added to resource list. + * Params: (ResourceType_t:type, const filename[], size, flags, index) + */ + RH_SV_AddResource, + + /* + * Description: Called when message is being printed to client console. + * Params: (const string[]) + */ + RH_SV_ClientPrintf, + + /* + * Description: Called before adding an entity to the physents of a player. + * Return type: bool + * Params: (const entity, const client) + */ + RH_SV_AllowPhysent, + + /* + * Description: Called when a command is being sent to server. + * Params: (const cmd[], source, id) + */ + RH_ExecuteServerStringCmd, + + /* + * Description: Called when server sends resources list and location. + * Params: (const client) + */ + RH_SV_SendResources, + +}; + +/** +* enum EntVars +*/ +enum EntVars +{ + /* + * Description: - + * Member type: string_t + * Get params: get_entvar(index, EntVars:var, dest[], const lenght); + * Set params: set_entvar(index, EntVars:var, const source[]); + */ + var_classname = BEGIN_MEMBER_REGION(entvars), + + /* + * Description: - + * Member type: string_t + * Get params: get_entvar(index, EntVars:var, dest[], const lenght); + * Set params: set_entvar(index, EntVars:var, const source[]); + */ + var_globalname, + + /* + * Description: - + * Member type: class Vector + * Get params: get_entvar(index, EntVars:var, Float:output[3]); + * Set params: set_entvar(index, EntVars:var, Float:dest[3]); + */ + var_origin, + + /* + * Description: - + * Member type: class Vector + * Get params: get_entvar(index, EntVars:var, Float:output[3]); + * Set params: set_entvar(index, EntVars:var, Float:dest[3]); + */ + var_oldorigin, + + /* + * Description: - + * Member type: class Vector + * Get params: get_entvar(index, EntVars:var, Float:output[3]); + * Set params: set_entvar(index, EntVars:var, Float:dest[3]); + */ + var_velocity, + + /* + * Description: - + * Member type: class Vector + * Get params: get_entvar(index, EntVars:var, Float:output[3]); + * Set params: set_entvar(index, EntVars:var, Float:dest[3]); + */ + var_basevelocity, + + /* + * Description: Base velocity that was passed in to server physics so client can predict conveyors correctly. Server zeroes it, so we need to it store here, too. + * Member type: class Vector + * Get params: get_entvar(index, EntVars:var, Float:output[3]); + * Set params: set_entvar(index, EntVars:var, Float:dest[3]); + */ + var_clbasevelocity, + + /* + * Description: - + * Member type: class Vector + * Get params: get_entvar(index, EntVars:var, Float:output[3]); + * Set params: set_entvar(index, EntVars:var, Float:dest[3]); + */ + var_movedir, + + /* + * Description: Angles model. + * Member type: class Vector + * Get params: get_entvar(index, EntVars:var, Float:output[3]); + * Set params: set_entvar(index, EntVars:var, Float:dest[3]); + */ + var_angles, + + /* + * Description: Angle velocity (degrees per second). + * Member type: class Vector + * Get params: get_entvar(index, EntVars:var, Float:output[3]); + * Set params: set_entvar(index, EntVars:var, Float:dest[3]); + */ + var_avelocity, + + /* + * Description: Auto-decaying view angle adjustment. + * Member type: class Vector + * Get params: get_entvar(index, EntVars:var, Float:output[3]); + * Set params: set_entvar(index, EntVars:var, Float:dest[3]); + */ + var_punchangle, + + /* + * Description: View angle (player only). + * Member type: class Vector + * Get params: get_entvar(index, EntVars:var, Float:output[3]); + * Set params: set_entvar(index, EntVars:var, Float:dest[3]); + */ + var_v_angle, + + /* + * Description: - + * Member type: class Vector + * Get params: get_entvar(index, EntVars:var, Float:output[3]); + * Set params: set_entvar(index, EntVars:var, Float:dest[3]); + */ + var_endpos, + + /* + * Description: - + * Member type: class Vector + * Get params: get_entvar(index, EntVars:var, Float:output[3]); + * Set params: set_entvar(index, EntVars:var, Float:dest[3]); + */ + var_startpos, + + /* + * Description: - + * Member type: float + * Get params: Float:get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, Float:value); + */ + var_impacttime, + + /* + * Description: - + * Member type: float + * Get params: Float:get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, Float:value); + */ + var_starttime, + + /* + * Description: 0:nothing, 1:force view angles, 2:add avelocity + * Member type: int + * Get params: get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, value); + */ + var_fixangle, + + /* + * Description: - + * Member type: float + * Get params: Float:get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, Float:value); + */ + var_idealpitch, + + /* + * Description: - + * Member type: float + * Get params: Float:get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, Float:value); + */ + var_pitch_speed, + + /* + * Description: - + * Member type: float + * Get params: Float:get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, Float:value); + */ + var_ideal_yaw, + + /* + * Description: - + * Member type: float + * Get params: Float:get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, Float:value); + */ + var_yaw_speed, + + /* + * Description: - + * Member type: int + * Get params: get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, value); + */ + var_modelindex, + + /* + * Description: - + * Member type: string_t + * Get params: get_entvar(index, EntVars:var, dest[], const lenght); + * Set params: set_entvar(index, EntVars:var, const source[]); + */ + var_model, + + /* + * Description: Player's viewmodel. + * Member type: string_t + * Get params: get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, const source[]); + */ + var_viewmodel, + + /* + * Description: The model that other players see. + * Member type: string_t + * Get params: get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, const source[]); + */ + var_weaponmodel, + + /* + * Description: BB min translated to world coord. + * Member type: class Vector + * Get params: get_entvar(index, EntVars:var, Float:output[3]); + * Set params: set_entvar(index, EntVars:var, Float:dest[3]); + */ + var_absmin, + + /* + * Description: BB max translated to world coord. + * Member type: class Vector + * Get params: get_entvar(index, EntVars:var, Float:output[3]); + * Set params: set_entvar(index, EntVars:var, Float:dest[3]); + */ + var_absmax, + + /* + * Description: Local BB min. + * Member type: class Vector + * Get params: get_entvar(index, EntVars:var, Float:output[3]); + * Set params: set_entvar(index, EntVars:var, Float:dest[3]); + */ + var_mins, + + /* + * Description: Local BB max. + * Member type: class Vector + * Get params: get_entvar(index, EntVars:var, Float:output[3]); + * Set params: set_entvar(index, EntVars:var, Float:dest[3]); + */ + var_maxs, + + /* + * Description: maxs - mins + * Member type: class Vector + * Get params: get_entvar(index, EntVars:var, Float:output[3]); + * Set params: set_entvar(index, EntVars:var, Float:dest[3]); + */ + var_size, + + /* + * Description: - + * Member type: float + * Get params: Float:get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, Float:value); + */ + var_ltime, + + /* + * Description: - + * Member type: float + * Get params: Float:get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, Float:value); + */ + var_nextthink, + + /* + * Description: - + * Member type: int + * Get params: get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, value); + */ + var_movetype, + + /* + * Description: - + * Member type: int + * Get params: get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, value); + */ + var_solid, + + /* + * Description: Skin selection for studio models. + * Member type: int + * Get params: get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, value); + */ + var_skin, + + /* + * Description: Sub-model selection for studio models. + * Member type: int + * Get params: get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, value); + */ + var_body, + + /* + * Description: - + * Member type: int + * Get params: get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, value); + */ + var_effects, + + /* + * Description: % of "normal" gravity. + * Member type: float + * Get params: Float:get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, Float:value); + */ + var_gravity, + + /* + * Description: Inverse elasticity of MOVETYPE_BOUNCE + * Member type: float + * Get params: Float:get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, Float:value); + */ + var_friction, + + /* + * Description: - + * Member type: int + * Get params: get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, value); + */ + var_light_level, + + /* + * Description: Animation sequence. + * Member type: int + * Get params: get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, value); + */ + var_sequence, + + /* + * Description: Movement animation sequence for player (0 for none) + * Member type: int + * Get params: get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, value); + */ + var_gaitsequence, + + /* + * Description: % playback position in animation sequences (0..255) + * Member type: float + * Get params: Float:get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, Float:value); + */ + var_frame, + + /* + * Description: World time when frame was set. + * Member type: float + * Get params: Float:get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, Float:value); + */ + var_animtime, + + /* + * Description: Animation playback rate (-8x to 8x) + * Member type: float + * Get params: Float:get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, Float:value); + */ + var_framerate, + + /* + * Description: Bone controller setting (0..255) + * Member type: byte [4] + * Get params: get_entvar(index, EntVars:var, element); + * Set params: set_entvar(index, EntVars:var, value, element); + */ + var_controller, + + /* + * Description: Blending amount between sub-sequences (0..255) + * Member type: byte [2] + * Get params: get_entvar(index, EntVars:var, element); + * Set params: set_entvar(index, EntVars:var, value, element); + */ + var_blending, + + /* + * Description: Sprite rendering scale (0..255) + * Member type: float + * Get params: Float:get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, Float:value); + */ + var_scale, + + /* + * Description: - + * Member type: int + * Get params: get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, value); + */ + var_rendermode, + + /* + * Description: - + * Member type: float + * Get params: Float:get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, Float:value); + */ + var_renderamt, + + /* + * Description: - + * Member type: class Vector + * Get params: get_entvar(index, EntVars:var, Float:output[3]); + * Set params: set_entvar(index, EntVars:var, Float:dest[3]); + */ + var_rendercolor, + + /* + * Description: - + * Member type: int + * Get params: get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, value); + */ + var_renderfx, + + /* + * Description: - + * Member type: float + * Get params: Float:get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, Float:value); + */ + var_health, + + /* + * Description: - + * Member type: float + * Get params: Float:get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, Float:value); + */ + var_frags, + + /* + * Description: bit mask for available weapons + * Member type: int + * Get params: get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, value); + */ + var_weapons, + + /* + * Description: - + * Member type: float + * Get params: Float:get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, Float:value); + */ + var_takedamage, + + /* + * Description: - + * Member type: int + * Get params: get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, value); + */ + var_deadflag, + + /* + * Description: eye position + * Member type: class Vector + * Get params: get_entvar(index, EntVars:var, Float:output[3]); + * Set params: set_entvar(index, EntVars:var, Float:dest[3]); + */ + var_view_ofs, + + /* + * Description: - + * Member type: int + * Get params: get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, value); + */ + var_button, + + /* + * Description: - + * Member type: int + * Get params: get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, value); + */ + var_impulse, + + /* + * Description: Entity pointer when linked into a linked list. + * Member type: struct edict_s * + * Get params: get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, value); + */ + var_chain, + + /* + * Description: - + * Member type: struct edict_s * + * Get params: get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, value); + */ + var_dmg_inflictor, + + /* + * Description: - + * Member type: struct edict_s * + * Get params: get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, value); + */ + var_enemy, + + /* + * Description: Entity pointer when MOVETYPE_FOLLOW + * Member type: struct edict_s * + * Get params: get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, value); + */ + var_aiment, + + /* + * Description: - + * Member type: struct edict_s * + * Get params: get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, value); + */ + var_owner, + + /* + * Description: - + * Member type: struct edict_s * + * Get params: get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, value); + */ + var_groundentity, + + /* + * Description: - + * Member type: int + * Get params: get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, value); + */ + var_spawnflags, + + /* + * Description: - + * Member type: int + * Get params: get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, value); + */ + var_flags, + + /* + * Description: lowbyte topcolor, highbyte bottomcolor + * Member type: int + * Get params: get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, value); + */ + var_colormap, + + /* + * Description: - + * Member type: int + * Get params: get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, value); + */ + var_team, + + /* + * Description: - + * Member type: float + * Get params: Float:get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, Float:value); + */ + var_max_health, + + /* + * Description: - + * Member type: float + * Get params: Float:get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, Float:value); + */ + var_teleport_time, + + /* + * Description: - + * Member type: float + * Get params: Float:get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, Float:value); + */ + var_armortype, + + /* + * Description: - + * Member type: float + * Get params: Float:get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, Float:value); + */ + var_armorvalue, + + /* + * Description: - + * Member type: int + * Get params: get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, value); + */ + var_waterlevel, + + /* + * Description: - + * Member type: int + * Get params: get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, value); + */ + var_watertype, + + /* + * Description: - + * Member type: string_t + * Get params: get_entvar(index, EntVars:var, dest[], const lenght); + * Set params: set_entvar(index, EntVars:var, const source[]); + */ + var_target, + + /* + * Description: - + * Member type: string_t + * Get params: get_entvar(index, EntVars:var, dest[], const lenght); + * Set params: set_entvar(index, EntVars:var, const source[]); + */ + var_targetname, + + /* + * Description: - + * Member type: string_t + * Get params: get_entvar(index, EntVars:var, dest[], const lenght); + * Set params: set_entvar(index, EntVars:var, const source[]); + */ + var_netname, + + /* + * Description: - + * Member type: string_t + * Get params: get_entvar(index, EntVars:var, dest[], const lenght); + * Set params: set_entvar(index, EntVars:var, const source[]); + */ + var_message, + + /* + * Description: - + * Member type: float + * Get params: Float:get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, Float:value); + */ + var_dmg_take, + + /* + * Description: - + * Member type: float + * Get params: Float:get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, Float:value); + */ + var_dmg_save, + + /* + * Description: - + * Member type: float + * Get params: Float:get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, Float:value); + */ + var_dmg, + + /* + * Description: - + * Member type: float + * Get params: Float:get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, Float:value); + */ + var_dmgtime, + + /* + * Description: - + * Member type: string_t + * Get params: get_entvar(index, EntVars:var, dest[], const lenght); + * Set params: set_entvar(index, EntVars:var, const source[]); + */ + var_noise, + + /* + * Description: - + * Member type: string_t + * Get params: get_entvar(index, EntVars:var, dest[], const lenght); + * Set params: set_entvar(index, EntVars:var, const source[]); + */ + var_noise1, + + /* + * Description: - + * Member type: string_t + * Get params: get_entvar(index, EntVars:var, dest[], const lenght); + * Set params: set_entvar(index, EntVars:var, const source[]); + */ + var_noise2, + + /* + * Description: - + * Member type: string_t + * Get params: get_entvar(index, EntVars:var, dest[], const lenght); + * Set params: set_entvar(index, EntVars:var, const source[]); + */ + var_noise3, + + /* + * Description: - + * Member type: float + * Get params: Float:get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, Float:value); + */ + var_speed, + + /* + * Description: - + * Member type: float + * Get params: Float:get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, Float:value); + */ + var_air_finished, + + /* + * Description: - + * Member type: float + * Get params: Float:get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, Float:value); + */ + var_pain_finished, + + /* + * Description: - + * Member type: float + * Get params: Float:get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, Float:value); + */ + var_radsuit_finished, + + /* + * Description: - + * Member type: struct edict_s * + * Get params: get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, value); + */ + var_pContainingEntity, + + /* + * Description: - + * Member type: int + * Get params: get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, value); + */ + var_playerclass, + + /* + * Description: - + * Member type: float + * Get params: Float:get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, Float:value); + */ + var_maxspeed, + + /* + * Description: - + * Member type: float + * Get params: Float:get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, Float:value); + */ + var_fov, + + /* + * Description: - + * Member type: int + * Get params: get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, value); + */ + var_weaponanim, + + /* + * Description: - + * Member type: int + * Get params: get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, value); + */ + var_pushmsec, + + /* + * Description: - + * Member type: int + * Get params: get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, value); + */ + var_bInDuck, + + /* + * Description: - + * Member type: int + * Get params: get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, value); + */ + var_flTimeStepSound, + + /* + * Description: - + * Member type: int + * Get params: get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, value); + */ + var_flSwimTime, + + /* + * Description: - + * Member type: int + * Get params: get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, value); + */ + var_flDuckTime, + + /* + * Description: - + * Member type: int + * Get params: get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, value); + */ + var_iStepLeft, + + /* + * Description: - + * Member type: float + * Get params: Float:get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, Float:value); + */ + var_flFallVelocity, + + /* + * Description: - + * Member type: int + * Get params: get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, value); + */ + var_gamestate, + + /* + * Description: - + * Member type: int + * Get params: get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, value); + */ + var_oldbuttons, + + /* + * Description: - + * Member type: int + * Get params: get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, value); + */ + var_groupinfo, + + /* + * Description: - + * Member type: int + * Get params: get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, value); + */ + var_iuser1, + + /* + * Description: - + * Member type: int + * Get params: get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, value); + */ + var_iuser2, + + /* + * Description: - + * Member type: int + * Get params: get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, value); + */ + var_iuser3, + + /* + * Description: - + * Member type: int + * Get params: get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, value); + */ + var_iuser4, + + /* + * Description: - + * Member type: float + * Get params: Float:get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, Float:value); + */ + var_fuser1, + + /* + * Description: - + * Member type: float + * Get params: Float:get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, Float:value); + */ + var_fuser2, + + /* + * Description: - + * Member type: float + * Get params: Float:get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, Float:value); + */ + var_fuser3, + + /* + * Description: - + * Member type: float + * Get params: Float:get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, Float:value); + */ + var_fuser4, + + /* + * Description: - + * Member type: class Vector + * Get params: get_entvar(index, EntVars:var, Float:output[3]); + * Set params: set_entvar(index, EntVars:var, Float:dest[3]); + */ + var_vuser1, + + /* + * Description: - + * Member type: class Vector + * Get params: get_entvar(index, EntVars:var, Float:output[3]); + * Set params: set_entvar(index, EntVars:var, Float:dest[3]); + */ + var_vuser2, + + /* + * Description: - + * Member type: class Vector + * Get params: get_entvar(index, EntVars:var, Float:output[3]); + * Set params: set_entvar(index, EntVars:var, Float:dest[3]); + */ + var_vuser3, + + /* + * Description: - + * Member type: class Vector + * Get params: get_entvar(index, EntVars:var, Float:output[3]); + * Set params: set_entvar(index, EntVars:var, Float:dest[3]); + */ + var_vuser4, + + /* + * Description: - + * Member type: struct edict_s * + * Get params: get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, value); + */ + var_euser1, + + /* + * Description: - + * Member type: struct edict_s * + * Get params: get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, value); + */ + var_euser2, + + /* + * Description: - + * Member type: struct edict_s * + * Get params: get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, value); + */ + var_euser3, + + /* + * Description: - + * Member type: struct edict_s * + * Get params: get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, value); + */ + var_euser4 +}; + +/** +* enum UCmd +*/ +enum UCmd +{ + /* + * Description: - + * Member type: short + * Get params: get_ucmd(const ucmd, UCmd:var); + * Set params: set_ucmd(const ucmd, UCmd:var, value); + */ + ucmd_lerp_msec = BEGIN_MEMBER_REGION(usercmd), + + /* + * Description: - + * Member type: byte + * Get params: get_ucmd(const ucmd, UCmd:var); + * Set params: set_ucmd(const ucmd, UCmd:var, value); + */ + ucmd_msec, + + /* + * Description: - + * Member type: vec3_t + * Get params: get_ucmd(const ucmd, UCmd:var, Float:output[3]); + * Set params: set_ucmd(const ucmd, UCmd:var, Float:dest[3]); + */ + ucmd_viewangles, + + /* + * Description: - + * Member type: float + * Get params: Float:get_ucmd(const ucmd, UCmd:var); + * Set params: set_ucmd(const ucmd, UCmd:var, Float:value); + */ + ucmd_forwardmove, + + /* + * Description: - + * Member type: float + * Get params: Float:get_ucmd(const ucmd, UCmd:var); + * Set params: set_ucmd(const ucmd, UCmd:var, Float:value); + */ + ucmd_sidemove, + + /* + * Description: - + * Member type: float + * Get params: Float:get_ucmd(const ucmd, UCmd:var); + * Set params: set_ucmd(const ucmd, UCmd:var, Float:value); + */ + ucmd_upmove, + + /* + * Description: - + * Member type: byte + * Get params: get_ucmd(const ucmd, UCmd:var); + * Set params: set_ucmd(const ucmd, UCmd:var, value); + */ + ucmd_lightlevel, + + /* + * Description: - + * Member type: unsigned short + * Get params: get_ucmd(const ucmd, UCmd:var); + * Set params: set_ucmd(const ucmd, UCmd:var, value); + */ + ucmd_buttons, + + /* + * Description: - + * Member type: byte + * Get params: get_ucmd(const ucmd, UCmd:var); + * Set params: set_ucmd(const ucmd, UCmd:var, value); + */ + ucmd_impulse, + + /* + * Description: - + * Member type: byte + * Get params: get_ucmd(const ucmd, UCmd:var); + * Set params: set_ucmd(const ucmd, UCmd:var, value); + */ + ucmd_weaponselect, + + /* + * Description: - + * Member type: int + * Get params: get_ucmd(const ucmd, UCmd:var); + * Set params: set_ucmd(const ucmd, UCmd:var, value); + */ + ucmd_impact_index, + + /* + * Description: - + * Member type: vec3_t + * Get params: get_ucmd(const ucmd, UCmd:var, Float:output[3]); + * Set params: set_ucmd(const ucmd, UCmd:var, Float:dest[3]); + */ + ucmd_impact_position +}; + +enum NetAdrType +{ + NA_NULL = 0, + NA_LOOPBACK, + NA_BROADCAST, + NA_IP, + NA_IPX, // Deprecated: GoldSrc + NA_BROADCAST_IPX, // Deprecated: GoldSrc +}; + +enum NetAdrVars +{ + /* + * Description: - + * Member type: NetAdrType + * Get params: get_netadr(const NetAdr:adr, const NetAdrVars:var); + * Set params: set_netadr(const NetAdr:adr, const NetAdrVars:var, const value); + */ + netadr_type = BEGIN_MEMBER_REGION(netadr), + + /* + * Description: - + * Member type: unsigned char [4] + * Get params: get_netadr(const NetAdr:adr, const NetAdrVars:var, dest[], const lenght); // Also returns a iplong value + * Set params: set_netadr(const NetAdr:adr, const NetAdrVars:var, const iplong_value); // Only iplong can to set + */ + netadr_ip, + + /* + * Description: - + * Member type: unsigned short + * Get params: get_netadr(const NetAdr:adr, const NetAdrVars:var); + * Set params: set_netadr(const NetAdr:adr, const NetAdrVars:var, const value); + */ + netadr_port +}; + +/** +* enum NetSrc +*/ +enum NetSrc +{ + NS_CLIENT, + NS_SERVER, + NS_MULTICAST // xxxMO +}; + +/** +* enum NetChan +*/ +enum NetChan +{ + /* + * Description: NS_SERVER or NS_CLIENT, depending on channel + * Member type: int + * Get params: NetSrc:get_netchan(const index, NetChan:var); + * Set params: set_netchan(const index, NetChan:var, NetSrc:value); + */ + net_sock = BEGIN_MEMBER_REGION(netchan), + + /* + * Description: Address this channel is talking to + * Member type: NetAdr + * Get params: NetAdr:get_netchan(const index, NetChan:var); + * Set params: set_netchan(const index, NetChan:var, NetAdr:value); + */ + net_remote_address, + + /* + * Description: - + * Member type: int + * Get params: get_netchan(const index, NetChan:var); + * Set params: set_netchan(const index, NetChan:var, value); + */ + net_player_slot, + + /* + * Description: For timeouts. Time last message was received + * Member type: float + * Get params: Float:get_netchan(const index, NetChan:var); + * Set params: set_netchan(const index, NetChan:var, Float:value); + */ + net_last_received, + + /* + * Description: Time when channel was connected + * Member type: float + * Get params: Float:get_netchan(const index, NetChan:var); + * Set params: set_netchan(const index, NetChan:var, Float:value); + */ + net_connect_time, + + /* + * Description: Bandwidth choke. (Bytes per second) + * Member type: float + * Get params: Float:get_netchan(const index, NetChan:var); + * Set params: set_netchan(const index, NetChan:var, Float:value); + */ + net_rate, + + /* + * Description: If rh_get_realtime() > cleartime, free to send next packet. + * Member type: float + * Get params: Float:get_netchan(const index, NetChan:var); + * Set params: set_netchan(const index, NetChan:var, Float:value); + */ + net_cleartime, + + /* + * Description: A sequence number that increases with each incoming bunch of packets. + * Member type: int + * Get params: get_netchan(const index, NetChan:var); + * Set params: set_netchan(const index, NetChan:var, value); + */ + net_incoming_sequence, + + /* + * Description: The number of last outgoing message that has been ack'd. + * Member type: int + * Get params: get_netchan(const index, NetChan:var); + * Set params: set_netchan(const index, NetChan:var, value); + */ + net_incoming_acknowledged, + + /* + * Description: Single bit indicating the state of acknowledgment for the last reliable message. + * Member type: int + * Get params: get_netchan(const index, NetChan:var); + * Set params: set_netchan(const index, NetChan:var, value); + */ + net_incoming_reliable_acknowledged, + + /* + * Description: Single bit, maintained local that toggles between 0 and 1 to track the sequence of reliable messages received + * Member type: int + * Get params: get_netchan(const index, NetChan:var); + * Set params: set_netchan(const index, NetChan:var, value); + */ + net_incoming_reliable_sequence, + + /* + * Description: Message we are sending to remote + * Member type: int + * Get params: get_netchan(const index, NetChan:var); + * Set params: set_netchan(const index, NetChan:var, value); + */ + net_outgoing_sequence, + + /* + * Description: Whether the message contains reliable payload, single bit + * Member type: int + * Get params: get_netchan(const index, NetChan:var); + * Set params: set_netchan(const index, NetChan:var, value); + */ + net_reliable_sequence, + + /* + * Description: Outgoing sequence number of last send that had reliable data + * Member type: int + * Get params: get_netchan(const index, NetChan:var); + * Set params: set_netchan(const index, NetChan:var, value); + */ + net_last_reliable_sequence +}; + +/** +* Message argument types used with GetMessageArgType() +*/ +enum MsgArgType +{ + ArgByte, + ArgChar, + ArgShort, + ArgLong, + ArgAngle, + ArgCoord, + ArgString, + ArgEntity, +}; + +/** +* Message data types used with SetMessageData()/GetMessageData() +* HasModifiedMessageData()/ResetModifiedMessageData() +*/ +enum MsgDataType +{ + /* + * Description: Any part of the message + */ + MsgAny, + + /* + * Description: The destination of the message + * Arg type: integer + * Get params: new dest = GetMessageData(MsgDest); + * Set params: SetMessageData(MsgDest, MSG_ALL); + */ + MsgDest, + + /* + * Description: The index of the message + * Arg type: integer + * Get params: new msg_id = GetMessageData(MsgMsgId); + * Set params: SetMessageData(MsgMsgId, const msg_id); + */ + MsgMsgId, + + /* + * Description: The origin of the message + * Arg type: float [3] + * Get params: GetMessageData(MsgOrigin, Float:dstVector[3]); + * Set params: SetMessageData(MsgOrigin, Float:srcVector[3]); + */ + MsgOrigin, + + /* + * Description: The index of the recipient client + * Arg type: integer + * Get params: new targetId = GetMessageData(MsgTargetId); + * Set params: SetMessageData(MsgTargetId, const targetId); (acceptable indexes 0-32, 0 index also as -1 means NULLENT) + */ + MsgTargetId, + + /* + * Description: The arguments of the message + * + * Arg type: string (ArgString) + * Get params: bool:GetMessageData(MsgArg, const argnumber, value[], const maxlen); + * Set params: bool:SetMessageData(MsgArg, const argnumber, const value[]); + * + * Arg type: float (ArgAngle, ArgCoord) + * Get params: Float:GetMessageData(MsgArg, const argnumber, &Float:value = 0.0); + * Set params: bool:SetMessageData(MsgArg, const argnumber, const Float:value); + * + * Arg type: integer (ArgByte, ArgChar, ArgShort, ArgLong, ArgEntity) + * Get params: GetMessageData(MsgArg, const argnumber); + * Set params: bool:SetMessageData(MsgArg, const argnumber, const value); + */ + MsgArg +}; + +/** +* Blocking behavior types for messages +* Flags for natives SetMessageBlock()/GetMessageBlock() +*/ +enum MsgBlockType +{ + MSG_BLOCK_NOT, // Not a block + MSG_BLOCK_ONCE, // Block once + MSG_BLOCK_SET // Set block +}; diff --git a/bin/amxxdump/includes/amxmodx/reapi_gamedll.inc b/bin/amxxdump/includes/amxmodx/reapi_gamedll.inc new file mode 100644 index 0000000..013eb5e --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/reapi_gamedll.inc @@ -0,0 +1,1223 @@ +#if defined _reapi_gamedll_included + #endinput +#endif + +#define _reapi_gamedll_included + +#include + +/* +* Sets Think callback for entity +* +* @param entity Entity index +* @param callback The forward to call +* @param params Optional set of data to pass through to callback +* @param len Optional size of data +* +* @note Use "" to reset callback +* @note Callback should be contains passing arguments as "public Think_Callback(const ent)" +* +* @noreturn +*/ +native SetThink(const ent, const callback[], const params[] = "", const len = 0); + +/* +* Sets Touch callback for entity +* +* @param entity Entity index +* @param callback The forward to call +* @param params Optional set of data to pass through to callback +* @param len Optional size of data +* +* @note Use "" to reset callback +* @note Callback should be contains passing arguments as "public Touch_Callback(const ent, const other)" +* +* @noreturn +*/ +native SetTouch(const ent, const callback[], const params[] = "", const len = 0); + +/* +* Sets Use callback for entity +* +* @param entity Entity index +* @param callback The forward to call +* @param params Optional set of data to pass through to callback +* @param len Optional size of data +* +* @note Use "" to reset callback +* @note Callback should be contains passing arguments as "public Use_Callback(const ent, const activator, const caller, USE_TYPE:useType, Float:value)" +* +* @noreturn +*/ +native SetUse(const ent, const callback[], const params[] = "", const len = 0); + +/* +* Sets Blocked callback for entity +* +* @param entity Entity index +* @param callback The forward to call +* @param params Optional set of data to pass through to callback +* @param len Optional size of data +* +* @note Use "" to reset callback +* @note Callback should be contains passing arguments as "public Blocked_Callback(const ent, const other)" +* +* @noreturn +*/ +native SetBlocked(const ent, const callback[], const params[] = "", const len = 0); + +/* +* Sets MoveDone callback for entity +* +* @param entity Entity index +* @param callback The forward to call +* @param params Optional set of data to pass through to callback +* @param len Optional size of data +* +* @note Use "" to reset callback +* @note Entity should be inherited from CBaseToggle, otherwise server can crash +* @note Callback should be contains passing arguments as "public MoveDone_Callback(const ent)" +* +* @noreturn +*/ +native SetMoveDone(const ent, const callback[], const params[] = "", const len = 0); + +/* +* Sets a value to CSGameRules_Members members. +* +* @param member The specified member, look at the enums with name CSGameRules_Members +* +* @return 1 on success. +*/ +native set_member_game(CSGameRules_Members:member, any:...); + +/* +* Returns a value from CSGameRules_Members members +* +* @param member The specified member, look at the enums with name CSGameRules_Members +* +* @return If an integer or boolean or one byte, array or everything else is passed via the 3rd argument and more, look at the argument list for the specified member +*/ +native any:get_member_game(CSGameRules_Members:member, any:...); + +/* +* Sets a value to an entity's member. +* +* @param index Entity index +* @param member The specified member, look at the enums with name *_Members +* +* @return 1 on success. +*/ +native set_member(const index, any:member, any:...); + +/* +* Returns a value from an entity's member. +* +* @param index Entity index +* @param member The specified member, look at the enums with name *_Members +* +* @return If an integer or boolean or one byte, array or everything else is passed via the 3rd argument and more, look at the argument list for the specified member +*/ +native any:get_member(const index, any:member, any:...); + +/* +* Sets a value to an entity's member. +* Safe version, can guarantee that the present member is refers to derived class of the entity. +* +* @param index Entity index +* @param member The specified member, look at the enums with name *_Members +* +* @return 1 on success. +*/ +native set_member_s(const index, any:member, any:...); + +/* +* Returns a value from an entity's member. +* Safe version, can guarantee that the present member is refers to derived class of the entity. +* +* @param index Entity index +* @param member The specified member, look at the enums with name *_Members +* +* @return If an integer or boolean or one byte, array or everything else is passed via the 3rd argument and more, look at the argument list for the specified member +*/ +native any:get_member_s(const index, any:member, any:...); + +/* +* Sets playermove var. +* +* @param var The specified playermove, look at the enum PlayerMove +* +* @return 1 on success. +*/ +native set_pmove(const PlayerMove:var, any:...); + +/* +* Returns a playermove var. +* +* @param var The specified playermove var, look at the enums PlayerMove +* +* @return If an integer or boolean or one byte, array or everything else is passed via the 3rd argument and more, look at the argument list for the specified mvar +*/ +native any:get_pmove(const PlayerMove:var, any:...); + +/* +* Sets a movevar value to a playermove. +* +* @param var The specified mvar, look at the enum MoveVars +* +* @return 1 on success. +*/ +native set_movevar(const MoveVars:var, any:...); + +/* +* Returns a movevar value from a playermove. +* +* @param var The specified mvar, look at the enum MoveVars +* +* @return If an integer or boolean or one byte, array or everything else is passed via the 3rd argument and more, look at the argument list for the specified mvar +*/ +native any:get_movevar(const MoveVars:var, any:...); + +/* +* Sets a pmtrace var. +* +* @param var The specified mvar, look at the enum PMTrace +* +* @return 1 on success. +*/ +native set_pmtrace(const tracehandle, const PMTrace:var, any:...); + +/* +* Returns a pmtrace var +* +* @param var The specified mvar, look at the enum PMTrace +* +* @return If an integer or boolean or one byte, array or everything else is passed via the 3rd argument and more, look at the argument list for the specified mvar +*/ +native any:get_pmtrace(const tracehandle, const PMTrace:var, any:...); + +/* +* Sets a RebuyStruct member. +* +* @param var The specified RebuyStruct, look at the enum RebuyStruct +* +* @return 1 on success. +*/ +native set_rebuy(const RebuyHandle:rebuyhandle, const RebuyStruct:member, any:value); + +/* +* Returns a RebuyStruct member +* +* @param var The specified RebuyStruct, look at the enum RebuyStruct +* +* @return If an integer or boolean or one byte, array or everything else is passed via the 3rd argument and more, look at the argument list for the specified RebuyStruct +*/ +native any:get_rebuy(const RebuyHandle:rebuyhandle, RebuyStruct:member); + +/* +* Assign the number of the player's animation. +* +* @param index Client index +* @param playerAnim Specific animation number +* +* @noreturn +*/ +native rg_set_animation(const index, PLAYER_ANIM:playerAnim); + +/* +* Adds money to player's account. +* +* @param index Client index +* @param amount The amount of money +* @param bTrackChange If bTrackChange is 1, the amount of money added will also be displayed. +* +* @noreturn +*/ +native rg_add_account(const index, amount, AccountSet:typeSet = AS_ADD, const bool:bTrackChange = true); + +/* +* Gives the player an item. +* +* @param index Client index +* @param pszName Item classname +* @param type Look at the enums with name GiveType +* +* @return Index of entity if successfull, -1 otherwise +*/ +native rg_give_item(const index, const pszName[], GiveType:type = GT_APPEND); + +/* +* Gives the player an custom item, this means that don't handled API things. +* +* @example rg_give_custom_item(id, "weapon_c4"); doesn't sets the member m_bHasC4 to true, as the rg_give_item does. +* +* @param index Client index +* @param pszName Item classname +* @param type Look at the enums with name GiveType +* @param uid Sets a unique index for the entity +* +* @return Index of entity if successfull, -1 otherwise +* +*/ +native rg_give_custom_item(const index, const pszName[], GiveType:type = GT_APPEND, const uid = 0); + +/* +* Give the default items to a player. +* +* @param index Client index +* +* @noreturn +*/ +native rg_give_default_items(const index); + +/* +* Gives the player a shield +* +* @param index Client index +* @param bDeploy To deploy the shield +* +* @noreturn +*/ +native rg_give_shield(const index, const bool:bDeploy = true); + +/* +* Inflicts damage in a radius from the source position. +* +* @param vecSrc The source position +* @param inflictor Inflictor is the entity that caused the damage (such as a gun) +* @param attacker Attacker is the entity that triggered the damage (such as the gun's owner) +* @param flDamage The amount of damage +* @param flRadius Damage radius +* @param iClassIgnore To specify classes that are immune to damage +* @param bitsDamageType Damage type DMG_* +* +* @noreturn +*/ +native rg_dmg_radius(Float:vecSrc[3], const inflictor, const attacker, const Float:flDamage, const Float:flRadius, const iClassIgnore, const bitsDamageType); + +/* +* Resets the global multi damage accumulator. +* +* @noreturn +*/ +native rg_multidmg_clear(); + +/* +* Inflicts contents of global multi damage registered on victim. +* +* @param inflictor Inflictor is the entity that caused the damage (such as a gun) +* @param attacker Attacker is the entity that triggered the damage (such as the gun's owner) +* +* @noreturn +*/ +native rg_multidmg_apply(const inflictor, const attacker); + +/* +* Adds damage to the accumulator. +* +* @param inflictor Inflictor is the entity that caused the damage (such as a gun) +* @param victim The victim that takes damage +* @param flDamage The amount of damage +* @param bitsDamageType Damage type DMG_* +* +* @noreturn +*/ +native rg_multidmg_add(const inflictor, const victim, const Float:flDamage, const bitsDamageType); + +/* +* Fires bullets from entity. +* +* @param inflictor Inflictor is the entity that caused the damage (such as a gun) +* @param attacker Attacker is the entity that triggered the damage (such as the gun's owner) +* @param shots The number of shots +* @param vecSrc The source position of the barrel +* @param vecDirShooting Shooting direction +* @param vecSpread Spread +* @param flDistance Max shot distance +* @param iBulletType Bullet type, look at the enum with name Bullet in cssdk_const.inc +* @param iTracerFreq Tracer frequency +* @param iDamage Damage amount +* +* @note: This native doesn't create a decal effect +* @note: Decal creation is handled by PlaybackEvent, including shot animation and shot sound +* +* @noreturn +*/ +native rg_fire_bullets(const inflictor, const attacker, const shots, Float:vecSrc[3], Float:vecDirShooting[3], Float:vecSpread[3], const Float:flDistance, const Bullet:iBulletType, const iTracerFreq, const iDamage); + +/* +* Fires buckshots from entity (used at XM1014 and M3 weapons). +* +* @param inflictor Inflictor is the entity that caused the damage (such as a gun) +* @param attacker Attacker is the entity that triggered the damage (such as the gun's owner) +* @param shots The number of shots +* @param vecSrc The source position of the barrel +* @param vecDirShooting Shooting direction +* @param vecSpread Spread +* @param flDistance Max shot distance +* @param iTracerFreq Tracer frequency +* @param iDamage Damage amount +* +* @note: This native doesn't create a decal effect +* @note: Decal creation is handled by PlaybackEvent, including shot animation and shot sound +* +* @noreturn +*/ +native rg_fire_buckshots(const inflictor, const attacker, const shots, Float:vecSrc[3], Float:vecDirShooting[3], Float:vecSpread[3], const Float:flDistance, const iTracerFreq, const iDamage); + +/* +* Fires bullets from player's weapon. +* +* @param inflictor Inflictor is the entity that caused the damage (such as a gun) +* @param attacker Attacker is the entity that triggered the damage (such as the gun's owner) +* @param vecSrc The source position of the barrel +* @param vecDirShooting Shooting direction +* @param vecSpread Spread +* @param flDistance Max shot distance +* @param iPenetration The amount of penetration +* @param iBulletType Bullet type, look at the enum with name Bullet in cssdk_const.inc +* @param iDamage Damage amount +* @param flRangeModifier Damage range modifier +* @param bPistol Pistol shot +* @param shared_rand Use player's random seed, get circular gaussian spread +* +* @note: This native doesn't create a decal effect +* @note: Decal creation is handled by PlaybackEvent, including shot animation and shot sound +* +* @return Float:[3] The spread result +*/ +native Float:[3] rg_fire_bullets3(const inflictor, const attacker, Float:vecSrc[3], Float:vecDirShooting[3], const Float:vecSpread, const Float:flDistance, const iPenetration, const Bullet:iBulletType, const iDamage, const Float:flRangeModifier, const bool:bPistol, const shared_rand); + +/* +* Forces the round to end. +* +* @param tmDelay Delay before the onset of a new round +* @param st Which team won +* @param event The event is the end of the round +* @param message The message on round end +* @param sentence The sound at the end of the round +* @param trigger This will trigger to all hooks on that function +* Be very careful about recursion! +* +* @return 1 on success, 0 otherwise +*/ +native rg_round_end(const Float:tmDelay, const WinStatus:st, const ScenarioEventEndRound:event = ROUND_NONE, const message[] = "default", const sentence[] = "default", const bool:trigger = false); + +/* +* Updates current scores. +* +* @param iCtsWins The amount of wins for counter-terrorists +* @param iTsWins The amount of wins for terrorists +* @param bAdd Adds the score to the current amount +* +* @noreturn +*/ +native rg_update_teamscores(const iCtsWins = 0, const iTsWins = 0, const bool:bAdd = true); + +/* +* Creates an entity using Counter-Strike's custom CreateNamedEntity wrapper. +* +* @param classname Entity classname +* @param useHashTable Use this only for known game entities +* @note: Do not use this if you plan to change custom classname an entity after creation, +* otherwise it will never be release from hash table even if an entity was destroyed, +* and that to lead table to inflate/memory leaks +* +* @return Index of the created entity or 0 otherwise +*/ +native rg_create_entity(const classname[], const bool:useHashTable = false); + +/* +* Finds an entity in the world using Counter-Strike's custom FindEntityByString wrapper. +* +* @param start_index Entity index to start searching from. -1 to start from the first entity +* @param classname Classname to search for +* @param useHashTable Use this only for known game entities +* +* @note: Do not use this if you use a custom classname +* +* @return Entity index > 0 if found, 0 otherwise +*/ +native rg_find_ent_by_class(start_index, const classname[], const bool:useHashTable = false); + +/* +* Finds an entity in the world using Counter-Strike's custom FindEntityByString wrapper, matching by owner. +* +* @param start_index Entity index to start searching from. AMX_NULLENT (-1) to start from the first entity +* @param classname Classname to search for +* +* @return true if found, false otherwise +*/ +native bool:rg_find_ent_by_owner(&start_index, const classname[], owner); + +/* +* Finds the weapon by name in the player's inventory. +* +* @param index Client index +* @param weapon Weapon name +* +* @return Weapon's entity index, 0 otherwise +*/ +native rg_find_weapon_bpack_by_name(const index, const weapon[]); + +/* +* Checks if the player has the item. +* +* @param index Client index +* @param item Item name +* +* @return true if he does, false otherwise +*/ +native bool:rg_has_item_by_name(const index, const item[]); + +/* +* Returns specific information about the weapon. +* +* @param weapon name or id Weapon id, see WEAPON_* constants, WeaponIdType or weapon_* name +* @param WpnInfo:type Info type, see WI_* constants +* +* @note weapon_* name can only be used to get WI_ID +* +* @return Weapon information +* @error If weapon_id or type are out of bounds, an error will be thrown +*/ +native any:rg_get_weapon_info(any:...); + +/* +* Sets specific weapon info values. +* +* @param weapon_id Weapon id, see WEAPON_* constants +* @param type Info type, see WI_* constants +* +* @return 1 on success, 0 otherwise +*/ +native rg_set_weapon_info(const {WeaponIdType,_}:weapon_id, WpnInfo:type, any:...); + +/* +* Remove all the player's stuff in a specific slot. +* +* @param index Client index +* @param slot The slot that will be emptied +* @param removeAmmo Remove ammunition +* +* @return 1 - successful removal of all items in the slot or the slot is empty +* 0 - if at least one item failed to remove +*/ +native rg_remove_items_by_slot(const index, const InventorySlotType:slot, const bool:removeAmmo = true); + +/* +* Drop to floor all the player's stuff by specific slot. +* +* @param index Client index +* @param slot Specific slot for remove of each item. +* +* @return 1 - successful drop of all items in the slot or the slot is empty +* 0 - if at least one item failed to drop +*/ +native rg_drop_items_by_slot(const index, const InventorySlotType:slot); + +/* +* Remove all of the player's items. +* +* @param index Client index +* @param removeSuit Remove suit +* +* @return 1 on success, 0 otherwise +*/ +native rg_remove_all_items(const index, const bool:removeSuit = false); + +/* +* Forces the player to drop the specified item classname. +* +* @param index Client index +* @param item_name Item classname, if no name, the active item classname +* +* @return Entity index of weaponbox, AMX_NULLENT (-1) otherwise +* +*/ +native rg_drop_item(const index, const item_name[]); + +/* +* Executes a client command on the gamedll side. +* +* @param index Client index +* @param command Client command to execute +* @param arg Optional command arguments +* +* @return 1 on success, 0 otherwise +*/ +native rg_internal_cmd(const index, const cmd[], const arg[] = ""); + +/* +* Removes the specified item classname from the player +* +* @param index Client index +* @param item_name Item classname +* @param removeAmmo Remove ammunition +* +* @return 1 if found and remove, 0 otherwise +*/ +native rg_remove_item(const index, const item_name[], const bool:removeAmmo = false); + +/* +* Sets the amount of ammo in the client's backpack for a specific weapon. +* +* @param index Client index +* @param weapon Weapon id +* @param amount New backpack ammo amount to set +* +* @noreturn +*/ +native rg_set_user_bpammo(const index, WeaponIdType:weapon, amount); + +/* +* Returns the amount of ammo in the client's backpack for a specific weapon. +* +* @param index Client index +* @param weapon Weapon id +* +* @return Amount of ammo in backpack +*/ +native rg_get_user_bpammo(const index, WeaponIdType:weapon); + +/* +* Sets the amount of clip ammo for a specific weapon. +* +* @param index Client index +* @param weapon Weapon id +* @param amount New clip ammo amount to set +* +* @noreturn +*/ +native rg_set_user_ammo(const index, WeaponIdType:weapon, amount); + +/* +* Returns the amount of clip ammo for a specific weapon. +* +* @param index Client index +* @param weapon Weapon id +* +* @return Amount of clip ammo +*/ +native rg_get_user_ammo(const index, WeaponIdType:weapon); + +/* +* Sets the client's defusekit status and allows to set a custom HUD icon and color. +* +* @param index Client index +* @param defusekit If nonzero the client will have a defusekit, otherwise it will be removed +* @param color Color RGB +* @param icon HUD sprite to use as an icon +* @param flash If nonzero the icon will flash red +* +* @noreturn +*/ +native rg_give_defusekit(const index, const bool:bDefusekit = true, const Float:color[] = {0.0, 160.0, 0.0}, const icon[] = "defuser", const bool:bFlash = false); + +/* +* Returns the client's armor value and retrieves the type of armor. +* +* @param index Client index +* @param armortype Variable to store armor type in +* +* @return Amount of armor, 0 if the client has no armor +*/ +native rg_get_user_armor(const index, &ArmorType:armortype = ARMOR_NONE); + +/* +* Sets the client's armor value and the type of armor. +* +* @param index Client index +* @param armorvalue Amount of armor to set +* @param armortype Armor type to set +* +* @noreturn +*/ +native rg_set_user_armor(const index, armorvalue, ArmorType:armortype); + +/* +* Sets the client's team without killing the player and sets the client's model. +* @note To obtain a TeamName use the following: +* new TeamName:team = get_member(id, m_iTeam); +* +* @param index Client index +* @param team Team id +* @param model Internal model, use MODEL_AUTO for a random appearance or MODEL_UNASSIGNED to not update it +* +* @param send_teaminfo If true, a TeamInfo message will be sent +* @param check_win_conditions If true, a CheckWinConditions will be call +* +* @return 1 on success, 0 otherwise +*/ +native rg_set_user_team(const index, {TeamName,_}:team, {ModelName,_}:model = MODEL_AUTO, const bool:send_teaminfo = true, const bool:check_win_conditions = false); + +/* +* Sets the client's player model. +* +* @param index Client index +* @param model Model name +* @param update_index If true, the modelindex is updated as well +* +* @return 1 on success, 0 otherwise +*/ +native rg_set_user_model(const index, const model[], const bool:update_index = false); + +/* +* Resets the client's model. +* +* @param index Client index +* @param update_index If true, the modelindex is reset as well +* +* @return 1 on success, 0 otherwise +*/ +native rg_reset_user_model(const index, const bool:update_index = false); + +/* +* Enable/Disable player's footsteps. +* +* @param index Client index +* @param silent To enable silent footsteps +* +* @return 1 on success, 0 otherwise +*/ +native rg_set_user_footsteps(const index, bool:silent = false); + +/* +* Get the current footsteps state of the player. +* +* @param index Client index +* +* @return 1 if the player has silent footsteps, 0 otherwise +*/ +native rg_get_user_footsteps(const index); + +/* +* Transfers C4 from one player to another. +* +* @param index Client index +* @param receiver Receiver index, if 0 it will transfer to a random player +* +* @return Index of player entity if successfull, 0 otherwise +*/ +native rg_transfer_c4(const index, const receiver = 0); + +/* +* Instantly reload client's weapons. +* +* @param index Client index +* @param weapon Weapon entity-index, if 0 then all weapons will be reloaded +* +* @return 1 on success, 0 otherwise +*/ +native rg_instant_reload_weapons(const index, const weapon = 0); + +/* +* Plant a bomb. +* +* @param index Owner index or 0 for worldspawn. +* @param origin The origin of the bomb where it will be planted. +* @param angles The angles of the planted bomb. +* +* @return Index of bomb entity or AMX_NULLENT (-1) otherwise +*/ +native rg_plant_bomb(const index, Float:vecOrigin[3], Float:vecAngles[3] = {0.0,0.0,0.0}); + +/* +* Sets the amount of reward in the game account for all players. +* +* @param rules_index Look at the enum with name RewardRules +* @param amount The money amount +* +* @noreturn +*/ +native rg_set_account_rules(const RewardRules:rules_index, const amount); + +/* +* Gets the specified reward rule's money amount. +* +* @param rules_index Look at the enum with name RewardRules +* +* @return The amount of reward +* +*/ +native rg_get_account_rules(const RewardRules:rules_index); + +/* +* Checks if the bomb is planted. +* +* @return true if the bomb is planted, false otherwise +*/ +native bool:rg_is_bomb_planted(); + +/* +* Forces a player to join a team. +* +* @param index Client index +* @param team Team id +* +* @return 1 on success, 0 otherwise +*/ +native rg_join_team(const index, const TeamName:team); + +/* +* Instantly balances the teams. +* +* @noreturn +*/ +native rg_balance_teams(); + +/* +* Swaps players' teams without reseting frags, deaths and wins. +* +* @noreturn +*/ +native rg_swap_all_players(); + +/* +* Instantly switches the player to his opposite team. +* @note Switch from CT to TERRORIST is also opposite. +* +* @param index Client index +* +* @noreturn +*/ +native rg_switch_team(const index); + +/* +* Forces the player to switch to a specific weapon. +* +* @param index Client index +* @param weapon Weapon entity-index +* +* @return 1 on success, 0 otherwise +*/ +native rg_switch_weapon(const index, const weapon); + +/* +* Gets which team has a higher join priority. +* +* @return Returns the Team Name +*/ +native TeamName:rg_get_join_team_priority(); + +/* +* Checks whether the player can take damage from the attacker. +* +* @param index Client index +* @param attacker Attacker index +* +* @return true if player can take damage, false otherwise +*/ +native bool:rg_is_player_can_takedamage(const index, const attacker); + +/* +* Checks whether the player can respawn. +* +* @param index Client index +* +* @return true if player can respawn, false otherwise +*/ +native bool:rg_is_player_can_respawn(const index); + +/* +* Gets WeaponIdType from weaponbox +* +* @param entity Weaponbox entity +* +* @return return enum of WeaponIdType +*/ +native WeaponIdType:rg_get_weaponbox_id(const entity); + +/* +* Respawn on round for players/bots. +* +* @param index Client index +* +* @noreturn +*/ +native rg_round_respawn(const index); + +/* +* Resets player's maxspeed. +* +* @param index Client index +* +* @noreturn +*/ +native rg_reset_maxspeed(const index); + +/* +* Draws a HUD progress bar which fills from 0% to 100% for the time duration in seconds. +* @note: Set the duration to 0 to hide the bar. +* +* @param index Client index +* @param time Duration +* @param observer Send for everyone who is observing the player +* +* @noreturn +*/ +native rg_send_bartime(const index, const duration, const bool:observer = true); + +/* +* Same as BarTime, but StartPercent specifies how much of the bar is (already) filled. +* +* @param index Client index +* @param time Duration +* @param startPercent Start percent +* @param observer Send for everyone who is observing the player +* +* @noreturn +*/ +native rg_send_bartime2(const index, const duration, const Float:startPercent, const bool:observer = true); + +/* +* Sends the SendAudio message - plays the specified audio. +* +* @param index Receiver index or use 0 for everyone +* @param sample Sound file to play +* @param pitch Sound pitch +* +* @noreturn +*/ +native rg_send_audio(const index, const sample[], const pitch = PITCH_NORM); + +/** +* Sets a parameter of the member CSPlayerItem::m_ItemInfo +* +* @param entity Entity index +* @param type Item info type. See ItemInfo constants. +* +*/ +native rg_set_iteminfo(const entity, ItemInfo:type, any:...); + +/** +* Gets a parameter of the member CSPlayerItem::m_ItemInfo +* +* @param entity Entity index +* @param type Item info type. See ItemInfo constants. +* +*/ +native rg_get_iteminfo(const ent, ItemInfo:type, any:...); + +/** +* Sets a parameter of the global CBasePlayerItem::m_ItemInfoArray array +* @note To have effect on client side (i.g. ammo size on HUD) you should +* alter this value BEFORE WeaponList message is sent to client, or +* force it's alteration by sending again to the specific client. +* Hooking WeaponList message with AMXX's register_message is a choice. +* +* @param weapon_id Weapon id, see WEAPON_* constants +* @param type Item info type. See ItemInfo constants. +* +*/ +native rg_set_global_iteminfo(const {WeaponIdType,_}:weapon_id, ItemInfo:type, any:...); + +/** +* Gets a parameter of the global CBasePlayerItem::m_ItemInfoArray array +* +* @param weapon_id Weapon id, see WEAPON_* constants +* @param type Item info type. See ItemInfo constants. +* +*/ +native rg_get_global_iteminfo(const {WeaponIdType,_}:weapon_id, ItemInfo:type, any:...); + +/* +* Adds hint message to the queue. +* +* @param index Client index +* @param message The message hint +* @param duration The time duration in seconds stays on screen +* @param bDisplayIfPlayerDead Whether to print hint for dead players? +* @param bOverride Whether to override previous messages? +* +* @return true if prints, false otherwise +*/ +native bool:rg_hint_message(const index, const message[], Float:duration = 6.0, bool:bDisplayIfPlayerDead = false, bool:bOverride = false); + +/* +* Instantly restart round. +* +* @noreturn +*/ +native rg_restart_round(); + +/* +* Instantly check win conditions. +* +* @noreturn +*/ +native rg_check_win_conditions(); + +/* +* Instantly initialize player counts. +* +* @param num_alive_terrorist Count alive terrorists +* @param num_alive_ct Count alive counter-terrorists +* @param num_dead_terrorist Count dead terrorists +* @param num_dead_ct Count dead counter-terrorists +* +* @noreturn +*/ +native rg_initialize_player_counts(&num_alive_terrorist = 0, &num_alive_ct = 0, &num_dead_terrorist = 0, &num_dead_ct = 0); + +/* +* Reset if player can hear another player. +* +* @param index Player id +* @noreturn +*/ +native rg_reset_can_hear_player(const index); + +/* +* Set if player can hear another player +* +* @param listener Listener player id +* @param sender Sender player id +* @param can_hear Can listener hear sender +* +* @noreturn +*/ +native rg_set_can_hear_player(const listener, const sender, const bool:can_hear); + +/* +* Get if player can hear another player +* +* @param listener Listener player id +* @param sender Sender player id +* +* @return boolean +*/ +native bool:rg_get_can_hear_player(const listener, const sender); + +/* +* Spawn a head gib +* +* @param index Entity id +* +* @return Index of head gib entity or AMX_NULLENT (-1) otherwise +*/ +native rg_spawn_head_gib(const index); + +/* +* Spawn random gibs +* +* @param index Entity id +* @param cGibs Count gibs +* @param bHuman Set gibs of a human or alien +* +* @noreturn +*/ +native rg_spawn_random_gibs(const index, const cGibs, const bool:bHuman = true); + +/* +* Spawn a grenade (HEGrenade, Flashbang, SmokeGrenade, or C4) +* +* @param weaponId WEAPON_HEGRENADE, WEAPON_SMOKEGRENADE, WEAPON_FLASHBANG or WEAPON_C4 +* @param pevOwner Grenade owner +* @param vecSrc Grenade spawn position +* @param vecThrow Grenade velocity vector +* @param time Grenade explosion time +* @param iTeam Grenade team, see TEAM_* constants +* @param usEvent Event index related to grenade (returned value of precache_event) +* +* @return Entity index on success, AMX_NULLENT (-1) otherwise +*/ +native rg_spawn_grenade(WeaponIdType:weaponId, pevOwner, Float:vecSrc[3], Float:vecThrow[3], Float:time, TeamName:iTeam, usEvent = 0); + +/* +* Spawn a weaponbox entity with its properties +* +* @param pItem Weapon entity index to attach +* @param pPlayerOwner Player index to remove pItem entity (0 = no weapon owner) +* @param modelName Model name ("models/w_*.mdl") +* @param origin Weaponbox origin position +* @param angles Weaponbox angles +* @param velocity Weaponbox initial velocity vector +* @param lifeTime Time to stay in world (< 0.0 = use mp_item_staytime cvar value) +* @param packAmmo Set if ammo should be removed from weapon owner +* +* @return Weaponbox ent index on success, AMX_NULLENT (-1) otherwise +*/ +native rg_create_weaponbox(const pItem, const pPlayerOwner, const modelName[], Float:origin[3], Float:angles[3], Float:velocity[3], Float:lifeTime, bool:packAmmo); + +/* +* Removes an entity using gamedll's UTIL_Remove function, which sets a frame delay to ensure its removal. +* +* @param pEntity Entity index to remove +* +* @return 1 on success, 0 otherwise +*/ +native rg_remove_entity(const pEntity); + +/* +* Creates a Decal in world based on a traceresult. +* +* @param ptr Traceresult pointer, use Fakemeta's create_tr2 to instantiate one +* @param decalNumber Number of decal to spray, see DECAL_ constants on cssdk_const.inc +* +* @noreturn +*/ +native rg_decal_trace(const ptr, Decal:decalNumber); + +/* +* Emits a sound based on a traceresult simulating a bullet hit (metal, wood, concrete, etc.). +* @note Used mostly on trace attacks (bullets, knife). +* +* @param ptr Traceresult pointer, use Fakemeta's create_tr2 to instantiate one +* @param vecSrc Start position +* @param vecEnd End position, must match ptr's vecEndPos member +* @param iBulletType Bullet type, see BULLET_* constants in cssdk_const.inc +* +* @noreturn +*/ +native rg_emit_texture_sound(const ptr, Float:vecSrc[3], Float:vecEnd[3], Bullet:iBulletType); + +/* +* Generates an ammo slot in game's logic +* @note To see a visual effect, WeaponList message should be sent using the custom ammo name, +* where ammo icon HUD will be the one listed in "sprites/weapon_.txt" file. +* +* @param szAmmoname Ammo name to create. +* +* @note Maximum ammo index is 31, after that every ammo instantiation will start from 1 overriding existing ones. +* @return New ammo index. If name already exists, will return the matched index from memory. +*/ +native rg_add_ammo_registry(const szAmmoname[]); + +/* +* Deploys a weapon attached to a player using the CBasePlayerWeapon::DefaultDeploy function. +* +* @param entity Weapon to deploy. Must be attached to a player. +* @param szViewModel Weapon view model name ("models/v_*.mdl") +* @param szWeaponModel Weapon world model bame ("models/p_*.mdl") +* @param iAnim Weapon view model animation to play (often "deploy", use HLMV to see anim index) +* @param szAnimExt Player anim extension name to assign. Examples: "carbine", "shotgun", "knife", etc. +* Use HLMV on a player model to see animext names. +* @param skiplocal If 0, weapon animation will be forced to play on client ignoring active client prediction. +* +* @return 1 on successful weapon deploy, 0 otherwise. +*/ +native rg_weapon_deploy(const entity, const szViewModel[], const szWeaponModel[], iAnim, const szAnimExt[], skiplocal = 0); + +/* +* Reloads a weapon or a player's active weapon using the CBasePlayerWeapon::DefaultReload function. +* +* @param entity Weapon to reload (> MaxClients) OR player index to reload his current active weapon (>= 1 & <= MaxClients). +* @param iClipSize Weapon max clip to check. 0 = weapon max clip stored in ItemInfo +* @param iAnim Weapon view model animation to play (often "reload", use HLMV to see anim index) +* @param fDelay Player reload duration before clip refill. +* +* @return 1 on successful weapon reload, 0 otherwise. +*/ +native rg_weapon_reload(const entity, iClipSize, iAnim, Float:fDelay); + +/* +* Forces shotgun reload thinking on a weapon or a player's active weapon using the CBasePlayerWeapon::DefaultShotgunReload function. +* +* @param entity Weapon to reload (> MaxClients) OR player index to reload his current active weapon (>= 1 & <= MaxClients). +* @param iAnim Weapon view model "insert" animation to play (use HLMV to see anim index) +* @param iStartAnim Weapon view model "start reload" animation to play (use HLMV to see anim index) +* @param fDelay Delay between each buckshot inserted +* @param fStartDelay Delay before buckshots insertion starts +* @param pszReloadSound1 Sound to play on every insertion +* @param pszReloadSound2 Another sound to play on every insertion +* +* @note This is used inside weapon's Reload function and is often called every frame player is pressing IN_RELOAD button. +* @return 1 while weapon not in delay and with ammo remaining to load, 0 otherwise. +*/ +native rg_weapon_shotgun_reload(const entity, iAnim, iStartAnim, Float:fDelay, Float:fStartDelay, const pszReloadSound1[] = "", const pszReloadSound2[] = ""); + +/* +* Sends a weapon animation using the CBasePlayerWeapon::SendWeaponAnim function. +* +* @param entity Weapon to send animation on owner (> MaxClients) OR player index to send animation (>= 1 & <= MaxClients). +* @param iAnim Weapon view model animation to play (use HLMV to see anim index) +* @param skiplocal If 0, weapon animation will be forced to play on client ignoring active client prediction. +* +* @noreturn +*/ +native rg_weapon_send_animation(const entity, iAnim, skiplocal = 0); + +/* +* Emits a "recoil" effect on weapon's player using the CBasePlayerWeapon::KickBack function. +* +* @param entity Weapon to reload (> MaxClients) OR player index to reload his current active weapon (>= 1 & <= MaxClients). +* @param up_base Minimum vertical punchangle +* @param lateral_base Minimum horizontal punchangle +* @param up_modifier Vertical punchangle units to multiply to m_iShotsFired member +* @param lateral_modifier Horizontal punchangle units to multiply to m_iShotsFired member +* @param up_max Maximum vertical punchangle +* @param lateral_max Maximum horizontal punchangle +* @param direction_change Probability to change punchangle orientation (positive or negative). 0 = 100% (1/1), 1 = 50% (1/2), 2 = 33.3% (1/3), ... +* +* @noreturn +*/ +native rg_weapon_kickback(const entity, Float:up_base, Float:lateral_base, Float:up_modifier, Float:lateral_modifier, Float:up_max, Float:lateral_max, direction_change); + +/* +* Switches player current weapon into the best one on its inventory using the CHalfLifeMultiplay::GetNextBestWeapon function. +* +* @param player Player index. +* @param currentWeapon Current player active weapon. 0 = retrieve from m_pActiveItem member +* +* @note Weapon selection is based on weapon's Weight attribute from ItemInfo structure. +* @return 1 if weapon was found and switched to, 0 otherwise +*/ +native rg_switch_best_weapon(const player, const currentWeapon = 0); + +/* +* Disappear a player from the world. Used when VIP reaches escape zone. Basically a silent kill. +* +* @param player Player index. +* +* @noreturn +*/ +native rg_disappear(const player); + +/* +* Sets player current Observer mode. +* @note Player must be a valid observer (m_afPhysicsFlags & PFLAG_OBSERVER). +* +* @param player Player index. +* @param mode Observer mode, see OBS_* constants in cssdk_const.inc +* +* @noreturn +*/ +native rg_set_observer_mode(const player, const mode); + +/* +* Emits a death notice (logs, DeathMsg event, win conditions check) +* +* @param pVictim Player index. +* @param pKiller Killer entity. +* @param pevInflictor Inflictor entity. 0 = world +* +* @noreturn +*/ +native rg_death_notice(const pVictim, const pKiller, const pevInflictor); + +/* +* Checks a player relationship with another reference +* +* @param player Player index +* @param target Target index +* +* @return Match player relationship, see GR_* constants in cssdk_const.inc +*/ +native rg_player_relationship(const player, const target); + +/* +* Sends death messages to all players, including info about the killer, victim, weapon used, +* extra death flags, death position, assistant, and kill rarity using the CHalfLifeMultiplay::SendDeathMessage function. +* +* @param pKiller Killer index (if any). +* @param pVictim Victim index. +* @param pAssister Assisting player index (if any). +* @param pevInflictor Inflictor entity. 0 = world +* @param killerWeaponName The name of the weapon used by the killer. +* @param iDeathMessageFlags Flags indicating extra death message info, see DeathMessageFlags enum in cssdk_const.inc +* @param iRarityOfKill An bitsums representing the rarity classification of the kill, see KillRarity enum in cssdk_const.inc +* +* @noreturn +*/ +native rg_send_death_message(const pKiller, const pVictim, const pAssister, const pevInflictor, const killerWeaponName[], const DeathMessageFlags:iDeathMessageFlags, const KillRarity:iRarityOfKill); diff --git a/bin/amxxdump/includes/amxmodx/reapi_gamedll_const.inc b/bin/amxxdump/includes/amxmodx/reapi_gamedll_const.inc new file mode 100644 index 0000000..30c0f55 --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/reapi_gamedll_const.inc @@ -0,0 +1,6401 @@ +#if defined _reapi_gamedll_const_included + #endinput +#endif + +#define _reapi_gamedll_const_included + +/** +* Returns true if round has ended by expired time +* +* @note Use this for hookchain RG_RoundEnd with the parameter ScenarioEventEndRound:event +*/ +#define IsRoundExpireEvent(%0) (((1 << _:(%0) + _:ScenarioEventEndRound:0) & ((1 << _:ROUND_TARGET_SAVED) | (1 << _:ROUND_HOSTAGE_NOT_RESCUED) | (1 << _:ROUND_TERRORISTS_NOT_ESCAPED) | (1 << _:ROUND_VIP_NOT_ESCAPED) | (1 << _:ROUND_GAME_OVER))) != 0) + +/** +* suppress warning: 200 on amxmodx 1.8.2 +*/ +#if AMXX_VERSION_NUM < 183 + #define RG_CBaseAnimating_ResetSequenceInfo RG_CBaseAnimating_ResetSequence + #define RG_CBasePlayer_Observer_IsValidTarget RG_CBasePlayer_Observer_IsValid + #define RG_CSGameRules_FShouldSwitchWeapon RG_CSGameRules_ShouldSwitchWpn + #define RG_CSGameRules_GetNextBestWeapon RG_CSGameRules_GetNextBestWpn + #define RG_CSGameRules_FlPlayerFallDamage RG_CSGameRules_PlayerFallDmg + #define RG_CSGameRules_FPlayerCanTakeDamage RG_CSGameRules_PlayerCanTakeDmg + #define RG_CSGameRules_FPlayerCanRespawn RG_CSGameRules_PlayerCanRespawn + #define RG_CSGameRules_GetPlayerSpawnSpot RG_CSGameRules_PlayerSpawnSpot + #define RG_CSGameRules_ClientUserInfoChanged RG_CSGameRules_UserInfoChanged + #define RG_CSGameRules_CanHavePlayerItem RG_CSGameRules_CanPlayerItem + #define RG_CSGameRules_DeadPlayerWeapons RG_CSGameRules_DeadPlayerWpn + #define RG_CSGameRules_CheckMapConditions RG_CSGameRules_CheckMapCond + #define RG_CSGameRules_CheckWinConditions RG_CSGameRules_CheckWinCond + #define RG_CSGameRules_CanPlayerHearPlayer RG_CSGameRules_CanPlrHearPlr + #define RG_CBasePlayer_SetClientUserInfoModel RG_CBasePlayer_SetUserInfoModel + #define RG_CBasePlayer_SetClientUserInfoName RG_CBasePlayer_SetUserInfoName + #define m_Shield_hEntToIgnoreTouchesFrom m_Shield_EntToIgnoreTouchesFrom + #define RG_CBasePlayer_RemoveSpawnProtection RG_CBasePlayer_RemoveProtection + #define RG_CBasePlayer_SetSpawnProtection RG_CBasePlayer_SetProtection + #define RG_CBasePlayerWeapon_DefaultDeploy RG_CBaseWeapon_DefDeploy + #define RG_CBasePlayerWeapon_DefaultReload RG_CBaseWeapon_DefReload + #define RG_CBasePlayerWeapon_DefaultShotgunReload RG_CBaseWeapon_DefShotgunReload + #define RG_CBasePlayer_Observer_SetMode RG_CBasePlayer_Observer_SetMod + #define RG_CBasePlayer_Observer_FindNextPlayer RG_CBasePlayer_Observer_FindNxt +#endif + +/** +* enum UnifiedSignals +*/ +enum UnifiedSignals +{ + US_Signal, + US_State +}; + +/** +* enum AccountSet +*/ +enum AccountSet +{ + AS_SET, // Setts the value of the account + AS_ADD // Adds a value to the account +}; + +/** +* Weapon info types for use with rg_set_weapon_info/rg_get_weapon_info() +*/ +enum WpnInfo +{ + /* + * Description: - + * Return type: enum WeaponIdType + * Get params: rg_get_weapon_info(const weapon_name[], WI_ID); + * Set params: - + */ + WI_ID, + + /* + * Description: - + * Return type: int + * Get params: rg_get_weapon_info(const weapon_id, WI_COST); + * Set params: rg_set_weapon_info(const weapon_id, WI_COST, const value); + */ + WI_COST, + + /* + * Description: - + * Return type: int + * Get params: rg_get_weapon_info(const weapon_id, WI_CLIP_COST); + * Set params: rg_set_weapon_info(const weapon_id, WI_CLIP_COST, const value); + */ + WI_CLIP_COST, + + /* + * Description: - + * Return type: int + * Get params: rg_get_weapon_info(const weapon_id, WI_BUY_CLIP_SIZE); + * Set params: rg_set_weapon_info(const weapon_id, WI_BUY_CLIP_SIZE, const value); + */ + WI_BUY_CLIP_SIZE, + + /* + * Description: - + * Return type: int + * Get params: rg_get_weapon_info(const weapon_id, WI_GUN_CLIP_SIZE); + * Set params: rg_set_weapon_info(const weapon_id, WI_GUN_CLIP_SIZE, const value); + */ + WI_GUN_CLIP_SIZE, + + /* + * Description: - + * Return type: int + * Get params: rg_get_weapon_info(const weapon_id, WI_MAX_ROUNDS); + * Set params: rg_set_weapon_info(const weapon_id, WI_MAX_ROUNDS, const value); + */ + WI_MAX_ROUNDS, + + /* + * Description: - + * Return type: int + * Get params: rg_get_weapon_info(const weapon_id, WI_AMMO_TYPE); + * Set params: rg_set_weapon_info(const weapon_id, WI_AMMO_TYPE, const value); + */ + WI_AMMO_TYPE, + + /* + * Description: - + * Return type: - + * Get params: rg_get_weapon_info(const weapon_id, WI_AMMO_NAME, const output[], maxlenght); + * Set params: - + */ + WI_AMMO_NAME, + + /* + * Description: - + * Return type: - + * Get params: rg_get_weapon_info(const weapon_id, WI_NAME, const output[], maxlenght); + * Set params: - + */ + WI_NAME, + + /* + * Description: - + * Return type: enum InventorySlotType + * Get params: rg_get_weapon_info(const weapon_id, WI_SLOT); + * Set params: rg_set_weapon_info(const weapon_id, WI_SLOT, const value); + */ + WI_SLOT, +}; + +/** +* Item's info types for use with rg_set_[global_]iteminfo/rg_get_[global_]iteminfo() +*/ +enum ItemInfo +{ + /* + * Description: - + * Return type: int + * Get params: rg_get_iteminfo(const ent, ItemInfo_iSlot); + * Set params: rg_set_iteminfo(const ent, ItemInfo_iSlot, const value); + */ + ItemInfo_iSlot, + + /* + * Description: - + * Return type: int + * Get params: rg_get_iteminfo(const ent, ItemInfo_iPosition); + * Set params: rg_set_iteminfo(const ent, ItemInfo_iPosition, const value); + */ + ItemInfo_iPosition, + + /* + * Description: - + * Return type: - + * Get params: rg_get_iteminfo(const ent, ItemInfo_pszAmmo1, const output[], maxlenght); + * Set params: rg_set_iteminfo(const ent, ItemInfo_pszAmmo1, const value[]); + */ + ItemInfo_pszAmmo1, + + /* + * Description: - + * Return type: int + * Get params: rg_get_iteminfo(const ent, ItemInfo_iMaxAmmo1); + * Set params: rg_set_iteminfo(const ent, ItemInfo_iMaxAmmo1, const value); + */ + ItemInfo_iMaxAmmo1, + + /* + * Description: - + * Return type: - + * Get params: rg_get_iteminfo(const ent, ItemInfo_pszAmmo2, const output[], maxlenght); + * Set params: rg_set_iteminfo(const ent, ItemInfo_pszAmmo2, const value[]); + */ + ItemInfo_pszAmmo2, + + /* + * Description: - + * Return type: int + * Get params: rg_get_iteminfo(const ent, ItemInfo_iMaxAmmo2); + * Set params: rg_set_iteminfo(const ent, ItemInfo_iMaxAmmo2, const value); + */ + ItemInfo_iMaxAmmo2, + + /* + * Description: - + * Return type: - + * Get params: rg_get_iteminfo(const ent, ItemInfo_pszName, const output[], maxlenght); + * Set params: rg_set_iteminfo(const ent, ItemInfo_pszName, const value[]); + */ + ItemInfo_pszName, + + /* + * Description: - + * Return type: int + * Get params: rg_get_iteminfo(const ent, ItemInfo_iMaxClip); + * Set params: rg_set_iteminfo(const ent, ItemInfo_iMaxClip, const value); + */ + ItemInfo_iMaxClip, + + /* + * Description: - + * Return type: int + * Get params: rg_get_iteminfo(const ent, ItemInfo_iId); + * Set params: rg_set_iteminfo(const ent, ItemInfo_iId, const value); + */ + ItemInfo_iId, + + /* + * Description: - + * Return type: int + * Get params: rg_get_iteminfo(const ent, ItemInfo_iFlags); + * Set params: rg_set_iteminfo(const ent, ItemInfo_iFlags, const value); + */ + ItemInfo_iFlags, + + /* + * Description: - + * Return type: int + * Get params: rg_get_iteminfo(const ent, ItemInfo_iWeight); + * Set params: rg_set_iteminfo(const ent, ItemInfo_iWeight, const value); + */ + ItemInfo_iWeight +}; + +/** +* Use with rg_give_item +*/ +enum GiveType +{ + GT_APPEND, // Just give item + GT_REPLACE, // Give the item and remove all other weapons from the slot + GT_DROP_AND_REPLACE // Give the item and drop all other weapons from the slot +}; + +/** +* MenuChooseTeam +*/ +enum MenuChooseTeam +{ + MenuChoose_T = 1, + MenuChoose_CT, + MenuChoose_VIP, + + MenuChoose_AutoSelect = 5, + MenuChoose_Spec, +}; + +/** +* VGUIMenu +*/ +enum VGUIMenu +{ + VGUI_Menu_Team = 2, + VGUI_Menu_MapBriefing = 4, + + VGUI_Menu_Class_T = 26, + VGUI_Menu_Class_CT, + VGUI_Menu_Buy, + VGUI_Menu_Buy_Pistol, + VGUI_Menu_Buy_ShotGun, + VGUI_Menu_Buy_Rifle, + VGUI_Menu_Buy_SubMachineGun, + VGUI_Menu_Buy_MachineGun, + VGUI_Menu_Buy_Item, +}; + +/** +* GamedllFunc +*/ +enum GamedllFunc +{ + /* + * Description: - + * Return type: int + * Params: (const pObserver) + */ + RG_GetForceCamera = BEGIN_FUNC_REGION(gamedll), + + /* + * Description: - + * Params: (const index, const inflictor, const attacker, const Float:fadeTime, const Float:fadeHold, const alpha, Float:color[3]) + */ + RG_PlayerBlind, + + /* + * Description: - + * Params: (const index, inflictor, attacker, Float:vecSrc[3], Float:vecSpot[3], tracehandle) + */ + RG_RadiusFlash_TraceLine, + + /* + * Description: - + * Params: (WinStatus:status, ScenarioEventEndRound:event, Float:tmDelay) + */ + RG_RoundEnd, + + /* + * Description: - + * Params: (const playerIndex) + */ + RG_PM_Move, + + /* + * Description: - + * Params: (const playerIndex) + */ + RG_PM_AirMove, + + /* + * Description: - + * Params: (const index, const slot) + */ + RG_HandleMenu_ChooseAppearance, + + /* + * Description: - + * Params: (const index, const MenuChooseTeam:slot) + */ + RG_HandleMenu_ChooseTeam, + + /* + * Description: - + * Params: (const index, const bitsSlots, const iDisplayTime, const iNeedMore, pszText[]) + */ + RG_ShowMenu, + + /* + * Description: - + * Params: (const index, VGUIMenu:menuType, const bitsSlots, szOldMenu[]) + */ + RG_ShowVGUIMenu, + + /* + * Description: The player buys ammo. + * Return type: bool + * Params: (const index, const weapon_entity, const bool:blinkMoney) + */ + RG_BuyGunAmmo, + + /* + * Description: - + * Return type: CBaseEntity * (Entity index of weapon) + * Params: (const index, const WeaponIdType:weaponID) + */ + RG_BuyWeaponByWeaponID, + + /* + * Description: Called when a player throws the hegrenade. + * Return type: CGrenade * (Entity index of hegrenade) + * Params: (const index, Float:vecStart[3], Float:vecVelocity[3], Float:time, const team, const usEvent) + */ + RG_ThrowHeGrenade, + + /* + * Description: Called when a player throws the flashbang. + * Return type: CGrenade * (Entity index of flashbang) + * Params: (const index, Float:vecStart[3], Float:vecVelocity[3], Float:time) + */ + RG_ThrowFlashbang, + + /* + * Description: Called when a player throws the smokegrenade. + * Return type: CGrenade * (Entity index of smokegrenade) + * Params: (const index, Float:vecStart[3], Float:vecVelocity[3], Float:time, const usEvent) + */ + RG_ThrowSmokeGrenade, + + /* + * Description: Called when a player plant's the bomb on the ground. + * Return type: CGrenade * (Entity index of bomb) + * Params: (const index, Float:vecStart[3], Float:vecVelocity[3]) + */ + RG_PlantBomb, + + /* + * Description: Called when a player hit to entity. + * Return type: bool + * Params: (Float:vecSrc[3], Float:vecEnd[3], index, entity) + */ + RG_IsPenetrableEntity, + + /* + * Description: - + * Return type: CGib * (Entity index of gib) + * Params: (pevVictim) + */ + RG_SpawnHeadGib, + + /* + * Description: - + * Params: (pevVictim, cGibs, human) + */ + RG_SpawnRandomGibs, + + /* + * Description: Called when a player drops a weapon (usually manual drop or death) + * Return type: CWeaponBox * (Entity index of weaponbox) + * Params: (const weaponent, const owner, modelName[], Float:origin[3], Float:angles[3], Float:velocity[3], Float:lifeTime, bool:packAmmo) + */ + RG_CreateWeaponBox, + + /* + * Description: Called when a player is on a ladder. + * Params: (const pLadder, const playerIndex) + */ + RG_PM_LadderMove, + + /* + * Description: Called on every frame after a player jumps on water for a short period of time + * Params: (const playerIndex) + */ + RG_PM_WaterJump, + + /* + * Description: Called when a player jumps on water for the first time + * Params: (const playerIndex) + */ + RG_PM_CheckWaterJump, + + /* + * Description: Called on every frame while player presses jump button + * Params: (const playerIndex) + */ + RG_PM_Jump, + + /* + * Description: Called on every frame to check player ducking + * Params: (const playerIndex) + */ + RG_PM_Duck, + + /* + * Description: Called whenever player tries to unduck + * Params: (const playerIndex) + */ + RG_PM_UnDuck, + + /* + * Description: Called whenever player emits an step sound + * Params: (step, Float:fvol, const playerIndex) + */ + RG_PM_PlayStepSound, + + /* + * Description: Called whenever player is on air (not touching floor) + * Params: (Float:wishdir[3], Float:wishspeed, Float:accel, const playerIndex) + */ + RG_PM_AirAccelerate, + + /* + * Description: Called when game clears multidamage data (before TraceAttack) + * Params: () + */ + RG_ClearMultiDamage, + + /* + * Description: Called inside TraceAttack to store entity damage to multidamage data + * Params: (const pevInflictor, const pEntity, Float:flDamage, bitsDamageType) + */ + RG_AddMultiDamage, + + /* + * Description: Called after game finished a bullet tracing for applying damage cached on multidamage data + * Params: (const pevInflictor, const pevAttacker) + */ + RG_ApplyMultiDamage, + + /* + * Description: Called when player buys an item from buy menu (Nightvision, Kevlar, etc.) + * Params: (const pPlayer, iSlot) + */ + RG_BuyItem, +}; + +/** +* GamedllFunc CBaseAnimating +*/ +enum GamedllFunc_CBaseAnimating +{ + /* + * Description: - + * Params: (const this) + */ + RG_CBaseAnimating_ResetSequenceInfo = BEGIN_FUNC_REGION(animating) +}; + +/** +* GamedllFunc CGrenade +*/ +enum GamedllFunc_CGrenade +{ + /* + * Description: Called when a player goes to start defuse the bomb. + * Params: (const this, const player) + */ + RG_CGrenade_DefuseBombStart = BEGIN_FUNC_REGION(grenade), + + /* + * Description: Called when a player has ended to defuses the bomb or when the previous defuser has taken off or been killed. + * Params: (const this, const player, bool:bDefused) + */ + RG_CGrenade_DefuseBombEnd, + + /* + * Description: Called when a hegrenade detonates. + * Params: (const this, tracehandle, const bitsDamageType) + */ + RG_CGrenade_ExplodeHeGrenade, + + /* + * Description: Called when a flashbang detonates. + * Params: (const this, tracehandle, const bitsDamageType) + */ + RG_CGrenade_ExplodeFlashbang, + + /* + * Description: Called when a smokegrenade detonates. + * Params: (const this) + */ + RG_CGrenade_ExplodeSmokeGrenade, + + /* + * Description: Called when a C4 goes to explodes. + * Params: (const this, tracehandle, const bitsDamageType) + */ + RG_CGrenade_ExplodeBomb, +}; + +/** +* GamedllFunc CWeaponBox +*/ +enum GamedllFunc_CWeaponBox +{ + /* + * Description: Called when a player dies to pack up the appropriate weapons and ammo items, and creates a weaponbox that falls to floor with sets specify the model or when a player drop the item. + * Params: (const this, const szModelName[]) + */ + RG_CWeaponBox_SetModel = BEGIN_FUNC_REGION(weaponbox), +}; + +/** +* GamedllFunc CBasePlayer +*/ +enum GamedllFunc_CBasePlayer +{ + /* + * Description: - + * Params: (const this) + */ + RG_CBasePlayer_Spawn = BEGIN_FUNC_REGION(player), + + /* + * Description: - + * Params: (const this) + */ + RG_CBasePlayer_Precache, + + /* + * Description: - + * Return type: int + * Params: (const this) + */ + RG_CBasePlayer_ObjectCaps, + + /* + * Description: - + * Return type: int + * Params: (const this) + */ + RG_CBasePlayer_Classify, + + /* + * Description: - + * Params: (const this, pevAttacker, Float:flDamage, Float:vecDir[3], tracehandle, bitsDamageType) + */ + RG_CBasePlayer_TraceAttack, + + /* + * Description: - + * Return type: int + * Params: (const this, pevInflictor, pevAttacker, Float:flDamage, bitsDamageType) + */ + RG_CBasePlayer_TakeDamage, + + /* + * Description: - + * Params: (const this, Float:flHealth, bitsDamageType) + */ + RG_CBasePlayer_TakeHealth, + + /* + * Description: - + * Params: (const this, pevAttacker, iGib) + */ + RG_CBasePlayer_Killed, + + /* + * Description: - + * Params: (const this, score, bAllowNegativeScore) + */ + RG_CBasePlayer_AddPoints, + + /* + * Description: - + * Params: (const this, score, bAllowNegativeScore) + */ + RG_CBasePlayer_AddPointsToTeam, + + /* + * Description: - + * Return type: BOOL + * Params: (const this, const pItem) + */ + RG_CBasePlayer_AddPlayerItem, + + /* + * Description: - + * Return type: BOOL + * Params: (const this, const pItem) + */ + RG_CBasePlayer_RemovePlayerItem, + + /* + * Description: - + * Return type: int + * Params: (const this, iAmount, szName[], iMax) + */ + RG_CBasePlayer_GiveAmmo, + + /* + * Description: - + * Params: (const this) + */ + RG_CBasePlayer_ResetMaxSpeed, + + /* + * Description: - + * Params: (const this) + */ + RG_CBasePlayer_Jump, + + /* + * Description: - + * Params: (const this) + */ + RG_CBasePlayer_Duck, + + /* + * Description: - + * Params: (const this) + */ + RG_CBasePlayer_PreThink, + + /* + * Description: - + * Params: (const this) + */ + RG_CBasePlayer_PostThink, + + /* + * Description: - + * Params: (const this) + */ + RG_CBasePlayer_UpdateClientData, + + /* + * Description: - + * Params: (const this) + */ + RG_CBasePlayer_ImpulseCommands, + + /* + * Description: - + * Params: (const this) + */ + RG_CBasePlayer_RoundRespawn, + + /* + * Description: - + * Params: (const this, Float:flUntilTime, Float:flHoldTime, Float:flFadeTime, iAlpha) + */ + RG_CBasePlayer_Blind, + + /* + * Description: - + * Params: (const this, infobuffer[], szNewModel[]) + */ + RG_CBasePlayer_SetClientUserInfoModel, + + /* + * Description: - + * Params: (const this, infobuffer[], szNewName[]) + */ + RG_CBasePlayer_SetClientUserInfoName, + + /* + * Description: - + * Params: (const this, iPlayerIndex, bool:bSameTeam) + */ + RG_CBasePlayer_Observer_IsValidTarget, + + /* + * Description: - + * Params: (const this, PLAYER_ANIM:playerAnim) + */ + RG_CBasePlayer_SetAnimation, + + /* + * Description: - + * Params: (const this) + */ + RG_CBasePlayer_GiveDefaultItems, + + /* + * Description: - + * Return type: CBaseEntity * (Entity index of item) + * Params: (const this, const pszName[]) + */ + RG_CBasePlayer_GiveNamedItem, + + /* + * Description: - + * Params: (const this, amount, RewardType:type, bool:bTrackChange) + */ + RG_CBasePlayer_AddAccount, + + /* + * Description: - + * Params: (const this, bool:bDeploy) + */ + RG_CBasePlayer_GiveShield, + + /* + * Description: - + * Return type: CBaseEntity * (Entity index of item) + * Params: (const this, const pszItemName[]) + */ + RG_CBasePlayer_DropPlayerItem, + + /* + * Description: - + * Params: (const this, ItemID:item, ItemRestType:type) + */ + RG_CBasePlayer_HasRestrictItem, + + /* + * Description: Called when a player throws the shield on the ground. + * Return type: CBaseEntity * (Entity index of shield) + * Params: (const this, bool:deploy) + */ + RG_CBasePlayer_DropShield, + + /* + * Description: Called on spawn, the attempt to equip a player. + * Params: (const this, bool:addDefault, bool:equipGame) + */ + RG_CBasePlayer_OnSpawnEquip, + + /* + * Description: The player uses a radio message. + * Called on self-radio uses, throwing grenades or on freeze time end. + * Params: (const this, const msg_id[], const msg_verbose[], pitch, bool:showIcon) + */ + RG_CBasePlayer_Radio, + + /* + * Description: VIP player got to the point of rescue. + * Params: (const this) + */ + RG_CBasePlayer_Disappear, + + /* + * Description: Makes a random player the VIP. + * Params: (const this) + */ + RG_CBasePlayer_MakeVIP, + + /* + * Description: Makes a random player the bomber. + * Return type: bool + * Params: (const this) + */ + RG_CBasePlayer_MakeBomber, + + /* + * Description: The player goes into observer mode. + * Params: (const this, Float:vecPosition[3], Float:vecViewAngle[3]) + */ + RG_CBasePlayer_StartObserver, + + /* + * Description: Called when a player enters the game. + * Return type: bool + * Params: (const this) + */ + RG_CBasePlayer_GetIntoGame, + + /* + * Description: Called when a player dying and goes into observer mode like StartObserver + * Params: (const this) + */ + RG_CBasePlayer_StartDeathCam, + + /* + * Description: Called when a player goes switch to opposite team after auto-teambalance or caused by 3rd-party things. + * @note This doesn't register the event when a player switched manually + * Params: (const this) + */ + RG_CBasePlayer_SwitchTeam, + + /* + * Description: Can a player switch to team? + * Return type: bool + * Params: (const this, TeamName:teamToSwap) + */ + RG_CBasePlayer_CanSwitchTeam, + + /* + * Description: Called when a player throws the grenade. + * Return type: CGrenade * (Entity index of grenade) + * Params: (const this, const grenade, Float:vecSrc[3], Float:vecThrow[3], Float:time, const usEvent) + */ + RG_CBasePlayer_ThrowGrenade, + + /* + * Description: Called when a player's set protection. + * Return type: void + * Params: (const this, Float:time) + */ + RG_CBasePlayer_SetSpawnProtection, + + /* + * Description: Called when a player's remove protection. + * Return type: void + * Params: (const this) + */ + RG_CBasePlayer_RemoveSpawnProtection, + + /* + * Description: Called when the game prints hint message into DHUD. + * Return type: bool + * Params: (const this, const message[], Float:duration, bool:bDisplayIfPlayerDead, bool:bOverride) + */ + RG_CBasePlayer_HintMessageEx, + + /* + * Description: Called when a player press use and if a suitable candidate is not found. + * Return type: void + * Params: (const this) + */ + RG_CBasePlayer_UseEmpty, + + /* + * Description: Called when a idle player is removed from server. + * Return type: void + * Params: (const this, const reason[]) + */ + RG_CBasePlayer_DropIdlePlayer, + + /* + * Description: Called when a client attempt to change the observer mode. + * Params: (const this, iMode) + */ + RG_CBasePlayer_Observer_SetMode, + + /* + * Description: Called when a client attempt to find the next observer. + * Return type: void + * Params: (const this, bool bReverse, name[]) + */ + RG_CBasePlayer_Observer_FindNextPlayer, + + /* + * Description: Called when a client emits a "pain sound" after received damage. + * Return type: void + * Params: (const this) + */ + RG_CBasePlayer_Pain, + + /* + * Description: Called when a client emits a "death sound" after death. + * Return type: void + * Params: (const this, lastHitGroup, bool:hasArmour) + */ + RG_CBasePlayer_DeathSound, + + /* + * Description: Called when a client "thinks for the join status". + * (permanently called on each call of "CBasePlayer::PreThink", and only when he is not assigned as specatator or not playing) + * Return type: void + * Params: (const this) + */ + RG_CBasePlayer_JoiningThink, + + /* + * Description: Called every client frame to check time based damage + * Return type: void + * Params: (const this) + */ + RG_CBasePlayer_CheckTimeBasedDamage, + + /* + * Description: Called when game selects a spawn point (info_player_start/deathmatch) to position the player + * Return type: edict_t * (Entity index of selected spawn point) + * Params: (const this) + */ + RG_CBasePlayer_EntSelectSpawnPoint, + + /* + * Description: - + * Params: (const this) + */ + RG_CBasePlayer_PlayerDeathThink, + + /* + * Description: - + * Params: (const this) + */ + RG_CBasePlayer_Observer_Think, + + /* + * Description: - + * Params: (const this, bool:removeSuit) + */ + RG_CBasePlayer_RemoveAllItems, +}; + +/** +* GamedllFunc CBasePlayer +*/ +enum GamedllFunc_CBasePlayerWeapon +{ + /* + * Description: - + * Return type: BOOL + * Params: (const this) + */ + RG_CBasePlayerWeapon_CanDeploy = BEGIN_FUNC_REGION(weapon), + + /* + * Description: - + * Return type: BOOL + * Params: (const this, szViewModel[], szWeaponModel[], iAnim, szAnimExt[], skiplocal) + */ + RG_CBasePlayerWeapon_DefaultDeploy, + + /* + * Description: - + * Return type: int + * Params: (const this, iClipSize, iAnim, Float:fDelay) + */ + RG_CBasePlayerWeapon_DefaultReload, + + /* + * Description: - + * Return type: bool + * Params: (const this, iAnim, iStartAnim, Float:fDelay, Float:fStartDelay, const pszReloadSound1[], const pszReloadSound2[]) + */ + RG_CBasePlayerWeapon_DefaultShotgunReload, + + /* + * Description: Called every client frame (PlayerPostThink) for the player's active weapon + * Return type: void + * Params: (const this) + */ + RG_CBasePlayerWeapon_ItemPostFrame, + + /* + * Description: Called whenever player fires a weapon and shakes player screen (punchangles altering) + * @note Weapons that use KickBack: AK47, AUG, FAMAS, GALIL, M249, M4A1, MAC10, MP5NAVY, P90, SG552, TMP, UMP45 + * Return type: void + * Params: (const this, Float:up_base, Float:lateral_base, Float:up_modifier, Float:lateral_modifier, Float:p_max, Float:lateral_max, direction_change) + */ + RG_CBasePlayerWeapon_KickBack, + + /* + * Description: Called whenever game sends an animation to his current holder (player) + * @note This is often called for all animations in exception of "fire" and "idle" sequences (both called via client prediction) + * Return type: void + * Params: (const this, iAnim, skiplocal) + */ + RG_CBasePlayerWeapon_SendWeaponAnim, +}; + +/** +* GamedllFunc CGib +*/ +enum GamedllFunc_CGib +{ + /* + * Description: - + * Params: (const this, const szGibModel[]) + */ + RG_CGib_Spawn = BEGIN_FUNC_REGION(gib), + + /* + * Description: - + * Params: (const this, pOther) + */ + RG_CGib_BounceGibTouch, + + /* + * Description: - + * Params: (const this) + */ + RG_CGib_WaitTillLand, +}; + +/** +* GamedllFunc CBaseEntity +*/ +enum GamedllFunc_CBaseEntity +{ + /* + * Description: - + * Return type: void + * Params: (pEntity, cShots, Float:vecSrc[3], Float:vecDirShooting[3], Float:vecSpread[3], Float:flDistance, iBulletType, iTracerFreq, iDamage, pevAttacker) + + */ + RG_CBaseEntity_FireBullets = BEGIN_FUNC_REGION(cbaseentity), + + /* + * Description: - + * Return type: void + * Params: (pEntity, cShots, Float:vecSrc[3], Float:vecDirShooting[3], Float:vecSpread[3], Float:flDistance, iTracerFreq, iDamage, pevAttacker) + */ + RG_CBaseEntity_FireBuckshots, + + /* + * Description: - + * Return type: Vector [3] + * Params: (pEntity, Float:vecSrc[3], Float:vecDirShooting[3], Float:vecSpread, Float:flDistance, iPenetration, iBulletType, iDamage, Float:flRangeModifier, pevAttacker, bool:bPistol, shared_rand) + */ + RG_CBaseEntity_FireBullets3, +}; + +/** +* GamedllFunc CBotManager +*/ +enum GamedllFunc_CBotManager +{ + /* + * Description: Called on each improved bot event + * Return type: void + * Params: (GameEventType:event, const pEntity, const pOther) + + */ + RG_CBotManager_OnEvent = BEGIN_FUNC_REGION(botmanager), +} + + +/** +* GamedllFunc CSGameRules +*/ +enum GamedllFunc_CSGameRules +{ + /* + * Description: Should the player switch to this weapon? + * Return type: BOOL + * Params: (const index, const weapon) + */ + RG_CSGameRules_FShouldSwitchWeapon = BEGIN_FUNC_REGION(gamerules), + + /* + * Description: I can't use this weapon anymore, get me the next best one. + * Return type: BOOL + * Params: (const index, const currentWeapon) + */ + RG_CSGameRules_GetNextBestWeapon, + + /* + * Description: - + * Return type: float + * Params: (const index) + */ + RG_CSGameRules_FlPlayerFallDamage, + + /* + * Description: Can this player take damage from this attacker? + * Return type: float + * Params: (const index, const attacker) + */ + RG_CSGameRules_FPlayerCanTakeDamage, + + /* + * Description: Called by CBasePlayer::Spawn just before releasing the player into the game. + * Params: (const index) + */ + RG_CSGameRules_PlayerSpawn, + + /* + * Description: Is this player allowed to respawn now? + * Return type: BOOL + * Params: (const index) + */ + RG_CSGameRules_FPlayerCanRespawn, + + /* + * Description: Place this player on his spawnspot and face him in the proper direction. + * Return type: edict_t * (Entity index of spawnspot) + * Params: (const index) + */ + RG_CSGameRules_GetPlayerSpawnSpot, + + /* + * Description: The player has changed userinfo; can change it now. + * Params: (const index, infobuffer[]) + */ + RG_CSGameRules_ClientUserInfoChanged, + + /* + * Description: Called each time a player dies. + * Params: (const victim, const killer, const inflictor) + */ + RG_CSGameRules_PlayerKilled, + + /* + * Description: Call this from within a GameRules class to report an obituary. + * Params: (const victim, const killer, const inflictor) + */ + RG_CSGameRules_DeathNotice, + + /* + * Description: The player is touching a CBasePlayerItem, do I give it to him? + * Return type: BOOL + * Params: (const index, const item) + */ + RG_CSGameRules_CanHavePlayerItem, + + /* + * Description: What do I do with player's weapons when he's killed? + * Return type: int + * Params: (const index) + */ + RG_CSGameRules_DeadPlayerWeapons, + + /* + * Description: - + * Params: () + */ + RG_CSGameRules_ServerDeactivate, + + /* + * Description: - + * Params: () + */ + RG_CSGameRules_CheckMapConditions, + + /* + * Description: Recreate all the map entities from the map data (preserving their indices), + * then remove everything else except the players. + * Also get rid of all world decals. + * Params: () + */ + RG_CSGameRules_CleanUpMap, + + /* + * Description: Call this on a new round or restart round with member m_bCompleteReset is TRUE + * Params: () + */ + RG_CSGameRules_RestartRound, + + /* + * Description: Check if the scenario has been won/lost. + * Params: () + */ + RG_CSGameRules_CheckWinConditions, + + /* + * Description: - + * Params: () + */ + RG_CSGameRules_RemoveGuns, + + /* + * Description: - + * Return type: CBasePlayer * (Entity index of player) + * Params: () + */ + RG_CSGameRules_GiveC4, + + /* + * Description: - + * Params: () + */ + RG_CSGameRules_ChangeLevel, + + /* + * Description: - + * Params: () + */ + RG_CSGameRules_GoToIntermission, + + /* + * Description: - + * Params: () + */ + RG_CSGameRules_BalanceTeams, + + /* + * Description: It's called when the freeze time ends. + * Params: () + */ + RG_CSGameRules_OnRoundFreezeEnd, + + /* + * Description: It's called when a player hears another player. + * Return type: bool + * Params: (const listener, const sender) + */ + RG_CSGameRules_CanPlayerHearPlayer, + + /* + * Description: Called every server frame to process game rules + * Params: () + */ + RG_CSGameRules_Think, + + /* + * Description: Called each time player tries to join a team to ensure availability + * Return type: bool + * Params: (team_id) + */ + RG_CSGameRules_TeamFull, + + /* + * Description: Called each time player tries to join a team to ensure a fair distribution of players (based on mp_limitteams cvar) + * Return type: bool + * Params: (newTeam_id, curTeam_id) + */ + RG_CSGameRules_TeamStacked, + + /* + * Description: Called each time player gets a weapon linked to his inventory + * Params: (const pPlayer, const pWeapon) + */ + RG_CSGameRules_PlayerGotWeapon, + + /* + * Description: Called when a player is killed, sends death messages to all players, including info about the killer, victim, weapon used, + * extra death flags, death position, assistant, and kill rarity + * Return type: void + * Params: (const pKiller, const pVictim, const pAssister, const pevInflictor, const killerWeaponName[], const DeathMessageFlags:iDeathMessageFlags, const KillRarity:iRarityOfKill) + */ + RG_CSGameRules_SendDeathMessage, +}; + +/** +* CSGameRules Members +*/ +enum CSGameRules_Members +{ + /* + * Description: - + * Member type: BOOL + * Get params: get_member_game(member); + * Set params: set_member_game(member, value); + */ + m_bFreezePeriod = BEGIN_MEMBER_REGION(gamerules), + + /* + * Description: - + * Member type: BOOL + * Get params: get_member_game(member); + * Set params: set_member_game(member, value); + */ + m_bBombDropped, + + /* + * Description: - + * Member type: char * + * Get params: get_member_game(member, dest[], const lenght); + * Set params: set_member_game(member, const source[]); + */ + m_GameDesc, + + /* + * Description: - + * Member type: int + * Get params: get_member_game(member); + * Set params: set_member_game(member, value); + */ + m_msgPlayerVoiceMask, + + /* + * Description: - + * Member type: int + * Get params: get_member_game(member); + * Set params: set_member_game(member, value); + */ + m_msgRequestState, + + /* + * Description: - + * Member type: int + * Get params: get_member_game(member); + * Set params: set_member_game(member, value); + */ + m_nMaxPlayers, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member_game(member); + * Set params: set_member_game(member, Float:value); + */ + m_UpdateInterval, + + /* + * Description: The global time when the round is supposed to end, if this is not 0. + * Member type: float + * Get params: Float:get_member_game(member); + * Set params: set_member_game(member, Float:value); + */ + m_flRestartRoundTime, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member_game(member); + * Set params: set_member_game(member, Float:value); + */ + m_flCheckWinConditions, + + /* + * Description: Time round has started. + * Member type: float + * Get params: Float:get_member_game(member); + * Set params: set_member_game(member, Float:value); + */ + m_fRoundStartTime, + + /* + * Description: How many seconds long this round is. + * Member type: int + * Get params: get_member_game(member); + * Set params: set_member_game(member, value); + */ + m_iRoundTime, + + /* + * Description: - + * Member type: int + * Get params: get_member_game(member); + * Set params: set_member_game(member, value); + */ + m_iRoundTimeSecs, + + /* + * Description: (From mp_freezetime) - How many seconds long the intro round (when players are frozen) is. + * Member type: int + * Get params: get_member_game(member); + * Set params: set_member_game(member, value); + */ + m_iIntroRoundTime, + + /* + * Description: The global time when the intro round ends and the real one starts (wrote the original "m_flRoundTime" comment for this variable). + * Member type: float + * Get params: Float:get_member_game(member); + * Set params: set_member_game(member, Float:value); + */ + m_fRoundStartTimeReal, + + /* + * Description: - + * Member type: int + * Get params: get_member_game(member); + * Set params: set_member_game(member, value); + */ + m_iAccountTerrorist, + + /* + * Description: - + * Member type: int + * Get params: get_member_game(member); + * Set params: set_member_game(member, value); + */ + m_iAccountCT, + + /* + * Description: The number of terrorists on the team (this is generated at the end of a round). + * Member type: int + * Get params: get_member_game(member); + * Set params: set_member_game(member, value); + */ + m_iNumTerrorist, + + /* + * Description: The number of CTs on the team (this is generated at the end of a round). + * Member type: int + * Get params: get_member_game(member); + * Set params: set_member_game(member, value); + */ + m_iNumCT, + + /* + * Description: - + * Member type: int + * Get params: get_member_game(member); + * Set params: set_member_game(member, value); + */ + m_iNumSpawnableTerrorist, + + /* + * Description: - + * Member type: int + * Get params: get_member_game(member); + * Set params: set_member_game(member, value); + */ + m_iNumSpawnableCT, + + /* + * Description: Number of Terrorist spawn points. + * Member type: int + * Get params: get_member_game(member); + * Set params: set_member_game(member, value); + */ + m_iSpawnPointCount_Terrorist, + + /* + * Description: Number of CT spawn points. + * Member type: int + * Get params: get_member_game(member); + * Set params: set_member_game(member, value); + */ + m_iSpawnPointCount_CT, + + /* + * Description: - + * Member type: int + * Get params: get_member_game(member); + * Set params: set_member_game(member, value); + */ + m_iHostagesRescued, + + /* + * Description: - + * Member type: int + * Get params: get_member_game(member); + * Set params: set_member_game(member, value); + */ + m_iHostagesTouched, + + /* + * Description: 1 == CTs won last round, 2 == Terrorists did, 3 == Draw, no winner + * Member type: int + * Get params: get_member_game(member); + * Set params: set_member_game(member, value); + */ + m_iRoundWinStatus, + + /* + * Description: - + * Member type: short + * Get params: get_member_game(member); + * Set params: set_member_game(member, value); + */ + m_iNumCTWins, + + /* + * Description: - + * Member type: short + * Get params: get_member_game(member); + * Set params: set_member_game(member, value); + */ + m_iNumTerroristWins, + + /* + * Description: Whether or not the bomb target has been bombed. + * Member type: bool + * Get params: get_member_game(member); + * Set params: set_member_game(member, bool:value); + */ + m_bTargetBombed, + + /* + * Description: Whether or not the bomb has been defused. + * Member type: bool + * Get params: get_member_game(member); + * Set params: set_member_game(member, bool:value); + */ + m_bBombDefused, + + /* + * Description: - + * Member type: bool + * Get params: get_member_game(member); + * Set params: set_member_game(member, bool:value); + */ + m_bMapHasBombTarget, + + /* + * Description: - + * Member type: bool + * Get params: get_member_game(member); + * Set params: set_member_game(member, bool:value); + */ + m_bMapHasBombZone, + + /* + * Description: - + * Member type: bool + * Get params: get_member_game(member); + * Set params: set_member_game(member, bool:value); + */ + m_bMapHasBuyZone, + + /* + * Description: - + * Member type: bool + * Get params: get_member_game(member); + * Set params: set_member_game(member, bool:value); + */ + m_bMapHasRescueZone, + + /* + * Description: - + * Member type: bool + * Get params: get_member_game(member); + * Set params: set_member_game(member, bool:value); + */ + m_bMapHasEscapeZone, + + /* + * Description: 0 = uninitialized, 1 = has VIP safety zone, 2 = DOES not have VIP safetyzone + * Member type: qboolean + * Get params: get_member_game(member); + * Set params: set_member_game(member, value); + */ + m_bMapHasVIPSafetyZone, + + /* + * Description: - + * Member type: BOOL + * Get params: get_member_game(member); + * Set params: set_member_game(member, value); + */ + m_bMapHasCameras, + + /* + * Description: - + * Member type: int + * Get params: get_member_game(member); + * Set params: set_member_game(member, value); + */ + m_iC4Timer, + + /* + * Description: The current Terrorist who has the C4. + * Member type: int + * Get params: get_member_game(member); + * Set params: set_member_game(member, value); + */ + m_iC4Guy, + + /* + * Description: The amount of money the losing team gets. This scales up as they lose more rounds in a row. + * Member type: int + * Get params: get_member_game(member); + * Set params: set_member_game(member, value); + */ + m_iLoserBonus, + + /* + * Description: The number of rounds the CTs have lost in a row. + * Member type: int + * Get params: get_member_game(member); + * Set params: set_member_game(member, value); + */ + m_iNumConsecutiveCTLoses, + + /* + * Description: The number of rounds the Terrorists have lost in a row. + * Member type: int + * Get params: get_member_game(member); + * Set params: set_member_game(member, value); + */ + m_iNumConsecutiveTerroristLoses, + + /* + * Description: For the idle kick functionality. This is the max amount of time that the player has to be idle before being kicked. + * Member type: float + * Get params: Float:get_member_game(member); + * Set params: set_member_game(member, Float:value); + */ + m_fMaxIdlePeriod, + + /* + * Description: - + * Member type: int + * Get params: get_member_game(member); + * Set params: set_member_game(member, value); + */ + m_iLimitTeams, + + /* + * Description: - + * Member type: bool + * Get params: get_member_game(member); + * Set params: set_member_game(member, bool:value); + */ + m_bLevelInitialized, + + /* + * Description: - + * Member type: bool + * Get params: get_member_game(member); + * Set params: set_member_game(member, bool:value); + */ + m_bRoundTerminating, + + /* + * Description: Set to TRUE to have the scores reset next time round restarts. + * Member type: bool + * Get params: get_member_game(member); + * Set params: set_member_game(member, bool:value); + */ + m_bCompleteReset, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member_game(member); + * Set params: set_member_game(member, Float:value); + */ + m_flRequiredEscapeRatio, + + /* + * Description: - + * Member type: int + * Get params: get_member_game(member); + * Set params: set_member_game(member, value); + */ + m_iNumEscapers, + + /* + * Description: - + * Member type: int + * Get params: get_member_game(member); + * Set params: set_member_game(member, value); + */ + m_iHaveEscaped, + + /* + * Description: Who can and can't buy. + * Member type: bool + * Get params: get_member_game(member); + * Set params: set_member_game(member, bool:value); + */ + m_bCTCantBuy, + + /* + * Description: Who can and can't buy. + * Member type: bool + * Get params: get_member_game(member); + * Set params: set_member_game(member, bool:value); + */ + m_bTCantBuy, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member_game(member); + * Set params: set_member_game(member, Float:value); + */ + m_flBombRadius, + + /* + * Description: - + * Member type: int + * Get params: get_member_game(member); + * Set params: set_member_game(member, value); + */ + m_iConsecutiveVIP, + + /* + * Description: - + * Member type: int + * Get params: get_member_game(member); + * Set params: set_member_game(member, value); + */ + m_iTotalGunCount, + + /* + * Description: - + * Member type: int + * Get params: get_member_game(member); + * Set params: set_member_game(member, value); + */ + m_iTotalGrenadeCount, + + /* + * Description: - + * Member type: int + * Get params: get_member_game(member); + * Set params: set_member_game(member, value); + */ + m_iTotalArmourCount, + + /* + * Description: Keeps track of the # of consecutive rounds that have gone by where one team outnumbers the other team by more than 2. + * Member type: int + * Get params: get_member_game(member); + * Set params: set_member_game(member, value); + */ + m_iUnBalancedRounds, + + /* + * Description: Keeps track of the # of consecutive rounds of escape played. Teams will be swapped after 8 rounds. + * Member type: int + * Get params: get_member_game(member); + * Set params: set_member_game(member, value); + */ + m_iNumEscapeRounds, + + /* + * Description: - + * Member type: int [100] + * Get params: get_member_game(member, element); + * Set params: set_member_game(member, value, element); + */ + m_iMapVotes, + + /* + * Description: - + * Member type: int + * Get params: get_member_game(member); + * Set params: set_member_game(member, value); + */ + m_iLastPick, + + /* + * Description: - + * Member type: int + * Get params: get_member_game(member); + * Set params: set_member_game(member, value); + */ + m_iMaxMapTime, + + /* + * Description: - + * Member type: int + * Get params: get_member_game(member); + * Set params: set_member_game(member, value); + */ + m_iMaxRounds, + + /* + * Description: - + * Member type: int + * Get params: get_member_game(member); + * Set params: set_member_game(member, value); + */ + m_iTotalRoundsPlayed, + + /* + * Description: - + * Member type: int + * Get params: get_member_game(member); + * Set params: set_member_game(member, value); + */ + m_iMaxRoundsWon, + + /* + * Description: - + * Member type: int + * Get params: get_member_game(member); + * Set params: set_member_game(member, value); + */ + m_iStoredSpectValue, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member_game(member); + * Set params: set_member_game(member, Float:value); + */ + m_flForceCameraValue, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member_game(member); + * Set params: set_member_game(member, Float:value); + */ + m_flForceChaseCamValue, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member_game(member); + * Set params: set_member_game(member, Float:value); + */ + m_flFadeToBlackValue, + + /* + * Description: - + * Member type: int + * Get params: get_member_game(member); + * Set params: set_member_game(member, value); + */ + m_pVIP, + + /* + * Description: - + * Member type: int [5] + * Get params: get_member_game(member, element); + * Set params: set_member_game(member, value, element); + */ + m_pVIPQueue, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member_game(member); + * Set params: set_member_game(member, Float:value); + */ + m_flIntermissionEndTime, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member_game(member); + * Set params: set_member_game(member, Float:value); + */ + m_flIntermissionStartTime, + + + /* + * Description: - + * Member type: BOOL + * Get params: get_member_game(member); + * Set params: set_member_game(member, value); + */ + m_iEndIntermissionButtonHit, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member_game(member); + * Set params: set_member_game(member, Float:value); + */ + m_tmNextPeriodicThink, + + /* + * Description: TRUE = the game commencing when there is at least one CT and T, FALSE = scoring will not start until both teams have players (deprecated name m_bFirstConnected) + * Member type: bool + * Get params: get_member_game(member); + * Set params: set_member_game(member, bool:value); + */ + m_bGameStarted, + + /* + * Description: - + * Member type: bool + * Get params: get_member_game(member); + * Set params: set_member_game(member, bool:value); + */ + m_bInCareerGame, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member_game(member); + * Set params: set_member_game(member, Float:value); + */ + m_fCareerRoundMenuTime, + + /* + * Description: - + * Member type: int + * Get params: get_member_game(member); + * Set params: set_member_game(member, value); + */ + m_iCareerMatchWins, + + /* + * Description: - + * Member type: int + * Get params: get_member_game(member); + * Set params: set_member_game(member, value); + */ + m_iRoundWinDifference, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member_game(member); + * Set params: set_member_game(member, Float:value); + */ + m_fCareerMatchMenuTime, + + /* + * Description: - + * Member type: bool + * Get params: get_member_game(member); + * Set params: set_member_game(member, bool:value); + */ + m_bSkipSpawn, + + /* + * Description: - + * Member type: bool + * Get params: get_member_game(member); + * Set params: set_member_game(member, bool:value); + */ + m_bSkipShowMenu, + + /* + * Description: - + * Member type: bool + * Get params: get_member_game(member); + * Set params: set_member_game(member, bool:value); + */ + m_bNeededPlayers, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member_game(member); + * Set params: set_member_game(member, Float:value); + */ + m_flEscapeRatio, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member_game(member); + * Set params: set_member_game(member, Float:value); + */ + m_flTimeLimit, + + /* + * Description: Stores the start time of the game. + * @note The time resets when the game is restarting or the game commencing. + * Member type: float + * Get params: Float:get_member_game(member); + * Set params: set_member_game(member, Float:value); + */ + m_flGameStartTime, + + /* + * Description: TRUE = goes balance team, otherwise FALSE + * Member type: bool + * Get params: get_member_game(member); + * Set params: set_member_game(member, bool:value); + */ + m_bTeamBalanced, +}; + +/** +* CBaseEntity Members +*/ +enum CBaseEntity_Members +{ + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + currentammo = BEGIN_MEMBER_REGION(base), + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + maxammo_buckshot, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + ammo_buckshot, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + maxammo_9mm, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + ammo_9mm, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + maxammo_556nato, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + ammo_556nato, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + maxammo_556natobox, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + ammo_556natobox, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + maxammo_762nato, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + ammo_762nato, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + maxammo_45acp, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + ammo_45acp, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + maxammo_50ae, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + ammo_50ae, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + maxammo_338mag, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + ammo_338mag, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + maxammo_57mm, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + ammo_57mm, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + maxammo_357sig, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + ammo_357sig, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_flStartThrow, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_flReleaseThrow, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_iSwing, + + /* + * Description: - + * Member type: bool + * Get params: get_member(index, member); + * Set params: set_member(index, member, bool:value); + */ + has_disconnected, +}; + +/** +* CBaseAnimating Members +*/ +enum CBaseAnimating_Members +{ + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_flFrameRate = BEGIN_MEMBER_REGION(animating), + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_flGroundSpeed, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_flLastEventCheck, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_fSequenceFinished, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_fSequenceLoops, +}; + +/** +* CBaseMonster Members +*/ +enum CBaseMonster_Members +{ + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_Activity = BEGIN_MEMBER_REGION(basemonster), + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_IdealActivity, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_LastHitGroup, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_bitsDamageType, + + /* + * Description: - + * Member type: byte [8] + * Get params: get_member(index, member, TimeBasedDamage:element); + * Set params: set_member(index, member, value, TimeBasedDamage:element); + */ + m_rgbTimeBasedDamage, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_MonsterState, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_IdealMonsterState, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_afConditions, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_afMemory, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_flNextAttack, + + /* + * Description: - + * Member type: class EHANDLE + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_hEnemy, + + /* + * Description: - + * Member type: class EHANDLE + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_hTargetEnt, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_flFieldOfView, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_bloodColor, + + /* + * Description: - + * Member type: class Vector + * Get params: get_member(index, member, Float:output[3]); + * Set params: set_member(index, member, Float:dest[3]); + */ + m_HackedGunPos, + + /* + * Description: - + * Member type: class Vector + * Get params: get_member(index, member, Float:output[3]); + * Set params: set_member(index, member, Float:dest[3]); + */ + m_vecEnemyLKP, +}; + +/** +* CBasePlayer Members +*/ +enum CBasePlayer_Members +{ + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + random_seed = BEGIN_MEMBER_REGION(player), + + /* + * Description: - + * Member type: unsigned short + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_usPlayerBleed, + + /* + * Description: - + * Member type: class EHANDLE + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_hObserverTarget, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_flNextObserverInput, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_iObserverWeapon, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_iObserverC4State, + + /* + * Description: - + * Member type: bool + * Get params: get_member(index, member); + * Set params: set_member(index, member, bool:value); + */ + m_bObserverHasDefuser, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_iObserverLastMode, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_flFlinchTime, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_flAnimTime, + + /* + * Description: - + * Member type: bool + * Get params: get_member(index, member); + * Set params: set_member(index, member, bool:value); + */ + m_bHighDamage, + + /* + * Description: Slow down the player based on the velocity modifier, applies when the player takes damage. + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_flVelocityModifier, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_iLastZoom, + + /* + * Description: - + * Member type: bool + * Get params: get_member(index, member); + * Set params: set_member(index, member, bool:value); + */ + m_bResumeZoom, + + /* + * Description: Delay to call EjectBrass function on M3, Scout and AWP (rest of weapons are client-side). + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_flEjectBrass, + + /* + * Description: - + * Member type: enum ArmorType + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_iKevlar, + + /* + * Description: - + * Member type: bool + * Get params: get_member(index, member); + * Set params: set_member(index, member, bool:value); + */ + m_bNotKilled, + + /* + * Description: - + * Member type: enum TeamName + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_iTeam, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_iAccount, + + /* + * Description: - + * Member type: bool + * Get params: get_member(index, member); + * Set params: set_member(index, member, bool:value); + */ + m_bHasPrimary, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_flDeathThrowTime, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_iThrowDirection, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_flLastTalk, + + /* + * Description: - + * Member type: bool + * Get params: get_member(index, member); + * Set params: set_member(index, member, bool:value); + */ + m_bJustConnected, + + /* + * Description: - + * Member type: bool + * Get params: get_member(index, member); + * Set params: set_member(index, member, bool:value); + */ + m_bContextHelp, + + /* + * Description: - + * Member type: enum JoinState + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_iJoiningState, + + /* + * Description: - + * Member type: class CBaseEntity * + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_pIntroCamera, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_fIntroCamTime, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_fLastMovement, + + /* + * Description: - + * Member type: bool + * Get params: get_member(index, member); + * Set params: set_member(index, member, bool:value); + */ + m_bMissionBriefing, + + /* + * Description: - + * Member type: bool + * Get params: get_member(index, member); + * Set params: set_member(index, member, bool:value); + */ + m_bTeamChanged, + + /* + * Description: - + * Member type: enum ModelName + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_iModelName, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_iTeamKills, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_iIgnoreGlobalChat, + + /* + * Description: - + * Member type: bool + * Get params: get_member(index, member); + * Set params: set_member(index, member, bool:value); + */ + m_bHasNightVision, + + /* + * Description: - + * Member type: bool + * Get params: get_member(index, member); + * Set params: set_member(index, member, bool:value); + */ + m_bNightVisionOn, + + /* + * Description: - + * Member type: class Vector [20] + * Get params: get_member(index, member, Float:output[3], element); + * Set params: set_member(index, member, Float:dest[3], element); + */ + m_vRecentPath, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_flIdleCheckTime, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_flRadioTime, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_iRadioMessages, + + /* + * Description: - + * Member type: bool + * Get params: get_member(index, member); + * Set params: set_member(index, member, bool:value); + */ + m_bIgnoreRadio, + + /* + * Description: - + * Member type: bool + * Get params: get_member(index, member); + * Set params: set_member(index, member, bool:value); + */ + m_bHasC4, + + /* + * Description: - + * Member type: bool + * Get params: get_member(index, member); + * Set params: set_member(index, member, bool:value); + */ + m_bHasDefuser, + + /* + * Description: - + * Member type: bool + * Get params: get_member(index, member); + * Set params: set_member(index, member, bool:value); + */ + m_bKilledByBomb, + + /* + * Description: - + * Member type: class Vector + * Get params: get_member(index, member, Float:output[3]); + * Set params: set_member(index, member, Float:dest[3]); + */ + m_vBlastVector, + + /* + * Description: - + * Member type: bool + * Get params: get_member(index, member); + * Set params: set_member(index, member, bool:value); + */ + m_bKilledByGrenade, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_flDisplayHistory, + + /* + * Description: - + * Member type: enum _Menu + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_iMenu, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_iChaseTarget, + + /* + * Description: - + * Member type: class CBaseEntity * + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_pChaseTarget, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_fCamSwitch, + + /* + * Description: - + * Member type: bool + * Get params: get_member(index, member); + * Set params: set_member(index, member, bool:value); + */ + m_bEscaped, + + /* + * Description: - + * Member type: bool + * Get params: get_member(index, member); + * Set params: set_member(index, member, bool:value); + */ + m_bIsVIP, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_tmNextRadarUpdate, + + /* + * Description: - + * Member type: class Vector + * Get params: get_member(index, member, Float:output[3]); + * Set params: set_member(index, member, Float:dest[3]); + */ + m_vLastOrigin, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_iCurrentKickVote, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_flNextVoteTime, + + /* + * Description: - + * Member type: bool + * Get params: get_member(index, member); + * Set params: set_member(index, member, bool:value); + */ + m_bJustKilledTeammate, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_iHostagesKilled, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_iMapVote, + + /* + * Description: The player can't shoot for freezetime period or during defuse bomb + * @note This member isn't flexible, you can't override it for other behavior, so for this purpose use m_bCanShootOverride + * Member type: bool + * Get params: get_member(index, member); + * Set params: set_member(index, member, bool:value); + */ + m_bCanShoot, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_flLastFired, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_flLastAttackedTeammate, + + /* + * Description: - + * Member type: bool + * Get params: get_member(index, member); + * Set params: set_member(index, member, bool:value); + */ + m_bHeadshotKilled, + + /* + * Description: - + * Member type: bool + * Get params: get_member(index, member); + * Set params: set_member(index, member, bool:value); + */ + m_bPunishedForTK, + + /* + * Description: - + * Member type: bool + * Get params: get_member(index, member); + * Set params: set_member(index, member, bool:value); + */ + m_bReceivesNoMoneyNextRound, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_iTimeCheckAllowed, + + /* + * Description: - + * Member type: bool + * Get params: get_member(index, member); + * Set params: set_member(index, member, bool:value); + */ + m_bHasChangedName, + + /* + * Description: - + * Member type: char [32] + * Get params: get_member(index, member, dest[], const lenght); + * Set params: set_member(index, member, const source[]); + */ + m_szNewName, + + /* + * Description: - + * Member type: bool + * Get params: get_member(index, member); + * Set params: set_member(index, member, bool:value); + */ + m_bIsDefusing, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_tmHandleSignals, + + /* + * Description: (0 - signal, 1 - state) + * Member type: class CUnifiedSignals + * Get params: get_member(index, member, signals[UnifiedSignals]); + * Set params: set_member(index, member, signals[UnifiedSignals]); + */ + m_signals, + + /* + * Description: - + * Member type: struct edict_s * + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_pentCurBombTarget, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_iPlayerSound, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_iTargetVolume, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_iWeaponVolume, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_iExtraSoundTypes, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_iWeaponFlash, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_flStopExtraSoundTime, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_flFlashLightTime, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_iFlashBattery, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_afButtonLast, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_afButtonPressed, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_afButtonReleased, + + /* + * Description: - + * Member type: struct edict_s * + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_pentSndLast, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_flSndRoomtype, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_flSndRange, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_flFallVelocity, + + /* + * Description: - + * Member type: int [4] + * Get params: get_member(index, member, element); + * Set params: set_member(index, member, value, element); + */ + m_rgItems, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_fNewAmmo, + + /* + * Description: - + * Member type: unsigned int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_afPhysicsFlags, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_fNextSuicideTime, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_flTimeStepSound, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_flTimeWeaponIdle, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_flSwimTime, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_flDuckTime, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_flWallJumpTime, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_flSuitUpdate, + + /* + * Description: - + * Member type: int [4] + * Get params: get_member(index, member, element); + * Set params: set_member(index, member, value, element); + */ + m_rgSuitPlayList, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_iSuitPlayNext, + + /* + * Description: - + * Member type: int [32] + * Get params: get_member(index, member, element); + * Set params: set_member(index, member, value, element); + */ + m_rgiSuitNoRepeat, + + /* + * Description: - + * Member type: float [32] + * Get params: Float:get_member(index, member, element); + * Set params: set_member(index, member, Float:value, element); + */ + m_rgflSuitNoRepeatTime, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_lastDamageAmount, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_tbdPrev, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_flgeigerRange, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_flgeigerDelay, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_igeigerRangePrev, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_iStepLeft, + + /* + * Description: - + * Member type: char [17] + * Get params: get_member(index, member, dest[], const lenght); + * Set params: set_member(index, member, const source[]); + */ + m_szTextureName, + + /* + * Description: - + * Member type: char + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_chTextureType, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_idrowndmg, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_idrownrestored, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_bitsHUDDamage, + + /* + * Description: - + * Member type: BOOL + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_fInitHUD, + + /* + * Description: - + * Member type: BOOL + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_fGameHUDInitialized, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_iTrain, + + /* + * Description: - + * Member type: BOOL + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_fWeapon, + + /* + * Description: - + * Member type: class EHANDLE + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_pTank, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_fDeadTime, + + /* + * Description: - + * Member type: BOOL + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_fNoPlayerSound, + + /* + * Description: - + * Member type: BOOL + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_fLongJump, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_tSneaking, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_iUpdateTime, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_iClientHealth, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_iClientBattery, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_iHideHUD, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_iClientHideHUD, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_iFOV, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_iClientFOV, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_iNumSpawns, + + /* + * Description: - + * Member type: class CBaseEntity * + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_pObserver, + + /* + * Description: - + * Member type: class CBasePlayerItem *[6] + * Get params: get_member(index, member, element); + * Set params: set_member(index, member, value, element); + */ + m_rgpPlayerItems, + + /* + * Description: - + * Member type: class CBasePlayerItem * + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_pActiveItem, + + /* + * Description: - + * Member type: class CBasePlayerItem * + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_pClientActiveItem, + + /* + * Description: - + * Member type: class CBasePlayerItem * + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_pLastItem, + + /* + * Description: - + * Member type: int [32] + * Get params: get_member(index, member, element); + * Set params: set_member(index, member, value, element); + */ + m_rgAmmo, + + /* + * Description: - + * Member type: int [32] + * Get params: get_member(index, member, element); + * Set params: set_member(index, member, value, element); + */ + m_rgAmmoLast, + + /* + * Description: - + * Member type: class Vector + * Get params: get_member(index, member, Float:output[3]); + * Set params: set_member(index, member, Float:dest[3]); + */ + m_vecAutoAim, + + /* + * Description: - + * Member type: BOOL + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_fOnTarget, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_iDeaths, + + /* + * Description: - + * Member type: int [4] + * Get params: get_member(index, member, element); + * Set params: set_member(index, member, value, element); + */ + m_izSBarState, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_flNextSBarUpdateTime, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_flStatusBarDisappearDelay, + + /* + * Description: - + * Member type: char [128] + * Get params: get_member(index, member, dest[], const lenght); + * Set params: set_member(index, member, const source[]); + */ + m_SbarString0, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_lastx, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_lasty, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_nCustomSprayFrames, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_flNextDecalTime, + + /* + * Description: - + * Member type: char [16] + * Get params: get_member(index, member, dest[], const lenght); + * Set params: set_member(index, member, const source[]); + */ + m_szTeamName, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_modelIndexPlayer, + + /* + * Description: - + * Member type: char [32] + * Get params: get_member(index, member, dest[], const lenght); + * Set params: set_member(index, member, const source[]); + */ + m_szAnimExtention, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_iGaitsequence, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_flGaitframe, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_flGaityaw, + + /* + * Description: - + * Member type: class Vector + * Get params: get_member(index, member, Float:output[3]); + * Set params: set_member(index, member, Float:dest[3]); + */ + m_prevgaitorigin, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_flPitch, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_flYaw, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_flGaitMovement, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_iAutoWepSwitch, + + /* + * Description: - + * Member type: bool + * Get params: get_member(index, member); + * Set params: set_member(index, member, bool:value); + */ + m_bVGUIMenus, + + /* + * Description: - + * Member type: bool + * Get params: get_member(index, member); + * Set params: set_member(index, member, bool:value); + */ + m_bShowHints, + + /* + * Description: - + * Member type: bool + * Get params: get_member(index, member); + * Set params: set_member(index, member, bool:value); + */ + m_bShieldDrawn, + + /* + * Description: - + * Member type: bool + * Get params: get_member(index, member); + * Set params: set_member(index, member, bool:value); + */ + m_bOwnsShield, + + /* + * Description: - + * Member type: bool + * Get params: get_member(index, member); + * Set params: set_member(index, member, bool:value); + */ + m_bWasFollowing, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_flNextFollowTime, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_flYawModifier, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_blindUntilTime, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_blindStartTime, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_blindHoldTime, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_blindFadeTime, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_blindAlpha, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_allowAutoFollowTime, + + /* + * Description: - + * Member type: char [256] + * Get params: get_member(index, member, dest[], const lenght); + * Set params: set_member(index, member, const source[]); + */ + m_autoBuyString, + + /* + * Description: - + * Member type: char * + * Get params: get_member(index, member, dest[], const lenght); + * Set params: set_member(index, member, const source[]); + */ + m_rebuyString, + + /* + * Description: - + * Member type: struct RebuyStruct + * Get params: RebuyHandle:get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_rebuyStruct, + + /* + * Description: - + * Member type: bool + * Get params: get_member(index, member); + * Set params: set_member(index, member, bool:value); + */ + m_bIsInRebuy, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_flLastUpdateTime, + + /* + * Description: - + * Member type: char [32] + * Get params: get_member(index, member, dest[], const lenght); + * Set params: set_member(index, member, const source[]); + */ + m_lastLocation, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_progressStart, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_progressEnd, + + /* + * Description: - + * Member type: bool + * Get params: get_member(index, member); + * Set params: set_member(index, member, bool:value); + */ + m_bObserverAutoDirector, + + /* + * Description: - + * Member type: bool + * Get params: get_member(index, member); + * Set params: set_member(index, member, bool:value); + */ + m_canSwitchObserverModes, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_heartBeatTime, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_intenseTimestamp, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_silentTimestamp, + + /* + * Description: - + * Member type: enum MusicState + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_musicState, + + /* + * Description: - + * Member type: float [8] + * Get params: Float:get_member(index, member, element); + * Set params: set_member(index, member, Float:value, element); + */ + m_flLastCommandTime, + + /* + * Description: The amount of money sent to the client last time. + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_iLastAccount, + + /* + * Description: The amount of health sent to the client last time. + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_iLastClientHealth, + + /* + * Description: Waiting time for update fields into scoreboard. + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_tmNextAccountHealthUpdate, +}; + +/** +* RebuyStruct +*/ +enum RebuyStruct +{ + /* + * Description: - + * Member type: int + * Get params: get_rebuy(RebuyHandle:handle, RebuyStruct:member); + * Set params: set_rebuy(RebuyHandle:handle, RebuyStruct:member, value); + */ + m_primaryWeapon = BEGIN_MEMBER_REGION(rebuystruct), + + /* + * Description: - + * Member type: int + * Get params: get_rebuy(RebuyHandle:handle, RebuyStruct:member); + * Set params: set_rebuy(RebuyHandle:handle, RebuyStruct:member, value); + */ + m_primaryAmmo, + + /* + * Description: - + * Member type: int + * Get params: get_rebuy(RebuyHandle:handle, RebuyStruct:member); + * Set params: set_rebuy(RebuyHandle:handle, RebuyStruct:member, value); + */ + m_secondaryWeapon, + + /* + * Description: - + * Member type: int + * Get params: get_rebuy(RebuyHandle:handle, RebuyStruct:member); + * Set params: set_rebuy(RebuyHandle:handle, RebuyStruct:member, value); + */ + m_secondaryAmmo, + + /* + * Description: - + * Member type: int + * Get params: get_rebuy(RebuyHandle:handle, RebuyStruct:member); + * Set params: set_rebuy(RebuyHandle:handle, RebuyStruct:member, value); + */ + m_heGrenade, + + /* + * Description: - + * Member type: int + * Get params: get_rebuy(RebuyHandle:handle, RebuyStruct:member); + * Set params: set_rebuy(RebuyHandle:handle, RebuyStruct:member, value); + */ + m_flashbang, + + /* + * Description: - + * Member type: int + * Get params: get_rebuy(RebuyHandle:handle, RebuyStruct:member); + * Set params: set_rebuy(RebuyHandle:handle, RebuyStruct:member, value); + */ + m_smokeGrenade, + + /* + * Description: - + * Member type: int + * Get params: get_rebuy(RebuyHandle:handle, RebuyStruct:member); + * Set params: set_rebuy(RebuyHandle:handle, RebuyStruct:member, value); + */ + m_defuser, + + /* + * Description: - + * Member type: int + * Get params: get_rebuy(RebuyHandle:handle, RebuyStruct:member); + * Set params: set_rebuy(RebuyHandle:handle, RebuyStruct:member, value); + */ + m_nightVision, + + /* + * Description: enum ArmorType + * Member type: int + * Get params: get_rebuy(RebuyHandle:handle, RebuyStruct:member); + * Set params: set_rebuy(RebuyHandle:handle, RebuyStruct:member, value); + */ + m_armor, +}; + +/** +* PlayerMove +*/ +enum PlayerMove +{ + /* + * Description: - + * Member type: int + * Get params: get_pmove(member); + * Set params: set_pmove(const PlayerMove:var, value); + */ + pm_player_index = BEGIN_MEMBER_REGION(playermove), + + /* + * Description: - + * Member type: qboolean + * Get params: get_pmove(member); + * Set params: set_pmove(const PlayerMove:var, value); + */ + pm_server, + + /* + * Description: - + * Member type: qboolean + * Get params: get_pmove(member); + * Set params: set_pmove(const PlayerMove:var, value); + */ + pm_multiplayer, + + /* + * Description: - + * Member type: float + * Get params: Float:get_pmove(const MoveVars:var); + * Set params: set_pmove(const MoveVars:var, Float:value); + */ + pm_time, + + /* + * Description: - + * Member type: float + * Get params: Float:get_pmove(const MoveVars:var); + * Set params: set_pmove(const MoveVars:var, Float:value); + */ + pm_frametime, + + /* + * Description: - + * Member type: vec3_t + * Get params: get_pmove(const PlayerMove:var, Float:output[3]); + * Set params: set_pmove(const PlayerMove:var, Float:dest[3]); + */ + pm_forward, + + /* + * Description: - + * Member type: vec3_t + * Get params: get_pmove(const PlayerMove:var, Float:output[3]); + * Set params: set_pmove(const PlayerMove:var, Float:dest[3]); + */ + pm_right, + + /* + * Description: - + * Member type: vec3_t + * Get params: get_pmove(const PlayerMove:var, Float:output[3]); + * Set params: set_pmove(const PlayerMove:var, Float:dest[3]); + */ + pm_up, + + /* + * Description: - + * Member type: vec3_t + * Get params: get_pmove(const PlayerMove:var, Float:output[3]); + * Set params: set_pmove(const PlayerMove:var, Float:dest[3]); + */ + pm_origin, + + /* + * Description: - + * Member type: vec3_t + * Get params: get_pmove(const PlayerMove:var, Float:output[3]); + * Set params: set_pmove(const PlayerMove:var, Float:dest[3]); + */ + pm_angles, + + /* + * Description: - + * Member type: vec3_t + * Get params: get_pmove(const PlayerMove:var, Float:output[3]); + * Set params: set_pmove(const PlayerMove:var, Float:dest[3]); + */ + pm_oldangles, + + /* + * Description: - + * Member type: vec3_t + * Get params: get_pmove(const PlayerMove:var, Float:output[3]); + * Set params: set_pmove(const PlayerMove:var, Float:dest[3]); + */ + pm_velocity, + + /* + * Description: - + * Member type: vec3_t + * Get params: get_pmove(const PlayerMove:var, Float:output[3]); + * Set params: set_pmove(const PlayerMove:var, Float:dest[3]); + */ + pm_movedir, + + /* + * Description: - + * Member type: vec3_t + * Get params: get_pmove(const PlayerMove:var, Float:output[3]); + * Set params: set_pmove(const PlayerMove:var, Float:dest[3]); + */ + pm_basevelocity, + + /* + * Description: - + * Member type: vec3_t + * Get params: get_pmove(const PlayerMove:var, Float:output[3]); + * Set params: set_pmove(const PlayerMove:var, Float:dest[3]); + */ + pm_view_ofs, + + /* + * Description: - + * Member type: float + * Get params: Float:get_pmove(member); + * Set params: set_pmove(const PlayerMove:var, Float:value); + */ + pm_flDuckTime, + + /* + * Description: - + * Member type: qboolean + * Get params: get_pmove(member); + * Set params: set_pmove(const PlayerMove:var, value); + */ + pm_bInDuck, + + /* + * Description: - + * Member type: int + * Get params: get_pmove(member); + * Set params: set_pmove(const PlayerMove:var, value); + */ + pm_flTimeStepSound, + + /* + * Description: - + * Member type: int + * Get params: get_pmove(member); + * Set params: set_pmove(const PlayerMove:var, value); + */ + pm_iStepLeft, + + /* + * Description: - + * Member type: float + * Get params: Float:get_pmove(member); + * Set params: set_pmove(const PlayerMove:var, Float:value); + */ + pm_flFallVelocity, + + /* + * Description: - + * Member type: vec3_t + * Get params: get_pmove(const PlayerMove:var, Float:output[3]); + * Set params: set_pmove(const PlayerMove:var, Float:dest[3]); + */ + pm_punchangle, + + /* + * Description: - + * Member type: float + * Get params: Float:get_pmove(member); + * Set params: set_pmove(const PlayerMove:var, Float:value); + */ + pm_flSwimTime, + + /* + * Description: - + * Member type: float + * Get params: Float:get_pmove(member); + * Set params: set_pmove(const PlayerMove:var, Float:value); + */ + pm_flNextPrimaryAttack, + + /* + * Description: - + * Member type: int + * Get params: get_pmove(member); + * Set params: set_pmove(const PlayerMove:var, value); + */ + pm_effects, + + /* + * Description: - + * Member type: int + * Get params: get_pmove(member); + * Set params: set_pmove(const PlayerMove:var, value); + */ + pm_flags, + + /* + * Description: - + * Member type: int + * Get params: get_pmove(member); + * Set params: set_pmove(const PlayerMove:var, value); + */ + pm_usehull, + + /* + * Description: - + * Member type: float + * Get params: Float:get_pmove(member); + * Set params: set_pmove(const PlayerMove:var, Float:value); + */ + pm_gravity, + + /* + * Description: - + * Member type: float + * Get params: Float:get_pmove(member); + * Set params: set_pmove(const PlayerMove:var, Float:value); + */ + pm_friction, + + /* + * Description: - + * Member type: int + * Get params: get_pmove(member); + * Set params: set_pmove(const PlayerMove:var, value); + */ + pm_oldbuttons, + + /* + * Description: - + * Member type: float + * Get params: Float:get_pmove(member); + * Set params: set_pmove(const PlayerMove:var, Float:value); + */ + pm_waterjumptime, + + /* + * Description: - + * Member type: qboolean + * Get params: get_pmove(member); + * Set params: set_pmove(const PlayerMove:var, value); + */ + pm_dead, + + /* + * Description: - + * Member type: int + * Get params: get_pmove(member); + * Set params: set_pmove(const PlayerMove:var, value); + */ + pm_deadflag, + + /* + * Description: - + * Member type: int + * Get params: get_pmove(member); + * Set params: set_pmove(const PlayerMove:var, value); + */ + pm_spectator, + + /* + * Description: - + * Member type: int + * Get params: get_pmove(member); + * Set params: set_pmove(const PlayerMove:var, value); + */ + pm_movetype, + + /* + * Description: - + * Member type: int + * Get params: get_pmove(member); + * Set params: set_pmove(const PlayerMove:var, value); + */ + pm_onground, + + /* + * Description: - + * Member type: int + * Get params: get_pmove(member); + * Set params: set_pmove(const PlayerMove:var, value); + */ + pm_waterlevel, + + /* + * Description: - + * Member type: int + * Get params: get_pmove(member); + * Set params: set_pmove(const PlayerMove:var, value); + */ + pm_watertype, + + /* + * Description: - + * Member type: int + * Get params: get_pmove(member); + * Set params: set_pmove(const PlayerMove:var, value); + */ + pm_oldwaterlevel, + + /* + * Description: - + * Member type: char [256] + * Get params: get_pmove(const PlayerMove:var, dest[], const lenght); + * Set params: set_pmove(const PlayerMove:var, const source[]); + */ + pm_sztexturename, + + /* + * Description: - + * Member type: char + * Get params: get_pmove(member); + * Set params: set_pmove(const PlayerMove:var, value); + */ + pm_chtexturetype, + + /* + * Description: - + * Member type: float + * Get params: Float:get_pmove(member); + * Set params: set_pmove(const PlayerMove:var, Float:value); + */ + pm_maxspeed, + + /* + * Description: - + * Member type: float + * Get params: Float:get_pmove(member); + * Set params: set_pmove(const PlayerMove:var, Float:value); + */ + pm_clientmaxspeed, + + /* + * Description: - + * Member type: int + * Get params: get_pmove(member); + * Set params: set_pmove(const PlayerMove:var, value); + */ + pm_iuser1, + + /* + * Description: - + * Member type: int + * Get params: get_pmove(member); + * Set params: set_pmove(const PlayerMove:var, value); + */ + pm_iuser2, + + /* + * Description: - + * Member type: int + * Get params: get_pmove(member); + * Set params: set_pmove(const PlayerMove:var, value); + */ + pm_iuser3, + + /* + * Description: - + * Member type: int + * Get params: get_pmove(member); + * Set params: set_pmove(const PlayerMove:var, value); + */ + pm_iuser4, + + /* + * Description: - + * Member type: float + * Get params: Float:get_pmove(member); + * Set params: set_pmove(const PlayerMove:var, Float:value); + */ + pm_fuser1, + + /* + * Description: - + * Member type: float + * Get params: Float:get_pmove(member); + * Set params: set_pmove(const PlayerMove:var, Float:value); + */ + pm_fuser2, + + /* + * Description: - + * Member type: float + * Get params: Float:get_pmove(member); + * Set params: set_pmove(const PlayerMove:var, Float:value); + */ + pm_fuser3, + + /* + * Description: - + * Member type: float + * Get params: Float:get_pmove(member); + * Set params: set_pmove(const PlayerMove:var, Float:value); + */ + pm_fuser4, + + /* + * Description: - + * Member type: vec3_t + * Get params: get_pmove(const PlayerMove:var, Float:output[3]); + * Set params: set_pmove(const PlayerMove:var, Float:dest[3]); + */ + pm_vuser1, + + /* + * Description: - + * Member type: vec3_t + * Get params: get_pmove(const PlayerMove:var, Float:output[3]); + * Set params: set_pmove(const PlayerMove:var, Float:dest[3]); + */ + pm_vuser2, + + /* + * Description: - + * Member type: vec3_t + * Get params: get_pmove(const PlayerMove:var, Float:output[3]); + * Set params: set_pmove(const PlayerMove:var, Float:dest[3]); + */ + pm_vuser3, + + /* + * Description: - + * Member type: vec3_t + * Get params: get_pmove(const PlayerMove:var, Float:output[3]); + * Set params: set_pmove(const PlayerMove:var, Float:dest[3]); + */ + pm_vuser4, + + /* + * Description: - + * Member type: int + * Get params: get_pmove(member); + * Set params: set_pmove(const PlayerMove:var, value); + */ + pm_numphysent, + + /* + * Description: - + * Member type: struct usercmd_s * + * Get params: get_pmove(member); + * Set params: set_pmove(const PlayerMove:var, value); + */ + pm_cmd, + + /* + * Description: - + * Member type: int + * Get params: get_pmove(member); + * Set params: set_pmove(const PlayerMove:var, value); + */ + pm_numtouch, + + /* + * Description: - + * Member type: char [256] + * Get params: get_pmove(const PlayerMove:var, dest[], const lenght); + * Set params: set_pmove(const PlayerMove:var, const source[]); + */ + pm_physinfo, + + /* + * Description: - + * Member type: vec3_t [4] + * Get params: get_pmove(const PlayerMove:var, Float:output[3], element); + * Set params: set_pmove(const PlayerMove:var, Float:dest[3], element); + */ + pm_player_mins, + + /* + * Description: - + * Member type: vec3_t [4] + * Get params: get_pmove(const PlayerMove:var, Float:output[3], element); + * Set params: set_pmove(const PlayerMove:var, Float:dest[3], element); + */ + pm_player_maxs, +}; + +/** +* MoveVars +*/ +enum MoveVars +{ + /* + * Description: - + * Member type: float + * Get params: Float:get_movevar(const MoveVars:var); + * Set params: set_movevar(const MoveVars:var, Float:value); + */ + mv_gravity = BEGIN_MEMBER_REGION(movevars), + + /* + * Description: - + * Member type: float + * Get params: Float:get_movevar(const MoveVars:var); + * Set params: set_movevar(const MoveVars:var, Float:value); + */ + mv_stopspeed, + + /* + * Description: - + * Member type: float + * Get params: Float:get_movevar(const MoveVars:var); + * Set params: set_movevar(const MoveVars:var, Float:value); + */ + mv_maxspeed, + + /* + * Description: - + * Member type: float + * Get params: Float:get_movevar(const MoveVars:var); + * Set params: set_movevar(const MoveVars:var, Float:value); + */ + mv_spectatormaxspeed, + + /* + * Description: - + * Member type: float + * Get params: Float:get_movevar(const MoveVars:var); + * Set params: set_movevar(const MoveVars:var, Float:value); + */ + mv_accelerate, + + /* + * Description: - + * Member type: float + * Get params: Float:get_movevar(const MoveVars:var); + * Set params: set_movevar(const MoveVars:var, Float:value); + */ + mv_airaccelerate, + + /* + * Description: - + * Member type: float + * Get params: Float:get_movevar(const MoveVars:var); + * Set params: set_movevar(const MoveVars:var, Float:value); + */ + mv_wateraccelerate, + + /* + * Description: - + * Member type: float + * Get params: Float:get_movevar(const MoveVars:var); + * Set params: set_movevar(const MoveVars:var, Float:value); + */ + mv_friction, + + /* + * Description: - + * Member type: float + * Get params: Float:get_movevar(const MoveVars:var); + * Set params: set_movevar(const MoveVars:var, Float:value); + */ + mv_edgefriction, + + /* + * Description: - + * Member type: float + * Get params: Float:get_movevar(const MoveVars:var); + * Set params: set_movevar(const MoveVars:var, Float:value); + */ + mv_waterfriction, + + /* + * Description: - + * Member type: float + * Get params: Float:get_movevar(const MoveVars:var); + * Set params: set_movevar(const MoveVars:var, Float:value); + */ + mv_entgravity, + + /* + * Description: - + * Member type: float + * Get params: Float:get_movevar(const MoveVars:var); + * Set params: set_movevar(const MoveVars:var, Float:value); + */ + mv_bounce, + + /* + * Description: - + * Member type: float + * Get params: Float:get_movevar(const MoveVars:var); + * Set params: set_movevar(const MoveVars:var, Float:value); + */ + mv_stepsize, + + /* + * Description: - + * Member type: float + * Get params: Float:get_movevar(const MoveVars:var); + * Set params: set_movevar(const MoveVars:var, Float:value); + */ + mv_maxvelocity, + + /* + * Description: - + * Member type: float + * Get params: Float:get_movevar(const MoveVars:var); + * Set params: set_movevar(const MoveVars:var, Float:value); + */ + mv_zmax, + + /* + * Description: - + * Member type: float + * Get params: Float:get_movevar(const MoveVars:var); + * Set params: set_movevar(const MoveVars:var, Float:value); + */ + mv_waveHeight, + + /* + * Description: - + * Member type: BOOL + * Get params: Float:get_movevar(const MoveVars:var); + * Set params: set_movevar(const MoveVars:var, Float:value); + */ + mv_footsteps, + + /* + * Description: - + * Member type: char [32] + * Get params: Float:get_movevar(const MoveVars:var, dest[], const lenght); + * Set params: set_movevar(const MoveVars:var, const source[]); + */ + mv_skyName, + + /* + * Description: - + * Member type: float + * Get params: Float:get_movevar(const MoveVars:var); + * Set params: set_movevar(const MoveVars:var, Float:value); + */ + mv_rollangle, + + /* + * Description: - + * Member type: float + * Get params: Float:get_movevar(const MoveVars:var); + * Set params: set_movevar(const MoveVars:var, Float:value); + */ + mv_rollspeed, + + /* + * Description: - + * Member type: float + * Get params: Float:get_movevar(const MoveVars:var); + * Set params: set_movevar(const MoveVars:var, Float:value); + */ + mv_skycolor_r, + + /* + * Description: - + * Member type: float + * Get params: Float:get_movevar(const MoveVars:var); + * Set params: set_movevar(const MoveVars:var, Float:value); + */ + mv_skycolor_g, + + /* + * Description: - + * Member type: float + * Get params: Float:get_movevar(const MoveVars:var); + * Set params: set_movevar(const MoveVars:var, Float:value); + */ + mv_skycolor_b, + + /* + * Description: - + * Member type: float + * Get params: Float:get_movevar(const MoveVars:var); + * Set params: set_movevar(const MoveVars:var, Float:value); + */ + mv_skyvec_x, + + /* + * Description: - + * Member type: float + * Get params: Float:get_movevar(const MoveVars:var); + * Set params: set_movevar(const MoveVars:var, Float:value); + */ + mv_skyvec_y, + + /* + * Description: - + * Member type: float + * Get params: Float:get_movevar(const MoveVars:var); + * Set params: set_movevar(const MoveVars:var, Float:value); + */ + mv_skyvec_z, +}; + +/** +* PMTrace +*/ +enum PMTrace +{ + /* + * Description: - + * Member type: qboolean + * Get params: get_pmtrace(const tr, const PMTrace:var); + * Set params: set_pmtrace(const tr, const PMTrace:var, value); + */ + pmt_allsolid = BEGIN_MEMBER_REGION(pmtrace), + + /* + * Description: - + * Member type: qboolean + * Get params: get_pmtrace(const tr, const PMTrace:var); + * Set params: set_pmtrace(const tr, const PMTrace:var, value); + */ + pmt_startsolid, + + /* + * Description: - + * Member type: qboolean + * Get params: get_pmtrace(const tr, const PMTrace:var); + * Set params: set_pmtrace(const tr, const PMTrace:var, value); + */ + pmt_inopen, + + /* + * Description: - + * Member type: qboolean + * Get params: get_pmtrace(const tr, const PMTrace:var); + * Set params: set_pmtrace(const tr, const PMTrace:var, value); + */ + pmt_inwater, + + /* + * Description: - + * Member type: float + * Get params: Float:get_pmtrace(const tr, const PMTrace:var); + * Set params: set_pmtrace(const tr, const PMTrace:var, Float:value); + */ + pmt_fraction, + + /* + * Description: - + * Member type: vec3_t + * Get params: get_pmtrace(const tr, const PMTrace:var, Float:output[3]); + * Set params: set_pmtrace(const tr, const PMTrace:var, Float:dest[3]); + */ + pmt_endpos, + + /* + * Description: - + * Member type: int + * Get params: get_pmtrace(const tr, const PMTrace:var); + * Set params: set_pmtrace(const tr, const PMTrace:var, value); + */ + pmt_ent, + + /* + * Description: - + * Member type: vec3_t + * Get params: get_pmtrace(const tr, const PMTrace:var, Float:output[3]); + * Set params: set_pmtrace(const tr, const PMTrace:var, Float:dest[3]); + */ + pmt_deltavelocity, + + /* + * Description: - + * Member type: int + * Get params: get_pmtrace(const tr, const PMTrace:var); + * Set params: set_pmtrace(const tr, const PMTrace:var, value); + */ + pmt_hitgroup +}; + +/** +* CCSPlayer API Members +*/ +enum CCSPlayer_Members +{ + /* + * Description: - + * Member type: char [32] + * Get params: get_member(index, member, dest[], const lenght); + * Set params: set_member(index, member, const source[]); + */ + m_szModel = BEGIN_MEMBER_REGION(csplayer), + + /* + * Description: - + * Member type: bool + * Get params: get_member(index, member); + * Set params: set_member(index, member, bool:value); + */ + m_bForceShowMenu, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_flRespawnPending, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_flSpawnProtectionEndTime, + + /* + * Description: - + * Member type: class Vector + * Get params: get_member(index, member, Float:output[3]); + * Set params: set_member(index, member, Float:dest[3]); + */ + m_vecOldvAngle, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_iWeaponInfiniteAmmo, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_iWeaponInfiniteIds, + + /* + * Description: Forcing override for CBasePlayer::m_bCanShoot + * Member type: bool + * Get params: get_member(index, member); + * Set params: set_member(index, member, bool:value); + */ + m_bCanShootOverride, + + /* + * Description: - + * Member type: bool + * Get params: get_member(index, member); + * Set params: set_member(index, member, bool:value); + */ + m_bGameForcingRespawn, + + /* + * Description: - + * Member type: bool + * Get params: get_member(index, member); + * Set params: set_member(index, member, bool:value); + */ + m_bAutoBunnyHopping, + + /* + * Description: - + * Member type: bool + * Get params: get_member(index, member); + * Set params: set_member(index, member, bool:value); + */ + m_bMegaBunnyJumping, + + /* + * Description: - + * Member type: bool + * Get params: get_member(index, member); + * Set params: set_member(index, member, bool:value); + */ + m_bPlantC4Anywhere, + + /* + * Description: - + * Member type: bool + * Get params: get_member(index, member); + * Set params: set_member(index, member, bool:value); + */ + m_bSpawnProtectionEffects, + + /* + * Description: Player vertical jump height + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_flJumpHeight, + + /* + * Description: Player vertical jump height with longjump + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_flLongJumpHeight, + + /* + * Description: Player horizontal jump height with longjump + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_flLongJumpForce, + + /* + * Description: Player crouch maxspeed multiplier + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_flDuckSpeedMultiplier, + + /* + * Description: How many unanswered kills this player has been dealt by each other player (0-31) + * Member type: int [32] + * Get params: get_member(index, member, element); + * Set params: set_member(index, member, value, element); + */ + m_iNumKilledByUnanswered, + + /* + * Description: Array of state per other player whether player is dominating other players (0-31) + * Member type: bool [32] + * Get params: get_member(index, member, element); + * Set params: set_member(index, member, value, element); + */ + m_bPlayerDominated, +}; + +/** +* CBasePlayerItem Members +*/ +enum CBasePlayerItem_Members +{ + /* + * Description: ID of the owner on this item + * Member type: class CBasePlayer * + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_pPlayer = BEGIN_MEMBER_REGION(baseitem), + + /* + * Description: Iterator for linked list of the entities + * Member type: class CBasePlayerItem * + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_pNext, + + /* + * Description: ID of the item + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_iId, +}; + +/** +* CBasePlayerWeapon Members +*/ +enum CBasePlayerWeapon_Members +{ + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_Weapon_iPlayEmptySound = BEGIN_MEMBER_REGION(baseweapon), + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_Weapon_fFireOnEmpty, + + /* + * Description: Soonest time ItemPostFrame will call PrimaryAttack. + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_Weapon_flNextPrimaryAttack, + + /* + * Description: Soonest time ItemPostFrame will call SecondaryAttack. + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_Weapon_flNextSecondaryAttack, + + /* + * Description: Soonest time ItemPostFrame will call WeaponIdle. + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_Weapon_flTimeWeaponIdle, + + /* + * Description: "primary" ammo index into player's m_rgAmmo[] + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_Weapon_iPrimaryAmmoType, + + /* + * Description: "secondary" ammo index into player's m_rgAmmo[] + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_Weapon_iSecondaryAmmoType, + + /* + * Description: Number of shots left in the primary weapon clip, -1 if not used. + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_Weapon_iClip, + + /* + * Description: The last version of m_Weapon_iClip sent to hud dll. + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_Weapon_iClientClip, + + /* + * Description: The last version of the weapon state sent to hud dll (is current weapon, is on target). + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_Weapon_iClientWeaponState, + + /* + * Description: Are we in the middle of a reload? + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_Weapon_fInReload, + + /* + * Description: Are we in the middle of a reload for the shotguns? + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_Weapon_fInSpecialReload, + + /* + * Description: How much ammo you get when you pick up this weapon as placed by a level designer. + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_Weapon_iDefaultAmmo, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_Weapon_iShellId, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_Weapon_fMaxSpeed, + + /* + * Description: - + * Member type: bool + * Get params: get_member(index, member); + * Set params: set_member(index, member, bool:value); + */ + m_Weapon_bDelayFire, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_Weapon_iDirection, + + /* + * Description: - + * Member type: bool + * Get params: get_member(index, member); + * Set params: set_member(index, member, bool:value); + */ + m_Weapon_bSecondarySilencerOn, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_Weapon_flAccuracy, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_Weapon_flLastFire, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_Weapon_iShotsFired, + + /* + * Description: Time to shoot the remaining bullets of the glock18 burst fire. + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_Weapon_flGlock18Shoot, + + /* + * Description: Used to keep track of the shots fired during the Glock18 burst fire mode. + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_Weapon_iGlock18ShotsFired, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_Weapon_flFamasShoot, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_Weapon_iFamasShotsFired, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_Weapon_fBurstSpread, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_Weapon_iWeaponState, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_Weapon_flNextReload, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_Weapon_flDecreaseShotsFired, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_Weapon_usFireGlock18, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_Weapon_usFireFamas, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_Weapon_flPrevPrimaryAttack, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_Weapon_flLastFireTime, +}; + +/** +* CWeaponBox Members +*/ +enum CWeaponBox_Members +{ + /* + * Description: - + * Member type: class CBasePlayerItem *[MAX_ITEM_TYPES] + * Get params: get_member(index, member, element); + * Set params: set_member(index, member, value, element); + */ + m_WeaponBox_rgpPlayerItems = BEGIN_MEMBER_REGION(weaponbox), + + /* + * Description: - + * Member type: string_t [MAX_AMMO_SLOTS] + * Get params: get_member(index, member, dest[], const lenght, element); + * Set params: set_member(index, member, const source[], element); + */ + m_WeaponBox_rgiszAmmo, + + /* + * Description: - + * Member type: int [MAX_AMMO_SLOTS] + * Get params: get_member(index, member, element); + * Set params: set_member(index, member, value, element); + */ + m_WeaponBox_rgAmmo, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_WeaponBox_cAmmoTypes, + + /* + * Description: - + * Member type: bool + * Get params: get_member(index, member); + * Set params: set_member(index, member, bool:value); + */ + m_WeaponBox_bIsBomb, +}; + +/** +* CArmoury Members +*/ +enum CArmoury_Members +{ + /* + * Description: - + * Member type: enum ArmouryItemPack + * Get params: ArmouryItemPack:get_member(index, member); + * Set params: set_member(index, member, ArmouryItemPack:value); + */ + m_Armoury_iItem = BEGIN_MEMBER_REGION(armoury), + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_Armoury_iCount, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_Armoury_iInitialCount, + + /* + * Description: - + * Member type: bool + * Get params: get_member(index, member); + * Set params: set_member(index, member, bool:value); + */ + m_Armoury_bAlreadyCounted, +}; + +/** +* CGrenade Members +*/ +enum CGrenade_Members +{ + /* + * Description: - + * Member type: bool + * Get params: get_member(index, member); + * Set params: set_member(index, member, bool:value); + */ + m_Grenade_bStartDefuse = BEGIN_MEMBER_REGION(grenade), + + /* + * Description: - + * Member type: bool + * Get params: get_member(index, member); + * Set params: set_member(index, member, bool:value); + */ + m_Grenade_bIsC4, + + /* + * Description: - + * Member type: class EHANDLE + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_Grenade_pBombDefuser, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_Grenade_flDefuseCountDown, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_Grenade_flC4Blow, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_Grenade_flNextFreqInterval, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_Grenade_flNextBeep, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_Grenade_flNextFreq, + + /* + * Description: - + * Member type: char * + * Get params: get_member(index, member, dest[], const lenght); + * Set params: set_member(index, member, const source[]); + */ + m_Grenade_sBeepName, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_Grenade_fAttenu, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_Grenade_flNextBlink, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_Grenade_fNextDefuse, + + /* + * Description: - + * Member type: bool + * Get params: get_member(index, member); + * Set params: set_member(index, member, bool:value); + */ + m_Grenade_bJustBlew, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_Grenade_iTeam, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_Grenade_iCurWave, + + /* + * Description: - + * Member type: struct edict_s * + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_Grenade_pentCurBombTarget, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_Grenade_SGSmoke, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_Grenade_angle, + + /* + * Description: - + * Member type: unsigned short + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_Grenade_usEvent, + + /* + * Description: - + * Member type: bool + * Get params: get_member(index, member); + * Set params: set_member(index, member, bool:value); + */ + m_Grenade_bLightSmoke, + + /* + * Description: - + * Member type: bool + * Get params: get_member(index, member); + * Set params: set_member(index, member, bool:value); + */ + m_Grenade_bDetonated, + + /* + * Description: - + * Member type: class Vector + * Get params: get_member(index, member, Float:output[3]); + * Set params: set_member(index, member, Float:dest[3]); + */ + m_Grenade_vSmokeDetonate, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_Grenade_iBounceCount, + + /* + * Description: Whether or not this grenade has issued its DANGER sound to the world sound list yet. + * Member type: BOOL + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_Grenade_fRegisteredSound, +}; + +/** +* CP228 Members +*/ +enum CP228_Members +{ + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_P228_iShell = BEGIN_MEMBER_REGION(p228), + + /* + * Description: - + * Member type: unsigned short + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_P228_usFire, +}; + +/** +* CSCOUT Members +*/ +enum CSCOUT_Members +{ + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_SCOUT_iShell = BEGIN_MEMBER_REGION(scout), + + /* + * Description: - + * Member type: unsigned short + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_SCOUT_usFire, +}; + +/** +* CHEGrenade Members +*/ +enum CHEGrenade_Members +{ + /* + * Description: - + * Member type: unsigned short + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_HEGrenade_usCreate = BEGIN_MEMBER_REGION(hegrenade), +}; + +/** +* CXM1014 Members +*/ +enum CXM1014_Members +{ + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_XM1014_iShell = BEGIN_MEMBER_REGION(xm1014), + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_XM1014_flPumpTime, + + /* + * Description: - + * Member type: unsigned short + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_XM1014_usFire, +}; + +/** +* CC4 Members +*/ +enum CC4_Members +{ + /* + * Description: - + * Member type: bool + * Get params: get_member(index, member); + * Set params: set_member(index, member, bool:value); + */ + m_C4_bStartedArming = BEGIN_MEMBER_REGION(c4), + + /* + * Description: - + * Member type: bool + * Get params: get_member(index, member); + * Set params: set_member(index, member, bool:value); + */ + m_C4_bBombPlacedAnimation, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_C4_fArmedTime, + + /* + * Description: - + * Member type: bool + * Get params: get_member(index, member); + * Set params: set_member(index, member, bool:value); + */ + m_C4_bHasShield, +}; + +/** +* CMAC10 Members +*/ +enum CMAC10_Members +{ + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_MAC10_iShell = BEGIN_MEMBER_REGION(mac10), + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_MAC10_iShellOn, + + /* + * Description: - + * Member type: unsigned short + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_MAC10_usFire, +}; + +/** +* CAUG Members +*/ +enum CAUG_Members +{ + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_AUG_iShell = BEGIN_MEMBER_REGION(aug), + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_AUG_iShellOn, + + /* + * Description: - + * Member type: unsigned short + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_AUG_usFire, +}; + +/** +* CSmokeGrenade Members +*/ +enum CSmokeGrenade_Members +{ + /* + * Description: - + * Member type: unsigned short + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_SmokeGrenade_usCreate = BEGIN_MEMBER_REGION(smokegrenade), +}; + +/** +* CELITE Members +*/ +enum CELITE_Members +{ + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_ELITE_iShell = BEGIN_MEMBER_REGION(elite), + + /* + * Description: - + * Member type: unsigned short + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_ELITE_usFire_LEFT, + + /* + * Description: - + * Member type: unsigned short + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_ELITE_usFire_RIGHT, +}; + +/** +* CFiveSeven Members +*/ +enum CFiveSeven_Members +{ + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_FiveSeven_iShell = BEGIN_MEMBER_REGION(fiveseven), + + /* + * Description: - + * Member type: unsigned short + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_FiveSeven_usFire, +}; + +/** +* CUMP45 Members +*/ +enum CUMP45_Members +{ + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_UMP45_iShell = BEGIN_MEMBER_REGION(ump45), + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_UMP45_iShellOn, + + /* + * Description: - + * Member type: unsigned short + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_UMP45_usFire, +}; + +/** +* CSG550 Members +*/ +enum CSG550_Members +{ + m_SG550_iShell = BEGIN_MEMBER_REGION(sg550), + + /* + * Description: - + * Member type: unsigned short + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_SG550_usFire, +}; + +/** +* CGalil Members +*/ +enum CGalil_Members +{ + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_Galil_iShell = BEGIN_MEMBER_REGION(galil), + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_Galil_iShellOn, + + /* + * Description: - + * Member type: unsigned short + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_Galil_usFire, +}; + +/** +* CFamas Members +*/ +enum CFamas_Members +{ + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_Famas_iShell = BEGIN_MEMBER_REGION(famas), + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_Famas_iShellOn, + + /* + * Description: Basic damage that famas deals before any multiplier, such as hitgroup, armor, distance and bullet penetration in burst mode + * Member type: float + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_Famas_flBaseDamageBurst, +}; + +/** +* CUSP Members +*/ +enum CUSP_Members +{ + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_USP_iShell = BEGIN_MEMBER_REGION(usp), + + /* + * Description: - + * Member type: unsigned short + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_USP_usFire, + + /* + * Description: Basic damage that usp deals before any multiplier, such as hitgroup, armor, distance and bullet penetration in silence mdoe + * Member type: float + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_USP_flBaseDamageSil, +}; + +/** +* CGLOCK18 Members +*/ +enum CGLOCK18_Members +{ + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_GLOCK18_iShell = BEGIN_MEMBER_REGION(glock18), + + /* + * Description: - + * Member type: bool + * Get params: get_member(index, member); + * Set params: set_member(index, member, bool:value); + */ + m_GLOCK18_bBurstFire, +}; + +/** +* CAWP Members +*/ +enum CAWP_Members +{ + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_AWP_iShell = BEGIN_MEMBER_REGION(awp), + + /* + * Description: - + * Member type: unsigned short + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_AWP_usFire, +}; + +/** +* CMP5N Members +*/ +enum CMP5N_Members +{ + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_MP5N_iShell = BEGIN_MEMBER_REGION(mp5n), + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_MP5N_iShellOn, + + /* + * Description: - + * Member type: unsigned short + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_MP5N_usFire, +}; + +/** +* CM249 Members +*/ +enum CM249_Members +{ + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_M249_iShell = BEGIN_MEMBER_REGION(m249), + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_M249_iShellOn, + + /* + * Description: - + * Member type: unsigned short + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_M249_usFire, +}; + +/** +* CM3 Members +*/ +enum CM3_Members +{ + m_M3_iShell = BEGIN_MEMBER_REGION(m3), + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_M3_flPumpTime, + + /* + * Description: - + * Member type: unsigned short + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_M3_usFire, +}; + +/** +* CM4A1 Members +*/ +enum CM4A1_Members +{ + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_M4A1_iShell = BEGIN_MEMBER_REGION(m4a1), + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_M4A1_iShellOn, + + /* + * Description: - + * Member type: unsigned short + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_M4A1_usFire, + + /* + * Description: Basic damage that m4a1 deals before any multiplier, such as hitgroup, armor, distance and bullet penetration in silence mdoe + * Member type: float + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_M4A1_flBaseDamageSil, +}; + +/** +* CTMP Members +*/ +enum CTMP_Members +{ + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_TMP_iShell = BEGIN_MEMBER_REGION(tmp), + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_TMP_iShellOn, + + /* + * Description: - + * Member type: unsigned short + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_TMP_usFire, +}; + +/** +* CG3SG1 Members +*/ +enum CG3SG1_Members +{ + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_G3SG1_iShell = BEGIN_MEMBER_REGION(g3sg1), + + /* + * Description: - + * Member type: unsigned short + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_G3SG1_usFire, +}; + +/** +* CDEAGLE Members +*/ +enum CDEAGLE_Members +{ + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_DEAGLE_iShell = BEGIN_MEMBER_REGION(deagle), + + /* + * Description: - + * Member type: unsigned short + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_DEAGLE_usFire, +}; + +/** +* CSG552 Members +*/ +enum CSG552_Members +{ + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_SG552_iShell = BEGIN_MEMBER_REGION(sg552), + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_SG552_iShellOn, + + /* + * Description: - + * Member type: unsigned short + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_SG552_usFire, +}; + +/** +* CAK47 Members +*/ +enum CAK47_Members +{ + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_AK47_iShell = BEGIN_MEMBER_REGION(ak47), + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_AK47_iShellOn, + + /* + * Description: - + * Member type: unsigned short + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_AK47_usFire, +}; + +/** +* CKnife Members +*/ +enum CKnife_Members +{ + /* + * Description: - + * Member type: TraceResult + * Get params: TraceResult:get_member(index, member); + * Set params: set_member(index, member, TraceResult:value); + */ + m_Knife_trHit = BEGIN_MEMBER_REGION(knife), + + /* + * Description: - + * Member type: unsigned short + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_Knife_usKnife, + + /* + * Description: Stab damage (default: 65.0) + * Member type: float + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_Knife_flStabBaseDamage, + + /* + * Description: Swing damage (default: 15.0) + * Member type: float + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_Knife_flSwingBaseDamage, + + /* + * Description: Fast Swing (first one) damage (default: 20.0) + * Member type: float + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_Knife_flSwingBaseDamage_Fast, + + /* + * Description: Stab distance (default: 32.0) + * Member type: float + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_Knife_flStabDistance, + + /* + * Description: Swing distance (default: 64.0) + * Member type: float + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_Knife_flSwingDistance, + + /* + * Description: Back Stab damage multiplier (default: 3.0) + * Member type: float + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_Knife_flBackStabMultiplier, +}; + +/** +* CP90 Members +*/ +enum CP90_Members +{ + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_P90_iShell = BEGIN_MEMBER_REGION(p90), + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_P90_iShellOn, + + /* + * Description: - + * Member type: unsigned short + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_P90_usFire, +}; + +/** +* CWShield Members +*/ +enum CShield_Members +{ + /* + * Description: - + * Member type: class EHANDLE + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_Shield_hEntToIgnoreTouchesFrom = BEGIN_MEMBER_REGION(shield), + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_Shield_flTimeToIgnoreTouches, +}; + +/** +* CMapInfo Members +*/ +enum CMapInfo_Members +{ + /* + * Description: - + * Member type: enum InfoMapBuyParam + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_MapInfo_iBuyingStatus = BEGIN_MEMBER_REGION(mapinfo), + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_MapInfo_flBombRadius, +}; + +/** +* CCSPlayerWeapon API Members +*/ +enum CCSPlayerWeapon_Members +{ + /* + * Description: Weapon secondary attack state + * Member type: enum SecondaryAtkState + * Get params: get_member(index, member); + * Set params: set_member(index, member, SecondaryAtkState:value); + */ + m_Weapon_iStateSecondaryAttack = BEGIN_MEMBER_REGION(csplayerweapon), + + /* + * Description: Basic damage that weapon deals before any multiplier, such as hitgroup, armor, distance and bullet penetration + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_Weapon_flBaseDamage, +}; + +// API compatibility +#define m_Weapon_bHasSecondaryAttack m_Weapon_iStateSecondaryAttack + +/** +* CGib Members +*/ +enum CGib_Members +{ + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_Gib_bloodColor = BEGIN_MEMBER_REGION(gib), + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_Gib_cBloodDecals, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_Gib_material, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_Gib_lifeTime, +}; + +/** +* CCSEntity API Members +*/ +enum CCSEntity_Members +{ + /* + * Description: Penetration level of the damage caused by the inflictor + * Member type: unsigned char + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_ucDmgPenetrationLevel = BEGIN_MEMBER_REGION(csentity), + + /* + * Description: Cached inflictor passed inside TakeDamage to retrieve in Killed + * Member type: entvars_t * + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_pevLastInflictor, +}; diff --git a/bin/amxxdump/includes/amxmodx/reapi_rechecker.inc b/bin/amxxdump/includes/amxmodx/reapi_rechecker.inc new file mode 100644 index 0000000..50c7f2d --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/reapi_rechecker.inc @@ -0,0 +1,58 @@ +#if defined _reapi_rechecker_included + #endinput +#endif +#define _reapi_rechecker_included + +enum ResourceType +{ + RES_TYPE_NONE = 0, + RES_TYPE_EXISTS, // to comparison with the specified hash value + RES_TYPE_MISSING, // check it missing file on client + RES_TYPE_IGNORE, // ignore the specified hash value + RES_TYPE_HASH_ANY, // any file with any the hash value +}; + +enum ReCheckerFunc +{ + /* + * Description: - + * Params: (const client, const filename[], const cmd[], const ResourceType:type, const responseHash, bool:isBreak) + */ + RC_FileConsistencyProcess = BEGIN_FUNC_REGION(rechecker), + + /* + * Description: - + * Params: (const client) + */ + RC_FileConsistencyFinal, + + /* + * Description: - + * Params: (const client, const filename[], const cmd[], const responseHash) + */ + RC_CmdExec, + + // [...] +}; + +/* +* Send request the file for the client to get hash +* +* @param file The file (Can contain a relative path to the file) +* @param function The forward to call +* @param type The request type, can be only RES_TYPE_EXISTS, RES_TYPE_MISSING or RES_TYPE_HASH_ANY +* @param hash Hash of file to request. +* +* @return Returns a hook handle. Use UnRegisterQueryFile to remove the forward +*/ +native QueryFileHook:RegisterQueryFile(const file[], const function[], const ResourceType:type, const hash = -1); + +/* +* Unregister the forward. +* Use the return value from RegisterQueryFile as the parameter here! +* +* @param hook The hook to remove +* +* @return Returns true if the hook is successfully removed, otherwise false +*/ +native bool:UnRegisterQueryFile(QueryFileHook:hook); diff --git a/bin/amxxdump/includes/amxmodx/reapi_reunion.inc b/bin/amxxdump/includes/amxmodx/reapi_reunion.inc new file mode 100644 index 0000000..311f0c2 --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/reapi_reunion.inc @@ -0,0 +1,61 @@ +#if defined _reapi_reunion_included + #endinput +#endif +#define _reapi_reunion_included + +enum client_auth_type +{ + CA_TYPE_NONE = 0, + CA_TYPE_DPROTO, + CA_TYPE_STEAM, + CA_TYPE_STEAMEMU, + CA_TYPE_REVEMU, + CA_TYPE_OLDREVEMU, + CA_TYPE_HLTV, + CA_TYPE_SC2009, + CA_TYPE_AVSMP, + CA_TYPE_SXEI, + CA_TYPE_REVEMU2013, + CA_TYPE_SSE3, +}; + +#define is_user_steam(%0) (REU_GetAuthtype(%0) == CA_TYPE_STEAM) + +/* +* Gets client protocol. +* +* @param index Client index +* +* @return Client protocol +*/ +native REU_GetProtocol(const index); + +/* +* Gets client auth type. +* +* @param index Client index +* +* @return Client auth type +*/ +native client_auth_type:REU_GetAuthtype(const index); + +/* +* Get client authkey +* +* @param index Client index +* @param index Buffer to copy the authkey +* @param index Maximum buffer size +* +* @return Number of cells copied to buffer +* +*/ +native REU_GetAuthKey(const index, dest[], maxlen); + +/* +* Check if the client is running RevEmu with limited user rights. +* +* @param index Client index +* +* @return 1/0 +*/ +native bool:REU_IsRevemuWithoutAdminRights(const index); diff --git a/bin/amxxdump/includes/amxmodx/reapi_version.inc b/bin/amxxdump/includes/amxmodx/reapi_version.inc new file mode 100644 index 0000000..e8d9800 --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/reapi_version.inc @@ -0,0 +1,9 @@ +#if defined _reapi_version_included + #endinput +#endif +#define _reapi_version_included + +// reapi version +#define REAPI_VERSION 524300 +#define REAPI_VERSION_MAJOR 5 +#define REAPI_VERSION_MINOR 24 diff --git a/bin/amxxdump/includes/amxmodx/reapi_vtc.inc b/bin/amxxdump/includes/amxmodx/reapi_vtc.inc new file mode 100644 index 0000000..98e3aae --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/reapi_vtc.inc @@ -0,0 +1,71 @@ +#if defined _reapi_vtc_included + #endinput +#endif +#define _reapi_vtc_included + +/* +* Checks whether the player is talking at the moment. +* +* @param index Client index +* +* @return true if client is speaking, false otherwise +*/ +native bool:VTC_IsClientSpeaking(const index); + +/* +* Mutes the player. +* +* @param index Client index +* +* @noreturn +*/ +native VTC_MuteClient(const index); + +/* +* Unmutes the player. +* +* @param index Client index +* +* @noreturn +*/ +native VTC_UnmuteClient(const index); + +/* +* Checks whether the player is muted at the moment. +* +* @param index Client index +* +* @return true if client is muted, false otherwise +*/ +native bool:VTC_IsClientMuted(const index); + +/* +* Play the audio file via the voice stream. +* +* @param receiver Receiver index +* @param soundFilePath The path to the sound file +* +* @note Usage example: +* VTC_PlaySound(id, "sound/ambience/Opera.wav"); +* +* @noreturn +*/ +native VTC_PlaySound(const receiver, const soundFilePath[]); + +/* +* Called when the player started talking. +* +* @param index Client index +* +* @noreturn +*/ +forward VTC_OnClientStartSpeak(const index); + +/* +* Called when the player stopped talking. +* +* @param index Client index +* +* @noreturn +*/ +forward VTC_OnClientStopSpeak(const index); diff --git a/bin/amxxdump/includes/amxmodx/regex.inc b/bin/amxxdump/includes/amxmodx/regex.inc new file mode 100644 index 0000000..5c777e4 --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/regex.inc @@ -0,0 +1,348 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Regular Expressions API +// + +#if defined _regex_included + #endinput +#endif +#define _regex_included + +#pragma reqlib regex +#if !defined AMXMODX_NOAUTOLOAD + #pragma loadlib regex +#endif + + +enum Regex +{ + REGEX_MATCH_FAIL = -2, + REGEX_PATTERN_FAIL = -1, + REGEX_NO_MATCH = 0, + REGEX_OK = 1 +}; + +/** + * Flags for compiling regex expressions. + * These come directly from the pcre library and can be used in regex_compile_ex. + */ +#define PCRE_CASELESS 0x00000001 /* Ignore Case */ +#define PCRE_MULTILINE 0x00000002 /* Multilines (affects ^ and $ so that they match the start/end of a line rather than matching the start/end of the string). */ +#define PCRE_DOTALL 0x00000004 /* Single line (affects . so that it matches any character, even new line characters). */ +#define PCRE_EXTENDED 0x00000008 /* Pattern extension (ignore whitespace and # comments). */ +#define PCRE_ANCHORED 0x00000010 /* Force pattern anchoring. */ +#define PCRE_DOLLAR_ENDONLY 0x00000020 /* $ not to match newline at end. */ +#define PCRE_UNGREEDY 0x00000200 /* Invert greediness of quantifiers */ +#define PCRE_NOTEMPTY 0x00000400 /* An empty string is not a valid match. */ +#define PCRE_UTF8 0x00000800 /* Use UTF-8 Chars */ +#define PCRE_NO_UTF8_CHECK 0x00002000 /* Do not check the pattern for UTF-8 validity (only relevant if PCRE_UTF8 is set) */ +#define PCRE_NEVER_UTF 0x00010000 /* Lock out interpretation of the pattern as UTF-8 */ +#define PCRE_FIRSTLINE 0x00040000 /* Force matching to be before newline */ +#define PCRE_DUPNAMES 0x00080000 /* Allow duplicate names for subpattern */ +#define PCRE_NEWLINE_CR 0x00100000 /* Specify that a newline is indicated by a single character CR ) */ +#define PCRE_NEWLINE_CRLF 0x00300000 /* specify that a newline is indicated by the two-character CRLF sequence ) Overrides the default */ +#define PCRE_NEWLINE_ANY 0x00400000 /* Specify that any Unicode newline sequence should be recognized. ) newline definition (LF) */ +#define PCRE_NEWLINE_ANYCRLF 0x00500000 /* Specify that any of CR, LF and CRLF sequences should be recognized ) */ +#define PCRE_UCP 0x20000000 /* Change the way PCRE processes \B, \b, \D, \d, \S, \s, \W, \w etc. to use Unicode properties */ + +/** + * Regex expression error codes. + * This can be used with regex_compile_ex and regex_match_ex. + */ +enum /*RegexError*/ +{ + REGEX_ERROR_NONE = 0, /* No error */ + REGEX_ERROR_NOMATCH = -1, /* No match was found */ + REGEX_ERROR_NULL = -2, + REGEX_ERROR_BADOPTION = -3, + REGEX_ERROR_BADMAGIC = -4, + REGEX_ERROR_UNKNOWN_OPCODE = -5, + REGEX_ERROR_NOMEMORY = -6, + REGEX_ERROR_NOSUBSTRING = -7, + REGEX_ERROR_MATCHLIMIT = -8, + REGEX_ERROR_CALLOUT = -9, /* Never used by PCRE itself */ + REGEX_ERROR_BADUTF8 = -10, + REGEX_ERROR_BADUTF8_OFFSET = -11, + REGEX_ERROR_PARTIAL = -12, + REGEX_ERROR_BADPARTIAL = -13, + REGEX_ERROR_INTERNAL = -14, + REGEX_ERROR_BADCOUNT = -15, + REGEX_ERROR_DFA_UITEM = -16, + REGEX_ERROR_DFA_UCOND = -17, + REGEX_ERROR_DFA_UMLIMIT = -18, + REGEX_ERROR_DFA_WSSIZE = -19, + REGEX_ERROR_DFA_RECURSE = -20, + REGEX_ERROR_RECURSIONLIMIT = -21, + REGEX_ERROR_NULLWSLIMIT = -22, /* No longer actually used */ + REGEX_ERROR_BADNEWLINE = -23, + REGEX_ERROR_BADOFFSET = -24, + REGEX_ERROR_SHORTUTF8 = -25, + REGEX_ERROR_RECURSELOOP = -26, + REGEX_ERROR_JIT_STACKLIMIT = -27, + REGEX_ERROR_BADMODE = -28, + REGEX_ERROR_BADENDIANNESS = -29, + REGEX_ERROR_DFA_BADRESTART = -30, + REGEX_ERROR_JIT_BADOPTION = -31, + REGEX_ERROR_BADLENGTH = -32, + REGEX_ERROR_UNSET = -33 +}; + +/** + * Precompile a regular expression. + * + * @note Use this if you intend on using the same expression multiple times. + * Pass the regex handle returned here to regex_match_c to check for matches. + * + * @note This handle is automatically freed on map change. However, + * if you are completely done with it before then, you should + * call regex_free on this handle. + * + * @note Consider using regex_compile_ex instead if you want to use PCRE_* flags. + * + * @param pattern The regular expression pattern. + * @param ret Error code encountered, if applicable. + * @param error Error message encountered, if applicable. + * @param maxLen Maximum string length of the error buffer. + * @param flags General flags for the regular expression. + * i = Ignore case + * m = Multilines (affects ^ and $ so that they match + * the start/end of a line rather than matching the + * start/end of the string). + * s = Single line (affects . so that it matches any character, + * even new line characters). + * x = Pattern extension (ignore whitespace and # comments). + * + * @return -1 on error in the pattern, > valid regex handle (> 0) on success. + */ +native Regex:regex_compile(const pattern[], &ret = 0, error[] = "", maxLen = 0, const flags[]=""); + +/** + * Matches a string against a pre-compiled regular expression pattern. + * + * @note You should free the returned handle with regex_free() + * when you are done with this pattern. + * + * @note Use the regex handle passed to this function to extract + * matches with regex_substr(). + * + * @param string The string to check. + * @param pattern The regular expression pattern. + * @param ret Error code, if applicable, or number of results on success. See REGEX_ERROR_* defines. + * + * @return -2 = Matching error (error code is stored in ret) + * 0 = No match. + * >1 = Number of results. + */ +native regex_match_c(const string[], Regex:pattern, &ret = 0); + +/** + * Matches a string against a regular expression pattern. + * + * @note If you intend on using the same regular expression pattern + * multiple times, consider using regex_compile and regex_match_ex + * instead of making this function reparse the expression each time. + * + * @note Flags only exist in amxmodx 1.8 and later. + * + * @note You should free the returned handle with regex_free() + * when you are done extracting all of the substrings. + * + * @param string The string to check. + * @param pattern The regular expression pattern. + * @param ret Error code, or result state of the match. + * @param error Error message, if applicable. + * @param maxLen Maximum length of the error buffer. + * @param flags General flags for the regular expression. + * i = Ignore case + * m = Multilines (affects ^ and $ so that they match + * the start/end of a line rather than matching the + * start/end of the string). + * s = Single line (affects . so that it matches any character, + * even new line characters). + * x = Pattern extension (ignore whitespace and # comments). + * + * @return -2 = Matching error (error code is stored in ret) + * -1 = Error in pattern (error message and offset # in error and ret) + * 0 = No match. + * >1 = Handle for getting more information (via regex_substr) + */ +native Regex:regex_match(const string[], const pattern[], &ret = 0, error[] = "", maxLen = 0, const flags[] = ""); + +/** + * Returns a matched substring from a regex handle. + * + * @note Substring ids start at 0 and end at ret - 1, where ret is from the corresponding + * regex_match* function call. + * + * @param id The regex handle to extract data from. + * @param str_id The index of the expression to get - starts at 0, and ends at ret - 1. + * @param buffer The buffer to set to the matching substring. + * @param maxLen The maximum string length of the buffer. + * + * @return 1 on success, otherwise 0 on failure. + */ +native regex_substr(Regex:id, str_id, buffer[], maxLen); + +/** + * Frees the memory associated with a regex result, and sets the handle to 0. + * + * @note This must be called on all results from regex_match() when you are done extracting + * the results with regex_substr(). + * + * @note The results of regex_compile() or regex_compile_ex() (and subsequently, regex_match_c()) + * only need to be freed when you are done using the pattern. + * + * @note Do not use the handle again after freeing it! + * + * @param id The regex handle to free. + * @noreturn + */ +native regex_free(&Regex:id); + + +/** + * The following natives are only available in 1.8.3 and above. + */ + +/** + * Precompile a regular expression. + * + * @note Use this if you intend on using the same expression multiple times. + * Pass the regex handle returned here to regex_match_c() to check for matches. + * + * @note Unlike regex_compile(), this allows you to use PCRE flags directly. + * + * @param pattern The regular expression pattern. + * @param flags General flags for the regular expression, see PCRE_* defines. + * @param error Error message encountered, if applicable. + * @param maxLen Maximum string length of the error buffer. + * @param errcode Regex type error code encountered, if applicable. See REGEX_ERROR_* defines. + * + * @return Valid regex handle (> 0) on success, or -1 on failure. + */ +native Regex:regex_compile_ex(const pattern[], flags = 0, error[]= "", maxLen = 0, &errcode = 0); + +/** + * Matches a string against a pre-compiled regular expression pattern, matching all + * occurrences of the pattern inside the string. This is similar to using the "g" flag + * in perl regex. + * + * @note You should free the returned handle (with regex_free()) + * when you are done with this pattern. + * + * @note Use the regex handle passed to this function to extract + * matches with regex_substr(). + * + * @param pattern The regular expression pattern. + * @param string The string to check. + * @param ret Error code, if applicable, or number of results on success. + * See REGEX_ERROR_* defines. + * + * @return -2 = Matching error (error code is stored in ret) + * 0 = No match. + * >1 = Number of results. + */ +native regex_match_all_c(const string[], Regex:pattern, &ret = 0); + +/** + * Matches a string against a regular expression pattern, matching all occurrences of the + * pattern inside the string. This is similar to using the "g" flag in perl regex. + * + * @note If you intend on using the same regular expression pattern + * multiple times, consider using regex_compile and regex_match_ex + * instead of making this function reparse the expression each time. + * + * @note Flags only exist in amxmodx 1.8 and later. + * + * @note You should free the returned handle with regex_free() + * when you are done extracting all of the substrings. + * + * @param string The string to check. + * @param pattern The regular expression pattern. + * @param flags General flags for the regular expression, see PCRE_* defines. + * @param error Error message encountered, if applicable. + * @param maxLen Maximum string length of the error buffer. + * @param errcode Regex type error code encountered, if applicable. See REGEX_ERROR_* defines. + * + * @return -2 = Matching error (error code is stored in ret) + * -1 = Error in pattern (error message and offset # in error and ret) + * 0 = No match. + * >1 = Handle for getting more information (via regex_substr) + */ +native Regex:regex_match_all(const string[], const pattern[], flags = 0, error[]= "", maxLen = 0, &errcode = 0); + +/** + * Matches a string against a regular expression pattern. + * + * @note If you intend on using the same regular expression pattern + * multiple times, consider using compile regex_compile_ex and regex_match* + * instead of making this function reparse the expression each time. + * + * @param str The string to check. + * @param pattern The regular expression pattern. + * @param flags General flags for the regular expression. + * @param error Error message, if applicable. + * @param maxLen Maximum length of the error buffer. + * @param errcode Regex type error code encountered, if applicable. See REGEX_ERROR_* defines. + * + * @return -2 = Matching error (error code is stored in ret) + * -1 = Pattern error (error code is stored in ret) + * 0 = No match. + * >1 = Number of results. + */ +stock regex_match_simple(const str[], const pattern[], flags = 0, error[]= "", maxLen = 0, &errcode = 0) +{ + new Regex:regex = regex_compile_ex(pattern, flags, error, maxLen, errcode); + if (regex < REGEX_OK) + { + return -1; + } + new substrings = regex_match_c(str, regex); + regex_free(regex); + return substrings; +} + +/** + * Flags used with regex_replace to control the replacement behavior. + */ +#define REGEX_FORMAT_DEFAULT 0 /* Uses the standard formatting rules to replace matches */ +#define REGEX_FORMAT_NOCOPY (1<<0) /* The sections that do not match the regular expression are not copied when replacing matches. */ +#define REGEX_FORMAT_FIRSTONLY (1<<1) /* Only the first occurrence of a regular expression is replaced. */ + +/** + * Perform a regular expression search and replace. + * + * An optional parameter, flags, allows you to specify options on how the replacement is performed. + * Supported format specifiers for replace parameter: + * $number : Substitutes the substring matched by group number. + * n must be an integer value designating a valid backreference, greater than 0, and of two digits at most. + * ${name} : Substitutes the substring matched by the named group name (a maximum of 32 characters). + * $& : Substitutes a copy of the whole match. + * $` : Substitutes all the text of the input string before the match. + * $' : Substitutes all the text of the input string after the match. + * $+ : Substitutes the last group that was captured. + * $_ : Substitutes the entire input string. + * $$ : Substitutes a literal "$". + * As note, the character \ can be also used with format specifier, this is same hehavior as $. + * + * @param pattern The regular expression pattern. + * @param string The string to check. + * @param error Error message, if applicable. + * @param maxLen Maximum length of the error buffer. + * @param replace The string will be used to replace any matches. See above for format specifiers. + * @param flags General flags to control how the string is replaced. See REGEX_FORMAT_* defines. + * @param errcode Regex type error code encountered, if applicable. See REGEX_ERROR_* defines. + * + * @return -2 = Matching error (error code is stored in ret) + * 0 = No match. + * >1 = Number of matches. + */ +native regex_replace(Regex:pattern, string[], maxLen, const replace[], flags = REGEX_FORMAT_DEFAULT, &errcode = 0); diff --git a/bin/amxxdump/includes/amxmodx/regex.inc.temp b/bin/amxxdump/includes/amxmodx/regex.inc.temp new file mode 100644 index 0000000..ffa246e --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/regex.inc.temp @@ -0,0 +1,93 @@ +#if defined _regex_included +#endinput +#endif +#define _regex_included +#pragma reqlib regex +#if !defined AMXMODX_NOAUTOLOAD +#pragma loadlib regex +#endif +enum Regex +{ +REGEX_MATCH_FAIL = -2, +REGEX_PATTERN_FAIL = -1, +REGEX_NO_MATCH = 0, +REGEX_OK = 1 +}; +#define PCRE_CASELESS 0x00000001 +#define PCRE_MULTILINE 0x00000002 +#define PCRE_DOTALL 0x00000004 +#define PCRE_EXTENDED 0x00000008 +#define PCRE_ANCHORED 0x00000010 +#define PCRE_DOLLAR_ENDONLY 0x00000020 +#define PCRE_UNGREEDY 0x00000200 +#define PCRE_NOTEMPTY 0x00000400 +#define PCRE_UTF8 0x00000800 +#define PCRE_NO_UTF8_CHECK 0x00002000 +#define PCRE_NEVER_UTF 0x00010000 +#define PCRE_FIRSTLINE 0x00040000 +#define PCRE_DUPNAMES 0x00080000 +#define PCRE_NEWLINE_CR 0x00100000 +#define PCRE_NEWLINE_CRLF 0x00300000 +#define PCRE_NEWLINE_ANY 0x00400000 +#define PCRE_NEWLINE_ANYCRLF 0x00500000 +#define PCRE_UCP 0x20000000 +enum +{ +REGEX_ERROR_NONE = 0, +REGEX_ERROR_NOMATCH = -1, +REGEX_ERROR_NULL = -2, +REGEX_ERROR_BADOPTION = -3, +REGEX_ERROR_BADMAGIC = -4, +REGEX_ERROR_UNKNOWN_OPCODE = -5, +REGEX_ERROR_NOMEMORY = -6, +REGEX_ERROR_NOSUBSTRING = -7, +REGEX_ERROR_MATCHLIMIT = -8, +REGEX_ERROR_CALLOUT = -9, +REGEX_ERROR_BADUTF8 = -10, +REGEX_ERROR_BADUTF8_OFFSET = -11, +REGEX_ERROR_PARTIAL = -12, +REGEX_ERROR_BADPARTIAL = -13, +REGEX_ERROR_INTERNAL = -14, +REGEX_ERROR_BADCOUNT = -15, +REGEX_ERROR_DFA_UITEM = -16, +REGEX_ERROR_DFA_UCOND = -17, +REGEX_ERROR_DFA_UMLIMIT = -18, +REGEX_ERROR_DFA_WSSIZE = -19, +REGEX_ERROR_DFA_RECURSE = -20, +REGEX_ERROR_RECURSIONLIMIT = -21, +REGEX_ERROR_NULLWSLIMIT = -22, +REGEX_ERROR_BADNEWLINE = -23, +REGEX_ERROR_BADOFFSET = -24, +REGEX_ERROR_SHORTUTF8 = -25, +REGEX_ERROR_RECURSELOOP = -26, +REGEX_ERROR_JIT_STACKLIMIT = -27, +REGEX_ERROR_BADMODE = -28, +REGEX_ERROR_BADENDIANNESS = -29, +REGEX_ERROR_DFA_BADRESTART = -30, +REGEX_ERROR_JIT_BADOPTION = -31, +REGEX_ERROR_BADLENGTH = -32, +REGEX_ERROR_UNSET = -33 +}; +native Regex:regex_compile(const pattern[], &ret = 0, error[] = "", maxLen = 0, const flags[]=""); +native regex_match_c(const string[], Regex:pattern, &ret = 0); +native Regex:regex_match(const string[], const pattern[], &ret = 0, error[] = "", maxLen = 0, const flags[] = ""); +native regex_substr(Regex:id, str_id, buffer[], maxLen); +native regex_free(&Regex:id); +native Regex:regex_compile_ex(const pattern[], flags = 0, error[]= "", maxLen = 0, &errcode = 0); +native regex_match_all_c(const string[], Regex:pattern, &ret = 0); +native Regex:regex_match_all(const string[], const pattern[], flags = 0, error[]= "", maxLen = 0, &errcode = 0); +stock regex_match_simple(const str[], const pattern[], flags = 0, error[]= "", maxLen = 0, &errcode = 0) +{ +new Regex:regex = regex_compile_ex(pattern, flags, error, maxLen, errcode); +if (regex < REGEX_OK) +{ +return -1; +} +new substrings = regex_match_c(str, regex); +regex_free(regex); +return substrings; +} +#define REGEX_FORMAT_DEFAULT 0 +#define REGEX_FORMAT_NOCOPY (1<<0) +#define REGEX_FORMAT_FIRSTONLY (1<<1) +native regex_replace(Regex:pattern, string[], maxLen, const replace[], flags = REGEX_FORMAT_DEFAULT, &errcode = 0); diff --git a/bin/amxxdump/includes/amxmodx/sockets.inc b/bin/amxxdump/includes/amxmodx/sockets.inc new file mode 100644 index 0000000..6102a9e --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/sockets.inc @@ -0,0 +1,183 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Socket Functions +// + +#if defined _socket_included + #endinput +#endif +#define _socket_included + +#pragma reqlib sockets +#if !defined AMXMODX_NOAUTOLOAD + #pragma loadlib sockets +#endif + +/** + * Socket connection type (TCP/UDP) + */ +#define SOCKET_TCP 1 +#define SOCKET_UDP 2 + +/** + * Socket flags + */ +#define SOCK_NON_BLOCKING (1 << 0) /* Set the socket a nonblocking */ +#define SOCK_LIBC_ERRORS (1 << 1) /* Enable libc error reporting */ + +/** + * Error reporting + */ +#define SOCK_ERROR_OK 0 /* No error */ +#define SOCK_ERROR_CREATE_SOCKET 1 /* Couldn't create a socket */ +#define SOCK_ERROR_SERVER_UNKNOWN 2 /* Server unknown */ +#define SOCK_ERROR_WHILE_CONNECTING 3 /* Error while connecting */ + +/** + * Connects to the given node and service via TCP/UDP. + * + * @note There's 2 types of error reporting on this function that you can use. + * @note Default error codes: + * 0 - No error + * 1 - Error while creating socket + * 2 - Couldn't resolve hostname + * 3 - Couldn't connect + * @note New, more expressive libc error codes: + * https://www.gnu.org/software/libc/manual/html_node/Error-Codes.html + * https://github.com/torvalds/linux/blob/master/include/uapi/asm-generic/errno.h + * https://msdn.microsoft.com/en-us/library/ms740668.aspx + * + * @note The currently available bit flags are: + * - SOCK_NON_BLOCKING : if set, the socket will be on nonblocking mode + * - SOCK_LIBC_ERRORS : if set, the new libc errors will be seen on _error + * + * @note If no flags are set, the behaviour of the function will not be modified. + * + * @note Multiple flags may be set at the same time using the | operator. + * For example, SOCK_NON_BLOCKING|SOCK_LIBC_ERRORS will create a nonblocking socket with libc error codes. + * + * @note If you're creating a new nonblocking socket, _hostname should be numeric to avoid calling the + * name resolution server and potentially blocking the call. + * + * @note If the socket is a nonblocking one, the returned socket descriptor may be still connecting and + * further checks should be done with socket_is_writable() before trying to send data. + * + * @param _hostname Node to connect to + * @param _port Service to connect to + * @param _protocol Connect via SOCKET_TCP or SOCKET_UDP + * @param _error Set an error code here if anything goes wrong + * @param _flags Optional bit flags that change the behaviour of the function + * + * @return A socket descriptor (a positive integer) on success + * -1 on failure +*/ +native socket_open(const _hostname[], _port, _protocol = SOCKET_TCP, &_error, _flags = 0); + +/** + * Closes a socket. + * + * @param _socket Socket descriptor + * + * @return 1 on success + * 0 on failure + */ +native socket_close(_socket); + +/** + * Receives data. + * + * @note The amount of bytes than you end up receiving can be less than the one you expected. + * + * @note This function will completely block the server until some data arrives + * to the given socket. Use this only if you are sure there is some data + * to be retrieved. You can do that by polling with socket_is_readable(). + * + * @param _socket Socket descriptor + * @param _data Array to save the data + * @param _length Length of the array + * + * @return Amount of bytes received + * 0 if the peer closed the connection + * -1 on failure + */ +native socket_recv(_socket, _data[], _length); + +/** + * Sends data. + * + * @note The amount of bytes that end up being sent may be lower than the total length of the array, + * check the return value and send the rest if needed. + * + * @param _socket Socket descriptor + * @param _data Array with the data to send + * @param _length Length of the array + * + * @return Amount of bytes sent + * -1 on failure + */ +native socket_send(_socket, const _data[], _length); + +/** + * Sends data that can contain null bytes. + * + * @note The amount of bytes that end up being sent may be lower than the total length of the array, + * check the return value and send the rest if needed. + * + * @note strlen(_data) will return the wrong length if the array contains null bytes. + * + * @param _socket Socket descriptor + * @param _data Array with the data to send + * @param _length Length of the array + * + * @return Amount of bytes sent + * -1 on failure + */ +native socket_send2(_socket, const _data[], _length); + +/** + * Backwards compatible function. + * + * @deprecated Renamed to socket_is_readable() + */ +#pragma deprecated Use socket_is_readable() instead +native socket_change(_socket, _timeout = 100000); + +/** + * Checks if a socket is marked as readable. + * + * @note You can use this function to make sure there's something on the socket and avoid a blocking call. + * @note Set _timeout to 0 avoid blocking the call. + * @note A socket will become readable if there's any data or an EOF. + * + * @param _socket Socket descriptor + * @param _timeout Amount of time to block the call waiting for the socket to be marked as readable or + * for the timeout to expire, in µSeconds (1 sec = 1000000 µsec) + * + * @return 1 if the socket is marked as readable + * 0 otherwise + */ +native socket_is_readable(_socket, _timeout = 100000); + +/** + * Checks if a socket is marked as writable. + * + * @note Use this function to check if a nonblocking socket is ready to be used. + * @note Set _timeout to 0 avoid blocking the call. + * @note An UDP socket is always writable. + * + * @param _socket Socket descriptor + * @param _timeout Amount of time to block the call waiting for the socket to be marked as writable or + * for the timeout to expire, in µSeconds (1 sec = 1000000 µsec) + * + * @return 1 if the socket is marked as writable + * 0 otherwise + */ +native socket_is_writable(_socket, _timeout = 100000); diff --git a/bin/amxxdump/includes/amxmodx/sockets.inc.temp b/bin/amxxdump/includes/amxmodx/sockets.inc.temp new file mode 100644 index 0000000..f13a36d --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/sockets.inc.temp @@ -0,0 +1,25 @@ +#if defined _socket_included +#endinput +#endif +#define _socket_included +#pragma reqlib sockets +#if !defined AMXMODX_NOAUTOLOAD +#pragma loadlib sockets +#endif +#define SOCKET_TCP 1 +#define SOCKET_UDP 2 +#define SOCK_NON_BLOCKING (1 << 0) +#define SOCK_LIBC_ERRORS (1 << 1) +#define SOCK_ERROR_OK 0 +#define SOCK_ERROR_CREATE_SOCKET 1 +#define SOCK_ERROR_SERVER_UNKNOWN 2 +#define SOCK_ERROR_WHILE_CONNECTING 3 +native socket_open(const _hostname[], _port, _protocol = SOCKET_TCP, &_error, _flags = 0); +native socket_close(_socket); +native socket_recv(_socket, _data[], _length); +native socket_send(_socket, const _data[], _length); +native socket_send2(_socket, const _data[], _length); +#pragma deprecated Use socket_is_readable() instead +native socket_change(_socket, _timeout = 100000); +native socket_is_readable(_socket, _timeout = 100000); +native socket_is_writable(_socket, _timeout = 100000); diff --git a/bin/amxxdump/includes/amxmodx/sockets_async.inc b/bin/amxxdump/includes/amxmodx/sockets_async.inc new file mode 100644 index 0000000..12e2b40 --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/sockets_async.inc @@ -0,0 +1,49 @@ +#if defined _sockets_async_included + #endinput +#endif +#define _sockets_async_included + /*=================| +| Sockets Async 1.2 | +|==================*/ +#pragma reqlib sockets_async +#pragma loadlib sockets_async + + +enum SOCKET: {} + + +enum { + SOCK_TYPE_UDP=0, + SOCK_TYPE_TCP, + SOCK_TYPE_CHILD // Son los nuevos sockets que se crean al aceptar una conexion TCP +} + + +native SOCKET:socket_create(type, customID) + +native socket_lasterror() +native socket_getip(const hostname[], ip[], len) + +native socket_close(SOCKET:socket) +native socket_bind(SOCKET:socket, const local_ip[]="", local_port) + +native socket_get_custom(SOCKET:socket) +native socket_set_custom(SOCKET:socket, customID) + +// TCP +native socket_connect(SOCKET:socket, const hostname[], port) +native socket_send(SOCKET:socket, const data[], sendsize=0) +native socket_recv(SOCKET:socket, data[], maxlen) + +// UDP +native socket_sendto(SOCKET:socket, const ip[], port, const data[], sendsize=0) +native socket_recvfrom(SOCKET:socket, data[], maxlen, ip[], len, &port) + +forward fw_sockConnected(SOCKET:socket, customID) +forward fw_sockClosed(SOCKET:socket, customID, error) +forward fw_sockAccepted(SOCKET:socket, customID, SOCKET:cl_sock, const cl_ip[], cl_port) +forward fw_sockReadable(SOCKET:socket, customID, type) +forward fw_sockWritable(SOCKET:socket, customID, type) +/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE +*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang11274\\ f0\\ fs16 \n\\ par } +*/ diff --git a/bin/amxxdump/includes/amxmodx/sorting.inc b/bin/amxxdump/includes/amxmodx/sorting.inc new file mode 100644 index 0000000..f4b259b --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/sorting.inc @@ -0,0 +1,107 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Sorting Functions +// + +// +// All sort functions are based off the qsort() function from the +// C standard library, which uses the Quick Sort algorithm. +// For more info, see: http://linux.wku.edu/~lamonml/algor/sort/sort.html +// + +#if defined _sorting_included + #endinput +#endif +#define _sorting_included + +/** + * Contains sorting orders. + */ +enum SortMethod +{ + Sort_Ascending = 0, + Sort_Descending, + Sort_Random, +}; + +/** + * Data types for ADT Array Sorts + */ +enum SortType +{ + Sort_Integer = 0, + Sort_Float, + Sort_String, +}; +/** + * Basic sorting functions below. + */ + +native SortIntegers(array[], array_size, SortMethod:order = Sort_Ascending); + +native SortFloats(Float:array[], array_size, SortMethod:order = Sort_Ascending); + +native SortStrings(array[][], num_strings, SortMethod:order = Sort_Ascending); + +/** + * Custom sorting functions below. + */ + +/** + * Sorts a custom 1D array. You must pass in a comparison function. + * The sorting algorithm then uses your comparison function to sort the data. + * The function is called in the following manner: + * + * public MySortFunc(elem1, elem2, const array[], const data[], data_size) + * + * elem1, elem2 - Current element pair being compared + * array[] - Array in its current mid-sorted state. + * data[] - Extra data array you passed to the sort func. + * data_size - Size of extra data you passed to the sort func. + * + * Your function should return: + * -1 if elem1 should go before elem2 + * 0 if elem1 and elem2 are equal + * 1 if elem1 should go after elem2 + * Note that the parameters after elem2 are all optional and you do not need to specify them. + */ +native SortCustom1D(array[], array_size, const comparefunc[], data[]="", data_size=0); + + +/** + * Sorts a custom 2D array. + * The sorting algorithm then uses your comparison function to sort the data. + * The function is called in the following manner: + * + * public MySortFunc(const elem1[], const elem2[], const array[], data[], data_size) + * + * elem1[], elem2[] - Current element array pairs being compared + * array[][] - Array in its currently being sorted state. + * data[] - Extra data array you passed to the sort func. + * data_size - Size of extra data you passed to the sort func. + * + * Your function should return: + * -1 if elem1[] should go before elem2[] + * 0 if elem1[] and elem2 are equal[] + * 1 if elem1[] should go after elem2[] + * Note that the parameters after elem2[] are all optional and you do not need to specify them. + */ +native SortCustom2D(array[][], array_size, const comparefunc[], data[]="", data_size=0); + +/** + * Sort an ADT Array. Specify the type as Integer, Float, or String. + * + * @param array Array Handle to sort + * @param order Sort order to use, same as other sorts. + * @param type Data type stored in the ADT Array + * @noreturn + */ +native SortADTArray(Array:array, SortMethod:order, SortType:type); diff --git a/bin/amxxdump/includes/amxmodx/sorting.inc.temp b/bin/amxxdump/includes/amxmodx/sorting.inc.temp new file mode 100644 index 0000000..c763ea2 --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/sorting.inc.temp @@ -0,0 +1,22 @@ +#if defined _sorting_included +#endinput +#endif +#define _sorting_included +enum SortMethod +{ +Sort_Ascending = 0, +Sort_Descending, +Sort_Random, +}; +enum SortType +{ +Sort_Integer = 0, +Sort_Float, +Sort_String, +}; +native SortIntegers(array[], array_size, SortMethod:order = Sort_Ascending); +native SortFloats(Float:array[], array_size, SortMethod:order = Sort_Ascending); +native SortStrings(array[][], num_strings, SortMethod:order = Sort_Ascending); +native SortCustom1D(array[], array_size, const comparefunc[], data[]="", data_size=0); +native SortCustom2D(array[][], array_size, const comparefunc[], data[]="", data_size=0); +native SortADTArray(Array:array, SortMethod:order, SortType:type); diff --git a/bin/amxxdump/includes/amxmodx/sqlx.inc b/bin/amxxdump/includes/amxmodx/sqlx.inc new file mode 100644 index 0000000..5576f88 --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/sqlx.inc @@ -0,0 +1,582 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// SQLX - Newer SQL Database API +// + +#if defined _sqlx_included + #endinput +#endif +#define _sqlx_included + +//eh.. +#define SQL_NumRows SQL_NumResults + +#pragma reqclass sqlx +#if !defined AMXMODX_NOAUTOLOAD + #pragma defclasslib sqlx mysql +#endif + +enum Handle +{ + Empty_Handle +}; + +/** + * Creates a connection information tuple. This tuple must be passed + * into connection routines. + * + * @note Freeing the tuple is not necessary, but is a good idea if you create + * many of them. You can cache these handles globally. + * @note This does not connect to the DB; it only caches the connection information. + * + * @param host Database host + * @param user Database user + * @param pass Database password + * @param db Database name to use + * @param timeout Specifies how long connections should wait before giving up. + * If <= 0, the default of 60s is used. + * + * @return A newly created tuple handle to be used in connection routines. + */ +native Handle:SQL_MakeDbTuple(const host[], const user[], const pass[], const db[], timeout=0); + + +/** + * Frees an SQL handle. + * + * @note The handle can be to anything (tuple, connection, query, results, etc). + * @note If you free the database connection handle, it closes the connection as well. + * + * @param h Handle to be freed. + * + * @noreturn + */ +native SQL_FreeHandle(Handle:h); + + +/** + * Opens a database connection. + * + * @param cn_tuple Tuple handle, returned from SQL_MakeDbTuple(). + * @param errcode An error code set by reference. + * @param error String where error string will be stored. + * @param maxlength Maximum length of the error buffer. + * + * @return Returns an SQL connection handle, which must be freed. + * Returns Empty_Handle on failure. + * @error Invalid info tuple handle. + */ +native Handle:SQL_Connect(Handle:cn_tuple, &errcode, error[], maxlength); + + +/** + * Sets the character set of the current connection. + * Like SET NAMES .. in mysql, but stays after connection problems. + * + * @note If a connection tuple is supplied, this should be called before SQL_Connect or SQL_ThreadQuery. + * @note The change will remain until you call this function with another value. + * @note This native does nothing in SQLite. + * + * Example: "utf8", "latin1" + * + * @param h Database or connection tuple Handle. + * @param charset The character set string to change to. + * + * @return True, if character set was changed, false otherwise. + */ +native bool:SQL_SetCharset(Handle:h, const charset[]); + + +/** + * Prepares a query. + * + * @note This does not actually do a query! + * + * @param db Connection handle, returned from SQL_Connect(). + * @param fmt Query string. Can be formated with format specifiers. + * @param ... Additional format specifiers used to format the query. + * + * @return Returns an SQL query handle, which must always be freed. + * Returns Empty_Handle on failure. + */ +native Handle:SQL_PrepareQuery(Handle:db, const fmt[], any:...); + + +/** + * Back-quotes characters in a string for database querying. + * + * @note The buffer's maximum size should be 2*strlen(string) to catch all scenarios. + * + * @param db Database handle for localization, or Empty_Handle + * for when a handle is not available. + * @param buffer Buffer to copy to. + * @param buflen Maximum size of the buffer. + * @param string String to backquote (should not overlap buffer). + * + * @return Length of new string, or -1 on failure. + * @error Invalid database handle. + */ +native SQL_QuoteString(Handle:db, buffer[], buflen, const string[]); + +/** + * Back-quotes characters in a string for database querying. + * Note: The buffer's maximum size should be 2*strlen(string) to catch + * all scenarios. + * + * @param db Database handle for localization, or Empty_Handle + * for when a handle is not available. + * @param buffer Buffer to copy to. + * @param buflen Maximum size of the buffer. + * @param fmt Format of string to backquote (should not overlap buffer). + * @param ... Format arguments. + * + * @return Length of new string, or -1 on failure. + */ +native SQL_QuoteStringFmt(Handle:db, buffer[], buflen, const fmt[], any:...); + + +/** + * Threaded query states. Used to check the state of a complete threaded query. + */ +#define TQUERY_CONNECT_FAILED -2 +#define TQUERY_QUERY_FAILED -1 +#define TQUERY_SUCCESS 0 + +/** + * Prepares and executes a threaded query. + * @note The handler should look like: + * public QueryHandler(failstate, Handle:query, error[], errnum, data[], size, Float:queuetime) + * failstate - One of the three TQUERY_ defines. + * query - Handle to the query, do not free it. + * error - An error message, if any. + * errnum - An error code, if any. + * data - Data array you passed in. + * size - Size of the data array you passed in. + * queuetime - Amount of gametime that passed while the query was resolving. + * @note This will not interrupt gameplay in the event of a poor/lossed + * connection, however, the interface is more complicated and + * asynchronous. Furthermore, a new connection/disconnection is + * made for each query to simplify driver support. + * @note The handle does not need to be freed. + * + * @param db_tuple Tuple handle, returned from SQL_MakeDbTuple(). + * @param handler A function to be called when the query finishes. It has to be public. + * @param query The query string. + * @param data Additional data array that will be passed to the handler function. + * @param dataSize The size of the additional data array. + * + * @noreturn + * @error Thread worker was unable to start. + * Invalid info tuple handle. + * Handler function not found. + */ +native SQL_ThreadQuery(Handle:db_tuple, const handler[], const query[], const data[]="", dataSize=0); + + +/** + * Executes an already prepared query. + * + * @note You can call this multiple times as long as its parent connection is kept open. + * Each time the result set from the previous call will be freed. + * + * @param query Handle of a prepared query to be executed. + * + * @return 1 if the query succeeded, 0 if the query failed. + * @error Invalid query handle. + */ +native SQL_Execute(Handle:query); + + +/** + * Gets information about a failed query error. + * + * @param query Handle of a query to extract the error from. + * @param error Buffer where to store the error string. + * @param maxlength The maximum length of the output buffer. + * + * @return The error code. + */ +native SQL_QueryError(Handle:query, error[], maxlength); + + +/** + * Checks whether there are more results to be read. + * + * @param query Handle of a query to check. + * + * @return 1 if there are more results, 0 otherwise. + * @error Invalid query handle. + */ +native SQL_MoreResults(Handle:query); + + +/** + * Tells whether a specific column in the current row is NULL or not. + * + * @param query Handle of a query to check. + * @param column Which column to check for NULL. + * + * @return 1 if the column is NULL, 0 otherwise. + * @error Invalid query handle. + * No result set in this query. + * Invalid column. + */ +native SQL_IsNull(Handle:query, column); + + +/** + * Retrieves the current result. + * + * @note A successful query starts at the first result, so you should not call + * SQL_NextRow() first. + * + * @note Example how to get different types of values: + * new num = SQL_ReadResult(query, 0) + * new Float:num2 + * new string[32] + * SQL_ReadResult(query, 1, num2) + * SQL_ReadResult(query, 2, string, charsmax(string)) + * + * @param query Handle of a query to read results from. + * @param column Which column to get the value from. + * @param ... Passing no extra arguments - returns an integer. + * Passing one extra argument - returns a float in the first extra argument + * Passing two extra params - returns a string in the first argument + * with a maximum string length in the second argument. + * + * @return If no extra arguments are passed, returns an integer value. + * @error Invalid query handle. + */ +native SQL_ReadResult(Handle:query, column, any:...); + + +/** + * Advances to the next result (row). + * + * @param query Handle of a query. + * + * @noreturn + * @error Invalid query handle. + * No result set in this query. + */ +native SQL_NextRow(Handle:query); + + +/** + * Returns the number of affected rows by a query. + * + * @param query Handle of a query to check. + * + * @return The number of affected rows. + * @error Invalid query handle. + */ +native SQL_AffectedRows(Handle:query); + + +/** + * The number of retrieved rows (results) after a query. + * + * @param query Handle of a query to check. + * + * @return The number of retrieved rows by the query. + * @error Invalid query handle. + */ +native SQL_NumResults(Handle:query); + + +/** + * Returns the total number of columns. + * + * @param query Handle of a query to check. + * + * @return The number of retrieved columns by the query. + * @error Invalid query handle. + * No result set in this query. + */ +native SQL_NumColumns(Handle:query); + + +/** + * Retrieves the name of a column by its index. + * + * @param query Handle of a query. + * @param num The number (index) of a column to retrieve the name from. + * @param name Buffer where to store the column's name. + * @param maxlength Maximum length of the output buffer. + * + * @noreturn + * @error Invalid query handle. + * No result set in this query. + * Invalid column index. + */ +native SQL_FieldNumToName(Handle:query, num, name[], maxlength); + + +/** + * Retrieves the number of a named column. + * + * @param query Handle of a query. + * @param name Name to search for. + * + * @return Column index if found (>= 0); -1 otherwise. + * @error Invalid query handle. + * No result set in this query. + */ +native SQL_FieldNameToNum(Handle:query, const name[]); + + +/** + * Rewinds a result set to the first row. + * + * @param query Handle of a query to rewind the result set of. + * + * @noreturn + * @error Invalid query handle. + * No result set in this query. + */ +native SQL_Rewind(Handle:query); + + +/** + * Retrieves the instert ID of the latest INSERT query. + * + * @param query Handle of a query. + * + * @return The insert ID of the latest INSERT query. + * @error Invalid query handle. + */ +native SQL_GetInsertId(Handle:query); + + +/** + * Retrieves which driver is this plugin currently bound to. + * + * @param driver Buffer to store the driver name in. + * @param maxlen Maximum length of the output buffer. + * + * @noreturn + */ +native SQL_GetAffinity(driver[], maxlen); + + +/** + * Sets driver affinity. You can use this to force a particular driver implementation. + * This will automatically change all SQL natives in your plugin to be "bound" to + * the module in question. + * + * @note Using this while you have open handles to another database type will + * cause problems. I.e., you cannot open a handle, switch affinity, + * then close the handle with a different driver. + * @note Switching affinity is an O(n * m) operation, where n is the number of + * SQL natives and m is the number of used natives in total. + * @note Intuitive programmers will note that this causes problems for + * threaded queries. You will have to either force your script to work + * under one affinity, or to pack the affinity type into the query data, + * check it against the current, then set the new affinity if necessary. + * Then, restore the old one for safety. + * + * @param driver The name of a driver to use. + * + * @return If no module with the given name is found, returns 0. + * Unless your plugin is bult to handle different driver + * types at once, you should let this error pass. + */ +native SQL_SetAffinity(const driver[]); + +/** + * Returns the original query string that a query handle used. + * + * @param query Handle of a query. + * @param buffer Buffer where to put the query string in. + * @param maxlength The maximum length of the output buffer. + * + * @noreturn + * @error Invalid query handle. + */ +native SQL_GetQueryString(Handle:query, buffer[], maxlength); + +/** + * For queries which return multiple result sets, this advances to the next + * result set if one is available. Otherwise, the current result set is + * destroyed and will no longer be accessible. + * + * @note This function will always return false on SQLite, and when using threaded + * queries in MySQL. Nonetheless, it has the same effect of removing the last + * result set. + * + * @param query Query Handle. + * + * @return True on success, false on failure. + * @error Invalid query handle. + * No result set in this query. + */ +native bool:SQL_NextResultSet(Handle:query); + + +/** + * This function can be used to find out if a table in a SQLite database exists. + * + * @param db Connection handle returned from SQL_Connect(). + * @param table The table name to check for. + * + * @return True if it exists, false otherwise. + */ +stock bool:sqlite_TableExists(Handle:db, const table[]) +{ + new Handle:query = SQL_PrepareQuery( + db, + "SELECT name FROM sqlite_master WHERE type='table' AND name='%s' LIMIT 1;", + table); + + if (!SQL_Execute(query) || !SQL_NumResults(query)) + { + SQL_FreeHandle(query); + return false; + } + + SQL_FreeHandle(query); + + return true; +} + +/** + * Use this for executing a query where you don't care about the result. + * + * @param db Connection handle returned from SQL_Connect(). + * @param query The query string. + * @param error If an error occurs, it will be placed into this buffer. + * @param maxlength Maximum length of the error buffer. + * @param rows Optional. If put, retrieves the number of rows the query returned. + * + * @return 1 on success, 0 on failure. + */ +stock SQL_SimpleQuery(Handle:db, const query[], error[]="", maxlength=0, &rows=0) +{ + new Handle:hQuery = SQL_PrepareQuery(db, "%s", query); + + if (!SQL_Execute(hQuery)) + { + SQL_QueryError(hQuery, error, maxlength); + SQL_FreeHandle(hQuery); + return 0; + } + + rows = SQL_NumResults(hQuery); + + SQL_FreeHandle(hQuery); + + return 1; +} + + +/** + * Use this for executing a query where you don't care about the result. + * + * @note Differs from SQL_SimpleQuery() because the query can be formated. + * + * @param db Connection handle returned from SQL_Connect(). + * @param error If an error occurs, it will be placed into this buffer. + * @param maxlength The maximum length of the error buffer. + * @param rows Optional. If put, retrieves the number of rows the query returned. + * @param fmt The query string that can be formated with format specifiers. + * @param ... Additional arguments for formating the query. + * + * @return 1 on success, 0 on failure. + */ +stock SQL_SimpleQueryFmt(Handle:db, error[]="", maxlength=0, &rows=0, const fmt[], any:...) +{ + static query_buf[2048]; + vformat(query_buf, 2047, fmt, 6); + + new Handle:hQuery = SQL_PrepareQuery(db, "%s", query_buf); + + if (!SQL_Execute(hQuery)) + { + SQL_QueryError(hQuery, error, maxlength); + SQL_FreeHandle(hQuery); + return 0; + } + + rows = SQL_NumResults(hQuery); + + SQL_FreeHandle(hQuery); + + return 1; +} + +/** + * Use this for executing a query and not caring about the error. + * + * @param db A connection handle returned from SQL_Connect(). + * @param queryfmt The query string that can be formated with format specifiers. + * @pram ... Additional arguments for formating the query. + * + * @return -1 on error. + * >= 0 on success (with the number of affected rows). + */ +stock SQL_QueryAndIgnore(Handle:db, const queryfmt[], any:...) +{ + static query[4096]; + new Handle:hQuery; + new ret; + + vformat(query, sizeof(query)-1, queryfmt, 3); + + hQuery = SQL_PrepareQuery(db, "%s", query); + + if (SQL_Execute(hQuery)) + { + ret = SQL_AffectedRows(hQuery); + } else { + ret = -1; + } + + SQL_FreeHandle(hQuery); + + return ret; +} + +/** + * Use this for making a standard DB Tuple, using AMXX's database info cvars. + * + * @param timeout Specifies how long connections should wait before giving up. + * If 0, the value is read from "amx_sql_timeout" cvar. + * + * @return A newly created tuple handle to be used in connection routines. + */ +stock Handle:SQL_MakeStdTuple(timeout = 0) +{ + static host[64], user[32], pass[32], db[128]; + static get_type[12], set_type[12]; + + get_cvar_string("amx_sql_host", host, 63); + get_cvar_string("amx_sql_user", user, 31); + get_cvar_string("amx_sql_pass", pass, 31); + get_cvar_string("amx_sql_type", set_type, 11); + get_cvar_string("amx_sql_db", db, 127); + + if (timeout <= 0) + { + timeout = get_cvar_num("amx_sql_timeout"); + } + + SQL_GetAffinity(get_type, 12); + + if (!equali(get_type, set_type)) + { + if (!SQL_SetAffinity(set_type)) + { + log_amx("Failed to set affinity from %s to %s.", get_type, set_type); + } + } + + return SQL_MakeDbTuple(host, user, pass, db, timeout); +} diff --git a/bin/amxxdump/includes/amxmodx/sqlx.inc.temp b/bin/amxxdump/includes/amxmodx/sqlx.inc.temp new file mode 100644 index 0000000..efe0d55 --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/sqlx.inc.temp @@ -0,0 +1,122 @@ +#if defined _sqlx_included +#endinput +#endif +#define _sqlx_included +#define SQL_NumRows SQL_NumResults +#pragma reqclass sqlx +#if !defined AMXMODX_NOAUTOLOAD +#pragma defclasslib sqlx mysql +#endif +enum Handle +{ +Empty_Handle +}; +native Handle:SQL_MakeDbTuple(const host[], const user[], const pass[], const db[], timeout=0); +native SQL_FreeHandle(Handle:h); +native Handle:SQL_Connect(Handle:cn_tuple, &errcode, error[], maxlength); +native bool:SQL_SetCharset(Handle:h, const charset[]); +native Handle:SQL_PrepareQuery(Handle:db, const fmt[], any:...); +native SQL_QuoteString(Handle:db, buffer[], buflen, const string[]); +native SQL_QuoteStringFmt(Handle:db, buffer[], buflen, const fmt[], any:...); +#define TQUERY_CONNECT_FAILED -2 +#define TQUERY_QUERY_FAILED -1 +#define TQUERY_SUCCESS 0 +native SQL_ThreadQuery(Handle:db_tuple, const handler[], const query[], const data[]="", dataSize=0); +native SQL_Execute(Handle:query); +native SQL_QueryError(Handle:query, error[], maxlength); +native SQL_MoreResults(Handle:query); +native SQL_IsNull(Handle:query, column); +native SQL_ReadResult(Handle:query, column, any:...); +native SQL_NextRow(Handle:query); +native SQL_AffectedRows(Handle:query); +native SQL_NumResults(Handle:query); +native SQL_NumColumns(Handle:query); +native SQL_FieldNumToName(Handle:query, num, name[], maxlength); +native SQL_FieldNameToNum(Handle:query, const name[]); +native SQL_Rewind(Handle:query); +native SQL_GetInsertId(Handle:query); +native SQL_GetAffinity(driver[], maxlen); +native SQL_SetAffinity(const driver[]); +native SQL_GetQueryString(Handle:query, buffer[], maxlength); +native bool:SQL_NextResultSet(Handle:query); +stock bool:sqlite_TableExists(Handle:db, const table[]) +{ +new Handle:query = SQL_PrepareQuery( +db, +"SELECT name FROM sqlite_master WHERE type='table' AND name='%s' LIMIT 1;", +table); +if (!SQL_Execute(query) || !SQL_NumResults(query)) +{ +SQL_FreeHandle(query); +return false; +} +SQL_FreeHandle(query); +return true; +} +stock SQL_SimpleQuery(Handle:db, const query[], error[]="", maxlength=0, &rows=0) +{ +new Handle:hQuery = SQL_PrepareQuery(db, "%s", query); +if (!SQL_Execute(hQuery)) +{ +SQL_QueryError(hQuery, error, maxlength); +SQL_FreeHandle(hQuery); +return 0; +} +rows = SQL_NumResults(hQuery); +SQL_FreeHandle(hQuery); +return 1; +} +stock SQL_SimpleQueryFmt(Handle:db, error[]="", maxlength=0, &rows=0, const fmt[], any:...) +{ +static query_buf[2048]; +vformat(query_buf, 2047, fmt, 6); +new Handle:hQuery = SQL_PrepareQuery(db, "%s", query_buf); +if (!SQL_Execute(hQuery)) +{ +SQL_QueryError(hQuery, error, maxlength); +SQL_FreeHandle(hQuery); +return 0; +} +rows = SQL_NumResults(hQuery); +SQL_FreeHandle(hQuery); +return 1; +} +stock SQL_QueryAndIgnore(Handle:db, const queryfmt[], any:...) +{ +static query[4096]; +new Handle:hQuery; +new ret; +vformat(query, sizeof(query)-1, queryfmt, 3); +hQuery = SQL_PrepareQuery(db, "%s", query); +if (SQL_Execute(hQuery)) +{ +ret = SQL_AffectedRows(hQuery); +} else { +ret = -1; +} +SQL_FreeHandle(hQuery); +return ret; +} +stock Handle:SQL_MakeStdTuple(timeout = 0) +{ +static host[64], user[32], pass[32], db[128]; +static get_type[12], set_type[12]; +get_cvar_string("amx_sql_host", host, 63); +get_cvar_string("amx_sql_user", user, 31); +get_cvar_string("amx_sql_pass", pass, 31); +get_cvar_string("amx_sql_type", set_type, 11); +get_cvar_string("amx_sql_db", db, 127); +if (timeout <= 0) +{ +timeout = get_cvar_num("amx_sql_timeout"); +} +SQL_GetAffinity(get_type, 12); +if (!equali(get_type, set_type)) +{ +if (!SQL_SetAffinity(set_type)) +{ +log_amx("Failed to set affinity from %s to %s.", get_type, set_type); +} +} +return SQL_MakeDbTuple(host, user, pass, db, timeout); +} diff --git a/bin/amxxdump/includes/amxmodx/string.inc b/bin/amxxdump/includes/amxmodx/string.inc new file mode 100644 index 0000000..d21676d --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/string.inc @@ -0,0 +1,786 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// String Manipulation +// + +#if defined _string_included + #endinput +#endif +#define _string_included + +#include + +/** + * @global Unless otherwise noted, all string functions which take in a + * writable buffer and maximum length should NOT have the null terminator INCLUDED + * in the length. This means that this is valid: + * copy(string, charsmax(string), ...) + */ + +/** + * Calculates the length of a string. + * + * @param string String to check. + * @return Number of valid character bytes in the string. + */ +native strlen(const string[]); + +/** + * Tests whether a string is found inside another string. + * + * @param source String to search in. + * @param string Substring to find inside the original string. + * + * @return -1 on failure (no match found). Any other value + * indicates a position in the string where the match starts. + */ +native contain(const source[], const string[]); + +/** + * Tests whether a string is found inside another string with case ignoring. + * + * @note This supports multi-byte characters (UTF-8) on comparison. + * + * @param source String to search in. + * @param string Substring to find inside the original string. + * + * @return -1 on failure (no match found). Any other value + * indicates a position in the string where the match starts. + */ +native containi(const source[], const string[]); + +/** + * Given a string, replaces the first occurrence of a search string with a + * replacement string. + * + * @param text String to perform search and replacements on. + * @param len Maximum length of the string buffer. + * @param what String to search for. + * @param with String to replace the search string with. + * + * @return The new string length after replacement, or 0 if no replacements were made. + */ +native replace(text[], len, const what[], const with[]); + +/** + * Given a string, replaces all occurrences of a search string with a + * replacement string. + * + * @note Similar to replace_all() stock, but implemented as native and + * with different algorithm. This native doesn't error on bad + * buffer size and will smartly cut off the string in a way + * that pushes old data out. + * + * @note Only available in 1.8.3 and above. + * @note This supports multi-byte characters (UTF-8) on case insensitive comparison. + * + * @param text String to perform search and replacements on. + * @param maxlength Maximum length of the string buffer. + * @param search String to search for. + * @param replace String to replace the search string with. + * @param caseSensitive If true (default), search is case sensitive. + * + * @return Number of replacements that were performed. + */ +native replace_string(text[], maxlength, const search[], const replace[], bool:caseSensitive = true); + +/** + * Given a string, replaces the first occurrence of a search string with a + * replacement string. + * + * @note Similar to replace() native, but implemented with more options and + * with different algorithm. This native doesn't error on bad + * buffer size and will smartly cut off the string in a way + * that pushes old data out. + * + * @note Only available in 1.8.3 and above. + * @note This supports multi-byte characters (UTF-8) on case insensitive comparison. + * + * @param text String to perform search and replacements on. + * @param maxlength Maximum length of the string buffer. + * @param search String to search for. + * @param replace String to replace the search string with. + * @param searchLen If higher than -1, its value will be used instead of + * a strlen() call on the search parameter. + * @param replaceLen If higher than -1, its value will be used instead of + * a strlen() call on the replace parameter. + * @param caseSensitive If true (default), search is case sensitive. + * + * @return Index into the buffer (relative to the start) from where + * the last replacement ended, or -1 if no replacements were + * made. + */ +native replace_stringex(text[], maxlength, const search[], const replace[], searchLen = -1, replaceLen = -1, bool:caseSensitive = true); + +/** + * Concatenates one string onto another. + * + * @param dest String to append to. + * @param len Maximum length of entire buffer. + * @param src Source string to concatenate. + * @param max Number of characters to add. + * + * @return Number of of all merged characters. + */ +native add(dest[],len,const src[],max=0); + +/** + * Formats a string according to the AMX Mod X format rules (see documentation). + * + * @note Example: format(dest, "Hello %s. You are %d years old", "Tom", 17). + * If any of your input buffers overlap with the destination buffer, + * format() falls back to a "copy-back" version as of 1.65. This is + * slower, so you should using a source string that is the same as + * the destination. + * + * @param output Destination string buffer. + * @param len Maximum length of output string buffer. + * @param format Formatting rules. + * @param ... Variable number of format parameters. + * + * @return Number of cells written. + */ +native format(output[], len, const format[], any:...); + +/** + * Formats a string according to the AMX Mod X format rules (see documentation). + * + * @note Same as format(), except does not perform a "copy back" check. + * This means formatex() is faster, but DOES NOT ALLOW this type + * of call: + * formatex(buffer, len, "%s", buffer) + * formatex(buffer, len, buffer, buffer) + * formatex(buffer, len, "%s", buffer[5]) + * This is because the output is directly stored into "buffer", + * rather than copied back at the end. + * + * @param output Destination string buffer. + * @param len Maximum length of output string buffer. + * @param format Formatting rules. + * @param ... Variable number of format parameters. + * + * @return Number of cells written. + */ +native formatex(output[], len, const format[], any:...); + +/** + * Formats and returns a string according to the AMX Mod X format rules + * (see documentation). + * + * @note Example: menu_additem(menu, fmt("My first %s", "item")). + * @note This should only be used for simple inline formatting like in the above example. + * Avoid using this function to store strings into variables as an additional + * copying step is required. + * @note The buffer size is defined by MAX_FMT_LENGTH. + * + * @param format Formatting rules. + * @param ... Variable number of format parameters. + * + * @return Formatted string + */ +native [MAX_FMT_LENGTH]fmt(const format[], any:...); + +/** + * Formats a string according to the AMX Mod X format rules (see documentation). + * + * @note This is the same as format(), except it grabs parameters from a + * parent parameter stack, rather than a local. This is useful for + * implementing your own variable argument functions. + * + * @note Replacement for format_args. Much faster and %L compatible. + * This works exactly like vsnprintf() from C. + * You must pass in the output buffer and its size, + * the string to format, and the number of the FIRST variable + * argument parameter. For example, for: + * function (a, b, c, ...) + * You would pass 4 (a is 1, b is 2, c is 3, et cetera). + * There is no vformatex(). + * + * @param buffer Destination string buffer. + * @param len Maximum length of output string buffer. + * @param fmt Formatting rules. + * @param vararg Argument number which contains the '...' symbol. + * Note: Arguments start at 1. + * @return Number of bytes written. + */ +native vformat(buffer[], len, const fmt[], vararg); + +/** + * Formats a string according to the AMX Mod X format rules (see documentation). + * + * @note Same as vformat(), except works in normal style dynamic natives. + * Instead of passing the format arg string, you can only pass the + * actual format argument number itself. + * If you pass 0, it will read the format string from an optional + * fifth parameter. + * + * @param buffer Destination string buffer. + * @param len Maximum length of output string buffer. + * @param fmt_arg Argument number which contains the format. + * @param vararg Argument number which contains the '...' symbol. + * Note: Arguments start at 1. + * @return Number of bytes written. + */ +native vdformat(buffer[], len, fmt_arg, vararg, ...); + +/** + * Gets parameters from function as formated string. + * + * @param output Destination string buffer. + * @param len Maximum length of output string buffer. + * @param pos Argument number which contains the '...' symbol. + * + * @return Number of bytes written. + */ +native format_args(output[], len, pos = 0); + +/** + * Converts an integer to a string. + * + * @param num Integer to convert. + * @param string Buffer to store string in. + * @param len Maximum length of string buffer. + * + * @return Number of cells written to buffer. + */ +native num_to_str(num,string[],len); + +/** + * Converts a string to an integer. + * + * @param string String to convert. + * @return Integer conversion of string, or 0 on failure. + */ +native str_to_num(const string[]); + +/** + * Parses the 'string' interpreting its content as an integral number of the specified 'base', + * which is returned as integer value. The function also sets the value of 'endPos' to point + * to the position of the first character after the number. + * + * This is the same as C++ strtol function with a difference on second param. + * + * The function first discards as many whitespace characters as necessary until the first + * non-whitespace character is found. Then, starting from this character, takes as many + * characters as possible that are valid following a syntax that depends on the 'base' parameter, + * and interprets them as a numerical value. Finally, a position of the first character following + * the integer representation in 'string' is stored in 'endPos'. + * + * If the value of 'base' is zero, the syntax expected is similar to that of integer constants, + * which is formed by a succession of : + * An optional sign character (+ or -) + * An optional prefix indicating octal or hexadecimal base ("0" or "0x"/"0X" respectively) + * A sequence of decimal digits (if no base prefix was specified) or either octal or hexadecimal digits if a specific prefix is present + * + * If the 'base' value is between 2 and 36, the format expected for the integral number is a succession + * of any of the valid digits and/or letters needed to represent integers of the specified radix + * (starting from '0' and up to 'z'/'Z' for radix 36). The sequence may optionally be preceded by + * a sign (either + or -) and, if base is 16, an optional "0x" or "0X" prefix. + * + * If the first sequence of non-whitespace characters in 'string' is not a valid integral number + * as defined above, or if no such sequence exists because either 'string' is empty or it contains + * only whitespace characters, no conversion is performed. + * + * @param string The string to parse. + * @param endPos The position of the first character following the number. + * On success and when containing only numbers, position is at the end of string, meaning equal to 'string' length. + * On failure, position is sets always to 0. + * @param base The numerical base (radix) that determines the valid characters and their interpretation. + * If this is 0, the base used is determined by the format in the sequence. + * @return On success, the function returns the converted integral number as integer value. + * If no valid conversion could be performed, a zero value is returned. + * If the value read is out of the range of representable values by a cell, + * the function returns 'cellmin' or 'cellmax'. + */ +native strtol(const string[], &endPos = 0, base = 0); + +/** + * Parses the 'string' interpreting its content as an floating point number and returns its value as a float. + * The function also sets the value of 'endPos' to point to the position of the first character after the number. + * + * This is the same as C++ strtod function with a difference on second param. + * + * The function first discards as many whitespace characters as necessary until the first + * non-whitespace character is found. Then, starting from this character, takes as many + * characters as possible that are valid and interprets them as a numerical value. + * Finally, a position of the first character following the float representation in 'string' + * is stored in 'endPos'. + * + * If the first sequence of non-whitespace characters in 'string' is not a valid float number + * as defined above, or if no such sequence exists because either 'string' is empty or it contains + * only whitespace characters, no conversion is performed. + * + * @param string The string to parse. + * @param endPos The position of the first character following the number. + * On success and when containing only numbers, position is at the end of string, meaning equal to 'string' length. + * On failure, position is sets always to 0. + * @return On success, the function returns the converted floating point number as float value. + * If no valid conversion could be performed, a zero value is returned. + */ +native Float:strtof(const string[], &endPos = 0); + +/** + * Converts a floating point number to a string. + * + * @param fl Floating point number to convert. + * @param string Buffer to store string in. + * @param len Maximum length of string buffer. + * + * @return Number of cells written to buffer. + */ +native float_to_str(Float:fl, string[], len); + +/** + * Converts a string to a floating point number. + * + * @param string String to convert to a foat. + * @return Floating point result, or 0.0 on error. + */ +native Float:str_to_float(const string[]); + +/** + * Returns whether two strings are equal. + * + * @param a First string (left). + * @param b Second string (right). + * @param c Number of characters to compare. + * + * @return True if equal, false otherwise. + */ +native equal(const a[],const b[],c=0); + +/** + * Returns whether two strings are equal with case ignoring. + * + * @note This supports multi-byte characters (UTF-8) on comparison. + * + * @param a First string (left). + * @param b Second string (right). + * @param c Number of characters to compare. + * + * @return True if equal, false otherwise. + */ +native equali(const a[], const b[], c = 0); + +/** + * Copies one string to another string. + * + * @note If the destination buffer is too small to hold the source string, the + * destination will be truncated. + * + * @param dest Destination string buffer to copy to. + * @param len Destination buffer length. + * @param src Source string buffer to copy from. + * + * @return Number of cells written. + */ +native copy(dest[],len,const src[]); + +/** + * Copies one string to another string until ch is found. + * + * @param dest Destination string buffer to copy to. + * @param len Destination buffer length. + * @param src Source string buffer to copy from. + * @param ch Character to search for. + * + * @return Number of cells written. + */ +native copyc(dest[],len,const src[],ch); + +/** + * Sets string with given character. + * + * @param src Destination string buffer to copy to. + * @param len Destination buffer length. + * @param ch Character to set string. + * + * @noreturn + */ +native setc(src[],len,ch); + +/** + * Gets parameters from text. + * + * @note Example: to split text: "^"This is^" the best year", + * call function like this: parse(text,arg1,len1,arg2,len2,arg3,len3,arg4,len4) + * and you will get: "This is", "the", "best", "year" + * Function returns number of parsed parameters. + * + * @param text String to parse. + * @param ... Variable number of format parameters. + * + * @return Number of parsed parameters. + */ +native parse(const text[], ... ); + +/** + * Breaks a string in two by token. + * + * @note Trimming spaces is buggy. Consider strtok2 instead. + * + * @note See argbreak() for doing this with parameters. + * Example: + * str1[] = This *is*some text + * strtok(str1, left, 24, right, 24, '*') + * left will be "This " + * Right will be "is*some text" + * If you use trimSpaces, all spaces are trimmed from Left. + * + * @param text String to tokenize + * @param Left Buffer to store left half + * @param leftLen Size of left buffer + * @param Right Buffer to store right half + * @param rightLen Size of right buffer + * @param token Token to split by + * @param trimSpaces Whether spaces are trimmed. + * + * @noreturn + */ +native strtok(const text[], Left[], leftLen, Right[], rightLen, token=' ', trimSpaces=0); + +/** + * Breaks a string in two by token. + * + * @note Only available in 1.8.3 and above. + * + * @param text String to tokenize + * @param left Buffer to store left half + * @param llen Size of left buffer + * @param right Buffer to store right half + * @param rlen Size of right buffer + * @param token Token to split by + * @param trim Flags for trimming behavior, see above + * + * @return Returns position of token in string if found, + * -1 if token was not found + */ +native strtok2(const text[], left[], const llen, right[], const rlen, const token = ' ', const trim = 0); + +/** + * Removes whitespace characters from the beginning and end of a string. + * + * @param text The string to trim. + * @return Number of bytes written. + */ +native trim(text[]); + +/** + * Converts all chars in string to lower case. + * + * @param string The string to convert. + * @return Number of bytes written. + */ +native strtolower(string[]); + +/** + * Performs a multi-byte safe (UTF-8) conversion of all chars in string to lower case. + * + * @note Although most code points can be converted in-place, there are notable + * exceptions and the final length can vary. + * @note Case mapping is not reversible. That is, toUpper(toLower(x)) != toLower(toUpper(x)). + * + * @param string The string to convert. + * @param maxlength Optional size of the buffer. If 0, the length of the original string + * will be used instead. + * + * @return Number of bytes written. + */ +native mb_strtolower(string[], maxlength = 0); + +/** + * Converts all chars in string to upper case. + * + * @param string The string to convert. + * @return Number of bytes written. + */ +native strtoupper(string[]); + +/** + * Performs a multi-byte safe (UTF-8) conversion of all chars in string to upper case. + * + * @note Although most code points can be converted in-place, there are notable + * exceptions and the final length can vary. + * @note Case mapping is not reversible. That is, toUpper(toLower(x)) != toLower(toUpper(x)). + * + * @param string The string to convert. + * @param maxlength Optional size of the buffer. If 0, the length of the original string + * will be used instead. + * + * @return Number of bytes written. + */ +native mb_strtoupper(string[], maxlength = 0); + +/** + * Make a string's first character uppercase. + * + * @param string The string to convert. + * @return 1 on success, otherwise 0. + */ +native ucfirst(string[]); + +/** + * Performs a multi-byte safe (UTF-8) conversion of a string's first character to upper case. + * + * @note Although most code points can be converted in-place, there are notable + * exceptions and the final length can vary. + * + * @param string The string to convert. + * @param maxlength Optional size of the buffer. If 0, the length of the original string + * will be used instead. + * + * @return Number of bytes written. + */ +native mb_ucfirst(string[], maxlength = 0); + +/** + * Performs a multi-byte safe (UTF-8) conversion of all chars in string to title case. + * + * @note Although most code points can be converted in-place, there are notable + * exceptions and the final length can vary. + * @note Any type of punctuation can break up a word, even if this is + * not grammatically valid. This happens because the titlecasing algorithm + * does not and cannot take grammar rules into account. + * @note Examples: + * The running man | The Running Man + * NATO Alliance | Nato Alliance + * You're amazing at building libraries | You'Re Amazing At Building Libraries + * + * @param string The string to convert. + * @param maxlength Optional size of the buffer. If 0, the length of the original string + * will be used instead. + * + * @return Number of bytes written. + */ +native mb_strtotitle(string[], maxlength = 0); + +/** + * Checks if the input string conforms to the category specified by the flags. + * + * @note This function can be used to check if the code points in a string are part + * of a category. Valid flags are part of the UTF8C_* list of defines. + * The category for a code point is defined as part of the entry in + * UnicodeData.txt, the data file for the Unicode code point database. + * @note Flags parameter must be a combination of UTF8C_* flags or a single UTF8C_IS* flag. + * In order to main backwards compatibility with POSIX functions like `isdigit` + * and `isspace`, compatibility flags have been provided. Note, however, that + * the result is only guaranteed to be correct for code points in the Basic + * Latin range, between U+0000 and 0+007F. Combining a compatibility flag with + * a regular category flag will result in undefined behavior. + * @note The function is greedy. This means it will try to match as many code + * points with the matching category flags as possible and return the offset in + * the input in bytes. + * + * @param input The string to check + * @param input_size Size of the string, use 1 to check one character regardless its size + * @param flags Requested category, see UTF8C_* flags + * @param output_size Number of bytes in the input that conform to the specified + * category flags + * @return True if the whole input of `input_size` conforms to the specified + * category flags, false otherwise + */ +native bool:is_string_category(const input[], input_size, flags, &output_size = 0); + +/** + * Returns whether a character is numeric. + * + * @note Multi-byte characters will always return false. + * + * @param ch Character to test. + * @return True if character is numeric, otherwise false. + */ +native isdigit(ch); + +/** + * Returns whether a character is an ASCII alphabet character. + * + * @note Multi-byte characters will always return false. + * + * @param ch Character to test. + * @return True if character is alphabetical, otherwise false. + */ +native isalpha(ch); + +/** + * Returns whether a character is whitespace. + * + * @note Multi-byte characters will always return false. + * + * @param ch Character to test. + * @return True if character is whitespace, otherwise false. + */ +native isspace(ch); + +/** + * Returns whether a character is numeric or an ASCII alphabet character. + * + * @note Multi-byte characters will always return false. + * + * @param ch Character to test. + * @return True if character is numeric, otherwise false. + */ +native isalnum(ch); + +/** + * Returns if a character is multi-byte or not. + * + * @note Only available in 1.8.3 and above. + * + * @param ch Character to test. + * @return 0 for a normal 7-bit ASCII character, + * otherwise number of bytes in multi-byte character. + */ +native is_char_mb(ch); + +/** + * Returns whether an alphabetic character is uppercase. + * + * @note Only available in 1.8.3 and above. + * @note Multi-byte characters will always return false. + * + * @param ch Character to test. + * @return True if character is uppercase, otherwise false. + */ +native bool:is_char_upper(ch); + +/** + * Returns whether an alphabetic character is lowercase. + * + * @note Only available in 1.8.3 and above. + * @note Multi-byte characters will always return false. + * + * @param ch Character to test. + * @return True if character is lowercase, otherwise false. + */ +native bool:is_char_lower(ch); + +/** + * Returns the number of bytes a character is using. This is + * for multi-byte characters (UTF-8). For normal ASCII characters, + * this will return 1. + * + * @note Only available in 1.8.3 and above. + * + * @param source Source input string. + * @return Number of bytes the current character uses. + */ +native get_char_bytes(const source[]); + +/** + * Concatenates one string onto another. + * + * @param dest String to append to. + * @param source Source string to concatenate. + * @param maxlength Maximum length of entire buffer. + * @return Number of bytes written. + */ +native strcat(dest[], const source[], maxlength); + +/** + * Tests whether a string is found inside another string. + * + * @note This supports multi-byte characters (UTF-8) on case insensitive comparison. + * + * @param string String to search in. + * @param sub Substring to find inside the original string. + * @param ignorecase If true, search is case insensitive. + * If false (default), search is case sensitive. + * @param pos Start position to search from. + * @return -1 on failure (no match found). Any other value + * indicates a position in the string where the match starts. + */ +native strfind(const string[], const sub[], bool:ignorecase = false, pos = 0); + +/** + * Compares two strings lexographically. + * + * @note This supports multi-byte characters (UTF-8) on case insensitive comparison. + * + * @param string1 First string (left). + * @param string2 Second string (right). + * @param ignorecase If true, comparison is case insensitive. + * If false (default), comparison is case sensitive. + * @return -1 if string1 < string2 + * 0 if string1 == string2 + * 1 if string1 > string2 + */ +native strcmp(const string1[], const string2[], bool:ignorecase = false); + +/** + * Compares two strings parts lexographically. + * + * @note Only available in 1.8.3 and above. + * @note This supports multi-byte characters (UTF-8) on case insensitive comparison. + * + * @param string1 First string (left). + * @param string2 Second string (right). + * @param num Number of characters to compare. + * @param ignorecase If true, comparison is case insensitive. + * If false (default), comparison is case sensitive. + * @return -1 if string1 < string2 + * 0 if string1 == string2 + * 1 if string1 > string2 + */ +native strncmp(const string1[], const string2[], num, bool:ignorecase = false); + +/** + * Parses an argument string to find the first argument. You can use this to + * replace strbreak(). + * + * @note Only available in 1.8.3 and above. + * + * @note You can use argparse() to break a string into all of its arguments: + * new arg[N], pos; + * while (true) { + * pos = argparse(string, pos, arg, sizeof(arg) - 1); + * if (pos == -1) + * break; + * } + * + * @note All initial whitespace is removed. Remaining characters are read until an + * argument separator is encountered. A separator is any whitespace not inside + * a double-quotation pair (i.e. "x b" is one argument). If only one quotation + * mark appears, argparse() acts as if one existed at the end of the string. + * Quotation marks are never written back, and do not act as separators. For + * example, "a""b""c" will return "abc". An empty quote pair ("") will count + * as an argument containing no characters. + * + * @note argparse() will write an empty string to argbuffer if no argument is found. + * + * @param text String to tokenize. + * @param pos Position to start parsing from. + * @param argbuffer Buffer to store first argument. + * @param maxlen Size of the buffer. + * @return If no argument was found, -1 is returned. Otherwise, + * the index to the next position to parse from is + * returned. This might be the very end of the string. + */ +native argparse(const text[], pos, argbuffer[], maxlen); + +/** + * Returns text in a string up until a certain character sequence is reached. + * + * @note Only available in 1.8.3 and above. + * + * @param source Source input string. + * @param split A string which specifies a search point to break at. + * @param part Buffer to store string part. + * @param partLen Maximum length of the string part buffer. + * + * @return -1 if no match was found; otherwise, an index into source + * marking the first index after the searched text. The + * index is always relative to the start of the input string. + */ +native split_string(const source[], const split[], part[], partLen); + + +// Always keep this at the bottom of this file. +#include diff --git a/bin/amxxdump/includes/amxmodx/string.inc.temp b/bin/amxxdump/includes/amxmodx/string.inc.temp new file mode 100644 index 0000000..8429d60 --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/string.inc.temp @@ -0,0 +1,56 @@ +#if defined _string_included +#endinput +#endif +#define _string_included +#include +native strlen(const string[]); +native contain(const source[], const string[]); +native containi(const source[], const string[]); +native replace(text[], len, const what[], const with[]); +native replace_string(text[], maxlength, const search[], const replace[], bool:caseSensitive = true); +native replace_stringex(text[], maxlength, const search[], const replace[], searchLen = -1, replaceLen = -1, bool:caseSensitive = true); +native add(dest[],len,const src[],max=0); +native format(output[], len, const format[], any:...); +native formatex(output[], len, const format[], any:...); +native [MAX_FMT_LENGTH]fmt(const format[], any:...); +native vformat(buffer[], len, const fmt[], vararg); +native vdformat(buffer[], len, fmt_arg, vararg, ...); +native format_args(output[], len, pos = 0); +native num_to_str(num,string[],len); +native str_to_num(const string[]); +native strtol(const string[], &endPos = 0, base = 0); +native Float:strtof(const string[], &endPos = 0); +native float_to_str(Float:fl, string[], len); +native Float:str_to_float(const string[]); +native equal(const a[],const b[],c=0); +native equali(const a[], const b[], c = 0); +native copy(dest[],len,const src[]); +native copyc(dest[],len,const src[],ch); +native setc(src[],len,ch); +native parse(const text[], ... ); +native strtok(const text[], Left[], leftLen, Right[], rightLen, token=' ', trimSpaces=0); +native strtok2(const text[], left[], const llen, right[], const rlen, const token = ' ', const trim = 0); +native trim(text[]); +native strtolower(string[]); +native mb_strtolower(string[], maxlength = 0); +native strtoupper(string[]); +native mb_strtoupper(string[], maxlength = 0); +native ucfirst(string[]); +native mb_ucfirst(string[], maxlength = 0); +native mb_strtotitle(string[], maxlength = 0); +native bool:is_string_category(const input[], input_size, flags, &output_size = 0); +native isdigit(ch); +native isalpha(ch); +native isspace(ch); +native isalnum(ch); +native is_char_mb(ch); +native bool:is_char_upper(ch); +native bool:is_char_lower(ch); +native get_char_bytes(const source[]); +native strcat(dest[], const source[], maxlength); +native strfind(const string[], const sub[], bool:ignorecase = false, pos = 0); +native strcmp(const string1[], const string2[], bool:ignorecase = false); +native strncmp(const string1[], const string2[], num, bool:ignorecase = false); +native argparse(const text[], pos, argbuffer[], maxlen); +native split_string(const source[], const split[], part[], partLen); +#include diff --git a/bin/amxxdump/includes/amxmodx/string_const.inc b/bin/amxxdump/includes/amxmodx/string_const.inc new file mode 100644 index 0000000..989282e --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/string_const.inc @@ -0,0 +1,156 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// String Manipulation Constants +// + +#if defined _string_const_included + #endinput +#endif +#define _string_const_included + +#define charsmax(%1) (sizeof(%1)-1) + +/** + * @global Unless otherwise noted, all string functions which take in a + * writable buffer and maximum length should NOT have the null terminator INCLUDED + * in the length. This means that this is valid: + * copy(string, charsmax(string), ...) + */ + +/** + * Buffer size used by fmt(). + */ +#define MAX_FMT_LENGTH 256 + +/** + * Below are the trim flags for strtok2 + * + * You can specify how the left and right buffers will + * be trimmed by strtok2. LTRIM trims spaces from the + * left side. RTRIM trims from the right side. + * + * The defines TRIM_INNER, TRIM_OUTER and TRIM_FULL are + * shorthands for commonly used flag combinations. + * + * When the initial string is trimmed, using TRIM_INNER + * for all subsequent strtok2 calls will ensure that left + * and right are always trimmed from both sides. + * + * Examples: + * str1[] = " This is * some text " + * strtok2(str1, left, 24, right, 24, '*', TRIM_FULL) + * left will be "This is", right will be "some text" + * + * str2[] = " Here is | an | example " + * trim(str2) + * strtok2(str2, left, 24, right, 24, '|', TRIM_INNER) + * left will be "Here is", right will be "an | example" + * strtok2(right, left, 24, right, 24, '|', TRIM_INNER) + * left will be "an", right will be "example" + * + * str3[] = " One - more " + * strtok2(str3, left, 24, right, 24, '-', TRIM_OUTER) + * left will be "One ", right will be " more" + * + * str4[] = " Final . example " + * strtok2(str4, left, 24, right, 24, '.', LTRIM_LEFT|LTRIM_RIGHT) + * left will be "Final ", right will be "example " +*/ +#define LTRIM_LEFT (1<<0) +#define RTRIM_LEFT (1<<1) +#define LTRIM_RIGHT (1<<2) +#define RTRIM_RIGHT (1<<3) + +#define TRIM_INNER RTRIM_LEFT|LTRIM_RIGHT +#define TRIM_OUTER LTRIM_LEFT|RTRIM_RIGHT +#define TRIM_FULL TRIM_OUTER|TRIM_INNER + +/** + * Category flags to be used with is_string_category(), to check whether code points in a + * string are part of that category. + */ +#define UTF8C_LETTER_UPPERCASE 0x00000001 // Uppercase letter code points, Lu in the Unicode database. +#define UTF8C_LETTER_LOWERCASE 0x00000002 // Lowercase letter code points, Ll in the Unicode database. +#define UTF8C_LETTER_TITLECASE 0x00000004 // Titlecase letter code points, Lt in the Unicode database. +#define UTF8C_LETTER_MODIFIER 0x00000008 // Modifier letter code points, Lm in the Unicode database. +#define UTF8C_LETTER_OTHER 0x00000010 // Other letter code points, Lo in the Unicode database. + +// Combined flag for all letter categories with case mapping +// Combined flag for all letter categories +const UTF8C_LETTER = (UTF8C_LETTER_UPPERCASE | UTF8C_LETTER_LOWERCASE | UTF8C_LETTER_TITLECASE | UTF8C_LETTER_MODIFIER | UTF8C_LETTER_OTHER); +const UTF8C_CASE_MAPPED = (UTF8C_LETTER_UPPERCASE | UTF8C_LETTER_LOWERCASE | UTF8C_LETTER_TITLECASE); + +#define UTF8C_MARK_NON_SPACING 0x00000020 // Non-spacing mark code points, Mn in the Unicode database. +#define UTF8C_MARK_SPACING 0x00000040 // Spacing mark code points, Mc in the Unicode database. +#define UTF8C_MARK_ENCLOSING 0x00000080 // Enclosing mark code points, Me in the Unicode database. + +// Combined flag for all mark categories. +const UTF8C_MARK = (UTF8C_MARK_NON_SPACING | UTF8C_MARK_SPACING | UTF8C_MARK_ENCLOSING); + +#define UTF8C_NUMBER_DECIMAL 0x00000100 // Decimal number code points, Nd in the Unicode database. +#define UTF8C_NUMBER_LETTER 0x00000200 // Letter number code points, Nl in the Unicode database. +#define UTF8C_NUMBER_OTHER 0x00000400 // Other number code points, No in the Unicode database. + +// Combined flag for all number categories. +const UTF8C_NUMBER = (UTF8C_NUMBER_DECIMAL | UTF8C_NUMBER_LETTER | UTF8C_NUMBER_OTHER); + +#define UTF8C_PUNCTUATION_CONNECTOR 0x00000800 // Connector punctuation category, Pc in the Unicode database. +#define UTF8C_PUNCTUATION_DASH 0x00001000 // Dash punctuation category, Pd in the Unicode database. +#define UTF8C_PUNCTUATION_OPEN 0x00002000 // Open punctuation category, Ps in the Unicode database. +#define UTF8C_PUNCTUATION_CLOSE 0x00004000 // Close punctuation category, Pe in the Unicode database. +#define UTF8C_PUNCTUATION_INITIAL 0x00008000 // Initial punctuation category, Pi in the Unicode database. +#define UTF8C_PUNCTUATION_FINAL 0x00010000 // Final punctuation category, Pf in the Unicode database. +#define UTF8C_PUNCTUATION_OTHER 0x00020000 // Other punctuation category, Po in the Unicode database. + +// Combined flag for all punctuation categories. +const UTF8C_PUNCTUATION = (UTF8C_PUNCTUATION_CONNECTOR | UTF8C_PUNCTUATION_DASH | UTF8C_PUNCTUATION_OPEN | \ + UTF8C_PUNCTUATION_CLOSE | UTF8C_PUNCTUATION_INITIAL | UTF8C_PUNCTUATION_FINAL | \ + UTF8C_PUNCTUATION_OTHER); + +#define UTF8C_SYMBOL_MATH 0x00040000 // Math symbol category, Sm in the Unicode database. +#define UTF8C_SYMBOL_CURRENCY 0x00080000 // Currency symbol category, Sc in the Unicode database. +#define UTF8C_SYMBOL_MODIFIER 0x00100000 // Modifier symbol category, Sk in the Unicode database. +#define UTF8C_SYMBOL_OTHER 0x00200000 // Other symbol category, So in the Unicode database. + +// Combined flag for all symbol categories. +const UTF8C_SYMBOL = (UTF8C_SYMBOL_MATH | UTF8C_SYMBOL_CURRENCY | UTF8C_SYMBOL_MODIFIER | UTF8C_SYMBOL_OTHER); + +#define UTF8C_SEPARATOR_SPACE 0x00400000 // Space separator category, Zs in the Unicode database. +#define UTF8C_SEPARATOR_LINE 0x00800000 // Line separator category, Zl in the Unicode database. +#define UTF8C_SEPARATOR_PARAGRAPH 0x01000000 // Paragraph separator category, Zp in the Unicode database. + +// Combined flag for all separator categories. +const UTF8C_SEPARATOR = (UTF8C_SEPARATOR_SPACE | UTF8C_SEPARATOR_LINE | UTF8C_SEPARATOR_PARAGRAPH); + +#define UTF8C_CONTROL 0x02000000 // Control category, Cc in the Unicode database. +#define UTF8C_FORMAT 0x04000000 // Format category, Cf in the Unicode database. +#define UTF8C_SURROGATE 0x08000000 // Surrogate category, Cs in the Unicode database. +#define UTF8C_PRIVATE_USE 0x10000000 // Private use category, Co in the Unicode database. +#define UTF8C_UNASSIGNED 0x20000000 // Unassigned category, Cn in the Unicode database. +#define UTF8C_COMPATIBILITY 0x40000000 // Flag used for maintaining backwards compatibility with POSIX +#define UTF8C_IGNORE_GRAPHEME_CLUSTER 0x80000000 // Flag used for checking only the general category of code points at the start of a grapheme cluster. + +// Flag used for maintaining backwards compatibility with POSIX function +const UTF8C_ISCNTRL = (UTF8C_COMPATIBILITY | UTF8C_CONTROL); +const UTF8C_ISPRINT = (UTF8C_COMPATIBILITY | UTF8C_LETTER | UTF8C_NUMBER | UTF8C_PUNCTUATION | UTF8C_SYMBOL | UTF8C_SEPARATOR); +const UTF8C_ISSPACE = (UTF8C_COMPATIBILITY | UTF8C_SEPARATOR_SPACE); +const UTF8C_ISBLANK = (UTF8C_COMPATIBILITY | UTF8C_SEPARATOR_SPACE | UTF8C_PRIVATE_USE); +const UTF8C_ISGRAPH = (UTF8C_COMPATIBILITY | UTF8C_LETTER | UTF8C_NUMBER | UTF8C_PUNCTUATION | UTF8C_SYMBOL); +const UTF8C_ISPUNCT = (UTF8C_COMPATIBILITY | UTF8C_PUNCTUATION | UTF8C_SYMBOL); +const UTF8C_ISALNUM = (UTF8C_COMPATIBILITY | UTF8C_LETTER | UTF8C_NUMBER); +const UTF8C_ISALPHA = (UTF8C_COMPATIBILITY | UTF8C_LETTER); +const UTF8C_ISUPPER = (UTF8C_COMPATIBILITY | UTF8C_LETTER_UPPERCASE); +const UTF8C_ISLOWER = (UTF8C_COMPATIBILITY | UTF8C_LETTER_LOWERCASE); +const UTF8C_ISDIGIT = (UTF8C_COMPATIBILITY | UTF8C_NUMBER); +const UTF8C_ISXDIGIT = (UTF8C_COMPATIBILITY | UTF8C_NUMBER | UTF8C_PRIVATE_USE); + +// All flags. +const UTF8C_ALL = 0xFFFFFFFF & (~UTF8C_COMPATIBILITY); diff --git a/bin/amxxdump/includes/amxmodx/string_stocks.inc b/bin/amxxdump/includes/amxmodx/string_stocks.inc new file mode 100644 index 0000000..67acbd0 --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/string_stocks.inc @@ -0,0 +1,325 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// String Manipulation Stocks +// + +#if defined _string_stocks_included + #endinput +#endif +#define _string_stocks_included + +#if !defined _string_included + #include +#endif + +/** + * @global Unless otherwise noted, all string functions which take in a + * writable buffer and maximum length should NOT have the null terminator INCLUDED + * in the length. This means that this is valid: + * copy(string, charsmax(string), ...) + */ + +/** + * Returns whether a given string contains only digits. + * This returns false for zero-length strings. + * + * @param sString Character to test. + * @return True if string contains only digit, otherwise false. + */ +stock bool:is_str_num(const sString[]) +{ + new i = 0; + + while (sString[i] && isdigit(sString[i])) + { + ++i; + } + + return sString[i] == 0 && i != 0; +} + +/** + * Returns an uppercase character to a lowercase character. + * + * @note Only available in 1.8.3 and above. + * + * @param chr Characer to convert. + * @return Lowercase character on success, + * no change on failure. + */ +stock char_to_upper(chr) +{ + if (is_char_lower(chr)) + { + return (chr & ~(1<<5)); + } + + return chr; +} + +/** + * Returns a lowercase character to an uppercase character. + * + * @note Only available in 1.8.3 and above. + * + * @param chr Characer to convert. + * @return Uppercase character on success, + * no change on failure. + */ +stock char_to_lower(chr) +{ + if (is_char_upper(chr)) + { + return (chr | (1<<5)); + } + + return chr; +} + +/** + * Backwards compatibility stock - use argbreak or argparse. + * @deprecated this function does not work properly. + */ +#pragma deprecated Use argbreak() instead +stock strbreak(const text[], Left[], leftLen, Right[], rightLen) +{ + return argbreak(text, Left, leftLen, Right, rightLen); +} + +/** + * Emulates strbreak() using argparse(). + * + * @param text Source input string. + * @param left Buffer to store string left part. + * @param leftlen Maximum length of the string part buffer. + * @param right Buffer to store string right part. + * @param rightlen Maximum length of the string part buffer. + * + * @return -1 if no match was found; otherwise, an index into source + * marking the first index after the searched text. The + * index is always relative to the start of the input string. + */ +stock argbreak(const text[], left[], leftlen, right[], rightlen) +{ + new pos = argparse(text, 0, left, leftlen); + + if (pos == -1) + { + return -1; + } + + new textlen = strlen(text); + + while (pos < textlen && isspace(text[pos])) + { + pos++; + } + + copy(right, rightlen, text[pos]); + + return pos; +} + +/** + * It is basically strbreak but you have a delimiter that is more than one character in length. By Suicid3. + * + * @param szInput Source input string. + * @param szLeft Buffer to store left string part. + * @param pL_Max Maximum length of the string part buffer. + * @param szRight Buffer to store right string part. + * @param pR_Max Maximum length of the string part buffer. + * @param szDelim A string which specifies a search point to break at. + * + * @noreturn + */ +stock split(const szInput[], szLeft[], pL_Max, szRight[], pR_Max, const szDelim[]) +{ + new iEnd = contain(szInput, szDelim); + new iStart = iEnd + strlen(szDelim); + + // If delimiter isnt in Input just split the string at max lengths + if (iEnd == -1) + { + iStart = copy(szLeft, pL_Max, szInput); + copy(szRight, pR_Max, szInput[iStart]); + return; + } + + // If delimter is in Input then split at input for max lengths + if (pL_Max >= iEnd) + copy(szLeft, iEnd, szInput); + else + copy(szLeft, pL_Max, szInput); + + copy(szRight, pR_Max, szInput[iStart]); +} + +/** + * Removes a path from szFilePath leaving the name of the file in szFile for a pMax length. + * + * @param szFilePath String to perform search and replacements on. + * @param szFile Buffer to store file name. + * @param pMax Maximum length of the string buffer. + * + * @noreturn + */ +stock remove_filepath(const szFilePath[], szFile[], pMax) +{ + new len = strlen(szFilePath); + + while ((--len >= 0) && (szFilePath[len] != '/') && (szFilePath[len] != '\')) { } + + copy(szFile, pMax, szFilePath[len + 1]); + + return; +} + +/** + * Replaces a contained string iteratively. + * + * @note Consider using replace_string() instead. + * + * @note This ensures that no infinite replacements will take place by + * intelligently moving to the next string position each iteration. + * + * @param string String to perform search and replacements on. + * @param len Maximum length of the string buffer. + * @param what String to search for. + * @param with String to replace the search string with. + * + * @return Number of replacements on success, otherwise 0. + */ +stock replace_all(string[], len, const what[], const with[]) +{ + new pos = 0; + + if ((pos = contain(string, what)) == -1) + { + return 0; + } + + new total = 0; + new with_len = strlen(with); + new diff = strlen(what) - with_len; + new total_len = strlen(string); + new temp_pos = 0; + + while (replace(string[pos], len - pos, what, with) != 0) + { + total++; + + /* jump to position after replacement */ + pos += with_len; + + /* update cached length of string */ + total_len -= diff; + + /* will the next call be operating on the last character? */ + if (pos >= total_len) + { + break; + } + + /* find the next position from our offset */ + temp_pos = contain(string[pos], what); + + /* if it's invalid, we're done */ + if (temp_pos == -1) + { + break; + } + + /* otherwise, reposition and update counters */ + pos += temp_pos; + } + + return total; +} + +/** + * Breaks a string into pieces and stores each piece into an array of buffers. + * + * @param text The string to split. + * @param split The string to use as a split delimiter. + * @param buffers An array of string buffers (2D array). + * @param maxStrings Number of string buffers (first dimension size). + * @param maxStringLength Maximum length of each string buffer. + * @param copyRemainder False (default) discard excess pieces, true to ignore + * delimiters after last piece. + * @return Number of strings retrieved. + */ +stock explode_string(const text[], const split[], buffers[][], maxStrings, maxStringLength, bool:copyRemainder = false) +{ + new reloc_idx, idx, total; + + if (maxStrings < 1 || !split[0]) + { + return 0; + } + + while ((idx = split_string(text[reloc_idx], split, buffers[total], maxStringLength)) != -1) + { + reloc_idx += idx; + if (++total == maxStrings) + { + if (copyRemainder) + { + copy(buffers[total-1], maxStringLength, text[reloc_idx-idx]); + } + return total; + } + } + + copy(buffers[total++], maxStringLength, text[reloc_idx]); + + return total; +} + +/** + * Joins an array of strings into one string, with a "join" string inserted in + * between each given string. This function complements ExplodeString. + * + * @param strings An array of strings. + * @param numStrings Number of strings in the array. + * @param join The join string to insert between each string. + * @param buffer Output buffer to write the joined string to. + * @param maxLength Maximum length of the output buffer. + * @return Number of bytes written to the output buffer. + */ +stock implode_strings(const strings[][], numStrings, const join[], buffer[], maxLength) +{ + new total, length, part_length; + new join_length = strlen(join); + + for (new i=0; i + * + * Example file below. Note that the second line is technically invalid. + * The event handler must decide whether this should be allowed. + * --FILE BELOW-- + * [gaben] + * hi = clams + * bye = "NO CLAMS" + * + * [valve] + * cannot + * maintain + * products + */ + +/** + * Parser invalid code. + */ +enum INIParser +{ + Invalid_INIParser = 0 +}; + +/** + * Creates a new INI parser. + * This is used to set parse hooks. + * + * @return A new handle to an INI Parse structure. + */ +native INIParser:INI_CreateParser(); + +/** + * Disposes of an INI parser. + * + * @param handle Handle to an INI Parse structure. + * + * @return True if disposed, false otherwise. + */ +native INI_DestroyParser(&INIParser:handle); + +/** + * Parses an INI config file. + * + * @param handle A handle to an INI Parse structure. + * @param file A string containing the file path. + * @param line An optional by reference cell to store the last line number read. + * @param col An optional by reference cell to store the last column number read. + * @param data An optional handle or value to pass through to callback functions + * + * @return An SMCParseError result. + * @error Invalid or corrupt handle. + */ +native bool:INI_ParseFile(INIParser:handle, const file[], &line = 0, &col = 0, any:data = 0); + +/** + * Sets the INI_ParseStart function of a parse handle. + * + * @note Below is the prototype of callback: + * - + * Called when parsing is started. + * + * @param handle A handle to an INI Parse structure. + * @param data Handle or value passed in INI_ParseFile + * + * @noreturn + * + * public OnParseStart(INIParser:handle, any:data) + * - + * @param handle Handle to an INI Parse structure. + * @param func A ParseStart callback. + * + * @noreturn + * @error Invalid or corrupt handle. + */ +native INI_SetParseStart(INIParser:handle, const func[]); + +/** + * Sets the INI_ParseEnd function of a parse handle. + * + * @note Below is the prototype of callback: + * - + * Called when parsing is halted. + * + * @param handle A handle to an INI Parse structure. + * @param halted True if abnormally halted, false otherwise. + * @param data Handle or value passed in INI_ParseFile + * + * @noreturn + * + * public OnParseEnd(INIParser:handle, bool:halted, any:data) + * - + * @param handle Handle to an INI Parse structure. + * @param func A ParseEnd callback. + * + * @noreturn + * @error Invalid or corrupt handle. + */ +native INI_SetParseEnd(INIParser:handle, const func[]); + +/** + * Sets the two main reader functions. + * + * @note Below is the prototype of callback: + * - + * NewSection: + * Called when the parser finds a new section. + * + * @param handle Handle to an INI Parse structure. + * @param section Name of section in between the [ and ] characters. + * @param invalid_tokens True if invalid tokens were detected in the name. + * @param close_bracket True if a closing bracket was detected, false otherwise. + * @param extra_tokens True if extra tokens were detected on the line. + * @param curtok Contains current token in the line where the section name starts. + * You can add to this offset when failing to point to a token. + * @param data Handle or value passed in INI_ParseFile + * + * @return True to keep parsing, false otherwise. + * + * public bool:OnNewSection(INIParser:handle, const section[], bool:invalid_tokens, bool:close_bracket, bool:extra_tokens, curtok, any:data) + * + * KeyValue: + * Called when the parser finds a new key/value pair. + * + * @param handle Handle to an INI Parse structure. + * @param key Name of key. + * @param value String containing value (with quotes stripped, if any). + * @param invalid_tokens Whether or not the key contained invalid tokens. + * @param equal_token There was an '=' sign present (in case the value is missing). + * @param quotes Whether value was enclosed in quotes. + * @param curtok Contains the token index of the start of the value string. + * This can be changed when returning false. + * @param data Handle or value passed in INI_ParseFile + * + * @return True to keep parsing, false otherwise. + * + * public bool:OnKeyValue(INIParser:handle, const key[], const value[], bool:invalid_tokens, bool:equal_token, bool:quotes, curtok, any:data) + * - + * @param handle Handle to an INI Parse structure. + * @param kv A KeyValue callback. + * @param ns An optional NewSection callback. + * + * @noreturn + */ +native INI_SetReaders(INIParser:smc, const kvFunc[], const nsFunc[] = "" ); + +/** + * Sets a raw line reader on an INI parser handle. + * + * @note Below is the prototype of callback: + * - + * Called whenever a raw line is read. + * + * @param handle The INI Parse handle. + * @param line Contents of line. + * @param lineno The line number it occurs on. + * @param curtok Pointer to optionally store failed position in string. + * @param data Handle or value passed in INI_ParseFile + * + * @return True to keep parsing, false otherwise. + * + * public bool:OnRawLine(INIParser:smc, const line[], lineno, curtok, any:data) + * + * @param handle Handle to an INI Parse structure. + * @param func A RawLine callback. + * + * @noreturn + */ +native INI_SetRawLine(INIParser:handle, const func[]); diff --git a/bin/amxxdump/includes/amxmodx/textparse_smc.inc b/bin/amxxdump/includes/amxmodx/textparse_smc.inc new file mode 100644 index 0000000..f97f244 --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/textparse_smc.inc @@ -0,0 +1,261 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// SMC Parser Functions +// + +#if defined _textparse_smc_included + #endinput +#endif +#define _textparse_smc_included + +/** + * Everything below describes the SMC Parse, or "SourceMod Configuration" format. + * This parser is entirely event based. You must hook events to receive data. + * The file format itself is nearly identical to Valve's KeyValues format (also known as VDF). + */ + +/** + * The SMC file format is defined as: + * WHITESPACE: 0x20, \n, \t, \r + * IDENTIFIER: Any ASCII character EXCLUDING ", {, }, ;, //, / *, or WHITESPACE. + * STRING : Any set of symbols enclosed in quotes. + * + * Note: if a STRING does not have quotes, it is parsed as an IDENTIFIER. + * + * Basic syntax is comprised of SECTIONBLOCKs. + * A SECTIONBLOCK defined as: + * + * SECTIONNAME + * { + * OPTION + * } + * + * OPTION can be repeated any number of times inside a SECTIONBLOCK. + * A new line will terminate an OPTION, but there can be more than one OPTION per line. + * OPTION is defined any of: + * "KEY" "VALUE" + * SECTIONBLOCK + * + * SECTIONNAME, KEY, VALUE, and SINGLEKEY are strings + * SECTIONNAME cannot have trailing characters if quoted, but the quotes can be optionally removed. + * If SECTIONNAME is not enclosed in quotes, the entire sectionname string is used (minus surrounding whitespace). + * If KEY is not enclosed in quotes, the key is terminated at first whitespace. + * If VALUE is not properly enclosed in quotes, the entire value string is used (minus surrounding whitespace). + * The VALUE may have inner quotes, but the key string may not. + * + * For an example, see scripting/testsuite/textparse_test.cfg + * + * WHITESPACE should be ignored. + * Comments are text occurring inside the following tokens, and should be stripped + * unless they are inside literal strings: + * ; + * // + * / * * / + */ + +/** + * Parser invalid code. + */ +enum SMCParser +{ + Invalid_SMCParser = 0 +}; + +/** + * Parse result directive. + */ +enum SMCResult +{ + SMCParse_Continue, /* Continue parsing */ + SMCParse_Halt, /* Stop parsing here */ + SMCParse_HaltFail /* Stop parsing and return failure */ +}; + +/** + * Parse error codes. + */ +enum SMCError +{ + SMCError_Okay = 0, /* No error */ + SMCError_StreamOpen, /* Stream failed to open */ + SMCError_StreamError, /* The stream died... somehow */ + SMCError_Custom, /* A custom handler threw an error */ + SMCError_InvalidSection1, /* A section was declared without quotes, and had extra tokens */ + SMCError_InvalidSection2, /* A section was declared without any header */ + SMCError_InvalidSection3, /* A section ending was declared with too many unknown tokens */ + SMCError_InvalidSection4, /* A section ending has no matching beginning */ + SMCError_InvalidSection5, /* A section beginning has no matching ending */ + SMCError_InvalidTokens, /* There were too many unidentifiable strings on one line */ + SMCError_TokenOverflow, /* The token buffer overflowed */ + SMCError_InvalidProperty1, /* A property was declared outside of any section */ +}; + +/** + * Creates a new SMC parser. + * This is used to set parse hooks. + * + * @return A new handle to an SMC Parse structure. + */ +native SMCParser:SMC_CreateParser(); + +/** + * Disposes of an SMC parser. + * + * @param handle Handle to an SMC Parse structure. + * + * @return True if disposed, false otherwise. + */ +native SMC_DestroyParser(&SMCParser:handle); + +/** + * Parses a config file. + * + * @param handle A handle to an SMC Parse structure. + * @param file A string containing the file path. + * @param line An optional by reference cell to store the last line number read. + * @param col An optional by reference cell to store the last column number read. + * @param data An optional handle or value to pass through to callback functions + * + * @return An SMCParseError result. + * @error Invalid or corrupt handle. + */ +native SMCError:SMC_ParseFile(SMCParser:handle, const file[], &line = 0, &col = 0, any:data = 0); + +/** + * Sets the SMC_ParseStart function of a parse handle. + * + * @note Below is the prototype of callback: + * - + * Called when parsing is started. + * + * @param handle Handle to an SMC Parse structure. + * @param data Handle or value passed in SMC_ParseFile + * + * @noreturn + * + * public OnParseStart(SMCParser:handle, any:data) + * - + * @param handle Handle to an SMC Parse structure. + * @param func A ParseStart callback. + * + * @noreturn + * @error Invalid or corrupt handle. + */ +native SMC_SetParseStart(SMCParser:handle, const func[]); + +/** + * Sets the SMC_ParseEnd function of a parse handle. + * + * @note Below is the prototype of callback: + * - + * Called when parsing is halted. + * + * @param handle Handle to an SMC Parse structure. + * @param halted True if abnormally halted, false otherwise. + * @param failed True if parsing failed, false otherwise. + * @param data Handle or value passed in SMC_ParseFile + * + * @noreturn + * + * public OnParseEnd(SMCParser:handle, bool:halted, bool:failed, any:data) + * - + * @param handle Handle to an SMC Parse structure. + * @param func A ParseEnd callback. + * + * @noreturn + * @error Invalid or corrupt handle. + */ +native SMC_SetParseEnd(SMCParser:handle, const func[]); + +/** + * Sets the three main reader functions. + * + * @note Enclosing quotes are always stripped. + * @note Below is the prototype of callbacks: + * - + * NewSection: + * Called when the parser finds a new section or sub-section. + * + * @param handle Handle to an SMC Parse structure. + * @param name String containing section name. + * @param data Handle or value passed in SMC_ParseFile + * + * @return An SMCResult action to take. + * + * public SMCResult:OnNewSection(SMCParser:handle, const name[], any:data) + * + * KeyValue: + * Called when the parser finds a new key/value pair. + * + * @param handle Handle to an SMC Parse structure. + * @param key String containing key name. + * @param value String containing value name. + * @param data Handle or value passed in SMC_ParseFile + * + * @return An SMCResult action to take. + * + * public SMCResult:OnKeyValue(SMCParser:handle, const key[], const value[], any:data) + * + * EndSection: + * Called when the parser finds the end of the current section. + * + * @param handle Handle to an SMC Parse structure. + * @param data Handle or value passed in SMC_ParseFile + * + * @return An SMCResult action to take. + * + * public SMCResult:OnEndSection(SMCParser:handle, any:data) + * - + * @param handle Handle to an SMC Parse structure. + * @param kv A KeyValue callback. + * @param ns An optional NewSection callback. + * @param es An optional EndSection callback. + * + * @noreturn + */ +native SMC_SetReaders(SMCParser:smc, const kvFunc[], const nsFunc[] = "", const esFunc[] = ""); + +/** + * Sets a raw line reader on an text parser handle. + * + * @note Below is the prototype of callbacks: + * - + * Called whenever a raw line is read. + * + * @param handle Handle to an SMC Parse structure. + * @param line A string containing the raw line from the file. + * @param lineno The line number it occurs on. + * @param data Handle or value passed in SMC_ParseFile + * + * @return An SMCResult action to take. + * + * public SMCResult:SMC_RawLine(SMCParser:handle, const line[], lineno, any:data) + * - + * @param handle Handle to an SMC Parse structure. + * @param func A RawLine callback. + * + * @noreturn + */ +native SMC_SetRawLine(SMCParser:handle, const func[]); + +/** + * Gets an error string for an SMCError code. + * + * @note SMCError_Okay returns false. + * @note SMCError_Custom (which is thrown on SMCParse_HaltFail) returns false. + * + * @param error The SMCParseError code. + * @param buffer A string buffer for the error (contents undefined on failure). + * @param buf_max The maximum size of the buffer. + * + * @return True on success, false otherwise. + */ +native bool:SMC_GetErrorString(SMCError:error, buffer[], buf_max); diff --git a/bin/amxxdump/includes/amxmodx/tfcconst.inc b/bin/amxxdump/includes/amxmodx/tfcconst.inc new file mode 100644 index 0000000..7c41a05 --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/tfcconst.inc @@ -0,0 +1,84 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// TFCX Constants +// + +#if defined _tfcconst_included + #endinput +#endif +#define _tfcconst_included + + +#define TFCMAX_WEAPONS 37 + +enum { + TFC_AMMO_SHELLS = 0, + TFC_AMMO_BULLETS, + TFC_AMMO_CELLS, + TFC_AMMO_ROCKETS, + TFC_AMMO_NADE1, + TFC_AMMO_NADE2, +}; + +enum { + TFC_WPN_NONE = 0, + TFC_WPN_TIMER,//TFC_WPN_UNK1, + TFC_WPN_SENTRYGUN,//TFC_WPN_UNK2, + TFC_WPN_MEDIKIT, + TFC_WPN_SPANNER, + TFC_WPN_AXE, + TFC_WPN_SNIPERRIFLE, + TFC_WPN_AUTORIFLE, + TFC_WPN_SHOTGUN, + TFC_WPN_SUPERSHOTGUN, + TFC_WPN_NG, + TFC_WPN_SUPERNG, + TFC_WPN_GL, + TFC_WPN_FLAMETHROWER, + TFC_WPN_RPG, + TFC_WPN_IC, + TFC_WPN_FLAMES,//TFC_WPN_UNK16, + TFC_WPN_AC, + TFC_WPN_UNK18, + TFC_WPN_UNK19, + TFC_WPN_TRANQ, + TFC_WPN_RAILGUN, + TFC_WPN_PL, + TFC_WPN_KNIFE, + TFC_WPN_CALTROP, // 24 + TFC_WPN_CONCUSSIONGRENADE, + TFC_WPN_NORMALGRENADE, + TFC_WPN_NAILGRENADE, + TFC_WPN_MIRVGRENADE, + TFC_WPN_NAPALMGRENADE, + TFC_WPN_GASGRENADE, + TFC_WPN_EMPGRENADE, +}; + +enum { + TFC_PC_SCOUT = 1, + TFC_PC_SNIPER, + TFC_PC_SOLDIER, + TFC_PC_DEMOMAN, + TFC_PC_MEDIC, + TFC_PC_HWGUY, + TFC_PC_PYRO, + TFC_PC_SPY, + TFC_PC_ENGENEER, // Typo; preserved for backward compatibility + TFC_PC_ENGINEER = 9, + TFC_PC_CIVILIAN = 11, +}; + +// Goal items +#define TFC_GOALITEM_BLUE (1 << 17) +#define TFC_GOALITEM_RED (1 << 18) +#define TFC_GOALITEM_YELLOW (1 << 24) +#define TFC_GOALITEM_GREEN (1 << 25) diff --git a/bin/amxxdump/includes/amxmodx/tfcstats.inc b/bin/amxxdump/includes/amxmodx/tfcstats.inc new file mode 100644 index 0000000..367406a --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/tfcstats.inc @@ -0,0 +1,62 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// TFCX Stats Functions +// + +#if defined _tfcstats_included + #endinput +#endif +#define _tfcstats_included + +/* Gets stats from given weapon index. If wpnindex is 0 +* then the stats are from all weapons. If weapon has not been used function +* returns 0 in other case 1. Fields in stats are: +* 0 - kills +* 1 - deaths +* 2 - headshots +* 3 - teamkilling +* 4 - shots +* 5 - hits +* 6 - damage +* For body hits fields see amxconst.inc. */ +native get_user_wstats(index,wpnindex,stats[STATSX_MAX_STATS],bodyhits[MAX_BODYHITS]); + +/* Gets round stats from given weapon index.*/ +native get_user_wrstats(index,wpnindex,stats[STATSX_MAX_STATS],bodyhits[MAX_BODYHITS]); + +/* Gets overall stats which are stored in file on server +* and updated on every respawn or user disconnect. +* Function returns the position in stats by diff. kills to deaths. */ +native get_user_stats(index,stats[STATSX_MAX_STATS],bodyhits[MAX_BODYHITS]); + +/* Gets round stats of player. */ +native get_user_rstats(index,stats[STATSX_MAX_STATS],bodyhits[MAX_BODYHITS]); + +/* Gets stats with which user have killed/hurt his victim. If victim is 0 +* then stats are from all victims. If victim has not been hurt, function +* returns 0 in other case 1. User stats are reset on his respawn. */ +native get_user_vstats(index,victim,stats[STATSX_MAX_STATS],bodyhits[MAX_BODYHITS],wpnname[]="",len=0); + +/* Gets stats with which user have been killed/hurt. If killer is 0 +* then stats are from all attacks. If killer has not hurt user, function +* returns 0 in other case 1. User stats are reset on his respawn. */ +native get_user_astats(index,wpnindex,stats[STATSX_MAX_STATS],bodyhits[MAX_BODYHITS],wpnname[]="",len=0); + +/* Resets life, weapon, victims and attackers user stats. */ +native reset_user_wstats(index); + +/* Gets overall stats which stored in stats.dat file in amx folder +* and updated on every mapchange or user disconnect. +* Function returns next index of stats entry or 0 if no more exists. */ +native get_stats(index,stats[STATSX_MAX_STATS],bodyhits[MAX_BODYHITS],name[],len); + +/* Returns number of all entries in stats. */ +native get_statsnum(); diff --git a/bin/amxxdump/includes/amxmodx/tfcx.inc b/bin/amxxdump/includes/amxmodx/tfcx.inc new file mode 100644 index 0000000..0da0118 --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/tfcx.inc @@ -0,0 +1,148 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// TFCX Functions +// + +#if defined _tfcx_included + #endinput +#endif +#define _tfcx_included + +#include +#include + +#pragma reqclass xstats +#if !defined AMXMODX_NOAUTOLOAD + #pragma defclasslib xstats tfcx +#endif + +/************* Shared Natives Start ********************************/ + +/* Forward types */ +enum { + XMF_DAMAGE = 0, + XMF_DEATH, +}; + +/* Use this function to register forwards */ +native register_statsfwd( ftype ); + +/* Function is called after player to player attacks , +* if players were damaged by teammate TA is set to 1 */ +forward client_damage(attacker,victim,damage,wpnindex,hitplace,TA); + +/* Function is called after player death , +* if player was killed by teammate TK is set to 1 */ +forward client_death(killer,victim,wpnindex,hitplace,TK); + +/* Custom Weapon Support */ +/* function will return index of new weapon */ +native custom_weapon_add( const wpnname[],melee = 0,const logname[]="" ); +/* Function will pass damage done by this custom weapon to stats module and other plugins */ +native custom_weapon_dmg( weapon, att, vic, damage, hitplace=0 ); +/* Function will pass info about custom weapon shot to stats module */ +native custom_weapon_shot( weapon,index ); // weapon id , player id + +/* function will return 1 if true */ +native xmod_is_melee_wpn(wpnindex); + +/* Returns weapon name. */ +native xmod_get_wpnname(wpnindex,name[],len); + +/* Returns weapon logname. */ +native xmod_get_wpnlogname(wpnindex,name[],len); + +/* Returns weapons array size */ +native xmod_get_maxweapons(); + +/* Returns stats array size ex. 8 in TS , 9 in DoD */ +native xmod_get_stats_size(); + +/* Returns 1 if true */ +native xmod_is_custom_wpn(wpnindex); + +/************* Shared Natives End ********************************/ + +stock tfc_isgrenade( weapon ){ + switch( weapon ) + { + case TFC_WPN_CALTROP, + TFC_WPN_CONCUSSIONGRENADE, + TFC_WPN_NORMALGRENADE, + TFC_WPN_NAILGRENADE, + TFC_WPN_MIRVGRENADE, + TFC_WPN_NAPALMGRENADE, + TFC_WPN_GASGRENADE, + TFC_WPN_EMPGRENADE: + return 1; + default: return 0; + } + return 0; +} + +native tfc_userkill( index ); + +/* Use this function to set private data offsets if needed +Default offsets: + timer: 932 + sentrygun: 83 +from AssKicR + shells: 53 + bullets: 55 + cells: 57 + rockets: 59 + nade1: 14 + nade2: 15 +*/ +native tfc_setpddata(timer,sentrygun,shells,bullets,cells,rockets,nade1,nade2); + +/*********************************************************************/ + +native tfc_setmodel(index, const Model[], const Skin[]); +native tfc_clearmodel(index); + +/* Get amount of ammo in backpack on a user for a specific weapon */ +/* Ammo Types in tfcconst.inc */ +native tfc_getbammo(index, ammo); + +/* Set amount of ammo in backpack on a user for a specific weapon */ +native tfc_setbammo(index, ammo, value); + +/* Returns amount of ammo in weapon's clip (backpack) */ +/* Weapons list in tfcconst.inc */ +native tfc_getweaponbammo(index, weapon); + +/* Sets amount of ammo in weapon's clip (backpack) */ +native tfc_setweaponbammo(index, weapon, value); + +/* Returns amount of ammo in weapon's clip */ +/* Index must be weapon's entity index */ +native tfc_getweaponammo(index); + +/* Sets amount of ammo in weapon's clip */ +/* Index must be weapon's entity index */ +native tfc_setweaponammo(index, value); + +/* Returns 1 if user is carrying a goal item such as a flag or a keycard, else 0. + * Team is by reference parameter that will be set to owning team(s) of the goal item. + * Use the TFC_GOALITEM_* constants to determine the owning team. + */ +native tfc_get_user_goalitem(index, &team); + +/* Returns 1 if the player is a spy and is currently feigning death */ +native tfc_is_user_feigning(index); + +/* Returns 1 if the two teams are allies, 0 otherwise + * Note: Team must be 1->4 + * Team 0 will always return 0 + * Any other team will result in an error + */ +native tfc_is_team_ally(TeamA,TeamB); diff --git a/bin/amxxdump/includes/amxmodx/tfcx.inc.temp b/bin/amxxdump/includes/amxmodx/tfcx.inc.temp new file mode 100644 index 0000000..e308a81 --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/tfcx.inc.temp @@ -0,0 +1,54 @@ +#if defined _tfcx_included +#endinput +#endif +#define _tfcx_included +#include +#include +#pragma reqclass xstats +#if !defined AMXMODX_NOAUTOLOAD +#pragma defclasslib xstats tfcx +#endif +enum { +XMF_DAMAGE = 0, +XMF_DEATH, +}; +native register_statsfwd( ftype ); +forward client_damage(attacker,victim,damage,wpnindex,hitplace,TA); +forward client_death(killer,victim,wpnindex,hitplace,TK); +native custom_weapon_add( const wpnname[],melee = 0,const logname[]="" ); +native custom_weapon_dmg( weapon, att, vic, damage, hitplace=0 ); +native custom_weapon_shot( weapon,index ); native xmod_is_melee_wpn(wpnindex); +native xmod_get_wpnname(wpnindex,name[],len); +native xmod_get_wpnlogname(wpnindex,name[],len); +native xmod_get_maxweapons(); +native xmod_get_stats_size(); +native xmod_is_custom_wpn(wpnindex); +stock tfc_isgrenade( weapon ){ +switch( weapon ) +{ +case TFC_WPN_CALTROP, +TFC_WPN_CONCUSSIONGRENADE, +TFC_WPN_NORMALGRENADE, +TFC_WPN_NAILGRENADE, +TFC_WPN_MIRVGRENADE, +TFC_WPN_NAPALMGRENADE, +TFC_WPN_GASGRENADE, +TFC_WPN_EMPGRENADE: +return 1; +default: return 0; +} +return 0; +} +native tfc_userkill( index ); +native tfc_setpddata(timer,sentrygun,shells,bullets,cells,rockets,nade1,nade2); +native tfc_setmodel(index, const Model[], const Skin[]); +native tfc_clearmodel(index); +native tfc_getbammo(index, ammo); +native tfc_setbammo(index, ammo, value); +native tfc_getweaponbammo(index, weapon); +native tfc_setweaponbammo(index, weapon, value); +native tfc_getweaponammo(index); +native tfc_setweaponammo(index, value); +native tfc_get_user_goalitem(index, &team); +native tfc_is_user_feigning(index); +native tfc_is_team_ally(TeamA,TeamB); diff --git a/bin/amxxdump/includes/amxmodx/time.inc b/bin/amxxdump/includes/amxmodx/time.inc new file mode 100644 index 0000000..34b91f6 --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/time.inc @@ -0,0 +1,100 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Time Specific Functions +// + +#if defined _time_included + #endinput +#endif +#define _time_included + +/* Time unit types for get_time_length() */ +enum +{ + timeunit_seconds = 0, + timeunit_minutes, + timeunit_hours, + timeunit_days, + timeunit_weeks, +}; + +/* Seconds in each time unit */ +#define SECONDS_IN_MINUTE 60 +#define SECONDS_IN_HOUR 3600 +#define SECONDS_IN_DAY 86400 +#define SECONDS_IN_WEEK 604800 + +/** + * Stock by Brad. + * + * @note You must add register_dictionary("time.txt") in plugin_init() + * + * @param id The player whose language the length should be translated to + * @param unitCnt The number of time units you want translated into verbose text + * @param type The type of unit (i.e. seconds, minutes, hours, days, weeks) that you are passing in + * @param output The variable you want the verbose text to be placed in + * @param outputLen The length of the output variable + * + * @noreturn + */ +stock get_time_length(id, unitCnt, type, output[], outputLen) +{ + if (unitCnt > 0) + { + // determine the number of each time unit there are + new weekCnt = 0, dayCnt = 0, hourCnt = 0, minuteCnt = 0, secondCnt = 0; + + switch (type) + { + case timeunit_seconds: secondCnt = unitCnt; + case timeunit_minutes: secondCnt = unitCnt * SECONDS_IN_MINUTE; + case timeunit_hours: secondCnt = unitCnt * SECONDS_IN_HOUR; + case timeunit_days: secondCnt = unitCnt * SECONDS_IN_DAY; + case timeunit_weeks: secondCnt = unitCnt * SECONDS_IN_WEEK; + } + + weekCnt = secondCnt / SECONDS_IN_WEEK; + secondCnt -= (weekCnt * SECONDS_IN_WEEK); + + dayCnt = secondCnt / SECONDS_IN_DAY; + secondCnt -= (dayCnt * SECONDS_IN_DAY); + + hourCnt = secondCnt / SECONDS_IN_HOUR; + secondCnt -= (hourCnt * SECONDS_IN_HOUR); + + minuteCnt = secondCnt / SECONDS_IN_MINUTE; + secondCnt -= (minuteCnt * SECONDS_IN_MINUTE); + + // translate the unit counts into verbose text + new maxElementIdx = -1; + new timeElement[5][33]; + + if (weekCnt > 0) + format(timeElement[++maxElementIdx], charsmax(timeElement[]), "%i %L", weekCnt, id, (weekCnt == 1) ? "TIME_ELEMENT_WEEK" : "TIME_ELEMENT_WEEKS"); + if (dayCnt > 0) + format(timeElement[++maxElementIdx], charsmax(timeElement[]), "%i %L", dayCnt, id, (dayCnt == 1) ? "TIME_ELEMENT_DAY" : "TIME_ELEMENT_DAYS"); + if (hourCnt > 0) + format(timeElement[++maxElementIdx], charsmax(timeElement[]), "%i %L", hourCnt, id, (hourCnt == 1) ? "TIME_ELEMENT_HOUR" : "TIME_ELEMENT_HOURS"); + if (minuteCnt > 0) + format(timeElement[++maxElementIdx], charsmax(timeElement[]), "%i %L", minuteCnt, id, (minuteCnt == 1) ? "TIME_ELEMENT_MINUTE" : "TIME_ELEMENT_MINUTES"); + if (secondCnt > 0) + format(timeElement[++maxElementIdx], charsmax(timeElement[]), "%i %L", secondCnt, id, (secondCnt == 1) ? "TIME_ELEMENT_SECOND" : "TIME_ELEMENT_SECONDS"); + + switch(maxElementIdx) + { + case 0: formatex(output, outputLen, "%s", timeElement[0]); + case 1: formatex(output, outputLen, "%s %L %s", timeElement[0], id, "TIME_ELEMENT_AND", timeElement[1]); + case 2: formatex(output, outputLen, "%s, %s %L %s", timeElement[0], timeElement[1], id, "TIME_ELEMENT_AND", timeElement[2]); + case 3: formatex(output, outputLen, "%s, %s, %s %L %s", timeElement[0], timeElement[1], timeElement[2], id, "TIME_ELEMENT_AND", timeElement[3]); + case 4: formatex(output, outputLen, "%s, %s, %s, %s %L %s", timeElement[0], timeElement[1], timeElement[2], timeElement[3], id, "TIME_ELEMENT_AND", timeElement[4]); + } + } +} diff --git a/bin/amxxdump/includes/amxmodx/time.inc.temp b/bin/amxxdump/includes/amxmodx/time.inc.temp new file mode 100644 index 0000000..43a1ab6 --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/time.inc.temp @@ -0,0 +1,59 @@ +#if defined _time_included +#endinput +#endif +#define _time_included +enum +{ +timeunit_seconds = 0, +timeunit_minutes, +timeunit_hours, +timeunit_days, +timeunit_weeks, +}; +#define SECONDS_IN_MINUTE 60 +#define SECONDS_IN_HOUR 3600 +#define SECONDS_IN_DAY 86400 +#define SECONDS_IN_WEEK 604800 +stock get_time_length(id, unitCnt, type, output[], outputLen) +{ +if (unitCnt > 0) +{ +new weekCnt = 0, dayCnt = 0, hourCnt = 0, minuteCnt = 0, secondCnt = 0; +switch (type) +{ +case timeunit_seconds: secondCnt = unitCnt; +case timeunit_minutes: secondCnt = unitCnt * SECONDS_IN_MINUTE; +case timeunit_hours: secondCnt = unitCnt * SECONDS_IN_HOUR; +case timeunit_days: secondCnt = unitCnt * SECONDS_IN_DAY; +case timeunit_weeks: secondCnt = unitCnt * SECONDS_IN_WEEK; +} +weekCnt = secondCnt / SECONDS_IN_WEEK; +secondCnt -= (weekCnt * SECONDS_IN_WEEK); +dayCnt = secondCnt / SECONDS_IN_DAY; +secondCnt -= (dayCnt * SECONDS_IN_DAY); +hourCnt = secondCnt / SECONDS_IN_HOUR; +secondCnt -= (hourCnt * SECONDS_IN_HOUR); +minuteCnt = secondCnt / SECONDS_IN_MINUTE; +secondCnt -= (minuteCnt * SECONDS_IN_MINUTE); +new maxElementIdx = -1; +new timeElement[5][33]; +if (weekCnt > 0) +format(timeElement[++maxElementIdx], charsmax(timeElement[]), "%i %L", weekCnt, id, (weekCnt == 1) ? "TIME_ELEMENT_WEEK" : "TIME_ELEMENT_WEEKS"); +if (dayCnt > 0) +format(timeElement[++maxElementIdx], charsmax(timeElement[]), "%i %L", dayCnt, id, (dayCnt == 1) ? "TIME_ELEMENT_DAY" : "TIME_ELEMENT_DAYS"); +if (hourCnt > 0) +format(timeElement[++maxElementIdx], charsmax(timeElement[]), "%i %L", hourCnt, id, (hourCnt == 1) ? "TIME_ELEMENT_HOUR" : "TIME_ELEMENT_HOURS"); +if (minuteCnt > 0) +format(timeElement[++maxElementIdx], charsmax(timeElement[]), "%i %L", minuteCnt, id, (minuteCnt == 1) ? "TIME_ELEMENT_MINUTE" : "TIME_ELEMENT_MINUTES"); +if (secondCnt > 0) +format(timeElement[++maxElementIdx], charsmax(timeElement[]), "%i %L", secondCnt, id, (secondCnt == 1) ? "TIME_ELEMENT_SECOND" : "TIME_ELEMENT_SECONDS"); +switch(maxElementIdx) +{ +case 0: formatex(output, outputLen, "%s", timeElement[0]); +case 1: formatex(output, outputLen, "%s %L %s", timeElement[0], id, "TIME_ELEMENT_AND", timeElement[1]); +case 2: formatex(output, outputLen, "%s, %s %L %s", timeElement[0], timeElement[1], id, "TIME_ELEMENT_AND", timeElement[2]); +case 3: formatex(output, outputLen, "%s, %s, %s %L %s", timeElement[0], timeElement[1], timeElement[2], id, "TIME_ELEMENT_AND", timeElement[3]); +case 4: formatex(output, outputLen, "%s, %s, %s, %s %L %s", timeElement[0], timeElement[1], timeElement[2], timeElement[3], id, "TIME_ELEMENT_AND", timeElement[4]); +} +} +} diff --git a/bin/amxxdump/includes/amxmodx/tsconst.inc b/bin/amxxdump/includes/amxmodx/tsconst.inc new file mode 100644 index 0000000..b41a2c5 --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/tsconst.inc @@ -0,0 +1,154 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// Copyright (C) 2005 Suzuka. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// TSFUN Constants +// + +#if defined _tsconst_included + #endinput +#endif +#define _tsconst_included + +#define TSMAX_WEAPONS 44 // 37 + throwing knife + brekable + 5 custom weapon slots + +#define TSPWUP_NONE 0 +#define TSPWUP_RANDOM 0 +#define TSPWUP_SLOWMO 1 +#define TSPWUP_INFAMMO 2 +#define TSPWUP_KUNGFU 4 +#define TSPWUP_SLOWPAUSE 8 +#define TSPWUP_DFIRERATE 16 +#define TSPWUP_GRENADE 32 +#define TSPWUP_HEALTH 64 +#define TSPWUP_ARMOR 128 +#define TSPWUP_SUPERJUMP 256 + +#define TSITEM_KUNGFU 1<<0 +#define TSITEM_SUPERJUMP 1<<1 + +#define TSKF_STUNTKILL 1<<0 +#define TSKF_SLIDINGKILL 1<<1 +#define TSKF_DOUBLEKILL 1<<2 +#define TSKF_ISSPEC 1<<3 +#define TSKF_KILLEDSPEC 1<<4 + +#define TSA_SILENCER 1 +#define TSA_LASERSIGHT 2 +#define TSA_FLASHLIGHT 4 +#define TSA_SCOPE 8 + +#define TSMSG_NORMAL 6 +#define TSMSG_WAITING 11 +#define TSMSG_DEAD 1 +#define TSMSG_KILLER 2 +#define TSMSG_DEMOLITION 3 +#define TSMSG_SPECIALIST 4 +#define TSMSG_UNSTOPPABLE 5 +#define TSMSG_THEONE 10 + +#define STUNT_NONE 0 +#define STUNT_DUCK 1 +#define STUNT_ROLL 2 +#define STUNT_DIVE 3 +#define STUNT_GETUP 4 +#define STUNT_FLIP 5 + +enum { + TSW_GLOCK18 = 1, + TSW_UNK1, + TSW_UZI, + TSW_M3, + TSW_M4A1, + TSW_MP5SD, + TSW_MP5K, + TSW_ABERETTAS, + TSW_MK23, + TSW_AMK23, + TSW_USAS, + TSW_DEAGLE, + TSW_AK47, + TSW_57, + TSW_AUG, + TSW_AUZI, + TSW_TMP, + TSW_M82A1, + TSW_MP7, + TSW_SPAS, + TSW_GCOLTS, + TSW_GLOCK20, + TSW_UMP, + TSW_M61GRENADE, + TSW_CKNIFE, + TSW_MOSSBERG, + TSW_M16A4, + TSW_MK1, + TSW_C4, + TSW_A57, + TSW_RBULL, + TSW_M60E3, + TSW_SAWED_OFF, + TSW_KATANA, + TSW_SKNIFE, + TSW_KUNG_FU, + TSW_TKNIFE, +}; + +/* +valid tsweaponid in TS_GiveWeapon + +1: "Glock 18" +3: "Mini Uzi" +4: "Benelli M3" +5: "M4A1" +6: "MP5SD" +7: "MP5K" +8: "Akimbo Berettas" +9: "Socom Mk23" +11: "Usas12" +12: "Desert Eagle" +13: "Ak47" +14: "FiveSeven" +15: "Steyr Aug" +17: "Steyr Tmp" +18: "Barrett M82" +19: "HK Pdw" +20: "Spas12" +21: "Akimbo colts" +22: "Glock 20" +23: "Mac10" +25: "Combat Knife" +26: "Mossberg 500" +27: "M16A4" +28: "Ruger Mk1" +24: "M61 Grenade" +29: "C4" +31: "Raging Bull" +32: "M60" +33: "Sawed off" +34: "Katana" +35: "Seal Knife" + +valid pwuptype in TS_GivePwUp + +0: "Random" +1: "Slow Motion" +2: "Infinite Clip" +4: "Kung Fu" +8: "Slow Pause" +16: "Double Firerate" +32: "Grenade" +64: "Health" +128: "Armor" +256: "Superjump" + +*/ + + diff --git a/bin/amxxdump/includes/amxmodx/tsfun.inc b/bin/amxxdump/includes/amxmodx/tsfun.inc new file mode 100644 index 0000000..c224275 --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/tsfun.inc @@ -0,0 +1,198 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// TSFUN Functions +// + +#if defined _tsxfun_included + #endinput +#endif +#define _tsxfun_included + +#include +#include + +/************* Shared Natives Start ********************************/ + +/* Forward types */ +enum { + XMF_DAMAGE = 0, + XMF_DEATH, +}; + +#pragma reqlib tsfun +#if !defined AMXMODX_NOAUTOLOAD + #pragma loadlib tsfun +#endif + +/************* Shared Natives End ********************************/ + +/* Function is called just before a kung foo attack is done, + * damage and time length may be altered with natives. + * Return PLUGIN_HANDLED to stop attack. + * UNAVAILABLE IN 1.70 + */ +forward Melee_Attack(id,Float:time,Float:damage,UNAVAILABLE); + + +// Returns when someone stunts, after they do it. +//UNAVAILABLE IN 1.70 +forward client_stunt(id,stunttype,UNAVAILABLE); + +/* Function is called when powerups are ran, + * Returns value of powerup. Use TSPWUP_*'s + * to find exactly which one it is. + * UNAVAILABLE IN 1.70 + */ +forward client_powerup(id,powerup,UNAVAILABLE); + +/* weapon logname to weapon name convertion */ +native ts_wpnlogtoname(const logname[],name[],len); + +/* weapon logname to weapon index convertion */ +native ts_wpnlogtoid(const logname[]); + +//UNAVAILABLE IN 1.70 +//native Float:ts_getusertime( index ); //! +//native ts_setusertime( index, Float:time ); //! + +native ts_getusercash( index ); +native ts_setusercash( index, money ); + +native ts_getuserslots( index ); +native ts_setuserslots( index, slots ); + +native ts_getuserstate( index ); +native ts_getuserwpn( index,&clip=0,&ammo=0,&mode=0,&extra=0 ); +native ts_getuserspace( index ); + +native ts_getuserkillflags(killer); +native ts_getkillingstreak( index ); +native ts_getuserlastfrag( index ); + +native ts_giveweapon( index,weapon,clips,extra ); + +native ts_getuserpwup( index ); + +stock ts_has_slowmo(id) { + return (ts_getuserpwup(id) &TSPWUP_SLOWMO); +} + +stock ts_has_infammo(id) { + return (ts_getuserpwup(id) &TSPWUP_INFAMMO); +} + +stock ts_has_slowpause(id) { + return (ts_getuserpwup(id) &TSPWUP_SLOWPAUSE); +} + +stock ts_has_dfirerate(id) { + return (ts_getuserpwup(id) &TSPWUP_DFIRERATE); +} + +stock ts_has_grenade(id) { + return (ts_getuserpwup(id) &TSPWUP_GRENADE); +} + +stock ts_has_health(id) { + return (ts_getuserpwup(id) &TSPWUP_HEALTH); +} + +stock ts_has_armor(id) { + return (ts_getuserpwup(id) &TSPWUP_ARMOR); +} + +/* Function will create pwup entity and return its index (pwupent) */ +native ts_createpwup( pwup ); + +native ts_givepwup( index,pwupent ); + +native ts_setpddata( knifeoffset ); + +// Alters a fu attack. Use with fu forward +// UNAVAILABLE IN 1.70 +// native ts_set_fuattack(id,Float:time,Float:damage); //! + +// Changes board message +native ts_set_message(id,message); + +// Gets the message board message +native ts_get_message(id); + +stock ts_is_normal(id) +{ + new msg = ts_get_message(id); + if( (msg > 11) || (msg > 6 && msg < 10) ) return 1; + return 0; +} + +stock ts_is_waiting(id) { + return (ts_get_message(id) == TSMSG_WAITING); +} + +stock ts_is_dead(id) { + return (ts_get_message(id) == TSMSG_DEAD); +} + +stock ts_is_killer(id) { + return (ts_get_message(id) == TSMSG_KILLER); +} + +stock ts_is_demolition(id) { + return (ts_get_message(id) == TSMSG_DEMOLITION); +} + +stock ts_is_specialist(id) { + return (ts_get_message(id) == TSMSG_SPECIALIST); +} + +stock ts_is_unstoppable(id) { + return (ts_get_message(id) == TSMSG_UNSTOPPABLE); +} + +stock ts_is_theone(id) { + return (ts_get_message(id) == TSMSG_THEONE); +} + +// Return one on true, 0 on false +// UNAVAILABLE IN 1.70 +native ts_has_superjump(id); //! +native ts_has_fupowerup(id); //! +native ts_is_in_slowmo(id); + +// Get and set consecutive frags +//UNAVAILABLE IN 1.70 +//native ts_get_cons_frags(id); +//native ts_set_cons_frags(id,num); + +// Set to see cool bullet trails. Only id will see them. +native ts_set_bullettrail(id,yesorno); + +// Sets fake versions of slow mo and slow pause. Use ts_set_speed for more options. +native ts_set_fakeslowmo(id,Float:time); +native ts_set_fakeslowpause(id,Float:time); + +/* Sets speed artificially. 1.0 is default, Go into fractions and decimals for slower +* and put in higher numbers for higher speeds. Aura is how far things around you are effected +* Time is the time until it wears off. 0.0 for speed will freeze people. Do not use negatives. */ + +native ts_set_speed(id,Float:speed,Float:auradist,Float:time); + +/* Sets physics speed artificially. Things like sparks and sounds will be effected. +* Any negative number will render all physics paused. */ +native ts_set_physics_speed(id,Float:speed); + +// Returns 0 if no powerup is running. Returns the powerup type otherwise. +native ts_is_running_powerup(id); + +// Highly experimental command which overrides powerup types. +// Use if a powerup is already running, or if a powerup is not running. +// Safe to use in powerup forward. +native ts_force_run_powerup(id,PWUP_TYPE); diff --git a/bin/amxxdump/includes/amxmodx/tsfun.inc.temp b/bin/amxxdump/includes/amxmodx/tsfun.inc.temp new file mode 100644 index 0000000..f1f798d --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/tsfun.inc.temp @@ -0,0 +1,92 @@ +#if defined _tsxfun_included +#endinput +#endif +#define _tsxfun_included +#include +#include +enum { +XMF_DAMAGE = 0, +XMF_DEATH, +}; +#pragma reqlib tsfun +#if !defined AMXMODX_NOAUTOLOAD +#pragma loadlib tsfun +#endif +forward Melee_Attack(id,Float:time,Float:damage,UNAVAILABLE); +forward client_stunt(id,stunttype,UNAVAILABLE); +forward client_powerup(id,powerup,UNAVAILABLE); +native ts_wpnlogtoname(const logname[],name[],len); +native ts_wpnlogtoid(const logname[]); +native ts_getusercash( index ); +native ts_setusercash( index, money ); +native ts_getuserslots( index ); +native ts_setuserslots( index, slots ); +native ts_getuserstate( index ); +native ts_getuserwpn( index,&clip=0,&ammo=0,&mode=0,&extra=0 ); +native ts_getuserspace( index ); +native ts_getuserkillflags(killer); +native ts_getkillingstreak( index ); +native ts_getuserlastfrag( index ); +native ts_giveweapon( index,weapon,clips,extra ); +native ts_getuserpwup( index ); +stock ts_has_slowmo(id) { +return (ts_getuserpwup(id) &TSPWUP_SLOWMO); +} +stock ts_has_infammo(id) { +return (ts_getuserpwup(id) &TSPWUP_INFAMMO); +} +stock ts_has_slowpause(id) { +return (ts_getuserpwup(id) &TSPWUP_SLOWPAUSE); +} +stock ts_has_dfirerate(id) { +return (ts_getuserpwup(id) &TSPWUP_DFIRERATE); +} +stock ts_has_grenade(id) { +return (ts_getuserpwup(id) &TSPWUP_GRENADE); +} +stock ts_has_health(id) { +return (ts_getuserpwup(id) &TSPWUP_HEALTH); +} +stock ts_has_armor(id) { +return (ts_getuserpwup(id) &TSPWUP_ARMOR); +} +native ts_createpwup( pwup ); +native ts_givepwup( index,pwupent ); +native ts_setpddata( knifeoffset ); +native ts_set_message(id,message); +native ts_get_message(id); +stock ts_is_normal(id) +{ +new msg = ts_get_message(id); +if( (msg > 11) || (msg > 6 && msg < 10) ) return 1; +return 0; +} +stock ts_is_waiting(id) { +return (ts_get_message(id) == TSMSG_WAITING); +} +stock ts_is_dead(id) { +return (ts_get_message(id) == TSMSG_DEAD); +} +stock ts_is_killer(id) { +return (ts_get_message(id) == TSMSG_KILLER); +} +stock ts_is_demolition(id) { +return (ts_get_message(id) == TSMSG_DEMOLITION); +} +stock ts_is_specialist(id) { +return (ts_get_message(id) == TSMSG_SPECIALIST); +} +stock ts_is_unstoppable(id) { +return (ts_get_message(id) == TSMSG_UNSTOPPABLE); +} +stock ts_is_theone(id) { +return (ts_get_message(id) == TSMSG_THEONE); +} +native ts_has_superjump(id); native ts_has_fupowerup(id); native ts_is_in_slowmo(id); +native ts_set_bullettrail(id,yesorno); +native ts_set_fakeslowmo(id,Float:time); +native ts_set_fakeslowpause(id,Float:time); +native ts_set_speed(id,Float:speed,Float:auradist,Float:time); +native ts_set_physics_speed(id,Float:speed); +native ts_is_running_powerup(id); +native ts_force_run_powerup(id,PWUP_TYPE); diff --git a/bin/amxxdump/includes/amxmodx/tsstats.inc b/bin/amxxdump/includes/amxmodx/tsstats.inc new file mode 100644 index 0000000..dd2ba60 --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/tsstats.inc @@ -0,0 +1,65 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// TSX Stats Functions +// + +#if defined _tsstats_included + #endinput +#endif +#define _tsstats_included + +/* Gets stats from given weapon index. If wpnindex is 0 +* then the stats are from all weapons. If weapon has not been used function +* returns 0 in other case 1. Fields in stats are: +* 0 - kills +* 1 - deaths +* 2 - headshots +* 3 - teamkilling +* 4 - shots +* 5 - hits +* 6 - damage +* For body hits fields see amxconst.inc. */ +native get_user_wstats(index,wpnindex,stats[STATSX_MAX_STATS],bodyhits[MAX_BODYHITS]); + +/* Gets round stats from given weapon index.*/ +native get_user_wrstats(index,wpnindex,stats[STATSX_MAX_STATS],bodyhits[MAX_BODYHITS]); + +/* Gets life (from spawn to spawn) stats from given weapon index.*/ +native get_user_wlstats(index,wpnindex,stats[STATSX_MAX_STATS],bodyhits[MAX_BODYHITS]); + +/* Gets overall stats which are stored in file on server +* and updated on every respawn or user disconnect. +* Function returns the position in stats by diff. kills to deaths. */ +native get_user_stats(index,stats[STATSX_MAX_STATS],bodyhits[MAX_BODYHITS]); + +/* Gets round stats of player. */ +native get_user_rstats(index,stats[STATSX_MAX_STATS],bodyhits[MAX_BODYHITS]); + +/* Gets stats with which user have killed/hurt his victim. If victim is 0 +* then stats are from all victims. If victim has not been hurt, function +* returns 0 in other case 1. User stats are reset on his respawn. */ +native get_user_vstats(index,victim,stats[STATSX_MAX_STATS],bodyhits[MAX_BODYHITS],wpnname[]="",len=0); + +/* Gets stats with which user have been killed/hurt. If killer is 0 +* then stats are from all attacks. If killer has not hurt user, function +* returns 0 in other case 1. User stats are reset on his respawn. */ +native get_user_astats(index,wpnindex,stats[STATSX_MAX_STATS],bodyhits[MAX_BODYHITS],wpnname[]="",len=0); + +/* Resets life, weapon, victims and attackers user stats. */ +native reset_user_wstats(index); + +/* Gets overall stats which stored in stats.dat file in amx folder +* and updated on every mapchange or user disconnect. +* Function returns next index of stats entry or 0 if no more exists. */ +native get_stats(index,stats[STATSX_MAX_STATS],bodyhits[MAX_BODYHITS],name[],len); + +/* Returns number of all entries in stats. */ +native get_statsnum(); diff --git a/bin/amxxdump/includes/amxmodx/tsstats.inc.temp b/bin/amxxdump/includes/amxmodx/tsstats.inc.temp new file mode 100644 index 0000000..baf7c70 --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/tsstats.inc.temp @@ -0,0 +1,14 @@ +#if defined _tsstats_included +#endinput +#endif +#define _tsstats_included +native get_user_wstats(index,wpnindex,stats[STATSX_MAX_STATS],bodyhits[MAX_BODYHITS]); +native get_user_wrstats(index,wpnindex,stats[STATSX_MAX_STATS],bodyhits[MAX_BODYHITS]); +native get_user_wlstats(index,wpnindex,stats[STATSX_MAX_STATS],bodyhits[MAX_BODYHITS]); +native get_user_stats(index,stats[STATSX_MAX_STATS],bodyhits[MAX_BODYHITS]); +native get_user_rstats(index,stats[STATSX_MAX_STATS],bodyhits[MAX_BODYHITS]); +native get_user_vstats(index,victim,stats[STATSX_MAX_STATS],bodyhits[MAX_BODYHITS],wpnname[]="",len=0); +native get_user_astats(index,wpnindex,stats[STATSX_MAX_STATS],bodyhits[MAX_BODYHITS],wpnname[]="",len=0); +native reset_user_wstats(index); +native get_stats(index,stats[STATSX_MAX_STATS],bodyhits[MAX_BODYHITS],name[],len); +native get_statsnum(); diff --git a/bin/amxxdump/includes/amxmodx/tsx.inc b/bin/amxxdump/includes/amxmodx/tsx.inc new file mode 100644 index 0000000..e9592af --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/tsx.inc @@ -0,0 +1,88 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// TSX Functions +// + +#if defined _tsx_included + #endinput +#endif +#define _tsx_included + +#include + +#pragma reqclass xstats +#if !defined AMXMODX_NOAUTOLOAD + #pragma defclasslib xstats tsx +#endif + +/************* Shared Natives Start ********************************/ + +/* Forward types */ +enum { + XMF_DAMAGE = 0, + XMF_DEATH, +}; + +/* Use this function to register forwards + * DEPRECATED + */ +native register_statsfwd( ftype ); + +/* Function is called after player to player attacks , +* if players were damaged by teammate TA is set to 1 */ +forward client_damage(attacker,victim,damage,wpnindex,hitplace,TA); + +/* Function is called after player death , +* if player was killed by teammate TK is set to 1 */ +forward client_death(killer,victim,wpnindex,hitplace,TK); + +/* Custom Weapon Support */ +/* function will return index of new weapon */ +native custom_weapon_add( const wpnname[],melee = 0,const logname[]="" ); +/* Function will pass damage done by this custom weapon to stats module and other plugins */ +native custom_weapon_dmg( weapon, att, vic, damage, hitplace=0 ); +/* Function will pass info about custom weapon shot to stats module */ +native custom_weapon_shot( weapon,index ); // weapon id , player id + +/* function will return 1 if true */ +native xmod_is_melee_wpn(wpnindex); + +/* Returns weapon name. */ +native xmod_get_wpnname(wpnindex,name[],len); + +/* Returns weapon logname. */ +native xmod_get_wpnlogname(wpnindex,name[],len); + +/* Returns weapons array size */ +native xmod_get_maxweapons(); + +/* Returns stats array size ex. 8 in TS , 9 in DoD */ +native xmod_get_stats_size(); + +/* Returns 1 if true */ +native xmod_is_custom_wpn(wpnindex); + +/************* Shared Natives End ********************************/ + +/* Spawns a Weapon */ +stock ts_weaponspawn(const weaponid[], const duration[], const extraclip[], const spawnflags[], const Float:Origin[3]) +{ + new ent = create_entity("ts_groundweapon"); + + DispatchKeyValue(ent, "tsweaponid", weaponid); + DispatchKeyValue(ent, "wduration", duration); + DispatchKeyValue(ent, "wextraclip", extraclip); + DispatchKeyValue(ent, "spawnflags", spawnflags); + DispatchSpawn(ent); + + entity_set_origin(ent, Origin); + return PLUGIN_HANDLED; +} diff --git a/bin/amxxdump/includes/amxmodx/tsx.inc.temp b/bin/amxxdump/includes/amxmodx/tsx.inc.temp new file mode 100644 index 0000000..7444d6c --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/tsx.inc.temp @@ -0,0 +1,35 @@ +#if defined _tsx_included +#endinput +#endif +#define _tsx_included +#include +#pragma reqclass xstats +#if !defined AMXMODX_NOAUTOLOAD +#pragma defclasslib xstats tsx +#endif +enum { +XMF_DAMAGE = 0, +XMF_DEATH, +}; +native register_statsfwd( ftype ); +forward client_damage(attacker,victim,damage,wpnindex,hitplace,TA); +forward client_death(killer,victim,wpnindex,hitplace,TK); +native custom_weapon_add( const wpnname[],melee = 0,const logname[]="" ); +native custom_weapon_dmg( weapon, att, vic, damage, hitplace=0 ); +native custom_weapon_shot( weapon,index ); native xmod_is_melee_wpn(wpnindex); +native xmod_get_wpnname(wpnindex,name[],len); +native xmod_get_wpnlogname(wpnindex,name[],len); +native xmod_get_maxweapons(); +native xmod_get_stats_size(); +native xmod_is_custom_wpn(wpnindex); +stock ts_weaponspawn(const weaponid[], const duration[], const extraclip[], const spawnflags[], const Float:Origin[3]) +{ +new ent = create_entity("ts_groundweapon"); +DispatchKeyValue(ent, "tsweaponid", weaponid); +DispatchKeyValue(ent, "wduration", duration); +DispatchKeyValue(ent, "wextraclip", extraclip); +DispatchKeyValue(ent, "spawnflags", spawnflags); +DispatchSpawn(ent); +entity_set_origin(ent, Origin); +return PLUGIN_HANDLED; +} diff --git a/bin/amxxdump/includes/amxmodx/unixtime.inc b/bin/amxxdump/includes/amxmodx/unixtime.inc new file mode 100644 index 0000000..a406f97 --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/unixtime.inc @@ -0,0 +1,258 @@ + +/* + Unix Time Conversion + by bugsy + v0.3 + + http://forums.alliedmods.net/showthread.php?t=91915 + + TimeZone data: http://www.epochconverter.com/epoch/timezones.php +*/ + +#if defined _file_unixtime_included + #endinput +#endif +#define _file_unixtime_included + +stock const YearSeconds[2] = +{ + 31536000, //Normal year + 31622400 //Leap year +}; + +stock const MonthSeconds[12] = +{ + 2678400, //January 31 + 2419200, //February 28 + 2678400, //March 31 + 2592000, //April 30 + 2678400, //May 31 + 2592000, //June 30 + 2678400, //July 31 + 2678400, //August 31 + 2592000, //September 30 + 2678400, //October 31 + 2592000, //November 30 + 2678400 //December 31 +}; + +enum TimeZones +{ + UT_TIMEZONE_SERVER, + UT_TIMEZONE_MIT, + UT_TIMEZONE_HAST, + UT_TIMEZONE_AKST, + UT_TIMEZONE_AKDT, + UT_TIMEZONE_PST, + UT_TIMEZONE_PDT, + UT_TIMEZONE_MST, + UT_TIMEZONE_MDT, + UT_TIMEZONE_CST, + UT_TIMEZONE_CDT, + UT_TIMEZONE_EST, + UT_TIMEZONE_EDT, + UT_TIMEZONE_PRT, + UT_TIMEZONE_CNT, + UT_TIMEZONE_AGT, + UT_TIMEZONE_BET, + UT_TIMEZONE_CAT, + UT_TIMEZONE_UTC, + UT_TIMEZONE_WET, + UT_TIMEZONE_WEST, + UT_TIMEZONE_CET, + UT_TIMEZONE_CEST, + UT_TIMEZONE_EET, + UT_TIMEZONE_EEST, + UT_TIMEZONE_ART, + UT_TIMEZONE_EAT, + UT_TIMEZONE_MET, + UT_TIMEZONE_NET, + UT_TIMEZONE_PLT, + UT_TIMEZONE_IST, + UT_TIMEZONE_BST, + UT_TIMEZONE_ICT, + UT_TIMEZONE_CTT, + UT_TIMEZONE_AWST, + UT_TIMEZONE_JST, + UT_TIMEZONE_ACST, + UT_TIMEZONE_AEST, + UT_TIMEZONE_SST, + UT_TIMEZONE_NZST, + UT_TIMEZONE_NZDT +} + +stock const TimeZoneOffset[ TimeZones ] = +{ + -1, + -39600, + -36000, + -32400, + -28800, + -28800, + -25200, + -25200, + -21600, + -21600, + -18000, + -18000, + -14400, + -14400, + -12600, + -10800, + -10800, + -3600, + 0, + 0, + 3600, + 3600, + 7200, + 7200, + 10800, + 7200, + 10800, + 12600, + 14400, + 18000, + 19800, + 21600, + 25200, + 28800, + 28800, + 32400, + 34200, + 36000, + 39600, + 43200, + 46800 +}; + +stock TimeZones:TimeZone; +stock const DaySeconds = 86400; +stock const HourSeconds = 3600; +stock const MinuteSeconds = 60; + +stock UnixToTime( iTimeStamp , &iYear , &iMonth , &iDay , &iHour , &iMinute , &iSecond , TimeZones:tzTimeZone=UT_TIMEZONE_UTC ) +{ + new iTemp; + + iYear = 1970; + iMonth = 1; + iDay = 1; + iHour = 0; + + if ( tzTimeZone == UT_TIMEZONE_SERVER ) + tzTimeZone = GetTimeZone(); + + iTimeStamp += TimeZoneOffset[ tzTimeZone ]; + + while ( iTimeStamp > 0 ) + { + iTemp = IsLeapYear(iYear); + + if ( ( iTimeStamp - YearSeconds[iTemp] ) >= 0 ) + { + iTimeStamp -= YearSeconds[iTemp]; + iYear++; + } + else + { + break; + } + } + + while ( iTimeStamp > 0 ) + { + iTemp = SecondsInMonth( iYear , iMonth ); + + if ( ( iTimeStamp - iTemp ) >= 0 ) + { + iTimeStamp -= iTemp; + iMonth++; + } + else + { + break; + } + } + + while ( iTimeStamp > 0) + { + if ( ( iTimeStamp - DaySeconds ) >= 0 ) + { + iTimeStamp -= DaySeconds; + iDay++; + } + else + { + break; + } + } + + while ( iTimeStamp > 0 ) + { + if ( ( iTimeStamp - HourSeconds ) >= 0 ) + { + iTimeStamp -= HourSeconds; + iHour++; + } + else + { + break; + } + } + + iMinute = ( iTimeStamp / 60 ); + iSecond = ( iTimeStamp % 60 ); +} + +stock TimeToUnix( const iYear , const iMonth , const iDay , const iHour , const iMinute , const iSecond , TimeZones:tzTimeZone=UT_TIMEZONE_UTC) +{ + new i , iTimeStamp; + + for ( i = 1970 ; i < iYear ; i++ ) + iTimeStamp += YearSeconds[ IsLeapYear(i) ]; + + for ( i = 1 ; i < iMonth ; i++ ) + iTimeStamp += SecondsInMonth( iYear , i ); + + iTimeStamp += ( ( iDay - 1 ) * DaySeconds ); + iTimeStamp += ( iHour * HourSeconds ); + iTimeStamp += ( iMinute * MinuteSeconds ); + iTimeStamp += iSecond; + + if ( tzTimeZone == UT_TIMEZONE_SERVER ) + tzTimeZone = GetTimeZone(); + + return ( iTimeStamp + TimeZoneOffset[ tzTimeZone ] ); +} + +stock TimeZones:GetTimeZone() +{ + if ( TimeZone ) + return TimeZone; + + new TimeZones:iZone , iOffset , iTime , iYear , iMonth , iDay , iHour , iMinute , iSecond; + date( iYear , iMonth , iDay ); + time( iHour , iMinute , iSecond ); + + iTime = TimeToUnix( iYear , iMonth , iDay , iHour , iMinute , iSecond , UT_TIMEZONE_UTC ); + iOffset = iTime - get_systime(); + + for ( iZone = TimeZones:0 ; iZone < TimeZones ; iZone++ ) + { + if ( iOffset == TimeZoneOffset[ iZone ] ) + break; + } + + return ( TimeZone = iZone ); +} + +stock SecondsInMonth( const iYear , const iMonth ) +{ + return ( ( IsLeapYear( iYear ) && ( iMonth == 2 ) ) ? ( MonthSeconds[iMonth - 1] + DaySeconds ) : MonthSeconds[iMonth - 1] ); +} + +stock IsLeapYear( const iYear ) +{ + return ( ( (iYear % 4) == 0) && ( ( (iYear % 100) != 0) || ( (iYear % 400) == 0 ) ) ); +} diff --git a/bin/amxxdump/includes/amxmodx/vault.inc b/bin/amxxdump/includes/amxmodx/vault.inc new file mode 100644 index 0000000..9982dfb --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/vault.inc @@ -0,0 +1,60 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Vault Functions +// + +#if defined _vault_included + #endinput +#endif +#define _vault_included + + /** + * Reads data from a given key. + * + * + * @param key Key to get the value from + * @param data Buffer to copy the value to + * @param len Buffer size. If len is set to 0 then the function will + * return the value as a number + * + * @return If len is not 0 the function will return the number of characters written. + If len is 0 the function will return the numerical value associated with the key. + */ +native get_vaultdata(const key[], data[] = "", len = 0); + + +/** + * Sets data for a given key. + * + * @param key Key to set the value for + * @param data Data to set for the given key + * + * @noreturn + */ +native set_vaultdata(const key[], const data[] = ""); + +/** + * Removes a key and its data from the vault. + * + * @param key Key to remove + * + * @noreturn + */ +native remove_vaultdata(const key[]); + +/** + * Checks if a key exists in the vault. + * + * @param key Key to check + * + * @return 1 if an entry was found, 0 otherwise. + */ +native vaultdata_exists(const key[]); diff --git a/bin/amxxdump/includes/amxmodx/vault.inc.temp b/bin/amxxdump/includes/amxmodx/vault.inc.temp new file mode 100644 index 0000000..cfbfa5d --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/vault.inc.temp @@ -0,0 +1,8 @@ +#if defined _vault_included +#endinput +#endif +#define _vault_included +native get_vaultdata(const key[], data[] = "", len = 0); +native set_vaultdata(const key[], const data[] = ""); +native remove_vaultdata(const key[]); +native vaultdata_exists(const key[]); diff --git a/bin/amxxdump/includes/amxmodx/vector.inc b/bin/amxxdump/includes/amxmodx/vector.inc new file mode 100644 index 0000000..ee76429 --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/vector.inc @@ -0,0 +1,131 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Vector Functions +// + +#if defined _corevector_included + #endinput +#endif +#define _corevector_included + +/** + * Used for angle_vector() + */ +#define ANGLEVECTOR_FORWARD 1 +#define ANGLEVECTOR_RIGHT 2 +#define ANGLEVECTOR_UP 3 + +/** + * Calculates the distance between two input vectors. + * + * @param origin1 The first vector + * @param origin2 The second vector + * + * @return The distance between two input vectors + */ +native get_distance(const origin1[3], const origin2[3]); + +/** + * Calculates the distance between two input float vectors. + * + * @param origin1 The first vector + * @param origin2 The second vector + * + * @return The distance between two input vectors + */ +native Float:get_distance_f(const Float:Origin1[3], const Float:Origin2[3]); + +/** + * Calculates velocity in the direction player is looking. + * + * @param iIndex Client index + * @param iVelocity Multiply vRetValue length by this much + * @param vRetValue Store the calculated velocity in this vector. + * + * @noreturn + * @error If client is not connected or client index is not + * within the range of 1 to MaxClients. + */ +native velocity_by_aim(iIndex, iVelocity, Float:vRetValue[3]); + +/** + * Changes a vector into an angle vector. + * + * @param fVector Input vector + * @param vReturn Output angle vector + * + * @noreturn + */ +native vector_to_angle(const Float:fVector[3], Float:vReturn[3]); + +/** + * Changes an angle vector into a vector. + * + * @param vector Input angle vector + * @param FRU One of the ANGLEVECTOR_* constants + * @param ret Output vector + * + * @noreturn + */ +native angle_vector(const Float:vector[3], FRU, Float:ret[3]); + +/** + * Calculates the length of a vector. + * + * @param vVector Input vector + * + * @return Length of the input vector + */ +native Float:vector_length(const Float:vVector[3]); + +/** + * Calculates the distance between two vectors. + * + * @param vVector The first vector + * @param vVector2 The second vector + * + * @return Distance between two input vectors + */ +native Float:vector_distance(const Float:vVector[3], const Float:vVector2[3]); + +/** + * Converts an integer vector to a floating point vector. + * + * @param IVec Input integer vector + * @param FVec Output float vector + * + * @noreturn + */ +stock IVecFVec(const IVec[3], Float:FVec[3]) +{ + FVec[0] = float(IVec[0]); + FVec[1] = float(IVec[1]); + FVec[2] = float(IVec[2]); + + return 1; +} + +/** + * Converts a floating point vector into an integer vector. + * + * @param FVec Input float vector + * @param IVec Output integer vector + * + * @noreturn + */ +stock FVecIVec(const Float:FVec[3], IVec[3]) +{ + IVec[0] = floatround(FVec[0]); + IVec[1] = floatround(FVec[1]); + IVec[2] = floatround(FVec[2]); + + return 1; +} diff --git a/bin/amxxdump/includes/amxmodx/vector.inc.temp b/bin/amxxdump/includes/amxmodx/vector.inc.temp new file mode 100644 index 0000000..d831329 --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/vector.inc.temp @@ -0,0 +1,28 @@ +#if defined _corevector_included +#endinput +#endif +#define _corevector_included +#define ANGLEVECTOR_FORWARD 1 +#define ANGLEVECTOR_RIGHT 2 +#define ANGLEVECTOR_UP 3 +native get_distance(const origin1[3], const origin2[3]); +native Float:get_distance_f(const Float:Origin1[3], const Float:Origin2[3]); +native velocity_by_aim(iIndex, iVelocity, Float:vRetValue[3]); +native vector_to_angle(const Float:fVector[3], Float:vReturn[3]); +native angle_vector(const Float:vector[3], FRU, Float:ret[3]); +native Float:vector_length(const Float:vVector[3]); +native Float:vector_distance(const Float:vVector[3], const Float:vVector2[3]); +stock IVecFVec(const IVec[3], Float:FVec[3]) +{ +FVec[0] = float(IVec[0]); +FVec[1] = float(IVec[1]); +FVec[2] = float(IVec[2]); +return 1; +} +stock FVecIVec(const Float:FVec[3], IVec[3]) +{ +IVec[0] = floatround(FVec[0]); +IVec[1] = floatround(FVec[1]); +IVec[2] = floatround(FVec[2]); +return 1; +} diff --git a/bin/amxxdump/includes/amxmodx/xs.inc b/bin/amxxdump/includes/amxmodx/xs.inc new file mode 100644 index 0000000..6c4e9b1 --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/xs.inc @@ -0,0 +1,1539 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// Copyright (C) 2004 Pavol "PM" Marko +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +/** + * XS Library + * Version 0.1 + * + * MACROS THAT YOU CAN DEFINE BEFORE INCLUDING XS.INC: + * XS_FLEQ_TOLERANCE: + * Tolerance that is used for XS_FLEQ float nearly-equal comparisions + * DEFAULT: 0.000005 + * XS_DEBUG + * Turn debug logging on + * DEFAULT: 0 + * XS_LOGBUFFER_SIZE + * Buffer size for logging + * DEFAULT: 512 + * XS_TASK_MAXPARAMS + * Maximal parameter count for managed tasks + * DEFAULT: 8 + * XS_TASK_MAXPARAMSIZE + * Maximal size of string parameter for tasks + * Has to be power of 2 and has to be >= 8 + * DEFAULT: 512 + * XS_TASK_MANAGEDIDS + * Number of managed IDs for tasks. + * DEFAULT: 2048 + * XS_REPLACEBUF_SIZE + * DEFAULT: 3072 + * + * NOTES: + * On AMX, VexdUM is required for some math functions + * xs__ / XS__ (2 underscores) stuff is meant to be intern + * untested: never tested + * half-tested: succesfully used in other applications; not extensively tested in xs though + * tested: fully tested + * If you have any useful functions / ideas for functions, please tell me. +*/ + +#if defined _xs_included + #endinput +#endif +#define _xs_included + +// **** CONFIG CHECK + +#if !defined XS_FLEQ_TOLERANCE + #define XS_FLEQ_TOLERANCE 0.000005 +#endif + +#if !defined XS_DEBUG + #define XS_DEBUG 0 +#endif + +#if !defined XS_LOGBUFFER_SIZE + #define XS_LOGBUFFER_SIZE 512 +#endif + +#if !defined XS_TASK_MAXPARAMS + #define XS_TASK_MAXPARAMS 8 +#endif + +#if !defined XS_TASK_MAXPARAMSIZE + #define XS_TASK_MAXPARAMSIZE 512 +#endif + +#if !defined XS_TASK_MANAGEDIDS + #define XS_TASK_MANAGEDIDS 2048 +#endif + +#if !defined XS_REPLACEBUF_SIZE + #define XS_REPLACEBUF_SIZE 3072 +#endif + + +/****** DEBUGGING / LOGING FUNCTIONS ******/ +enum xs_logtypes +{ + xs_debug, + xs_message, + xs_warning, + xs_error, + xs_fatalerror, + xs__assertionfailed, + + // must come last + xs_logtypes_count +} + +stock const xs__logtypenames[xs_logtypes_count][] = {"DEBUG", "", "WARNING", "ERROR", "FATAL ERROR", "DEBUG ASSERTION FAILED"}; + +// tested +stock xs_log(xs_logtypes:logtype, any:...) +{ + // WARNING: Don't try to use assert in here; it uses this func + + // Don't log debug if not in debug mode + #if !XS_DEBUG + if (logtype == xs_debug) + return; + #endif + + new buffer[XS_LOGBUFFER_SIZE+1]; + buffer[XS_LOGBUFFER_SIZE]=0; + format_args(buffer, XS_LOGBUFFER_SIZE, 1 /* go from SECOND argument*/); + new bool:addLogTypeName = strlen(xs__logtypenames[logtype]) ? true : false; + + // Use AMXX's logging system + log_amx("%s%s%s", addLogTypeName ? xs__logtypenames[logtype] : "", + addLogTypeName ? ": " : "", buffer); +} + +// Assertion +// tested +stock xs_assertfunc(any:exp, const desc[]) +{ + // Check exp + if (exp) + return 1; // ok + + // not ok + + // print info + xs_log(xs__assertionfailed, "%s", desc); + + return 0; +} +#define xs_assert(%1,%2) if (!xs_assertfunc(%1,%2)) xs__global_null /= xs__global_null + + +// Assertion; only in debug mode +// untested; logical flow says it should work +#if XS_DEBUG + #define xs_assert_dbg(%1,%2) if (!xs_assertfunc(%1,%2)) xs__global_null /= xs__global_null +#else + #define xs_assert_dbg(%1,%2) +#endif + +new xs__global_null = 0; + +/****** MATH FUNCTIONS ******/ + +/****** BASIC STUFF ******/ + +/** + * Gets the sign of a value. + * + * @param num Number to get the sign from. + * + * @return -1 if the number is negative, + * 0 if the number is equal to 0, + * 1 if the number is positive. + */ +stock xs_sign(num) +{ + return (num < 0) ? -1 : ((num == 0) ? 0 : 1); +} + +/** + * Gets the sign of a float value. + * + * @param num Number to get the sign from. + * + * @return -1 if the number is negative, + * 0 if the number is equal to 0, + * 1 if the number is positive. + */ +stock xs_fsign(Float:num) +{ + return (num < 0.0) ? -1 : ((num == 0.0) ? 0 : 1); +} + +/** + * Gets the absolute value of a number. + * + * @param num Number to get the absolute value from. + * + * @return Absolute value of the input number. + */ +stock xs_abs(num) +{ + return (num < 0) ? -num : num; +} + +/** + * Checks if the number is a power of 2. + * + * @param x Number to check. + * + * @return 1 if it is a power of 2, 0 otherwise. + */ +stock xs_is_2power(x) +{ + return (x!=0) && ((x&(x-1))==0); +} + +/** + * Converts degrees to radians. + * + * @param x Input degrees. + * + * @return Degrees converted to radians. + */ +stock Float:xs_deg2rad(Float:x) +{ + return x * 0.017453292519943; +} + +/** + * Converts radians to degrees. + * + * @param x Input radians. + * + * @return Radians converted to degrees. + */ +stock Float:xs_rad2deg(Float:x) +{ + return x * 57.29577951308232; +} + +/** + * Converts gradians to radians. + * + * @param x Input gradians. + * + * @return Gradians converted to radians. + */ +stock Float:xs_gra2rad(Float:x) +{ + return x * 0.015707963267948; +} + +/** + * Converts radians to gradians. + * + * @param x Input radians. + * + * @return Radians converted to gradians. + */ +stock Float:xs_rad2gra(Float:x) +{ + return x * 63.66197723675813; +} + +/** + * Checks if two floating point values are nearly equal. + * + * @param %1 The first value to compare. + * @param %2 The second value to compare. + * + * @return 1 if they are nearly equal, 0 otherwise. + */ +#define XS_FLEQ(%1,%2) (((%1) <= ((%2) + XS_FLEQ_TOLERANCE)) && ((%1) >= ((%2) - XS_FLEQ_TOLERANCE))) + +/** + * Calculates the reciprocal of the square root of the input value. + * + * @param x The input value. + * + * @return The reciprocal of the square root of the input value. + */ +stock Float:xs_rsqrt(Float:x) +{ + return 1.0 / floatsqroot(x); +} + +/** + * Calculates the square root of the input value. + * + * @note This is an alias for floatsqroot(). + * + * @param x The input value. + * + * @return The square root of the input value. + */ +stock Float:xs_sqrt(Float:x) +{ + return floatsqroot(x); +} + +// These functions generate errors if you use the macros with wrong parameter count. +stock Float:xs_fabs(Float:pa) +{ + #pragma unused pa + new rawr = you_need_one_param_for_fabs; + rawr = warning_below_shows_line_number; + #pragma unused rawr +} +stock Float:xs_asin(Float:pa,Float:pb) +{ + #pragma unused pa,pb + new rawr = you_need_two_params_for_asin; + rawr = warning_below_shows_line_number; + #pragma unused rawr +} +stock Float:xs_sin(Float:pa,Float:pb) +{ + #pragma unused pa,pb + new rawr = you_need_two_params_for_sin; + #pragma unused rawr +} +stock Float:xs_acos(Float:pa,Float:pb) +{ + #pragma unused pa,pb + new rawr = you_need_two_params_for_acos; + rawr = warning_below_shows_line_number; + #pragma unused rawr +} +stock Float:xs_cos(Float:pa,Float:pb) +{ + #pragma unused pa,pb + new rawr = you_need_two_params_for_cos; + rawr = warning_below_shows_line_number; + #pragma unused rawr +} +stock Float:xs_atan(Float:pa,Float:pb) +{ + #pragma unused pa,pb + new rawr = you_need_two_params_for_atan; + rawr = warning_below_shows_line_number; + #pragma unused rawr +} +stock Float:xs_atan2(Float:pa,Float:pb) +{ + #pragma unused pa,pb + new rawr = you_need_two_params_for_atan2; + rawr = warning_below_shows_line_number; + #pragma unused rawr +} +stock Float:xs_tan(Float:pa, Float:pb) +{ + #pragma unused pa,pb + new rawr = you_need_two_params_for_tan; + rawr = warning_below_shows_line_number; + #pragma unused rawr +} + +#define xs_fabs(%1) floatabs(%1) +#define xs_asin(%1,%2) floatasin(%1, %2) +#define xs_sin(%1,%2) floatsin(%1, %2) +#define xs_acos(%1,%2) floatacos(%1, %2) +#define xs_cos(%1,%2) floatcos(%1, %2) +#define xs_atan(%1,%2) floatatan(%1, %2) +#define xs_atan2(%1,%2) floatatan2(%1, %2) +#define xs_tan(%1,%2) floattan(%1, %2) + +/****** RANDOM NUMBERS ******/ +// This routine comes from the book "Inner Loops" by Rick Booth, Addison-Wesley +// (ISBN 0-201-47960-5). This is a "multiplicative congruential random number +// generator" that has been extended to 31-bits + +stock xs__internalseed=0x546875; + +#define XS__IL_RMULT 1103515245 + +/** + * Sets the seed for the random number generation. + * + * @param x The seed to set. + * + * @noreturn + */ +stock xs_seed(seed) +{ + xs__internalseed = seed; +} + +/** + * Retrieves a random integer. + * + * @return A random integer. + */ +stock xs_irand() +{ + new lo, hi, ll, lh, hh, hl; + new result; + + lo = xs__internalseed & 0xffff; + hi = xs__internalseed >> 16; + xs__internalseed = xs__internalseed * XS__IL_RMULT + 12345; + ll = lo * (XS__IL_RMULT & 0xffff); + lh = lo * (XS__IL_RMULT >> 16 ); + hl = hi * (XS__IL_RMULT & 0xffff); + hh = hi * (XS__IL_RMULT >> 16 ); + result = xs_abs(((ll + 12345) >> 16) + lh + hl + (hh << 16)); + return result; +} + +/** + * Retrieves a random float. + * + * @return A random float. + */ +stock Float:xs_frand() +{ + return float(xs_irand()) / float(xs_get_maxnum()); // -1/2 should be the biggest possible positive number +} + +/** + * Retrieves a random integer between the specified values. + * + * @note @pmax has to be greater than @pmin! + * + * @param pmin The minimum value. + * @param pmax The maximum value. + * + * @return A random integer. + */ +stock xs_irand_range(pmin, pmax) +{ + xs_assert_dbg(pmax - pmin >= 0, "xs_irand_range: pmin > pmax"); + new i = pmin + floatround(xs_frand() * float(pmax - pmin)); + if (i > pmax) + i = pmax; + return i; +} + +/****** VECTORS & PLANES ******/ + +// *** vectors + +/** + * Sets vector's components to specified values. + * + * @param vec The vector to set values to. + * @param x The X component to be set. + * @param y The Y component to be set. + * @param z The Z component to be set. + * + * @noreturn + */ +stock xs_vec_set(Float:vec[], Float:x, Float:y, Float:z) +{ + vec[0] = x; + vec[1] = y; + vec[2] = z; +} + +/** + * Adds two vectors. + * + * @param in1 The first vector to add. + * @param in2 The second vector to add. + * @param out The output vector. Can be one of the input vectors. + * + * @noreturn + */ +stock xs_vec_add(const Float:in1[], const Float:in2[], Float:out[]) +{ + out[0] = in1[0] + in2[0]; + out[1] = in1[1] + in2[1]; + out[2] = in1[2] + in2[2]; +} + +/** + * Subtracts one vector from another one. + * + * @param in1 Vector to subtract from. + * @param in2 Vector to subtract from the first one. + * @param out The output vector. Can be one of the input vectors. + * + * @noreturn + */ +stock xs_vec_sub(const Float:in1[], const Float:in2[], Float:out[]) +{ + out[0] = in1[0] - in2[0]; + out[1] = in1[1] - in2[1]; + out[2] = in1[2] - in2[2]; +} + +/** + * Adds the second vector scaled by a scalar to the first. + * + * @param in1 Vector to add to. + * @param in2 Vector to scale and add. + * @param scalar Scalar to scale the second vector with. + * @param out The output vector. Can be one of the input vectors. + * + * @noreturn + */ +stock xs_vec_add_scaled(const Float:in1[], const Float:in2[], Float:scalar, Float:out[]) +{ + out[0] = in1[0] + in2[0] * scalar; + out[1] = in1[1] + in2[1] * scalar; + out[2] = in1[2] + in2[2] * scalar; +} + +/** + * Subtracts the second vector scaled by a scalar from the first one. + * + * @param in1 Vector to subtract from. + * @param in2 Vector to scale and subtract. + * @param scalar Scalar to scale the second vector with. + * @param out The output vector. Can be one of the input vectors. + * + * @noreturn + */ +stock xs_vec_sub_scaled(const Float:in1[], const Float:in2[], Float:scalar, Float:out[]) +{ + out[0] = in1[0] - in2[0] * scalar; + out[1] = in1[1] - in2[1] * scalar; + out[2] = in1[2] - in2[2] * scalar; +} + +/** + * Checks if two vectors are equal. + * + * @note If you need to check if two vectors are nearly equal, + * take a look at xs_vec_nearlyequal(). + * + * @param vec1 The first input vector to check. + * @param vec2 The second input vector to check. + * + * @return 1 if vectors are equal, 0 otherwise. + */ +stock bool:xs_vec_equal(const Float:vec1[], const Float:vec2[]) +{ + return (vec1[0] == vec2[0]) && (vec1[1] == vec2[1]) && (vec1[2] == vec2[2]); +} + +/** + * Checks if two vectors are nearly equal. + * + * @note If you need to check if two vectors are exactly equal, + * take a look at xs_vec_equal(). + * + * @param vec1 The first input vector to check. + * @param vec2 The second input vector to check. + * + * @return 1 if vectors are equal, 0 otherwise. + */ +stock bool:xs_vec_nearlyequal(const Float:vec1[], const Float:vec2[]) +{ + return XS_FLEQ(vec1[0], vec2[0]) && XS_FLEQ(vec1[1], vec2[1]) && XS_FLEQ(vec1[2], vec2[2]); +} + +/** + * Multiply a vector by a scalar value. + * + * @param vec The vector to be multiplied. + * @param scalar The scalar value to multiply the vector with. + * @param out The output vector. Can be the same as the input vector. + * + * @noreturn + */ +stock xs_vec_mul_scalar(const Float:vec[], Float:scalar, Float:out[]) +{ + out[0] = vec[0] * scalar; + out[1] = vec[1] * scalar; + out[2] = vec[2] * scalar; +} + +/** + * Divide a vector by a scalar value. + * + * @param vec The vector to be divided. + * @param scalar The scalar value to divide the vector with. + * @param out The output vector. Can be the same as the input vector. + * + * @noreturn + */ +stock xs_vec_div_scalar(const Float:vec[], Float:scalar, Float:out[]) +{ + new Float:__tmp = 1.0 / scalar; + out[0] = vec[0] * __tmp; + out[1] = vec[1] * __tmp; + out[2] = vec[2] * __tmp; +} + +/** + * Computes the length of a vector. + * + * @param vec The vector to compute the length of. + * + * @return The length of the input vector. + */ +stock Float:xs_vec_len(const Float:vec[]) +{ + return xs_sqrt(vec[0]*vec[0] + vec[1]*vec[1] + vec[2]*vec[2]); +} + +/** + * Computes the length of a 2D vector. + * + * @param vec The vector to compute the length of. + * + * @return The length of the input vector. + */ +stock Float:xs_vec_len_2d(const Float:vec[]) +{ + return xs_sqrt(vec[0]*vec[0] + vec[1]*vec[1]); +} + +/** + * Computes the distance between two vectors (points). + * + * @param vec1 First vector. + * @param vec2 Second vector. + * + * @return The distance between two vectors. + */ +stock Float:xs_vec_distance(const Float:vec1[], const Float:vec2[]) +{ + return xs_sqrt((vec1[0]-vec2[0]) * (vec1[0]-vec2[0]) + + (vec1[1]-vec2[1]) * (vec1[1]-vec2[1]) + + (vec1[2]-vec2[2]) * (vec1[2]-vec2[2])); +} + +/** + * Computes the distance between two 2D vectors (points). + * + * @param vec1 First vector. + * @param vec2 Second vector. + * + * @return The distance between two vectors. + */ +stock Float:xs_vec_distance_2d(const Float:vec1[], const Float:vec2[]) +{ + return xs_sqrt((vec1[0]-vec2[0]) * (vec1[0]-vec2[0]) + + (vec1[1]-vec2[1]) * (vec1[1]-vec2[1])); +} + +/** + * Normalizes a vector. Normalized vector is a vector with the length of 1 unit, + * but with the same direction as the original vector. + * + * @param vec The vector to be normalized. + * @param out The output vector. Can be the same as the input vector. + * + * @noreturn + */ +stock xs_vec_normalize(const Float:vec[], Float:out[]) +{ + new Float:invlen = xs_rsqrt(vec[0]*vec[0] + vec[1]*vec[1] + vec[2]*vec[2]); + out[0] = vec[0] * invlen; + out[1] = vec[1] * invlen; + out[2] = vec[2] * invlen; +} + +/** + * Computes the cross product of two vectors. + * + * @param vec1 The first vector operand of the cross operation. + * @param vec2 The second vector operand of the cross operation. + * @param out The output vector. *Can't* be one of the input vectors. + * + * @noreturn + */ +stock xs_vec_cross(const Float:vec1[], const Float:vec2[], Float:out[]) +{ + out[0] = vec1[1]*vec2[2] - vec1[2]*vec2[1]; + out[1] = vec1[2]*vec2[0] - vec1[0]*vec2[2]; + out[2] = vec1[0]*vec2[1] - vec1[1]*vec2[0]; +} + +/** + * Computes the dot product of two vectors. + * + * @param vec1 The first vector operand of the dot operation. + * @param vec2 The second vector operand of the dot operation. + * + * @return The dot product of two input vectors. + */ +stock Float:xs_vec_dot(const Float:vec1[], const Float:vec2[]) +{ + return vec1[0]*vec2[0] + vec1[1]*vec2[1] + vec1[2]*vec2[2]; +} + +/** + * Negates a vector. + * + * @param vec The vector to negate. + * @param out The output vector. Can be the same as the input vector. + * + * @noreturn + */ +stock xs_vec_neg(const Float:vec[], Float:out[]) +{ + out[0] = -vec[0]; + out[1] = -vec[1]; + out[2] = -vec[2]; +} + +/** + * Copies a vector into another one. + * + * @param vecIn The vector to copy. + * @param vecOut The output vector where to copy the input vector. + * + * @noreturn + */ +stock xs_vec_copy(const Float:vecIn[], Float:vecOut[]) +{ + vecOut[0] = vecIn[0]; + vecOut[1] = vecIn[1]; + vecOut[2] = vecIn[2]; +} + +/** + * Computes the angle between two vectors. + * + * @param vec1 The first vector. + * @param vec2 The second vector. + * + * @return The angle between two input vectors in degrees. + */ +stock Float:xs_vec_angle(const Float:vec1[], const Float:vec2[]) +{ + return xs_rad2deg(xs_acos(xs_vec_dot(vec1, vec2), radian)); +} + +/** + * Reflects a vector about a normal. + * + * @param vec The vector to be reflected. + * @param normal The normal vector about which to reflect. + * @param out The output reflected vector. + * + * @noreturn + */ +stock xs_vec_reflect(const Float:vec[], const Float:normal[], Float:out[]) +{ + // normalize(vec) - (normal * 2.0 * (tmp . normal)) * length(vec) + + new Float:tmp1[3]; + xs_vec_normalize(vec, tmp1); + + // tmp1 - (normal * 2.0 * (tmp . normal)) * length(vec) + + new Float:tmp2[3]; + xs_vec_mul_scalar(normal, 2.0, tmp2); + xs_vec_mul_scalar(tmp2, xs_vec_dot(tmp1, normal), tmp2); + + // tmp1 - tmp2 * length(vec) + xs_vec_mul_scalar(tmp2, xs_vec_len(vec), tmp2); + + // tmp1 - tmp2 + xs_vec_sub(tmp1, tmp2, out); +} + +/** + * Turns a 3D vector into a 2D vector. + * + * @note This function just ignores the Z (3rd) component of a 3D vector. + * + * @param vec A 3D vector to turn into a 2D vector. + * @param out The output 2D vector. + * + * @noreturn + */ +stock xs_vec_make2d(const Float:vec[3], Float:out[2]) +{ + out[0] = vec[0]; + out[1] = vec[1]; +} + +// *** planes + +// normal +#define XS_PLANE_A 0 +#define XS_PLANE_B 1 +#define XS_PLANE_C 2 +// plane shift distance +#define XS_PLANE_D 3 + + +/** + * Sets a plane to the specified values. + * + * @param plane The plane to set the values to. It's a 4D vector. + * @param a The first component of a plane to be set. + * @param b The second component of a plane to be set. + * @param c The third component of a plane to be set. + * @param d The fouth component of a plane to be set. + * + * @noreturn + */ +stock xs_plane_set(Float:plane[], Float:a, Float:b, Float:c, Float:d) +{ + plane[XS_PLANE_A] = a; + plane[XS_PLANE_B] = b; + plane[XS_PLANE_C] = c; + plane[XS_PLANE_D] = d; +} + +/** + * Constructs a plane out of 4 points in space. + * + * @param plane The output plane to store the newly created plane. + * @param p1 The first point of a plane. + * @param p2 The second point of a plane. + * @param p3 The third point of a plane. + * + * @noreturn + */ +stock xs_plane_3p(Float:plane[], const Float:p1[], const Float:p2[], const Float:p3[]) +{ + new Float:normalA[3], Float:normalB[3]; + + // normalA = Normalize(p3 - p1); + normalA[0] = p3[0] - p1[0]; + normalA[1] = p3[1] - p1[1]; + normalA[2] = p3[2] - p1[2]; + xs_vec_normalize(normalA, normalA); + + // normalB = Normalize(p3 - p2); + normalB[0] = p3[0] - p2[0]; + normalB[1] = p3[1] - p2[1]; + normalB[2] = p3[2] - p2[2]; + xs_vec_normalize(normalB, normalB); + + // plane normal = Normalize(normalA cross normalB) + xs_vec_cross(normalA, normalB, plane); + xs_vec_normalize(plane, plane); + + // plane shift distance = (-p1) dot plane normal + new Float:__tmp[3]; + xs_vec_neg(plane, __tmp); + plane[XS_PLANE_D] = xs_vec_dot(__tmp, p1); + +} + +/** + * Checks if two planes are equal. + * + * @note If you have to check if two planes are just nearly equal, + * take a look at xs_plane_nearlyequal(). + * + * @param plane1 The first plane to check. + * @param plane2 The second plane to check. + * + * @return 1 if planes are equal, 0 otherwise. + */ +stock bool:xs_plane_equal(const Float:plane1[], const Float:plane2[]) +{ + if ( (plane1[0] == plane2[0]) && + (plane1[1] == plane2[1]) && + (plane1[2] == plane2[2]) && + (plane1[3] == plane2[3])) + return true; + return false; +} + +/** + * Checks if two planes are nearly equal. + * + * @note If you have to check if two planes are exactly equal, + * take a look at xs_plane_equal(). + * + * @param plane1 The first plane to check. + * @param plane2 The second plane to check. + * + * @return 1 if planes are nearly equal, 0 otherwise. + */ + +stock bool:xs_plane_nearlyequal(const Float:plane1[], const Float:plane2[]) +{ + if(XS_FLEQ(plane1[0], plane2[0]) && XS_FLEQ(plane1[1], plane2[1]) && + XS_FLEQ(plane1[2], plane2[2]) && + XS_FLEQ(plane1[3], plane2[3])) + return true; + return false; +} + +/** + * Computes the distance between a plane and a point. + * + * @param plane The plane to check the distance from. + * @param point The point to check the distance to. + * + * @return The distance between the input plane and point. + */ +stock Float:xs_plane_dst2point(const Float:plane[], const Float:point[]) +{ + // return normal dot point + D + return xs_vec_dot(plane, point) + plane[XS_PLANE_D]; +} + +/** + * Checks whether a plane intersects with the ray starting at @rayStart and + * going to @rayDir direction. + * If it does intersect, outputs the intersection point in @out. + * + * @param plane The plane to check intersection with. + * @param rayStart The starting point of the ray. + * @param rayDir Direction in which the ray is going. + * @param out The vector to copy the intersection point to, if it exists. + * + * @return true if they intersect, false otherwise. + */ +stock bool:xs_plane_rayintersect(const Float:plane[], const Float:rayStart[], const Float:rayDir[], Float:out[]) +{ + new Float:a = xs_vec_dot(plane, rayDir); + + if (a == 0.0) + return false; // ray is parallel to plane + + // if (distance plane<->(rayStart + rayDir) > distance plane<->rayStart) and both have the same sign, the ray + // goes away from the plane + new Float:rsplusrd[3]; + xs_vec_add(rayStart, rayDir, rsplusrd); + new Float:dst1 = xs_plane_dst2point(plane, rsplusrd); + new Float:dst2 = xs_plane_dst2point(plane, rayStart); + if (xs_fabs(dst1) > xs_fabs(dst2) && xs_fsign(dst1) == xs_fsign(dst2)) + return false; + + + // out = rayStart - rayDir * ((distance plane<->rayStart) / a) + new Float:__tmp[3]; + xs_vec_mul_scalar(rayDir, xs_plane_dst2point(plane, rayStart) / a, __tmp); + // out = rayStart - tmp + xs_vec_sub(rayStart, __tmp, out); + + return true; +} + +/** + * Checks if a point is on a specified plane. + * + * @param plane The plane to check. + * @param point The point to check. + * + * @return true if the point is on the plane, false otherwise. + */ +stock bool:xs_point_onplane(const Float:plane[], const Float:point[]) +{ + return XS_FLEQ(xs_plane_dst2point(plane, point), 0.0); +} + +/** + * Projects a point on the plane. Stores the projected point in @out. + * + * @param plane The plane to project the point onto. + * @param point The point to project onto the plane. + * @param out The vector to copy the projected point into. + * + * @noreturn + */ +stock xs_projpoint_onplane(const Float:plane[], const Float:point[], Float:out[]) +{ + new Float:__tmp[3]; + // out = point - (plane normal * distance point<->plane) + xs_vec_copy(plane, __tmp); + xs_vec_mul_scalar(__tmp, xs_plane_dst2point(plane, point), __tmp); + xs_vec_sub(point, __tmp, out); +} + +/** + * Copies a plane. + * + * @param planeIn The plane to copy. + * @param planeOut The plane to store the copy into. + * + * @noreturn + */ +stock xs_plane_copy(const Float:planeIn[], Float:planeOut[]) +{ + planeOut[0] = planeIn[0]; + planeOut[1] = planeIn[1]; + planeOut[2] = planeIn[2]; + planeOut[3] = planeIn[3]; +} + +/****** HL ENGINE SPECIFIC STUFF ******/ + +// angle indexes +#define XS_PITCH 0 // up / down +#define XS_YAW 1 // left / right +#define XS_ROLL 2 // fall over + +/** + * Computes forward, right and up vectors from given angles. + * + * @param angles Angles to compute vectors from. + * @param fwd The vector to store the forward vector into. + * @param right The vector to store the right vector into. + * @param up The vector to store the up vector into. + * + * @noreturn + */ +stock xs_anglevectors(const Float:angles[3], Float:fwd[3], Float:right[3], Float:up[3]) +{ + // sin (s) and cos (c) for yaw (y), pitch (p) and roll (r) + new Float:sr, Float:sp, Float:sy, Float:cr, Float:cp, Float:cy; + + sy = xs_sin(angles[XS_YAW], degrees); + cy = xs_cos(angles[XS_YAW], degrees); + sp = xs_sin(angles[XS_PITCH], degrees); + cp = xs_cos(angles[XS_PITCH], degrees); + sr = xs_sin(angles[XS_ROLL], degrees); + cr = xs_cos(angles[XS_ROLL], degrees); + + fwd[0] = cp*cy; + fwd[1] = cp*sy; + fwd[2] = -sp; + + right[0] = (-1*sr*sp*cy + -1*cr*-sy); + right[1] = (-1*sr*sp*sy + -1*cr*cy); + right[2] = -1*sr*cp; + + up[0] = (cr*sp*cy + -sr*-sy); + up[1] = (cr*sp*sy + -sr*cy); + up[2] = cr*cp; +} +/****** STRING FUNCS *******/ + +/** + * Finds a character in a string and returns its position in the string. + * + * @param str The string to search in. + * @param chr The character to search for in the string. + * + * @return The character position if found, -1 otherwise. + */ +stock xs_strchr(const str[], chr) +{ + for (new i = 0; str[i] != 0; ++i) + { + if (str[i] == chr) + return i; + } + return -1; +} + +/** + * Remove @charstotrim number of characters from @stringtotrim, + * either from the beginning or the end of the string. + * + * @param stringtotrim The string to be trimmed. + * @param charstostrim The number of characters to trim. + * @param fromleft If set to true, the string will be trimmer from the left. + * If false, it will be trimmed from the right. + * + * @noreturn + */ +stock xs_strtrim(stringtotrim[], charstotrim, bool:fromleft = true) +{ + if (charstotrim <= 0) + return; + + if (fromleft) + { + new maxlen = strlen(stringtotrim); + if (charstotrim > maxlen) + charstotrim = maxlen; + + // In format, input and output regions can overlap + format(stringtotrim, maxlen, "%s", stringtotrim[charstotrim]); + } + else + { + new maxlen = strlen(stringtotrim) - charstotrim; + if (maxlen < 0) + maxlen = 0; + + // In format, input and output regions can overlap + format(stringtotrim, maxlen, "%s", stringtotrim); + } +} + +/** + * Copies characters from @oldmsg to @newmsg, starting at @start and ending + * at @end (includes the end character). + * + * @param oldmsg The string to copy from. + * @param newmsg The string to copy to. + * @param start Starting position of the @oldmsg string to copy from. + * @param end Ending position of the @oldmsg string to copy from. + * @param outlen If positive, specifies the maximum number of characters + * to be copied. Otherwise, the function assumes that + * newmsg is at least @end - @start + 1 characters long. + * + * @noreturn + */ +stock xs_strmid(const oldmsg[], newmsg[], start, end, outlen=-1) +{ + new len = strlen(oldmsg); + + if(start < 0) + start = 0; + + ++end; // Include end + + if(end <= start || end > len) + end = len; + + new j = 0, i = start; + for(; (i < end) && (outlen--);) + newmsg[j++] = oldmsg[i++]; + + newmsg[j] = 0; +} + +/** + * "Explodes" a string, breaking it at the @delimeter character and putting + * each exploded part into the @output array. + * + * @param input The input string to be exploded. + * @param output The output array of string where exploded string will be stored. + * @param delimeter The character to break the string at. + * @param maxelems Maximum amount of elements in @output. + * @param elemsize Maximum size of each string in the @output array. + * + * @return The number of strings successfully exploded. + */ +stock xs_explode(const input[], output[][], delimiter, maxelems, elemsize) +{ + new nIdx = 0; + new nLen = 0; + + new copied = 0; + while(nLen < strlen(input) && nIdx < maxelems) + { + copied = copyc(output[nIdx++], elemsize, input[nLen], delimiter); + if (copied == elemsize) + { + // maybe it got force-stopped because of maxsize + // so check whether we have to skip something + if (input[nLen + copied] != delimiter && input[nLen + copied] != 0) + { + new found = xs_strchr(input[nLen + copied], delimiter); + if (found == -1) + break; + copied += found; + } + } + + nLen += copied + 1; // +1: skip delimiter + } + return nIdx; +} + +/** + * The opposite of xs_explode(). Takes an array of strings and puts them together + * in a single string, delimeted by the @delimeter character. + * + * @param output The string to store the impoded string into. + * @param outsize The size of the output buffer. + * @param delimeter The character to put between imploded strings. + * @param input The array of strings to implode. + * @param elemsnum The number of strings in the input array. + * + * @return The number of characters in the final output buffer. + */ +stock xs_implode(output[], outsize, delimiter, const input[][], elemsnum) +{ + new pos = 0; + new copied; + for (new i = 0; i < elemsnum; ++i) + { + copied = copy(output[pos], outsize - pos, input[i]); + pos += copied; + if (pos >= outsize) + return outsize; + // append delimiter + output[pos] = delimiter; + ++pos; + // last check + if (pos >= outsize) + return outsize; + } + + output[--pos] = 0; // The last char would be delimiter, so skip it. + return pos; +} + + +stock xs__replace_buf[XS_REPLACEBUF_SIZE]; + +/** + * Replaces all occurencies of @what in @text with @with. + * + * @param text The text to search in. + * @param len The maximum size of the @text buffer. + * @param what What to search for. + * @param with What to replace occurencies with. + * + * @return Returns the number of replaced items. + */ +stock xs_replace(text[], len, const what[], const with[]) +{ + new occur = 0; + new i = 0; + new bufPos = 0; + new replaceLen = strlen(with); + new whatLen = strlen(what); + for (; text[i]; ++i) + { + if (text[i] == what[0]) + { + new posInWhat=0; + new j; + for (j = i; j-i < replaceLen && text[j]; ++j, ++posInWhat) + { + if (text[j] != what[posInWhat]) + break; + } + if (whatLen == posInWhat) + { + for (new i2 = 0; i2 < replaceLen && bufPos < XS_REPLACEBUF_SIZE; ++i2) + xs__replace_buf[bufPos++] = with[i2]; + i = j - 1; + ++occur; + if (bufPos >= XS_REPLACEBUF_SIZE) + return occur; + continue; + } + } + if (bufPos >= XS_REPLACEBUF_SIZE) + return occur; + xs__replace_buf[bufPos++] = text[i]; + } + xs__replace_buf[bufPos] = 0; + copy(text, len, xs__replace_buf); + return occur; +} + +/** + * Replaces all occurencies of @what character in @text with @with character. + * + * @param text The text to search in. + * @param len The maximum size of the @text buffer. + * @param what What character to search for. + * @param with What charactear to replace occurencies with. + * + * @return The number of replaced characters. + */ +stock xs_replace_char(text[], len, what, with) +{ + // let the xs_replace function do the work + new arr[4]; + arr[0] = what; + arr[1] = 0; + arr[2] = with; + arr[3] = 0; + + return xs_replace(text, len, arr[0], arr[2]); +} + +/****** MISC FUNCS *******/ + +/** + * Retrieves the name of a command identified by its ID. + * + * @param cid The command ID. + * @param namestr The buffer where to store command's name. + * @param namelen The maximum size of the output buffer. + * + * @noreturn + */ +stock xs_concmd_name(cid, namestr[], namelen) +{ + new dummy1; + new dummy2[1]; + get_concmd(cid, namestr, namelen, dummy1, dummy2, 0, 0); +} + +/** + * Checks whether there are at least @num free visible slots. + * + * @param num The number of slots to check. + * + * @return true if there are at least that many free, false otherwise. + */ +stock bool:xs_freevisibleslots(num) +{ + new maxplayers = get_cvar_num("sv_visiblemaxplayers"); + if (maxplayers <= 0) + maxplayers = MaxClients; + + return (get_playersnum(1) <= maxplayers-num) ? true : false; +} + +stock xs__maxnum = 0; + +/** + * Returns the biggest possible positive number. + * + * @return The biggest possible positive number. + */ +stock xs_get_maxnum() +{ + if (!xs__maxnum) + { + // build it + xs__maxnum = ((1 << (cellbits - 2)) - 1 ) | (1 << (cellbits - 2)); + /* + new bits = get_cellsize() * 8 - 1; + for (new i = 0; i < bits; ++i) + xs__maxnum |= 1 << i; + */ + } + return xs__maxnum; +} + +/** + * Returns the smallest possible negative number. + * + * @return The smallest possible negative number. + */ +stock xs_get_minnum() +{ + return xs_get_maxnum() + 1; +} + + +// *** The following two functions were created by Damaged Soul. + +// Max messages reserved by engine (DO NOT MODIFY) +#define XS__MAX_ENGINE_MESSAGES 63 +// Max possible messages for mod, is 255 really the limit? +#define XS__MAX_POSSIBLE_MESSAGES 255 + +// Returns max number of messages for mod +stock xs_get_maxmessages() +{ + new name[2]; + + for (new i = XS__MAX_ENGINE_MESSAGES + 1; i <= XS__MAX_POSSIBLE_MESSAGES; i++) + if (!get_user_msgname(i, name, 1)) + return i - 1; + + return XS__MAX_POSSIBLE_MESSAGES; +} + +// Returns true if msgid is a valid message +stock bool:xs_is_msg_valid(msgid) +{ + new name[2]; + new retval = get_user_msgname(msgid, name, 1); + + if (msgid < 1 || (msgid > XS__MAX_ENGINE_MESSAGES && !retval)) + return false; + + return true; +} + +/****** MANAGED TASKS ******/ + +// ***** managed task ids +stock xs_find_freetaskid() +{ + for (new i = 1; i <= XS_TASK_MANAGEDIDS; ++i) + { + if (!task_exists(i)) + return i; + } + return -1; +} + +// ***** managed tasks +enum xs_paramtypes +{ + xs_invalid = 0, + xs_int, + xs_float, + xs_string +} + +// new task +stock xs__TaskParam[ 1 + // number of parameters + XS_TASK_MAXPARAMS + // parameter types + (XS_TASK_MAXPARAMSIZE char) * XS_TASK_MAXPARAMS]; // space for len + value + +stock Float:xs__TaskInterval = 0.0; +stock xs__TaskFlags[5]; +stock xs__TaskFunc[48]; +stock xs__TaskId; +stock xs__TaskRepeat; + +#define xs__TaskParamCount xs__TaskParam[0] +#define xs__TaskParamType[%1] xs__TaskParam[1 + %1] + +#define xs__TaskParamValue[%1] xs__TaskParam[1 + XS_TASK_MAXPARAMS + (%1 * (XS_TASK_MAXPARAMSIZE char))] + + +// incoming task +stock xs__ITaskParam[ 1 + // number of parameters + XS_TASK_MAXPARAMS + // parameter types + (XS_TASK_MAXPARAMSIZE char) * XS_TASK_MAXPARAMS]; // space for len + value +stock xs__ITaskId; + +#define xs__ITaskParamCount xs__ITaskParam[0] +#define xs__ITaskParamType[%1] xs__ITaskParam[1 + %1] + +#define xs__ITaskParamValue[%1] xs__ITaskParam[1 + XS_TASK_MAXPARAMS + (%1 * (XS_TASK_MAXPARAMSIZE char))] + +// tested +stock xs_task_begin(Float:interval, const func[], id = 0, const flags[] = "", repeat = 0) +{ + xs_assert(xs__TaskInterval == 0.0, "New xs_task_begin called before xs_task_end"); + + xs__TaskInterval = interval; + if (xs__TaskInterval < 0.1) + xs__TaskInterval = 0.1; + + copy(xs__TaskFunc, 47, func); + xs__TaskId = id; + copy(xs__TaskFlags, 4, flags); + xs__TaskRepeat = repeat; + + xs__TaskParamCount = 0; +} + +// tested +stock xs_task_pushint(value, bool:__isfl=false /*internal use only*/) +{ + xs_assert(xs__TaskInterval, "xs_task_push* called without xs_task_begin"); + if (xs__TaskParamCount >= XS_TASK_MAXPARAMS) + return 0; + + xs__TaskParamType[xs__TaskParamCount] = __isfl ? xs_float : xs_int; + xs__TaskParamValue[xs__TaskParamCount] = value; + + ++xs__TaskParamCount; + return 1; +} + +// tested +stock xs_task_pushfl(Float:value) +{ + return xs_task_pushint(_:value, true); +} + +// tested +stock xs_task_pushstr(const value[]) +{ + xs_assert(xs__TaskInterval, "xs_task_push* called without xs_task_begin"); + if (xs__TaskParamCount >= XS_TASK_MAXPARAMS) + return 0; + + xs__TaskParamType[xs__TaskParamCount] = xs_string; + strpack(xs__TaskParamValue[xs__TaskParamCount], value); + ++xs__TaskParamCount; + return 1; +} + +// tested +stock xs_task_end() +{ + xs_assert(xs__TaskInterval, "xs_task_end called without xs_task_begin"); + + // find a task id if needed + if (xs__TaskId == -1) + { + xs__TaskId = xs_find_freetaskid(); + if (xs__TaskId == -1) + { + // not found + xs__TaskInterval = 0.0; + return -1; + } + } + + set_task(xs__TaskInterval, xs__TaskFunc, xs__TaskId, xs__TaskParam, + 1 + xs__TaskParamCount * (XS_TASK_MAXPARAMSIZE char), xs__TaskFlags, xs__TaskRepeat); + + xs__TaskInterval = 0.0; + + return xs__TaskId; +} + + +// tested +#define XS_MAKE_TASKFUNC(%1) public %1(const _xs__taskparam[], _xs__taskid) if(xs__task_setup(_xs__taskparam, _xs__taskid)) + +// tested +stock xs__task_setup(const param[], taskid) +{ + xs__ITaskId = taskid; + new len = 1 + param[0] * (XS_TASK_MAXPARAMSIZE char); + for (new i = 0; i < len; ++i) + xs__ITaskParam[i] = param[i]; + return 1; +} + +// tested +stock xs_task_readid() +{ + return xs__ITaskId; +} + +// tested +stock xs_task_paramcount() +{ + return xs__ITaskParamCount; +} + +// tested +stock xs_paramtypes:xs_task_paramtype(paramid) +{ + if (paramid < 0 || paramid >= xs__ITaskParamCount) + return xs_invalid; + + return xs_paramtypes:xs__ITaskParamType[paramid]; +} + +// tested +stock xs_task_paramint(paramid) +{ + if (paramid < 0 || paramid >= xs__ITaskParamCount) + return 0; + if (xs__ITaskParamType[paramid] != _:xs_int) + return 0; + + return xs__ITaskParamValue[paramid]; +} + +// tested +stock Float:xs_task_paramfl(paramid) +{ + if (paramid < 0 || paramid >= xs__ITaskParamCount) + return 0.0; + if (xs__ITaskParamType[paramid] != _:xs_float) + return 0.0; + + return Float:xs__ITaskParamValue[paramid]; +} + +// tested +stock xs_task_paramstr(paramid, out[], maxlen) +{ + #pragma unused maxlen + + if (paramid < 0 || paramid >= xs__ITaskParamCount) + return 0; + if (xs__ITaskParamType[paramid] != _:xs_string) + return 0; + + strunpack(out, xs__ITaskParamValue[paramid]); + return 1; +} diff --git a/bin/amxxdump/includes/amxmodx/zombieplague43.inc b/bin/amxxdump/includes/amxmodx/zombieplague43.inc new file mode 100644 index 0000000..2809ec3 --- /dev/null +++ b/bin/amxxdump/includes/amxmodx/zombieplague43.inc @@ -0,0 +1,505 @@ +/*================================================================================ + + --------------------------------------- + -*- Zombie Plague 4.3 Includes File -*- + --------------------------------------- + + ~~~~~~~~~~ + - How To - + ~~~~~~~~~~ + + To make use of the Zombie Plague API features in your plugin, just + add the following line at the beginning of your script: + + #include + + ~~~~~~~~~~~ + - Natives - + ~~~~~~~~~~~ + + These work just like any other functions: you may have to pass + parameters and they usually return values. + + Example: + + if ( is_user_alive( id ) && zp_get_user_zombie( id ) ) + { + server_print( "Player %d is alive and a zombie", id ) + } + + ~~~~~~~~~~~~ + - Forwards - + ~~~~~~~~~~~~ + + Forwards get called whenever an event happens during the game. + You need to make a public callback somewhere on your script, + and it will automatically be triggered when the event occurs. + + Example: + + public zp_user_infected_post( id, infector, nemesis ) + { + if ( !infector || nemesis ) + return; + + server_print( "Player %d just got infected by %d!", id, infector ) + } + + Also, take note of cases when there's a suffix: + + * _pre : means the forward will be called BEFORE the event happens + * _post : means it will be called AFTER the event takes place + +=================================================================================*/ + +#if defined _zombieplague_included + #endinput +#endif +#define _zombieplague_included + +/* Teams for zp_register_extra_item() */ +#define ZP_TEAM_ZOMBIE (1<<0) +#define ZP_TEAM_HUMAN (1<<1) +#define ZP_TEAM_NEMESIS (1<<2) +#define ZP_TEAM_SURVIVOR (1<<3) + +/* Game modes for zp_round_started() */ +enum +{ + MODE_INFECTION = 1, + MODE_NEMESIS, + MODE_SURVIVOR, + MODE_SWARM, + MODE_MULTI, + MODE_PLAGUE +} + +/* Winner teams for zp_round_ended() */ +enum +{ + WIN_NO_ONE = 0, + WIN_ZOMBIES, + WIN_HUMANS +} + +/* Custom forward return values */ +#define ZP_PLUGIN_HANDLED 97 + +/** + * Returns whether a player is a zombie. + * + * @param id Player index. + * @return True if it is, false otherwise. + */ +native zp_get_user_zombie(id) + +/** + * Returns whether a player is a nemesis. + * + * @param id Player index. + * @return True if it is, false otherwise. + */ +native zp_get_user_nemesis(id) + +/** + * Returns whether a player is a survivor. + * + * @param id Player index. + * @return True if it is, false otherwise. + */ +native zp_get_user_survivor(id) + +/** + * Returns whether a player is the first zombie. + * + * @param id Player index. + * @return True if it is, false otherwise. + */ +native zp_get_user_first_zombie(id) + +/** + * Returns whether a player is the last zombie. + * + * @param id Player index. + * @return True if it is, false otherwise. + */ +native zp_get_user_last_zombie(id) + +/** + * Returns whether a player is the last human. + * + * @param id Player index. + * @return True if it is, false otherwise. + */ +native zp_get_user_last_human(id) + +/** + * Returns a player's current zombie class ID. + * + * @param id Player index. + * @return Internal zombie class ID, or -1 if not yet chosen. + */ +native zp_get_user_zombie_class(id) + +/** + * Returns a player's next zombie class ID (for the next infection). + * + * @param id Player index. + * @return Internal zombie class ID, or -1 if not yet chosen. + */ +native zp_get_user_next_class(id) + +/** + * Sets a player's next zombie class ID (for the next infection). + * + * @param id Player index. + * @param classid A valid zombie class ID. + * @return True on success, false otherwise. + */ +native zp_set_user_zombie_class(id, classid) + +/** + * Returns a player's ammo pack count. + * + * @param id Player index. + * @return Number of ammo packs owned. + */ +native zp_get_user_ammo_packs(id) + +/** + * Sets a player's ammo pack count. + * + * @param id Player index. + * @param amount New quantity of ammo packs owned. + */ +native zp_set_user_ammo_packs(id, amount) + +/** + * Returns the default maximum health of a zombie. + * + * Note: Takes into account first zombie's HP multiplier. + * + * @param id Player index. + * @return Maximum amount of health points, or -1 if not a normal zombie. + */ +native zp_get_zombie_maxhealth(id) + +/** + * Returns a player's custom flashlight batteries charge. + * + * @param id Player index. + * @return Charge percent (0 to 100). + */ +native zp_get_user_batteries(id) + +/** + * Sets a player's custom flashlight batteries charge. + * + * @param id Player index. + * @param value New charge percent (0 to 100). + */ +native zp_set_user_batteries(id, charge) + +/** + * Returns whether a player has night vision. + * + * @param id Player index. + * @return True if it has, false otherwise. + */ +native zp_get_user_nightvision(id) + +/** + * Sets whether a player has night vision. + * + * @param id Player index. + * @param set True to give, false for removing it. + */ +native zp_set_user_nightvision(id, set) + +/** + * Forces a player to become a zombie. + * + * Note: Unavailable for last human/survivor. + * + * @param id Player index to be infected. + * @param infector Player index who infected him (optional). + * @param silent If set, there will be no HUD messages or infection sounds. + * @param rewards Whether to show DeathMsg and reward frags, hp, and ammo packs to infector. + * @return True on success, false otherwise. + */ +native zp_infect_user(id, infector = 0, silent = 0, rewards = 0) + +/** + * Forces a player to become a human. + * + * Note: Unavailable for last zombie/nemesis. + * + * @param id Player index to be cured. + * @param silent If set, there will be no HUD messages or antidote sounds. + * @return True on success, false otherwise. + */ +native zp_disinfect_user(id, silent = 0) + +/** + * Forces a player to become a nemesis. + * + * Note: Unavailable for last human/survivor. + * + * @param id Player index to turn into nemesis. + * @return True on success, false otherwise. + */ +native zp_make_user_nemesis(id) + +/** + * Forces a player to become a survivor. + * + * Note: Unavailable for last zombie/nemesis. + * + * @param id Player index to turn into survivor. + * @return True on success, false otherwise. + */ +native zp_make_user_survivor(id) + +/** + * Respawns a player into a specific team. + * + * @param id Player index to be respawned. + * @param team Team to respawn the player into (ZP_TEAM_ZOMBIE or ZP_TEAM_HUMAN). + * @return True on success, false otherwise. + */ +native zp_respawn_user(id, team) + +/** + * Forces a player to buy an extra item. + * + * @param id Player index. + * @param itemid A valid extra item ID. + * @param ignorecost If set, item's cost won't be deduced from player. + * @return True on success, false otherwise. + */ +native zp_force_buy_extra_item(id, itemid, ignorecost = 0) + +/** + * Overrides ZP player model with a different custom model. + * + * Note: This will last until player's next infection/humanization/respawn. + * + * Note: Don't call more often than absolutely needed. + * + * @param id Player index. + * @param newmodel Model name. + * @param modelindex Modelindex (optional). + */ +native zp_override_user_model(id, const newmodel[], modelindex = 0) + +/** + * Returns whether the ZP round has started, i.e. first zombie + * has been chosen or a game mode has begun. + * + * @return 0 - Round not started + * 1 - Round started + * 2 - Round starting + */ +native zp_has_round_started() + +/** + * Returns whether the current round is a nemesis round. + * + * @return True if it is, false otherwise. + */ +native zp_is_nemesis_round() + +/** + * Returns whether the current round is a survivor round. + * + * @return True if it is, false otherwise. + */ +native zp_is_survivor_round() + +/** + * Returns whether the current round is a swarm round. + * + * @return True if it is, false otherwise. + */ +native zp_is_swarm_round() + +/** + * Returns whether the current round is a plague round. + * + * @return True if it is, false otherwise. + */ +native zp_is_plague_round() + +/** + * Returns number of alive zombies. + * + * @return Zombie count. + */ +native zp_get_zombie_count() + +/** + * Returns number of alive humans. + * + * @return Human count. + */ +native zp_get_human_count() + +/** + * Returns number of alive nemesis. + * + * @return Nemesis count. + */ +native zp_get_nemesis_count() + +/** + * Returns number of alive survivors. + * + * @return Survivor count. + */ +native zp_get_survivor_count() + +/** + * Registers a custom item which will be added to the extra items menu of ZP. + * + * Note: The returned extra item ID can be later used to catch item + * purchase events for the zp_extra_item_selected() forward. + * + * Note: ZP_TEAM_NEMESIS and ZP_TEAM_SURVIVOR can be used to make + * an item available to Nemesis and Survivors respectively. + * + * @param name Caption to display on the menu. + * @param cost Ammo packs to be deducted on purchase. + * @param teams Bitsum of teams it should be available for. + * @return An internal extra item ID, or -1 on failure. + */ +native zp_register_extra_item(const name[], cost, teams) + +/** + * Registers a custom class which will be added to the zombie classes menu of ZP. + * + * Note: The returned zombie class ID can be later used to identify + * the class when calling the zp_get_user_zombie_class() natives. + * + * @param name Caption to display on the menu. + * @param info Brief description of the class. + * @param model Player model to be used. + * @param clawmodel Claws model to be used. + * @param hp Initial health points. + * @param speed Maximum speed. + * @param gravity Gravity multiplier. + * @param knockback Knockback multiplier. + * @return An internal zombie class ID, or -1 on failure. + */ +native zp_register_zombie_class(const name[], const info[], const model[], const clawmodel[], hp, speed, Float:gravity, Float:knockback) + +/** + * Returns an extra item's ID. + * + * @param name Item name to look for. + * @return Internal extra item ID, or -1 if not found. + */ +native zp_get_extra_item_id(const name[]) + +/** + * Returns a zombie class' ID. + * + * @param name Class name to look for. + * @return Internal zombie class ID, or -1 if not found. + */ +native zp_get_zombie_class_id(const name[]) + +/** + * Returns a zombie class' description (passed by reference). + * + * @param classid Internal zombie class ID. + * @param info The buffer to store the string in. + * @param len Character size of the output buffer. + * @return True on success, false otherwise. + */ +native zp_get_zombie_class_info(classid, info[], len) + +/** + * Called when the ZP round starts, i.e. first zombie + * is chosen or a game mode begins. + * + * @param gamemode Mode which has started. + * @param id Affected player's index (if applicable). + */ +forward zp_round_started(gamemode, id) + +/** + * Called when the round ends. + * + * @param winteam Team which has won the round. + */ +forward zp_round_ended(winteam) + +/** + * Called when a player gets infected. + * + * @param id Player index who was infected. + * @param infector Player index who infected him (if applicable). + * @param nemesis Whether the player was turned into a nemesis. + */ +forward zp_user_infected_pre(id, infector, nemesis) +forward zp_user_infected_post(id, infector, nemesis) + +/** + * Called when a player turns back to human. + * + * @param id Player index who was cured. + * @param survivor Whether the player was turned into a survivor. + */ +forward zp_user_humanized_pre(id, survivor) +forward zp_user_humanized_post(id, survivor) + +/** + * Called on a player infect/cure attempt. You can use this to block + * an infection/humanization by returning ZP_PLUGIN_HANDLED in your plugin. + * + * Note: Right now this is only available after the ZP round starts, since some + * situations (like blocking a first zombie's infection) are not yet handled. + */ +forward zp_user_infect_attempt(id, infector, nemesis) +forward zp_user_humanize_attempt(id, survivor) + +/** + * Called when a player buys an extra item from the ZP menu. + * + * Note: You can now return ZP_PLUGIN_HANDLED in your plugin to block + * the purchase and the player will be automatically refunded. + * + * @param id Player index of purchaser. + * @param itemid Internal extra item ID. + */ +forward zp_extra_item_selected(id, itemid) + +/** + * Called when a player gets unfrozen (frostnades). + * + * @param id Player index. + */ +forward zp_user_unfrozen(id) + +/** + * Called when a player becomes the last zombie. + * + * Note: This is called for the first zombie too. + * + * @param id Player index. + */ +forward zp_user_last_zombie(id) + +/** + * Called when a player becomes the last human. + * + * @param id Player index. + */ +forward zp_user_last_human(id) + + +/** + * @deprecated - Do not use! + * For backwards compatibility only. + */ +#define ZP_TEAM_ANY 0 diff --git a/bin/compiler/amxxpc.exe b/bin/compiler/amxxpc.exe new file mode 100644 index 0000000000000000000000000000000000000000..bf0825dad24f224bd3738f15b24b3f3fd91cfa02 GIT binary patch literal 171008 zcmeEvdwf*Ywf~u!lVk`3XV4%4qQn|4c2Wxt)`S7ggPBAmAsCoIAwesqF`}g~13{CJ za59jS%|UFn)n4tD+TLqhdrNPT1hqOtC=t=Ir-gd+oK?UVH7e_bK?+7QrG2f`}&)5rh`J=`V}_Ui!yw5`@u{UK%ZI zAMwVuEv7kdTsyzw{#B_fR(|(8EAM$Q_1=3Pdg!~p)NkLHy3+qp>irL;&YD}C`rvn$ z-FMTdQHg0r(Qj9c{{5EmcYhjv(gKft`eXRh0zddPnZLjPX(Qgh%DeZo2L8V9vmN}s z?6dWFC*&>r?1y+ibfWA2-L_f`4e`}j>HBDkon2Hep^se*9#O)Hn(;c( zQ%xNVl~G&aK;IN%%0vTYWRU9PqcJnXY7^R4{~ zoDqLg*fWQ!^+x{03heT3t72lFIZMk*TT!0ebNAMt)#V7zKPc`2G}f!QpJ!7P|Ie5w z-Qk%my;hj`RNraV<_szY&noU00(+&+uc5Hw5^0hkH5VpIue~e%=8&aqvgLhtW#E9+ z@O{K?-Sk1Wpt!d^y9Mt?_x5u6v=!*c6)k(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HFsAMF({#RpQZtXPx)=s(iIar2ZCrBaoxT*&W%OlwxgDkc;h z%E4x_`H-*~@EWgVcl4F)`KmBgy01lwu63StF(heBbfh}T)Q^M4h2V^3EsO6+?6Ey@8|DY;C}(K CS2Z#K literal 0 HcmV?d00001 diff --git a/bin/compiler/amxxpc32.dll b/bin/compiler/amxxpc32.dll new file mode 100644 index 0000000000000000000000000000000000000000..7e29a32005ea44582822c58505c8ac2f6ecb5bae GIT binary patch literal 327680 zcmeFaeS8!}wm06BOu_&IJwU(&qC^D+gNg=}5F!CGAu8ZNWTHXeQ)I)st^(R8kd1vEvtuDav|0>0c55{r7(yHbv<C@)ccj_dR$221!g4&_=lcFE5-a z->viRLPnyI0$M4TQQBWo{P-_^yun6+RPhf4#Nq#@Xy1YF z>@J~ivnj^j!1m10(`!*IxK9nnx+;oz`gxnOy5m#3E7+uW^Dh$B(``y%yWM983yY&& zQ|M)N{SRjPZK6V^ue#w4yQ}#?ibuR>=2>|no+n@C5sxgiDGc^Dae<67o~Aa0-G@Bk z;M~qw3=eSv4_{H#?()@sZ+Df&bcYaVPhfj?pm4`$c9-J6gj2MsVooy}(H7Y52)1kI z`)7K^z$U`hfl4y!PEc{pSz8mEsih-B%98YrnK#>A#!n3?*q_uKPjc;)<&@?OIjMHakkp)$Yu`W=4NtW-HrU2d<8yauJ($X(N^lRy z@;Va^pRs_A`v1ce(Hh5u}uNHv9LEk^Y zT3&GtlFgTLv6=JU#(6V?P1+u>*a)l)#;C{>;-|RM#L7YA#2<^r3~oTVc!=`$rSX7q zVZ5UbR2pp5w<+OiHjw!zuXrP!$4qoETHh8*%B>D0tds^vxX8Ao8|B}r{}dZZu*B<6 zG4)o@-N%E-C8N>wAEwHt6Awkw4xooc_|mB2bS zlF$`VbXQ=z6SPc^r5!}QB?Vlf>LauERTR0JfJD-Az?IYj?e^G6;;cX+v6`}B5;}5y zG5)B<&4EJVM8&gVCPiK^BR%StG-6dqjNQM+V!ru^_J|+bV+p4dnthUfvxm_)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J{YJDB1LmUw|7-eHFZ%rLF>sRD^uA3v=I4{X5!yYRmkxZj9$ z(Tqgn(pi&b+@S}Z$S_`Dcz4*H0kccP>P%4VfZz(~ZGhYksO^E+f#!Nf!uSQ9shHDs zQrcy&;IY?rt=h$BU9G-WPe*8{Q(dtIx!yH3+j3hSsM=Zgw{*9lQ?Mz>6kG}_1(SkE z!K0v2uqa3r<}4@_32o*++fC#Vz53E~8Af;PdLAWd*4C~J`UY3sViB(kKk zLwl@iJJ)=C4IAI;`W`h8zrez8y2c63zlDA0;NAtY$DXdVB)Fv3Z7zPPc3*RCVcJt& z@rAR}HQ(y==!xv;r>?u`ty1}<=G4Nd1p*F7E zjr;EI+`W6m8UH|=x}xme@%9oWgZy8rlqqFPW+_j~(;)>|CXZD^lWCGh?BJcpnmrHT z&SRLf@Me?!QV1sO*CRXi#y(B4NgXz+&lYXTe%vyn_{f8k_@~T!^@Vlw&;S4ZBNg}) D=pO@( literal 0 HcmV?d00001 diff --git a/bin/compiler/include/amxconst.inc b/bin/compiler/include/amxconst.inc new file mode 100644 index 0000000..23fc592 --- /dev/null +++ b/bin/compiler/include/amxconst.inc @@ -0,0 +1,584 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +#if defined _amxconst_included + #endinput +#endif +#define _amxconst_included + +#include + +/** + * Internal AMXX buffer size for string retrieval. + * + * @note This is the buffer size AMX Mod X uses internally to retrieve strings + * from plugins. Most natives that take strings as arguments will + * implicitly truncate them to this maximum length. This has been raised + * to the current value with AMXX 1.8.3. Previously the limit was 3072. + * @note This is here mainly for documentation purposes. By default plugins + * don't have enough memory available to allocate an array of this size. + * You probably should not use this to actually declare a buffer unless + * you *absolutely* have to. Look at #pragma dynamic to increase a plugins + * available memory. + */ +#define MAX_STRING_LENGTH 16384 + +/** + * Defines and constants related to the maximum number of clients. + * + * @note MAX_PLAYERS is not the same as MaxClients. MAX_PLAYERS is a hardcoded + * value as an upper limit, used mainly to declare arrays big enough for + * all possible server situations. MaxClients changes based on the + * server the plugin is deployed on.. + */ +#define MAX_PLAYERS 32 /* Maximum number of players AMX Mod X supports */ + +/** + * Maximum number of players the server supports + */ +public stock const MaxClients; + +/** + * Pass this into certain functions to act as a C++ NULL + */ +public stock const NULL_STRING[1]; + +/** + * Pass this into certain functions to act as a C++ NULL + */ +public stock const Float:NULL_VECTOR[3]; + +/** + * The maximum buffer size required to store a client's name. + */ +#define MAX_NAME_LENGTH 32 + +/** + * The maximum buffer size required to store a client's IP address without a port. + */ +#define MAX_IP_LENGTH 16 + +/** + * The maximum buffer size required to store a client's IP address with a port. + */ +#define MAX_IP_WITH_PORT_LENGTH 22 + +/** + * The maximum buffer size required to store a client's AuthID. + */ +#define MAX_AUTHID_LENGTH 64 + +/** + * The maximum buffer size required to store a resource path. + */ +#define MAX_RESOURCE_PATH_LENGTH 64 + +/** + * The maximum buffer size that can be displayed in a MOTD. + */ +#define MAX_MOTD_LENGTH 1536 + +/** + * The maximum size accepted by the user info buffer. + */ +#define MAX_USER_INFO_LENGTH 256 + +/** + * The maximum buffer size that can be displayed in a menu. + */ +#define MAX_MENU_LENGTH 512 + +/** + * π + */ +#define M_PI 3.1415926535 + +/** + * @section Admin privilege and authentication constants + */ + +/** + * Admin level constants + */ +#define ADMIN_ALL 0 /* everyone */ +#define ADMIN_IMMUNITY (1<<0) /* flag "a" */ +#define ADMIN_RESERVATION (1<<1) /* flag "b" */ +#define ADMIN_KICK (1<<2) /* flag "c" */ +#define ADMIN_BAN (1<<3) /* flag "d" */ +#define ADMIN_SLAY (1<<4) /* flag "e" */ +#define ADMIN_MAP (1<<5) /* flag "f" */ +#define ADMIN_CVAR (1<<6) /* flag "g" */ +#define ADMIN_CFG (1<<7) /* flag "h" */ +#define ADMIN_CHAT (1<<8) /* flag "i" */ +#define ADMIN_VOTE (1<<9) /* flag "j" */ +#define ADMIN_PASSWORD (1<<10) /* flag "k" */ +#define ADMIN_RCON (1<<11) /* flag "l" */ +#define ADMIN_LEVEL_A (1<<12) /* flag "m" */ +#define ADMIN_LEVEL_B (1<<13) /* flag "n" */ +#define ADMIN_LEVEL_C (1<<14) /* flag "o" */ +#define ADMIN_LEVEL_D (1<<15) /* flag "p" */ +#define ADMIN_LEVEL_E (1<<16) /* flag "q" */ +#define ADMIN_LEVEL_F (1<<17) /* flag "r" */ +#define ADMIN_LEVEL_G (1<<18) /* flag "s" */ +#define ADMIN_LEVEL_H (1<<19) /* flag "t" */ +#define ADMIN_MENU (1<<20) /* flag "u" */ +#define ADMIN_BAN_TEMP (1<<21) /* flag "v" */ +#define ADMIN_ADMIN (1<<24) /* flag "y" */ +#define ADMIN_USER (1<<25) /* flag "z" */ + +/** + * Admin authentication behavior flags + */ +#define FLAG_KICK (1<<0) /* flag "a" */ +#define FLAG_TAG (1<<1) /* flag "b" */ +#define FLAG_AUTHID (1<<2) /* flag "c" */ +#define FLAG_IP (1<<3) /* flag "d" */ +#define FLAG_NOPASS (1<<4) /* flag "e" */ +#define FLAG_CASE_SENSITIVE (1<<10) /* flag "k" */ + +/** + * @endsection + */ + +/** + * Return codes + */ +#define PLUGIN_CONTINUE 0 /* Results returned by public functions */ +#define PLUGIN_HANDLED 1 /* stop other plugins */ +#define PLUGIN_HANDLED_MAIN 2 /* to use in client_command(), continue all plugins but stop the command */ + +/** + * HI weapon constants + */ +#define HIW_BERETTA 1 +#define HIW_SPAS12 2 +#define HIW_M4A1 3 +#define HIW_MP5A4 4 +#define HIW_MP5SD5 5 +#define HIW_AK47 6 +#define HIW_AKS74U 7 +#define HIW_GLOCK 8 +#define HIW_M11 9 +#define HIW_M11SD 10 +#define HIW_PSG1 11 +#define HIW_ZASTAVA 12 +#define HIW_M16A2 13 +#define HIW_REMINGTON 14 +#define HIW_NATOGREN 15 +#define HIW_TANGOGREN 16 +#define HIW_FLASHBANG 17 + +/** + * Parts of body for hits + */ +#define HIT_GENERIC 0 /* none */ +#define HIT_HEAD 1 +#define HIT_CHEST 2 +#define HIT_STOMACH 3 +#define HIT_LEFTARM 4 +#define HIT_RIGHTARM 5 +#define HIT_LEFTLEG 6 +#define HIT_RIGHTLEG 7 +#define HIT_SHIELD 8 // CS only +#define MAX_BODYHITS 8 + +/** + * @section emit_sound() constants + */ + +/** + * Channels + */ +#define CHAN_AUTO 0 +#define CHAN_WEAPON 1 +#define CHAN_VOICE 2 +#define CHAN_ITEM 3 +#define CHAN_BODY 4 +#define CHAN_STREAM 5 /* allocate stream channel from the static or dynamic area */ +#define CHAN_STATIC 6 /* allocate channel from the static area */ +#define CHAN_NETWORKVOICE_BASE 7 /* voice data coming across the network */ +#define CHAN_NETWORKVOICE_END 500 /* network voice data reserves slots (CHAN_NETWORKVOICE_BASE through CHAN_NETWORKVOICE_END). */ + +/** + *Attenuation values + */ +#define ATTN_NONE 0.00 +#define ATTN_NORM 0.80 +#define ATTN_IDLE 2.00 +#define ATTN_STATIC 1.25 + +/** + * Pitch values + */ +#define PITCH_NORM 100 /* non-pitch shifted */ +#define PITCH_LOW 95 /* other values are possible - 0-255, where 255 is very high */ +#define PITCH_HIGH 120 + +/** + * Volume values + */ +#define VOL_NORM 1.0 + +/** + * Sound behavior constants + */ +#define SND_SPAWNING (1<<8) // we're spawing, used in some cases for ambients +#define SND_STOP (1<<5) // stop sound +#define SND_CHANGE_VOL (1<<6) // change sound vol +#define SND_CHANGE_PITCH (1<<7) // change sound pitch + +/** + * @endsection + */ + +/** + * Menu keys + */ +#define MENU_KEY_1 (1<<0) +#define MENU_KEY_2 (1<<1) +#define MENU_KEY_3 (1<<2) +#define MENU_KEY_4 (1<<3) +#define MENU_KEY_5 (1<<4) +#define MENU_KEY_6 (1<<5) +#define MENU_KEY_7 (1<<6) +#define MENU_KEY_8 (1<<7) +#define MENU_KEY_9 (1<<8) +#define MENU_KEY_0 (1<<9) + +/** + * Language constants + */ +#define LANG_SERVER 0 +#define LANG_PLAYER -1 + +/** + * @section Client print native constants + */ + +/** + * Destination types for client_print() + */ +enum +{ + print_notify = 1, + print_console, + print_chat, + print_center, + print_radio /* Counter-Strike only */ +}; + +/** + * Color types for client_print_color() + */ +enum +{ + print_team_default = 0, + print_team_grey = -1, + print_team_red = -2, + print_team_blue = -3, +}; + +/** + * Destination types for engclient_print() + */ +enum +{ + engprint_console = 0, + engprint_center, + engprint_chat, +}; + +/** + * @endsection + */ + +/** + * @section Entity rendering constants + */ + +/** + * Rendering modes (i.e. for set_user_rendering()) + */ +enum +{ + kRenderNormal = 0, /* src */ + kRenderTransColor, /* c*a+dest*(1-a) */ + kRenderTransTexture, /* src*a+dest*(1-a) */ + kRenderGlow, /* src*a+dest -- No Z buffer checks */ + kRenderTransAlpha, /* src*srca+dest*(1-srca) */ + kRenderTransAdd, /* src*a+dest */ +}; + +/** + * Rendering fx (i.e. for set_user_rendering()) + */ +enum +{ + kRenderFxNone = 0, + kRenderFxPulseSlow, + kRenderFxPulseFast, + kRenderFxPulseSlowWide, + kRenderFxPulseFastWide, + kRenderFxFadeSlow, + kRenderFxFadeFast, + kRenderFxSolidSlow, + kRenderFxSolidFast, + kRenderFxStrobeSlow, + kRenderFxStrobeFast, + kRenderFxStrobeFaster, + kRenderFxFlickerSlow, + kRenderFxFlickerFast, + kRenderFxNoDissipation, + kRenderFxDistort, /* Distort/scale/translate flicker */ + kRenderFxHologram, /* kRenderFxDistort + distance fade */ + kRenderFxDeadPlayer, /* kRenderAmt is the player index */ + kRenderFxExplode, /* Scale up really big! */ + kRenderFxGlowShell, /* Glowing Shell */ + kRenderFxClampMinScale, /* Keep this sprite from getting very small (SPRITES only!) */ + kRenderFxLightMultiplier, /* CTM !!!CZERO added to tell the studiorender that the value in iuser2 is a lightmultiplier */ +}; + +/** + * @endsection + */ + +/** + * Type for force_unmodified() + */ +enum +{ + force_exactfile = 0, /* File on client must exactly match server's file */ + force_model_samebounds, /* For model files only, the geometry must fit in the same bbox */ + force_model_specifybounds, /* For model files only, the geometry must fit in the specified bbox */ +}; + +/** + * Status for get_module() + */ +enum +{ + module_none = 0, + module_query, + module_badload, + module_loaded, + module_noinfo, + module_noquery, + module_noattach, + module_old, +}; + +/** + * AMX flag constants + */ +#define AMX_FLAG_DEBUG 0x02 /* symbolic info. available */ +#define AMX_FLAG_COMPACT 0x04 /* compact encoding */ +#define AMX_FLAG_BYTEOPC 0x08 /* opcode is a byte (not a cell) */ +#define AMX_FLAG_NOCHECKS 0x10 /* no array bounds checking; no STMT opcode */ +#define AMX_FLAG_NTVREG 0x1000 /* all native functions are registered */ +#define AMX_FLAG_JITC 0x2000 /* abstract machine is JIT compiled */ +#define AMX_FLAG_BROWSE 0x4000 /* busy browsing */ +#define AMX_FLAG_RELOC 0x8000 /* jump/call addresses relocated */ + +/** + * Invalid plugin id + */ +#define INVALID_PLUGIN_ID -1 + +/** + * Menu and menu item status codes + */ +#define MENU_TIMEOUT -4 +#define MENU_EXIT -3 +#define MENU_BACK -2 +#define MENU_MORE -1 +#define ITEM_IGNORE 0 +#define ITEM_ENABLED 1 +#define ITEM_DISABLED 2 + +/** + * AMX error codes + */ +#define AMX_ERR_NATIVE 10 +#define AMX_ERR_MEMACCESS 5 +#define AMX_ERR_NONE 0 +#define AMX_ERR_BOUNDS 4 +#define AMX_ERR_STACKERR 3 +#define AMX_ERR_STACKLOW 7 +#define AMX_ERR_HEAPLOW 8 +#define AMX_ERR_DIVIDE 11 +#define AMX_ERR_NOTFOUND 19 +#define AMX_ERR_PARAMS 25 +#define AMX_ERR_GENERAL 27 + +/** + * Generic invalid handle value + */ +#define INVALID_HANDLE -1 + +/** + * @section Plugin forward related constants + */ + +/** + * Stop types for plugin forwards + */ +#define ET_IGNORE 0 //ignore return val +#define ET_STOP 1 //stop on PLUGIN_HANDLED +#define ET_STOP2 2 //same, except return biggest +#define ET_CONTINUE 3 //no stop, return biggest + +/** + * Parameter types for plugin forwards + */ +#define FP_CELL 0 +#define FP_FLOAT 1 +#define FP_STRING 2 +#define FP_ARRAY 4 +#define FP_VAL_BYREF 5 //cell & float are handled in the same way + +/** + * @endsection + */ + +/** + * LibType constants + */ +enum LibType +{ + LibType_Library, + LibType_Class +}; + +/** + * AdminProp constants + */ +enum AdminProp +{ + AdminProp_Auth = 0, + AdminProp_Password, + AdminProp_Access, + AdminProp_Flags +}; + +/** + * HashType constants + * To be used on hash_file() and hash_string() + */ +enum HashType +{ + Hash_Crc32 = 0, // Provides CRC32 hashing + Hash_Md5, // Provides MD5 hashing + Hash_Sha1, // Provides SHA1 hashing + Hash_Sha256, // Provides SHA256 hashing + + Hash_Sha3_224, // Provides SHA3 224 bit hashing + Hash_Sha3_256, // Provides SHA3 256 bit hashing + Hash_Sha3_384, // Provides SHA3 384 bit hashing + Hash_Sha3_512, // Provides SHA3 512 bit hashing + + Hash_Keccak_224, // Provides Keccak 224 bit hashing + Hash_Keccak_256, // Provides Keccak 256 bit hashing + Hash_Keccak_384, // Provides Keccak 384 bit hashing + Hash_Keccak_512 // Provides Keccak 512 bit hashing +}; + +/** + * SetTaskFlags constants for set_task_ex() + */ +enum SetTaskFlags (<<= 1) +{ + SetTask_Once = 0, // None; execute callback after the specified amount of time (Default) + SetTask_RepeatTimes = 1, // Repeat timer a set amount of times + SetTask_Repeat, // Loop indefinitely until timer is stopped + SetTask_AfterMapStart, // Time interval is treated as absolute time after map start + SetTask_BeforeMapChange // Time interval is treated as absolute time before map change +}; + +/** + * RegisterEventFlags constants for register_event_ex() + */ +enum RegisterEventFlags (<<= 1) +{ + RegisterEvent_None = 0, // None + RegisterEvent_Global = 1, // Global event (sent to every client) + RegisterEvent_Single, // Event sent to single client + RegisterEvent_OnceForMultiple, // Call only once when repeated to multiple clients + RegisterEvent_OnlyDead, // Call only if sent to dead client + RegisterEvent_OnlyAlive, // Call only if sent to alive client + RegisterEvent_OnlyHuman, // Call only if sent to human client (RegisterEvent_Single required) + RegisterEvent_OnlyBots // Call only if sent to bot (RegisterEvent_Single required) +}; + +/** + * GetPlayerFlags constants for get_players_ex() + */ +enum GetPlayersFlags (<<= 1) +{ + GetPlayers_None = 0, // No filter (Default) + GetPlayers_ExcludeDead = 1, // Do not include dead clients + GetPlayers_ExcludeAlive, // Do not include alive clients + GetPlayers_ExcludeBots, // Do not include bots + GetPlayers_ExcludeHuman, // Do not include human clients + GetPlayers_MatchTeam, // Match with team + GetPlayers_MatchNameSubstring, // Match with part of name + GetPlayers_CaseInsensitive, // Match case insensitive + GetPlayers_ExcludeHLTV, // Do not include HLTV proxies + GetPlayers_IncludeConnecting // Include connecting clients +}; + +/** + * FindPlayerFlags constants for find_player_ex() + */ +enum FindPlayerFlags (<<= 1) +{ + FindPlayer_None = 0, // None + FindPlayer_MatchName = 1, // Match with name + FindPlayer_MatchNameSubstring, // Match with name substring + FindPlayer_MatchAuthId, // Match with authid + FindPlayer_MatchIP, // Match with ip + FindPlayer_MatchTeam, // Match with team name + FindPlayer_ExcludeDead, // Do not include dead clients + FindPlayer_ExcludeAlive, // Do not include alive clients + FindPlayer_ExcludeBots, // Do not include bots + FindPlayer_ExcludeHuman, // Do not include human clients + FindPlayer_LastMatched, // Return last matched client instead of the first + FindPlayer_MatchUserId, // Match with userid + FindPlayer_CaseInsensitive, // Match case insensitively + FindPlayer_IncludeConnecting // Include connecting clients +} + +/** + * Constants for client statistics + */ +enum +{ + STATSX_KILLS = 0, + STATSX_DEATHS, + STATSX_HEADSHOTS, + STATSX_TEAMKILLS, + STATSX_SHOTS, + STATSX_HITS, + STATSX_DAMAGE, + STATSX_RANK, + STATSX_MAX_STATS +} + +/** + * Constants for get_user_origin() + */ +enum +{ + Origin_Client = 0, // Client's Origin + Origin_Eyes, // Eyes (and Weapon) Origin + Origin_AimEndClient, // Aim End Origin from Client's Position + Origin_AimEndEyes, // Aim End Origin from Eyes Position + Origin_CS_LastBullet // Last Bullet's Origin (Counter-Strike) +} + +#include // To keep backward compatibility diff --git a/bin/compiler/include/amxmisc.inc b/bin/compiler/include/amxmisc.inc new file mode 100644 index 0000000..96fb92a --- /dev/null +++ b/bin/compiler/include/amxmisc.inc @@ -0,0 +1,899 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +#if defined _amxmisc_included + #endinput +#endif +#define _amxmisc_included + +#if !defined _amxmodx_included + #include +#endif + +/** + * Returns if the client has any admin flags set + * + * @param id Client index + * + * @return 1 if client has any admin flags, 0 otherwise + */ +stock is_user_admin(id) +{ + new __flags = get_user_flags(id); + return (__flags > 0 && !(__flags & ADMIN_USER)); +} + +/** + * Returns if the user can execute the current command by checking the necessary + * admin flags and parameter count. Displays a denied access message to the user + * if missing privileges or a usage example if too few parameters are provided. + * + * @note This should be used inside of a command forward as it uses read_argc() + * to check the parameter count. + * + * @param id Client index + * @param level Required admin flags + * @param cid Command id + * @param num Required number of parameters + * @param acesssilent If true no denied access message will be printed + * + * @return 1 if access granted and parameters provided, 0 otherwise + */ +stock cmd_access(id, level, cid, num, bool:accesssilent = false) +{ + new has_access = 0; + if (id == (is_dedicated_server() ? 0 : 1)) + { + has_access = 1; + } + else if (level == ADMIN_ADMIN) + { + if (is_user_admin(id)) + { + has_access = 1; + } + } + else if (get_user_flags(id) & level) + { + has_access = 1; + } + else if (level == ADMIN_ALL) + { + has_access = 1; + } + + if (has_access == 0) + { + if (!accesssilent) + { + console_print(id, "%L", id, "NO_ACC_COM"); + } + return 0; + } + if (read_argc() < num) + { + new hcmd[32], hinfo[128], hflag, bool:info_ml; + get_concmd(cid, hcmd, charsmax(hcmd), hflag, hinfo, charsmax(hinfo), level, _, info_ml); + + if (info_ml) + { + LookupLangKey(hinfo, charsmax(hinfo), hinfo, id); + } + + console_print(id, "%L: %s %s", id, "USAGE", hcmd, hinfo); + return 0; + } + + return 1; +} + +/** + * Returns if the client has the specified admin flags. + * + * @param id Client index + * @param level Required admin flags + * + * @return 1 if client has the admin flags, 0 otherwise + */ +stock access(id, level) +{ + if (level == ADMIN_ADMIN) + { + return is_user_admin(id); + } + else if (level == ADMIN_ALL) + { + return 1; + } + + return (get_user_flags(id) & level); +} + +/** + * cmd_target flags + */ +#define CMDTARGET_OBEY_IMMUNITY (1<<0) // Obey immunity +#define CMDTARGET_ALLOW_SELF (1<<1) // Allow self targeting +#define CMDTARGET_ONLY_ALIVE (1<<2) // Target must be alive +#define CMDTARGET_NO_BOTS (1<<3) // Target can't be a bot + +/** + * Processes a generic target pattern and tries to match it to a client based + * on filtering flags. If no unique target is found an appropriate message is + * displayed to the admin. + * + * @note The pattern is first matched case insensitively against client names. + * If no match is found it is matched against client authids. If still no + * match is found and the pattern starts with '#' it is finally matched + * against client userids. + * @note Since client names are matched by substring the pattern can potentially + * match multiple targets. In that case the function will return 0 and ask + * the admin to provide a unique pattern. + * @note The filtering flags are applied after the pattern matching has + * finished. That means the pattern has to be unique against all clients + * on the server even if some of them are not eligible. + * + * @param id Client index of admin performing an action + * @param arg Target pattern + * @param flags Filtering flags, see CMDTARGET_* constants above + * + * @return Client index, or 0 if no or multiple clients matched + */ +stock cmd_target(id, const arg[], flags = CMDTARGET_OBEY_IMMUNITY) +{ + new player = find_player("bl", arg); + if (player) + { + if (player != find_player("blj", arg)) + { + console_print(id, "%L", id, "MORE_CL_MATCHT"); + return 0; + } + } + else if ((player = find_player("c", arg)) == 0 && arg[0] == '#' && arg[1]) + { + player = find_player("k", str_to_num(arg[1])); + } + if (!player) + { + console_print(id, "%L", id, "CL_NOT_FOUND"); + return 0; + } + if (flags & CMDTARGET_OBEY_IMMUNITY) + { + if ((get_user_flags(player) & ADMIN_IMMUNITY) && ((flags & CMDTARGET_ALLOW_SELF) ? (id != player) : true)) + { + new imname[MAX_NAME_LENGTH]; + get_user_name(player, imname, charsmax(imname)); + console_print(id, "%L", id, "CLIENT_IMM", imname); + return 0; + } + } + if (flags & CMDTARGET_ONLY_ALIVE) + { + if (!is_user_alive(player)) + { + new imname[MAX_NAME_LENGTH]; + get_user_name(player, imname, charsmax(imname)); + console_print(id, "%L", id, "CANT_PERF_DEAD", imname); + return 0; + } + } + if (flags & CMDTARGET_NO_BOTS) + { + if (is_user_bot(player)) + { + new imname[MAX_NAME_LENGTH]; + get_user_name(player, imname, charsmax(imname)); + console_print(id, "%L", id, "CANT_PERF_BOT", imname); + return 0; + } + } + + return player; +} + +/** + * Standard method to show admin activity to clients connected to the server. + * This depends on the amx_show_activity cvar. See documentation for more details. + * + * @param id Client index performing the action + * @param name Name of client performing the action + * @param fmt Formatting rules + * @param ... Variable number of formatting parameters + * + * @noreturn + */ +stock show_activity(id, const name[], const fmt[], any:...) +{ + static __amx_show_activity; + if (__amx_show_activity == 0) + { + __amx_show_activity = get_cvar_pointer("amx_show_activity"); + + // if still not found, then register the cvar as a dummy + if (__amx_show_activity == 0) + { + __amx_show_activity = register_cvar("amx_show_activity", "2", FCVAR_PROTECTED); + } + } + + new prefix[10]; + if (is_user_admin(id)) + { + copy(prefix, charsmax(prefix), "ADMIN"); + } + else + { + copy(prefix, charsmax(prefix), "PLAYER"); + } + new buffer[512]; + vformat(buffer, charsmax(buffer), fmt, 4); + + switch (get_pcvar_num(__amx_show_activity)) + { + case 5: // hide name only to admins, show nothing to normal users + { + for (new i = 1; i <= MaxClients; i++) + { + if (is_user_connected(i)) + { + if (is_user_admin(i)) + { + client_print(i, print_chat, "%L: %s", i, prefix, buffer); + } + } + } + } + case 4: // show name only to admins, show nothing to normal users + { + for (new i = 1; i <= MaxClients; i++) + { + if (is_user_connected(i)) + { + if (is_user_admin(i)) + { + client_print(i, print_chat, "%L %s: %s", i, prefix, name, buffer); + } + } + } + } + case 3: // show name only to admins, hide name from normal users + { + for (new i = 1; i <= MaxClients; i++) + { + if (is_user_connected(i)) + { + if (is_user_admin(i)) + { + client_print(i, print_chat, "%L %s: %s", i, prefix, name, buffer); + } + else + { + client_print(i, print_chat, "%L: %s", i, prefix, buffer); + } + } + } + } + case 2: // show name to all + { + client_print(0, print_chat, "%L %s: %s", LANG_PLAYER, prefix , name , buffer); + } + case 1: // hide name to all + { + client_print(0, print_chat, "%L: %s", LANG_PLAYER, prefix, buffer); + } + } +} + +/** + * Standard method to show admin activity to a single client. + * This depends on the amx_show_activity cvar. See documentation for more details. + * + * @param idtarget Client index to display message to + * @param id Client index performing the action + * @param name Name of client performing the action + * @param fmt Formatting rules + * @param ... Variable number of formatting parameters + * + * @noreturn + */ +stock show_activity_id(idtarget, idadmin, const name[], const fmt[], any:...) +{ + if (idtarget == 0 || !is_user_connected(idtarget)) + { + return; + } + + static __amx_show_activity; + if (__amx_show_activity == 0) + { + __amx_show_activity = get_cvar_pointer("amx_show_activity"); + + // if still not found, then register the cvar as a dummy + if (__amx_show_activity == 0) + { + __amx_show_activity = register_cvar("amx_show_activity", "2", FCVAR_PROTECTED); + } + } + + static prefix[10]; + if (is_user_admin(idadmin)) + { + copy(prefix, charsmax(prefix), "ADMIN"); + } + else + { + copy(prefix, charsmax(prefix), "PLAYER"); + } + + static buffer[512]; + vformat(buffer, charsmax(buffer), fmt, 5); + + switch (get_pcvar_num(__amx_show_activity)) + { + case 5: // hide name only to admins, show nothing to normal users + { + if (is_user_admin(idtarget)) + { + client_print(idtarget, print_chat, "%L: %s", idtarget, prefix, buffer); + } + } + case 4: // show name only to admins, show nothing to normal users + { + if (is_user_admin(idtarget)) + { + client_print(idtarget, print_chat, "%L %s: %s", idtarget, prefix, name, buffer); + } + } + case 3: // show name only to admins, hide name from normal users + { + if (is_user_admin(idtarget)) + { + client_print(idtarget, print_chat, "%L %s: %s", idtarget, prefix, name, buffer); + } + else + { + client_print(idtarget, print_chat, "%L: %s", idtarget, prefix, buffer); + } + } + case 2: // show name to all + { + client_print(idtarget, print_chat, "%L %s: %s", idtarget, prefix, name, buffer); + } + case 1: // hide name to all + { + client_print(idtarget, print_chat, "%L: %s", idtarget, prefix, buffer); + } + } +} + +/** + * Standard method to show activity to one single client with normal language keys. + * These keys need to be in the format of standard AMXX keys: + * eg: ADMIN_KICK_1 = ADMIN: kick %s + * ADMIN_KICK_2 = ADMIN %s: kick %s + * This depends on the amx_show_activity cvar. See documentation for more details. + * + * @param KeyWithoutName The language key that does not have the name field. + * @param KeyWithName The language key that does have the name field. + * @param __AdminName The name of the person doing the action. + * @extra Pass any extra format arguments for the language key in the variable arguments list. + * + * @noreturn + */ +stock show_activity_key(const KeyWithoutName[], const KeyWithName[], const ___AdminName[], any:...) +{ +// The variable gets used via vformat, but the compiler doesn't know that, so it still cries. +#pragma unused ___AdminName + static __amx_show_activity; + if (__amx_show_activity == 0) + { + __amx_show_activity = get_cvar_pointer("amx_show_activity"); + + // if still not found, then register the cvar as a dummy + if (__amx_show_activity == 0) + { + __amx_show_activity = register_cvar("amx_show_activity", "2", FCVAR_PROTECTED); + } + } + + new buffer[512]; + new keyfmt[256]; + new i; + + switch (get_pcvar_num(__amx_show_activity)) + { + case 5: // hide name to admins, display nothing to normal players + { + while (i++ < MaxClients) + { + if (is_user_connected(i)) + { + if (is_user_admin(i)) + { + LookupLangKey(keyfmt, charsmax(keyfmt), KeyWithoutName, i); + + // skip the "adminname" argument if not showing name + vformat(buffer, charsmax(buffer), keyfmt, 4); + client_print(i, print_chat, "%s", buffer); + } + } + } + } + case 4: // show name only to admins, display nothing to normal players + { + while (i++ < MaxClients) + { + if (is_user_connected(i)) + { + if (is_user_admin(i)) + { + LookupLangKey(keyfmt, charsmax(keyfmt), KeyWithName, i); + vformat(buffer, charsmax(buffer), keyfmt, 3); + client_print(i, print_chat, "%s", buffer); + } + } + } + } + case 3: // show name only to admins, hide name from normal users + { + while (i++ < MaxClients) + { + if (is_user_connected(i)) + { + if (is_user_admin(i)) + { + LookupLangKey(keyfmt, charsmax(keyfmt), KeyWithName, i); + vformat(buffer, charsmax(buffer), keyfmt, 3); + } + else + { + LookupLangKey(keyfmt, charsmax(keyfmt), KeyWithoutName, i); + + // skip the "adminname" argument if not showing name + vformat(buffer, charsmax(buffer), keyfmt, 4); + } + client_print(i, print_chat, "%s", buffer); + } + } + } + case 2: // show name to all users + { + while (i++ < MaxClients) + { + if (is_user_connected(i)) + { + LookupLangKey(keyfmt, charsmax(keyfmt), KeyWithName, i); + vformat(buffer, charsmax(buffer), keyfmt, 3); + client_print(i, print_chat, "%s", buffer); + } + } + } + case 1: // hide name from all users + { + while (i++ < MaxClients) + { + if (is_user_connected(i)) + { + LookupLangKey(keyfmt, charsmax(keyfmt), KeyWithoutName, i); + + // skip the "adminname" argument if not showing name + vformat(buffer, charsmax(buffer), keyfmt, 4); + client_print(i, print_chat, "%s", buffer); + } + } + } + } +} + +/** + * Returns if the mod running on the server supports colored menus. + * + * @note The full list of mods supporting colored menus: + * Counter-Strike, Counter-Strike: Condition Zero, Deathmatch Classic, + * Day of Defeat, Team Fortress Classic and Half-Life: Deathmatch. + * @note Since this is a stock and compiled into the plugin, the list of + * supported mods will not update and require recompilation of the plugin + * if the list ever changed. + * + * @return 1 if colored menus are supported, 0 otherwise + */ +stock colored_menus() +{ + static ColoredMenus = -1; + + if (ColoredMenus == -1) + { + new const ModNames[][] = { "cstrike", "czero", "dmc", "dod", "tfc", "valve" }; + new ModName[32]; + + get_modname(ModName, charsmax(ModName)); + + for (new Iterator = 0; Iterator < sizeof(ModNames); Iterator++) + { + if (equal(ModName, ModNames[Iterator])) + { + ColoredMenus = 1; + + break; + } + } + + if (ColoredMenus == -1) + ColoredMenus = 0; + } + + return ColoredMenus; +} + +/** + * Returns if the mod running on the server is a version of Counter-Strike. + * + * @return 1 if mod is Counter-Strike, 0 otherwise + */ +stock cstrike_running() +{ + new mod_name[32]; + get_modname(mod_name, charsmax(mod_name)); + + return (equal(mod_name, "cstrike") || equal(mod_name, "czero") || equal(mod_name, "csv15") || equal(mod_name, "cs13")); +} + +/** + * Returns if the server is running a specific mod. + * + * @param mod Mod name to check for + * + * @return 1 if mod name matches, 0 otherwise + */ +stock is_running(const mod[]) +{ + new mod_name[32]; + get_modname(mod_name, charsmax(mod_name)); + + return equal(mod_name, mod); +} + +/** + * Retrieves the path to the AMXX base directory. + * + * @param name Buffer to copy path to + * @param len Maximum buffer size + * + * @return Number of cells written to buffer + */ +stock get_basedir(name[], len) +{ + return get_localinfo("amxx_basedir", name, len); +} + +/** + * Retrieves the path to the AMXX configs directory. + * + * @param name Buffer to copy path to + * @param len Maximum buffer size + * + * @return Number of cells written to buffer + */ +stock get_configsdir(name[], len) +{ + return get_localinfo("amxx_configsdir", name, len); +} + +/** + * Retrieves the path to the AMXX data directory. + * + * @param name Buffer to copy path to + * @param len Maximum buffer size + * + * @return Number of cells written to buffer + */ +stock get_datadir(name[], len) +{ + return get_localinfo("amxx_datadir", name, len); +} + +/** + * Provides a shorthand to register a working menu. + * + * @note Combines the necessary calls to register_menuid() and + * register_menucmd() into a single function. + * + * @param title Menu name + * @param keys Key flags + * @param function Callback function + * @param outside Catch menus outside the calling plugin + * + * @noreturn + * @error If an invalid callback function is specified, an error will + * be thrown. + */ +stock register_menu(const title[], keys, const function[], outside = 0) +{ + register_menucmd(register_menuid(title, outside), keys, function); +} + +/** + * Alias to get_configsdir provided for backwards compatibility. Originally + * intended to retrieve the AMXX custom directory. + * + * @deprecated Should not be used as the concept of a custom directory does no + * longer exists in AMXX. + * + * @param name Buffer to copy path to + * @param len Maximum buffer size + * + * @return Number of cells written to buffer + */ +#pragma deprecated The concept of a custom directory no longer exists in AMXX. Do not use. +stock get_customdir(name[], len) +{ + return get_configsdir(name, len); +} + +/** + * Adds a menu item/command to the admin menu (amxmodmenu) handled by the + * "Menus Front-End" plugin, if it is loaded. + * + * @param MENU_TEXT Item text that will be displayed in the menu + * @param MENU_CMD Command that will be executed on the client + * @param MENU_ACCESS Admin access required for menu command + * @param MENU_PLUGIN Case-insensitive name or filename of plugin providing + * the menu command + * + * @noreturn + */ +stock AddMenuItem(const MENU_TEXT[], const MENU_CMD[], const MENU_ACCESS, const MENU_PLUGIN[]) +{ + AddMenuItem_call(MENU_TEXT, MENU_CMD, MENU_ACCESS, MENU_PLUGIN, false); +} + +/** + * Adds a menu item/command to the client menu (amx_menu) handled by the + * "Menus Front-End" plugin, if it is loaded. Items should be accessible by + * non-admins. + * + * @param MENU_TEXT Item text that will be displayed in the menu + * @param MENU_CMD Command that will be executed on the client + * @param MENU_ACCESS Admin access required for menu command + * @param MENU_PLUGIN Case-insensitive name or filename of plugin providing + * the menu command + * + * @noreturn + */ +stock AddClientMenuItem(const MENU_TEXT[], const MENU_CMD[], const MENU_ACCESS, const MENU_PLUGIN[]) +{ + AddMenuItem_call(MENU_TEXT, MENU_CMD, MENU_ACCESS, MENU_PLUGIN, true); +} + +/** + * Helper function used by AddMenuItem() and AddClientMenuItem() + * + * @param MENU_TEXT Item text that will be displayed in the menu + * @param MENU_CMD Command that will be executed on the client + * @param MENU_ACCESS Admin access required for menu command + * @param MENU_PLUGIN Case-insensitive name or filename of plugin + * providing the menu command + * @param ADD_TO_CLIENT_MENU If true adds command to client menu, false adds + * to admin menu + * + * @noreturn + */ +stock AddMenuItem_call(const MENU_TEXT[], const MENU_CMD[], const MENU_ACCESS, const MENU_PLUGIN[], const bool:ADD_TO_CLIENT_MENU) +{ + new pluginid = is_plugin_loaded("Menus Front-End"); + if (pluginid == -1) + { + log_amx("Can't add menu item ^"%s^" from plugin ^"%s^" to menu set because the Menus Front-End plugin itself is not loaded!", MENU_TEXT, MENU_PLUGIN); + return; // Menus Front-End doesn't exist, return. + } + + new filename[64], b[1]; + get_plugin(pluginid, filename, charsmax(filename), b, charsmax(b), b, charsmax(b), b, charsmax(b), b, charsmax(b)); + + new status = callfunc_begin(ADD_TO_CLIENT_MENU ? "AddClientMenu" : "AddMenu", filename); + new bool:failed = true; + switch (status) + { + case 1: + { + failed = false; + } + case 0: + { + log_amx("Run time error! (AddMenuItem_call failed)"); + } + case -2: + { + log_amx("Function not found! (AddMenuItem_call failed)"); + } + case -1: + { + log_amx("Plugin not found! (AddMenuItem_call failed)"); + } + } + if (failed) + { + return; + } + // Item text + callfunc_push_str(MENU_TEXT); + // Cmd + callfunc_push_str(MENU_CMD); + // Access + callfunc_push_int(MENU_ACCESS); + // Menu exists in this plugin + callfunc_push_str(MENU_PLUGIN); + + callfunc_end(); +} + +/** + * Computes an offset from a given value while constraining it between the + * specified bounds, rolling over if necessary. + * + * @note Example: The range is 1-5 and the base value (seed) is 3, the offset + * that the value should be moved by is also 3. Offsetting the value by 3 + * would result in 6, but it is to be constrained between 1 and 5. With + * clamp() this would result in 5, but this function rolls the value over + * and returns 1 instead. + * + * @param low Lower bound + * @param high Higher bound + * @param seed Base value + * @param offset Offset to move + * + * @return Computed offset value between specified bounds + */ +stock constraint_offset(low, high, seed, offset) +{ + new numElements = high - low + 1; + offset += seed - low; + + if (offset >= 0) + { + return low + (offset % numElements); + } + else + { + return high - (abs(offset) % numElements) + 1; + } + + return 0; // Makes the compiler happy -_- +} + +/** + * Returns if the client has any of the specified admin flags. + * + * @param id Client index + * @param flags Flag string + * + * @return 1 if the user has any of the specified flags, 0 otherwise + */ +stock has_flag(id, const flags[]) +{ + return (get_user_flags(id) & read_flags(flags)); +} + +/** + * Returns if the client has all of the specified admin flags. + * + * @param id Client index + * @param flags Flag string + * + * @return 1 if the user has all of the specified flags, 0 otherwise + */ +stock has_all_flags(id, const flags[]) +{ + new FlagsNumber = read_flags(flags); + return ((get_user_flags(id) & FlagsNumber) == FlagsNumber); +} + +/** + * Resets the client's menu. + * + * @note This is a wrapper around show_menu() for the sake of readability. + * + * @param index Client to reset menu of, 0 to reset all clients + * + * @noreturn + */ +stock reset_menu(index) +{ + show_menu(index, 0, "", 0); +} + +/** + * Calls a function after a specified time has elapsed. + * + * @param time Time interval to assign + * @param function Function to execute + * @param id Task id to assign + * @param parameter Data to pass through to callback + * @param len Size of data + * @param flags Optional flags (enum SetTaskFlags); valid flags are: + * SetTask_Once - Execute callback once (Default) + * SetTask_RepeatTimes - repeat timer a set amount of times + * SetTask_Repeat - loop indefinitely until timer is stopped + * SetTask_AfterMapStart - time interval is treated as absolute + * time after map start + * SetTask_BeforeMapChange - time interval is treated as absolute + * time before map change + * @param repeat If the SetTask_RepeatTimes flag is set, the task will be repeated this + * many times + * + * @noreturn + * @error If an invalid callback function is provided, an error is + * thrown. + */ +stock set_task_ex(Float:time, const function[], id = 0, const any:parameter[] = "", len = 0, SetTaskFlags:flags = SetTask_Once, repeat = 0) +{ + new strFlags[2]; // There should never be a need to set more than 1 flag + get_flags(_:flags, strFlags, charsmax(strFlags)); + set_task(time, function, id, parameter, len, strFlags, repeat); +} + +/** + * Stores a filtered list of client indexes to an array. + * + * @note Example retrieving all alive CTs: + * get_players_ex(players, num, GetPlayers_ExcludeDead | GetPlayers_MatchTeam, "CT") + * + * @param players Array to store indexes to + * @param num Variable to store number of indexes to + * @param flags Optional filtering flags (enum GetPlayersFlags); valid flags are: + * GetPlayers_None - No filter (Default) + * GetPlayers_ExcludeDead - do not include dead clients + * GetPlayers_ExcludeAlive - do not include alive clients + * GetPlayers_ExcludeBots - do not include bots + * GetPlayers_ExcludeHuman - do not include human clients + * GetPlayers_MatchTeam - match with team + * GetPlayers_MatchNameSubstring - match with part of name + * GetPlayers_CaseInsensitive - match case insensitive + * GetPlayers_ExcludeHLTV - do not include HLTV proxies + * GetPlayers_IncludeConnecting - include connecting clients + * @param team String to match against if the "e" or "f" flag is specified + * + * @noreturn + */ +stock get_players_ex(players[MAX_PLAYERS] = {}, &num, GetPlayersFlags:flags = GetPlayers_None, const team[] = "") +{ + new strFlags[10]; + get_flags(_:flags, strFlags, charsmax(strFlags)); + get_players(players, num, strFlags, team); +} + +/** + * Returns the number of clients on the server that match the specified flags. + * + * @note Example retrieving all alive CTs: + * new AliveCt = get_playersnum_ex(GetPlayers_ExcludeDead | GetPlayers_MatchTeam, "CT") + * + * @param flags Optional filtering flags (enum GetPlayersFlags); valid flags are: + * GetPlayers_None - No filter (Default) + * GetPlayers_ExcludeDead - do not include dead clients + * GetPlayers_ExcludeAlive - do not include alive clients + * GetPlayers_ExcludeBots - do not include bots + * GetPlayers_ExcludeHuman - do not include human clients + * GetPlayers_MatchTeam - match with team + * GetPlayers_MatchNameSubstring - match with part of name + * GetPlayers_CaseInsensitive - match case insensitive + * GetPlayers_ExcludeHLTV - do not include HLTV proxies + * GetPlayers_IncludeConnecting - include connecting clients + * @param team String to match against if the GetPlayers_MatchTeam or GetPlayers_MatchNameSubstring flag is specified + * + * @return Number of clients on the server that match the specified flags + */ +stock get_playersnum_ex(GetPlayersFlags:flags = GetPlayers_None, const team[] = "") +{ + new PlayersNum; + get_players_ex(_, PlayersNum, flags, team); + return PlayersNum; +} diff --git a/bin/compiler/include/amxmodx.inc b/bin/compiler/include/amxmodx.inc new file mode 100644 index 0000000..551eac8 --- /dev/null +++ b/bin/compiler/include/amxmodx.inc @@ -0,0 +1,3422 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +#if defined _amxmodx_included + #endinput +#endif +#define _amxmodx_included + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/** + * Called just after server activation. + * + * @note Good place to initialize most of the plugin, such as registering + * cvars, commands or forwards, creating data structures for later use, or + * generating and loading other required configurations. + * + * @noreturn + */ +forward plugin_init(); + +/** + * Called just before the plugin is paused from execution. + * + * @noreturn + */ +forward plugin_pause(); + +/** + * Called just after the plugin is unpaused. + * + * @noreturn + */ +forward plugin_unpause(); + +/** + * Called when the mod tries to change the map. + * + * @note This is *only* called if the mod itself handles the map change. The + * server command "changelevel", which is used by many plugins, will not + * trigger this forward. Unfortunately, this means that in practice this + * forward can be unreliable and will not be called in many situations. + * @note AMXX 1.8.3 has added the engine_changelevel() function, which will utilize + * the correct engine function to change the map, and therefore trigger + * this forward. + * + * @param map Map that the mod tries to change to + * + * @return PLUGIN_CONTINUE to let the mod change the map + * PLUGIN_HANDLED or higher to prevent the map change + */ +forward server_changelevel(map[]); + +/** + * Called when all plugins went through plugin_init() + * + * @note When this forward is called, most plugins should have registered their + * cvars and commands already. + * + * @noreturn + */ +forward plugin_cfg(); + +/** + * Called just before server deactivation and subsequent unloading of the + * plugin. + * + * @note The plugin is required to manually free Handles it has acquired, such + * as those from dynamic data structures. Failing to do that will result + * in the plugin and AMXX leaking memory. + * + * @noreturn + */ +forward plugin_end(); + +/** + * Called when a message is about to be logged. + * + * @note Message data and information can be retrieved using the read_log* set + * of functions. + * + * @return PLUGIN_CONTINUE to let the log message through + * PLUGIN_HANDLED or higher to stop the log message + */ +forward plugin_log(); + +/** + * This forward allows plugins to add models, sounds and generic files to the + * precache tables using the precache_* set of functions. + * + * @note Adding files to the precaching tables will trigger the client to + * download them to its local filesystem. + * @note There is a hard upper limit of entries in the precaching tables for + * every game, this limit is 512 in most cases. The entries will be filled + * and indexed incrementally. Going over this limit will crash the server. + * + * @noreturn + */ +forward plugin_precache(); + +/** + * Called when a clients info has changed. + * + * @param id Client index + * + * @noreturn + */ +forward client_infochanged(id); + +/** + * Called when a client is connecting. + * + * @note This forward is called too early to do anything that directly affects + * the client. + * + * @param id Client index + * + * @noreturn + */ +forward client_connect(id); + +/** + * Called when a client is connecting. + * + * @note This forward is called too early to do anything that directly affects + * the client. + * + * @param id Client index + * @param name Client name + * @param ip Client ip address with port + * @param reason A reason that will be displayed when player gets rejected (can be overwritten) + * + * @return PLUGIN_CONTINUE to let a client join to the server + * PLUGIN_HANDLED or higher to prevent a client to join + */ +forward client_connectex(id, const name[], const ip[], reason[128]); + +/** + * Called when the client gets a valid SteamID. + * + * @note This may occur before or after client_putinserver has been called. + * @note This is called for bots, and the SteamID will be "BOT". + * + * @param id Client index + * @param authid Client auth + * + * @noreturn + */ +forward client_authorized(id, const authid[]); + +/** + * @deprecated This function does not catch all cases. + */ +#pragma deprecated Use client_disconnected() instead. +forward client_disconnect(id); + +/** + * Called when a client is disconnected from the server. + * + * @note This will be called in some additional cases that client_disconnect doesn't cover, + * most notably when a client aborts the connection process. It is guaranteed to pair + * with the client_connect() forward. + * @note When this fires the player entity is still valid (e.g. is_user_connected(id) will + * return true), but no networked commands will reach the client. + * + * @param id Client index + * @param drop If true, the game has explicitly dropped the client + * @param message If drop is true, a writable buffer containing the disconnect info message + * @param maxlen Maximum size of buffer + * + * @noreturn + */ +forward client_disconnected(id, bool:drop, message[], maxlen); + +/** + * Called when a client entity has been removed from the server. + * + * @note This fires after the client_disconnected() forward, when the player entity has been + * removed (e.g. is_user_connected(id) will return false). + * + * @param id Client index + * @param drop If true, the game has explicitly dropped the client + * @param message If drop is true, contains the disconnect info message + * + * @noreturn + */ +forward client_remove(id, bool:drop, const message[]); + + +/** + * Called when a client attempts to execute a command. + * + * @note The command and its arguments can be read using the read_arg* set of + * functions. + * + * @param id Client index + * + * @return PLUGIN_CONTINUE to let the client execute the command + * PLUGIN_HANDLED or higher to stop the command + */ +forward client_command(id); + +/** + * Called when a client is entering the game. + * + * @note It is not defined whether the client already has a SteamID when this + * forward is called. client_authorized may occur either before or after + * this. + * + * @param id Client index + * + * @noreturn + */ +forward client_putinserver(id); + +/** + * Sets informations about the calling plugin. + * + * @param plugin_name Name of the plugin + * @param version Version of the plugin + * @param author Author of the plugin + * + * @return Plugin id of the calling plugin + */ +native register_plugin(const plugin_name[], const version[], const author[]); + +/** + * Precaches a model file. + * + * @note Can only be used inside of the plugin_precache() forward. + * + * @param name Path to the model file + * + * @return Unique cache id of the model + * @error If called outside of the plugin_precache() forward, an error is + * thrown. + */ +native precache_model(const name[]); + +/** + * Precaches a sound file. + * + * @note Can only be used inside of the plugin_precache() forward. + * @note The filepath is always relative to the "sound" folder, and the file has + * to be a wav file. Precaching a file with this will add it to the engine + * sound table, making it available for usage in emit_sound() for example. + * @note Precaching other filetypes (such as mp3 music), optionally in different + * locations, has to be done with precache_generic() + * + * @param name Path to the sound file + * + * @return Unique cache id of the sound + * @error If called outside of the plugin_precache() forward, an error is + * thrown. + */ +native precache_sound(const name[]); + +/** + * Precaches a generic file. + * + * @note Can only be used inside of the plugin_precache() forward. + * @note Precaching sounds with this will not add them to the engine sound table. + * + * @param szFile Path to the file + * + * @return Unique cache id of the file + * @error If called outside of the plugin_precache() forward, an error + * is thrown. + */ +native precache_generic(const szFile[]); + +/** + * Precaches an event file. + * + * @note The event type should always be 1. + * @note Contrary to the other precache_* natives, this can be used outside of + * the plugin_precache() forward, e.g. in plugin_init() or plugin_cfg(). + * A bug in some clients makes this necessary, as plugin_precache() is + * called before the mod has precached its own, default event files. This + * can cause the event table to be misaligned on the client, leading to + * visual and audio bugs that are hard to diagnose. + * + * @param type Event type + * @param Name Formatting rules, path to the event file + * @param ... Variable number of formatting parameters + * + * @return Unique cache id of the event + */ +native precache_event(type, const Name[], any:...); + +/** + * Changes the map. + * + * @note This calls the pfnChangelLevel engine function. + * @note This has the same behavior as using the "changelevel" server command, + * but will also trigger the server_changelevel() forward in AMXX + * plugins. It will also notify any Metamod plugins that are hooking + * the pfnChangeLevel function. + * + * @param map Map name to change to + * + * @noreturn + */ +native engine_changelevel(const map[]); + +/** + * Sets info on the client. + * + * @param index Client index + * @param info Info key + * @param value New value + * + * @noreturn + * @error If the index is not within the range of 1 to MaxClients or + * the client is not connected, an error will be thrown. + */ +native set_user_info(index, const info[], const value[]); + +/** + * Gets info from the client. + * + * @param index Client index + * @param info Info key + * @param output Buffer to copy value to + * @param len Maximum size of the buffer + * + * @return Number of cells written to buffer + * @error If the index is not within the range of 1 to MaxClients or + * the client is not connected, an error will be thrown. + */ +native get_user_info(index, const info[], output[], len); + +/** + * Sets info on the server. + * + * @param info Info key + * @param value New value + * + * @noreturn + */ +native set_localinfo(const info[], const value[]); + +/** + * Gets info from the server. + * + * @param info Info key + * @param output Buffer to copy value to + * @param len Maximum size of the buffer + * + * @return Number of cells written to buffer + */ +native get_localinfo(const info[], output[], len); + +/** + * Shows text or a file in MOTD window. + * + * @param player Client index, use 0 to display to all clients + * @param message Message to display inside the MOTD window, if this is a + * filename the contents of this file will be displayed + * @param header Text for the MOTD header, if empty the servers hostname will + * be displayed instead + * + * @noreturn + */ +native show_motd(player, const message[], const header[] = ""); + +/** + * Sends a message to the client. + * + * @note This functions return value behaves differently depending on what is + * used as the client index: If 0 is specified, then the function will + * return 0 if nothing has been sent (no client connected). If either a + * single client is specified or there is at least one client connected, + * the number of printed characters will refer to the message that is sent + * last, to the client with the highest index. + * + * @param index Client index, use 0 to display to all clients + * @param type Message type, see print_* destination constants in + * amxconst.inc + * @param message Formatting rules + * @param ... Variable number of formatting parameters + * + * @return Number of printed characters + * @error If a single client is specified and the index is not within + * the range of 1 to MaxClients, an error will be thrown. + */ +native client_print(index, type, const message[], any:...); + +/** + * Sends colored chat messages to clients. + * + * @note This only works in Counter-Strike 1.6 and Condition Zero. + * @note The colors can be modified inside of the format string using special + * characters. These characters can be included using the escape character + * green x04 ; use location color from this point forward + * red/blue/grey x03 ; use team color from this point forward + * red/blue/grey x02 ; use team color to the end of the client name + * ; This only works at the start of the string, + * ; and precludes using other control characters + * default x01 ; use default color from this point forward + * @note The team color is defined by the sender's index. Alternatively, a + * specific team color can be enforced using the print_team_* constants in + * amxconst.inc + * @note Usage examples: + * client_print_color(id, print_team_red, "^4Green ^3Red ^1Default") + * client_print_color(id, id2, "^4Green ^3id2's team color, ^1Default") + * @note Including colors in ML can be done using the same escaping method: + * EXAMPLE_ML_KEY = ^4Green ^3Team color ^1Default + * @note This functions return value behaves differently depending on what is + * used as the client index: If 0 is specified, then the function will + * return 0 if nothing has been sent (no client connected). If either a + * single client is specified, or there is at least one client connected, + * the number of printed characters will refer to the message that is sent + * last, to the client with the highest index. + * + * @param index Client index, use 0 to display to all clients + * @param sender Client index used as the message sender + * @param fmt Formatting rules + * @param ... Variable number of formatting parameters + * + * @return Number of printed characters + * @error If a single client is specified and the index is not within + * the range of 1 to MaxClients, an error will be thrown. + */ +native client_print_color(index, sender, const message[], any:...); + +/** + * Sends a message to the client via the engine. + * + * @note This functions return value behaves differently depending on what is + * used as the client index: If 0 is specified, then the function will + * return 0 if nothing has been sent (no client connected). If either a + * single client is specified, or there is at least one client connected, + * the number of printed characters will refer to the message that is sent + * last, to the client with the highest index. + * + * @param player Client index, use 0 to display to all clients + * @param type Message type, see engprint_* destination constants in + * amxconst.inc + * @param message Formatting rules + * @param ... Variable number of formatting parameters + * + * @return Number of printed characters + * @error If a single client is specified and the index is not within + * the range of 1 to MaxClients, an error will be thrown. + */ +native engclient_print(player, type, const message[], any:...); + +/** + * Sends a message to the console of a client or the server. + * + * @param index Client index, or 0 to print to the server console + * @param message Formatting rules + * @param ... Variable number of formatting parameters + * + * @return Number of printed characters + * @error If a single client is specified and the index is not within + * the range of 1 to MaxClients, an error will be thrown. + */ +native console_print(id, const message[], any:...); + +/** + * Executes a command from the specified client or the server console. + * + * @param id Client index, or 0 to execute from the server console + * @param cmd Formatting rules + * @param ... Variable number of formatting parameters + * + * @return Length of the formatted command + */ +native console_cmd(id, const cmd[], any:...); + +/** + * Registers a function to be called on a given game event. + * + * @note Please consider using register_event_ex() instead which allows you to + * use named constants for flags instead of letters. + * @note Examples for event conditions: + * "2=c4" - Second parameter of message must be the string "c4" + * "3>10" - Third parameter of message must be greater than 10 + * "3!4" - Third parameter of message must not be equal to 4 + * "2&Buy" - Second parameter of message must contain "Buy" substring + * "2!Buy" - Second parameter of message must not equal "Buy" + * @note Due to a long-standing bug that would break compatibility with older + * plugins, the client id should be checked for alive/dead state if using + * flags "d" or "e". + * @note If multiple conditions are specified for a single parameter, only one + * of them has to hold true for the event function to be called. + * + * @param event Name of event that should be hooked + * @param function Name of callback function + * @param flags Flags used for filtering events, the valid flags are: + * "a" - Global event (sent to every client) + * "b" - Event sent to single client + * "c" - Call only once when repeated to multiple clients + * "d" - Call only if sent to dead client + * "e" - Call only if sent to alive client + * "f" - Call only if sent to human client ("b" flag required) + * "g" - Call only if sent to bot ("b" flag required) + * @param cond Condition string used for filtering events, built as: + * "" + * Argument number is the argument position to be filtered + * The comparison operator may be: + * - "=" for equality comparison (all argument types) + * - "!" for inequality comparison (all argument types) + * - "&" for bitwise and (int argument) or substring + * comparison (string argument) + * - "<" for less than comparison (int/float arguments) + * - ">" for greater than comparison (int/float arguments) + * The argument is compared to the specified value accordingly + * @param ... Any number of additional conditions + * + * @return Event handle + * @error If an invalid event name or callback function is provided, + * an error will be thrown. + */ +native register_event(const event[], const function[], const flags[], const cond[] = "", ...); + +/** + * Registers a function to be called on a given game event. + * + * @note Examples for event conditions: + * "2=c4" - Second parameter of message must be the string "c4" + * "3>10" - Third parameter of message must be greater than 10 + * "3!4" - Third parameter of message must not be equal to 4 + * "2&Buy" - Second parameter of message must contain "Buy" substring + * "2!Buy" - Second parameter of message must not equal "Buy" + * @note Due to a long-standing bug that would break compatibility with older + * plugins, the client id should be checked for alive/dead state if using + * flags "d" or "e". + * @note If multiple conditions are specified for a single parameter, only one + * of them has to hold true for the event function to be called. + * + * @param event Name of event that should be hooked + * @param function Name of callback function + * @param flags Flags used for filtering events (enum RegisterEventFlags); the valid flags are: + * RegisterEvent_Global - Global event (sent to every client) + * RegisterEvent_Single - Event sent to single client + * RegisterEvent_OnceForMultiple - Call only once when repeated to multiple clients + * RegisterEvent_OnlyDead - Call only if sent to dead client + * RegisterEvent_OnlyAlive - Call only if sent to alive client + * RegisterEvent_OnlyHuman - Call only if sent to human client (RegisterEvent_Single required) + * RegisterEvent_OnlyBots - Call only if sent to bot (RegisterEvent_Single required) + * @param cond Condition string used for filtering events, built as: + * "" + * Argument number is the argument position to be filtered + * The comparison operator may be: + * "=" for equality comparison (all argument types) + * "!" for inequality comparison (all argument types) + * "&" for bitwise and (int argument) or substring + * comparison (string argument) + * "<" for less than comparison (int/float arguments) + * ">" for greater than comparison (int/float arguments) + * The argument is compared to the specified value accordingly + * @param ... Any number of additional conditions + * + * @return Event handle + * @error If an invalid event name or callback function is provided, + * an error will be thrown. + */ +native register_event_ex(const event[], const function[], RegisterEventFlags:flags, const cond[] = "", ...); + +/** + * Enables a function hook of a game event which has been previously registered with register_event_ex(). + * + * @param handle Value returned from register_event() or register_event_ex() + * + * @noreturn + * @error If an invalid handle is provided, an error will be thrown. + */ +native enable_event(handle); + +/** + * Disables a function hook of a game event which has been previously registered with register_event_ex(). + * + * @param handle Value returned from register_event() or register_event_ex() + * + * @noreturn + * @error If an invalid handle is provided, an error will be thrown. + */ +native disable_event(handle); + +/** + * Registers a function to be called on a given log event. + * + * @note Examples for log conditions: + * "0 = World triggered" "1 = Game_Commencing" + * "1 = say" + * "3 = Terrorists_Win" + * "1 = entered the game" + * "0 = Server cvar" + * + * @param function Name of callback function + * @param argsnum Number of arguments of the log event + * @param ... Any number of conditions used for filtering events + * A condition string is built as: + * "" + * Argument number is the argument position to be filtered + * The comparison operator may be: + * - "=" for equality comparison + * - "&" for substring comparison + * The argument is compared to the specified string accordingly + * + * @return Log event handle + * @error If an invalid callback function is provided, an error will + * be thrown. + */ +native register_logevent(const function[], argsnum, ...); + +/** + * Enables a function hook of a game log event which has been previously registered with register_logevent(). + * + * @param handle Value returned from register_logevent() + * + * @noreturn + * @error If an invalid handle is provided, an error will be thrown. + */ +native enable_logevent(handle); + +/** + * Disables a function hook of a game log event which has been previously registered with register_logevent(). + * + * @param handle Value returned from register_logevent() + * + * @noreturn + * @error If an invalid handle is provided, an error will be thrown. + */ +native disable_logevent(handle); + +/** + * Sets display parameters for hudmessages. + * + * @note As of AMXX 1.61, setting the channel to -1 will automatically choose + * the next available HUD channel for the client. + * @note There are four different HUD channels available on the client (1-4). + * Sending a hudmessage to a channel will overwrite any existing messages + * already displaying on that channel. + * @note If you plan to create a permanent message, don't forget to specify a + * specific channel to avoid possible flickering due to auto-channeling. + * @note For the hudmessage coordinates x and y, -1.0 will center the message + * on the respective axis. + * @note These parameters stay until the next call to set_hudmessage overwrites + * them. Multiple calls to show_hudmessage will therefore re-use the same + * parameters. The parameters are not stored per-plugin, so other plugins + * can overwrite them. + * + * @param red Red component of hudmessage color + * @param green Green component of hudmessage color + * @param blue Blue component of hudmessage color + * @param x Location of the message on the x axis in percent + * @param y Location of the message on the y axis in percent + * @param effects Display effect + * @param fxtime Duration of the effect + * @param holdtime Time the message stays on screen + * @param fadeintime Time it takes the message to fully appear (fade-in) + * @param fadeouttime Time it takes the message to fully disappear (fade-out) + * @param channel Channel to use on the client + * @param alpha1 Alpha component of hudmessage color + * @param color2[4] Color 2 array {r,g,b,a} + * + * @noreturn + */ +native set_hudmessage(red = 200, green = 100, blue = 0, Float:x = -1.0, Float:y = 0.35, effects = 0, Float:fxtime = 6.0, Float:holdtime = 12.0, Float:fadeintime = 0.1, Float:fadeouttime = 0.2, channel = -1, alpha1 = 0, color2[4] = {255, 255, 250, 0}); + +/** + * Displays a message on the client HUD. + * + * @note Use set_hudmessage to define how the message should look on screen. + * @note This functions return value behaves differently depending on what is + * used as the client index: If 0 is specified, then the function will + * return 0 if nothing has been sent (no client connected). If either a + * single client is specified, or there is at least one client connected, + * the number of printed characters will refer to the message that is sent + * last, to the client with the highest index. + * + * @param index Client index, use 0 to display to all clients + * @param message Formatting rules + * @param ... Variable number of formatting parameters + * + * @return Number of printed characters + * @error If a single client is specified and the index is not within + * the range of 1 to MaxClients, an error will be thrown. + */ +native show_hudmessage(index, const message[], any:...); + +/** + * Sets display parameters for director hudmessages. + * + * @note For the hudmessage coordinates x and y, -1.0 will center the message + * on the respective axis. + * @note These parameters stay until the next call to set_dhudmessage overwrites + * them. Multiple calls to show_dhudmessage will therefore re-use the same + * parameters. The parameters are not stored per-plugin, so other plugins + * can overwrite them. + * + * @param red Red component of hudmessage color + * @param green Green component of hudmessage color + * @param blue Blue component of hudmessage color + * @param x Location of the message on the x axis in percent + * @param y Location of the message on the y axis in percent + * @param effects Display effect + * @param fxtime Duration of the effect + * @param holdtime Time the message stays on screen + * @param fadeintime Time it takes the message to fully appear (fade-in) + * @param fadeouttime Time it takes the message to fully disappear (fade-out) + * + * @noreturn + */ +native set_dhudmessage(red = 200, green = 100, blue = 0, Float:x = -1.0, Float:y = 0.35, effects = 0, Float:fxtime = 6.0, Float:holdtime = 12.0, Float:fadeintime = 0.1, Float:fadeouttime = 0.2); + +/** + * Displays a director message on the client HUD. + * + * @note Use set_dhudmessage to define how the message should look on screen. + * @note Unlike the classic HUD message, which is channel-based, director + * messages are stack-based. You can have up to 8 messages displaying at + * once. If more are added, they will be overwritten in the order they were + * sent. There is no way to clear a specific message. + * @note The message has a maximum length of 128 characters which this function + * will automatically enforce. + * @note This functions return value behaves differently depending on what is + * used as the client index: If 0 is specified, then the function will + * return 0 if nothing has been sent (no client connected). If either a + * single client is specified, or there is at least one client connected, + * the number of printed characters will refer to the message that is sent + * last, to the client with the highest index. + * + * @param index Client index, use 0 to display to all clients + * @param message Formatting rules + * @param ... Variable number of formatting parameters + * + * @return Number of printed characters + * @error If a single client is specified and the index is not within + * the range of 1 to MaxClients, an error will be thrown. + */ +native show_dhudmessage(index, const message[], any:...); + +/** + * Displays a menu to the client. + * + * @note Keys is a bitflag value that represents which keys the user can press + * on the menu. If you want to display disabled menu options, or skip + * certain number slots, you should exclude that key from the bitflag. + * amxconst.inc provides MENU_KEY_* constants for convenience. + * @note The title parameter is not displayed to the client and is only used for + * identifying menus internally and assigning them to their callbacks. + * The title corresponds to the menu name that you register with + * register_menuid() + * + * @param index Client to display menu to, use 0 to display to all clients + * @param keys Enabled keys + * @param menu Menu body + * @param time Menu timeout in seconds, -1 to disable + * @param title Name of the menu for internal tracking purposes + * + * @return 1 on success, 0 if menu could not be displayed (client not + * connected) + * @error If a single client is specified and the index is not within + * the range of 1 to MaxClients, an error will be thrown. + */ +native show_menu(index, keys, const menu[], time = -1, const title[] = ""); + +/** + * Retrieves values from a client message. + * + * @note For use within callbacks registered with register_event_ex() + * @note Usage examples: + * value = read_data(1); + * read_data(2, floatvalue); + * written = read_data(3, buffer, buffersize); + * + * @param value Argument number to retrieve value from + * @param ... Changes the native's behavior depending on how many + * additional parameters are provided: + * 0 - Return the argument integer value directly + * 1 - Store the argument float value in the variable passed + * as the second parameter + * 2 - Copy the argument string value to the buffer provided + * in the second parameter, using the third as the + * maximum buffer size + * + * @return Changes depending on how many additional parameters are + * provided: + * 0 - Returns the argument integer value + * 1 - Returns the argument float value, converted + * (truncated) to an integer + * 2 - Returns the number of cells written to the buffer + */ +native read_data(value, any:...); + +/** + * Returns the number of values in the client message. + * + * @note For use within callbacks registered with register_event_ex() + * + * @return Number of values in client message + */ +native read_datanum(); + +/** + * Returns the message id of the client message. + * + * @note For use within callbacks registered with register_event_ex() + * + * @return Message id of the client message + */ +native read_datatype(); + +/** + * Retrieves current log message. + * + * @note Should only be used inside of the plugin_log() forward. + * + * @param output Buffer to copy log message to + * @param len Maximum buffer size + * + * @return Number of cells written to buffer + */ +native read_logdata(output[], len); + +/** + * Returns number of log message arguments. + * + * @note Should only be used inside of the plugin_log() forward. + * + * @return Number of arguments in the log message + */ +native read_logargc(); + +/** + * Retrieves argument of log message. + * + * @note Should only be used inside of the plugin_log() forward. + * + * @param id Argument index, starting from 0 + * @param output Buffer to copy log argument to + * @param len Maximum buffer size + * + * @return Number of cells written to buffer + */ +native read_logargv(id, output[], len); + +/** + * Parse log data about client. + * + * @note When client actions are logged, they appear in the the format + * "Name<#userid>", this native extracts the individual + * pieces of information. + * + * @param text String to process + * @param name Buffer to copy client name to + * @param nlen Maximum name buffer size + * @param userid Variable to store userid in + * @param authid Buffer to copy client authid to + * @param alen Maximum auth buffer size + * @param team Buffer to copy client team to + * @param tlen Maximum team buffer size + * + * @noreturn + * @error If the provided string is not valid client log data, an + * error will be thrown. + */ +native parse_loguser(const text[], name[], nlen, &userid =-2, authid[] = "", alen = 0, team[] = "", tlen = 0); + +/** + * Sends a message to the console of the server. + * + * @param message Formatting rules + * @param ... Variable number of formatting parameters + * + * @return Number of printed characters + */ +native server_print(const message[], any:...); + +/** + * Returns if the given mapname is deemed valid by the engine. + * + * @param mapname Name of the map + * + * @return 1 if the map name is valid, 0 otherwise + */ +native is_map_valid(const mapname[]); + +/** + * Returns if the client is a bot. + * + * @param index Client index + * + * @return 1 if client is a bot, 0 otherwise + */ +native is_user_bot(index); + +/** + * Returns if the client is a HLTV proxy. + * + * @param index Client index + * + * @return 1 if client is a HLTV proxy, 0 otherwise + */ +native is_user_hltv(index); + +/** + * Returns if the client is connected. + * + * @note This does not throw an error if the provided index is out of the + * 1 to MaxClients range. That means you can safely use this native + * without manually verifying that the index is a valid client index. + * + * @param index Client index + * + * @return 1 if client is connected, 0 otherwise + */ +native is_user_connected(index); + +/** + * Returns if the client is connecting. + * + * @param index Client index + * + * @return 1 if client is connecting, 0 otherwise + */ +native is_user_connecting(index); + +/** + * Returns if the client is alive. + * + * @note This will never return true if a client is not connected. If you need + * to know whether a client is alive, an additional call to + * is_user_connected() is unnecessary. + * + * @param index Client index + * + * @return 1 if client is alive, 0 otherwise + */ +native is_user_alive(index); + +/** + * Returns if the server is a dedicated server. + * + * @return 1 if server is a dedicated server, 0 otherwise + */ +native is_dedicated_server(); + +/** + * Returns if the server is running on Linux. + * + * @return 1 if server is running on Linux, 0 otherwise + */ +native is_linux_server(); + +/** + * Returns if the AMXX installation has the JIT enabled. + * + * @return 1 if JIT is enabled, 0 otherwise + */ +native is_jit_enabled(); + +/** + * Retrieves the version string of the AMXX installation. + * + * @param buffer Buffer to copy version to + * @param length Maximum buffer size + * + * @return Number of cells written to the buffer + */ +native get_amxx_verstring(buffer[], length); + +/** + * Returns the last known attacker of a client. + * + * @note As of AMXX 1.75 this can return a non-client entity index if the client + * was attacked by a non-client entity. + * + * @param index Client index + * @param ... If provided, the attacker weapon will be stored in an + * optional second parameter, and the body hit place will be + * stored in an optional third parameter + * + * @return Attacker client index, a non-client entity or 0 if no + * attacker was found + * @error If the client index is not within the range of 1 to + * MaxClients, an error will be thrown. + */ +native get_user_attacker(index, ...); + +/** + * Traces the client's current aim vector to see if it hits something. + * + * @note If the trace does not hit a client, id and body will be set to 0. + * @note If the trace hits nothing within the specified distance, 0 is returned. + * @note For a list of possible body hitplaces see the HIT_* constants in amxconst.inc. + * + * @param index Client index to trace aim from + * @param id Variable to store hit client index (if applicable) + * @param body Variable to store hit client body part (if applicable) + * @param dist Maximum distance of the trace + * + * @return Distance between the trace start and end point + * @error If the client index is not within the range of 1 to + * MaxClients, an error will be thrown. + */ +native Float:get_user_aiming(index, &id, &body = HIT_GENERIC, dist = 9999); + +/** + * Returns the client's frags. + * + * @note While this is mod-independent, the mod may track frag count differently, + * so it can only be retrieved using another native or other methods. + * @note This will actually return the client's overall score, which may or may + * not be equal to their scored frags depending on the mod. + * + * @param index Client index + * + * @return Frags/Score of the client. Also returns 0 if the client is + * not connected or the index is not within the range of + * 1 to MaxClients + */ +native get_user_frags(index); + +/** + * Returns the client's armor value. + * + * @note While this is mod-independent, the mod may track armor data differently, + * so it can only be retrieved using another native or other methods. + * + * @param index Client index + * + * @return Amount of armor the client has. Also returns 0 if the client + * is not connected or the index is not within the range of + * 1 to MaxClients + */ +native get_user_armor(index); + +/** + * Returns the client's death count. + * + * @note While this is mod-independent, the mod may track death count differently, + * so it can only be retrieved using another native or other methods. + * + * @param index Client index + * + * @return Amount of deaths the client has. Also returns 0 if the + * client is not connected or the index is not within the range + * of 1 to MaxClients + */ +native get_user_deaths(index); + +/** + * Returns the client's health points. + * + * @note While this is mod-independent, the mod may track health points + * differently, so it can only be retrieved using another native or other + * methods. + * + * @param index Client index + * + * @return Amount of health points the client has. Also returns 0 if + * the client is not connected or the index is not within the + * range of 1 to MaxClients + */ +native get_user_health(index); + +/** + * Retrieves a client's index by name. + * + * @param name Name to search for + * + * @return Client index on success, 0 otherwise + */ +native get_user_index(const name[]); + +/** + * Retrieves the IP of a client or the server. + * + * @param index Client index, use 0 to retrieve the server IP + * @param ip Buffer to copy IP to + * @param len Maximum buffer size + * @param without_port Remove the port from the IP if nonzero + * + * @return Number of cells written to the buffer + */ +native get_user_ip(index, ip[], len, without_port = 0); + +/** + * Returns if the client has the specified weapon in their inventory. + * + * @param index Client index + * @param weapon Weapon index + * @param setweapon If zero the weapon bit will be removed from the client's + * inventory, if 1 it will be set + * + * @return 1 if the weapon is present, 0 if it is not + * @error If the client index is not within the range of 1 to + * MaxClients, an error will be thrown. + */ +native user_has_weapon(index, weapon, setweapon = -1); + +/** + * Returns weapon index of the currently carried weapon. Also allows retrieval + * of ammo in the clip and backpack. + * + * @param index Client index + * @param clip Optional variable to store clip ammo to + * @param ammo Optional variable to store backpack ammo to + * + * @return Weapon index on success or 0 if the client is not connected + * @error If the client index is not within the range of 1 to + * MaxClients, an error will be thrown. + */ +native get_user_weapon(index, &clip = 0, &ammo = 0); + +/** + * Retrieves ammo in the clip and backpack of the specified weapon. + * + * @param index Client index + * @param weapon Weapon index + * @param clip Variable to store clip ammo to + * @param ammo Variable to store backpack ammo to + * + * @return 1 on success or 0 if the client is not connected + * @error If the client index is not within the range of 1 to + * MaxClients or the weapon index is invalid, an error will + * be thrown. + */ +native get_user_ammo(index, weapon, &clip, &ammo); + +/** + * Converts an integer to a text string. + * + * @note The conversion algorithm is limited to a certain range of numbers, but + * is guaranteed to work correctly for all numbers from 0 to 999. Outside + * of that range, the conversion will result in an incorrect string, but + * will not fail. + * @note The conversion is to english text, there is no way to change this. + * + * @param num Integer to convert + * @param output Buffer to copy string to + * @param len Maximum buffer size + * + * @return Number of cells written to buffer + */ +native num_to_word(num, output[], len); + +/** + * Returns the team id of the client, and optionally retrieves the name of + * the team. + * + * @param index Client index + * @param team Buffer to copy team name to + * @param len Maximum size of buffer + * + * @return Team index on success, -1 if client index is invalid or + * the client is not connected + */ +native get_user_team(index, team[] = "", len = 0); + +/** + * Returns client's playing time in seconds. + * + * @param index Client index + * @param flag If nonzero, the result will not include the time it took + * the client to connect. + * + * @return Connection time in seconds, 0 if client index is invalid or + * client is not connected + */ +native get_user_time(index, flag = 0); + +/** + * Retrieves the ping and loss of a client. + * + * @param index Client index + * @param ping Variable to store ping in + * @param loss Variable to store loss in + * + * @return 1 on success, 0 if client index is invalid or the client + * is not connected + */ +native get_user_ping(index, &ping, &loss); + +/** + * Retrieves an origin related to the client. + * + * @note For a list of possible modes see the Origin_* constants in amxconst.inc. + * + * @param index Client index + * @param origin Array to store origin in + * @param mode What type of origin to retrieve: + * Origin_Client - current position + * Origin_Eyes - position of eyes (and weapon) + * Origin_AimEndClient - aim end position from client position + * Origin_AimEndEyes - aim end position from eyes (hit point for weapon) + * Origin_CS_LastBullet - position of last bullet hit (only for Counter-Strike) + * + * @return 1 on success, 0 if client is not connected + * @error If the client index is not within the range of 1 to + * MaxClients, an error will be thrown. + */ +native get_user_origin(index, origin[3], mode = 0); + +/** + * Retrieves all weapons in the client inventory, stores them in an array, and + * returns the inventory as a bitflag sum. + * + * @note Make sure that num has an initial value of 0 or the native will not + * work correctly. + * + * @param index Client index + * @param weapons Array to store weapon indexes in + * @param num Variable to store number of weapons in the inventory to + * + * @return Bitflag sum of weapon indexes, 0 if client is not connected + * @error If the client index is not within the range of 1 to + * MaxClients, an error will be thrown. + */ +native get_user_weapons(index, weapons[32], &num); + +/** + * Retrieves the full name of a weapon. + * + * @param id Weapon index + * @param weapon Buffer to copy name to + * @param len Maximum buffer size + * + * @return Number of cells written to buffer + */ +native get_weaponname(id, weapon[], len); + +/** + * Retrieves the name of a client or the server. + * + * @param index Client index, or 0 to retrieve the server hostname + * @param name Buffer to copy name to + * @param len Maximum buffer size + * + * @return Number of cells written to buffer + */ +native get_user_name(index, name[], len); + +/** + * Retrieves the SteamID of a client. + * + * @note The SteamID is only available once the client_authorized() forward has + * been called for the client. + * + * @param index Client index + * @param authid Buffer to copy auth to + * @param len Maximum buffer size + * + * @return Number of cells written to buffer + */ +native get_user_authid(index, authid[], len); + +/** + * Returns the userid of a client. + * + * @param index Client index + * + * @return Client userid, 0 if the userid is not available or the + * client index is invalid + */ +native get_user_userid(index); + +/** + * Slaps the client with specified power. Killing the client if applicable. + * + * @note This removes "power" amount of health from the client, performing + * a kill if they have no health left after the slap. + * @note The function will apply a velocity to the client that is independent + * of the slap power. The slap direction can be influenced by the third + * parameter. + * + * @param index Client index + * @param power Power of the slap + * @param rnddir If set to zero the player will be slapped along it's aim + * vector, otherwise the direction will be randomized + * + * @return 1 if user is alive and slap succeeded, 0 otherwise + */ +native user_slap(index, power, rnddir = 1); + +/** + * Kills a client. + * + * @param index Client index + * @param flag If nonzero, the death will not affect the client's score + * + * @return 1 on success, 0 if client index is invalid or the client + * is not connected + */ +native user_kill(index, flag = 0); + +/** + * Logs a message to the current AMXX log file. + * + * @note The message will automatically be tagged with the plugin's name and the + * log will include a timestamp with the message. + * + * @param string Formatting rules + * @param ... Variable number of formatting parameters + * + * @noreturn + */ +native log_amx(const string[], any:...); + +/** + * Logs a message to the current server log file. + * + * @note The log will include a timestamp with the message. + * + * @param string Formatting rules + * @param ... Variable number of formatting parameters + * + * @return Number of printed characters + */ +native log_message(const message[], any:...); + +/** + * Logs a message hookable by plugins to the current server log file. + * + * @note The log will include a timestamp with the message. + * @note The message can be hooked using "register_logevent". + * + * @param string Formatting rules + * @param ... Variable number of formatting parameters + * + * @return Number of printed characters + */ +native elog_message(const message[], any:...); + +/** + * Logs a message to the specified file + * + * @note The log will include a timestamp with the message. + * + * @param string Formatting rules + * @param ... Variable number of formatting parameters + * + * @noreturn + */ +native log_to_file(const file[], const message[], any:...); + +/** + * Returns the number of clients on the server. + * + * @param flag Count clients still in the connecting process if nonzero + * + * @return Number of clients on the server + */ +native get_playersnum(flag = 0); + +/** + * Stores a filtered list of client indexes to an array. + * + * @note Please consider using get_players_ex() instead which allows you to + * use named constants for flags instead of letters. + * @note Example retrieving all alive CTs: get_players(players, num "ae", "CT") + * + * @param players Array to store indexes to + * @param num Variable to store number of indexes to + * @param flags Optional list of filtering flags: + * "a" - do not include dead clients + * "b" - do not include alive clients + * "c" - do not include bots + * "d" - do not include human clients + * "e" - match with team + * "f" - match with part of name + * "g" - match case insensitive + * "h" - do not include HLTV proxies + * "i" - include connecting clients + * @param team String to match against if the "e" or "f" flag is specified + * + * @noreturn + */ +native get_players(players[MAX_PLAYERS], &num, const flags[] = "", const team[] = ""); + +/** + * Retrieves argument of client command as string. + * + * @note Should only be used inside of the client_command() forward. + * + * @param id Argument index starting from 1, 0 returns the command itself + * @param output Buffer to copy command argument to + * @param len Maximum buffer size + * + * @return Number of cells written to buffer + */ +native read_argv(id, output[], len); + +/** + * Retrieves argument of client command as integer value. + * + * @note Should only be used inside of the client_command() forward. + * + * @param id Argument index starting from 1 + * + * @return Integer value + */ +native read_argv_int(id); + +/** + * Retrieves argument of client command as float value. + * + * @note Should only be used inside of the client_command() forward. + * + * @param id Argument index starting from 1 + * + * @return Float value + */ +native Float:read_argv_float(id); + +/** + * Retrieves full client command string. + * + * @note Should only be used inside of the client_command() forward. + * + * @param output Buffer to copy command line to + * @param len Maximum buffer size + * + * @return Number of cells written to buffer + */ +native read_args(output[], len); + +/** + * Returns number of client command arguments. + * + * @note Should only be used inside of the client_command() forward. + * @note This count includes the command itself. I.e. in a command with 4 + * arguments, this will return 5. + * + * @return Number of arguments in the command + */ +native read_argc(); + +/** + * Converts a flag string to a bitflag value. + * + * @note Example: The string "abcd" represents the sum of 1, 2, 4, and 8 - or + * (1<<0)|(1<<1)|(1<<2)|(1<<3). The function will return 15. + * + * @param flags Flag string to convert + * + * @return Bitflag value + */ +native read_flags(const flags[]); + +/** + * Converts a bitflag value to a flag string. + * + * @note Example: The value 3 will yield the string "ab" + * + * @param flags Bitflag value to convert + * @param output Buffer to copy flag string to + * @param len Maximum buffer size + * + * @return Number of cells written to buffer + */ +native get_flags(flags, output[], len); + +/** + * Find a player given a filter. + * + * @note Please consider using find_player_ex() instead which allows you to + * use named constants for flags instead of letters. + * @note If matching by userid, do not also specify the "a", "b" or "c" flags, + * or the function may not return a correct result. + * + * @param flags List of filtering flags: + * "a" - match with name + * "b" - match with name substring + * "c" - match with authid + * "d" - match with ip + * "e" - match with team name + * "f" - do not include dead clients + * "g" - do not include alive clients + * "h" - do not include bots + * "i" - do not include human clients + * "j" - return last matched client instead of the first + * "k" - match with userid + * "l" - match case insensitively + * "m" - include connecting clients + * @param ... String to match against (integer if "k" flag is specified) + * + * @return Client index, or 0 if no client was found + */ +native find_player(const flags[], ...); + +/** + * Find a player given a filter. + * + * @note If matching by userid, do not also specify FindPlayer_MatchName, FindPlayer_MatchNameSubstring + * or FindPlayer_MatchAuthId, or the function may not return a correct result. + * + * @param flags Filtering flags (enum FindPlayerFlags); valid flags are: + * FindPlayer_MatchName - match with name + * FindPlayer_MatchNameSubstring - match with name substring + * FindPlayer_MatchAuthId - match with authid + * FindPlayer_MatchIP - match with ip + * FindPlayer_MatchTeam - match with team name + * FindPlayer_ExcludeDead - do not include dead clients + * FindPlayer_ExcludeAlive - do not include alive clients + * FindPlayer_ExcludeBots - do not include bots + * FindPlayer_ExcludeHuman - do not include human clients + * FindPlayer_LastMatched - return last matched client instead of the first + * FindPlayer_MatchUserId - match with userid + * FindPlayer_CaseInsensitive - match case insensitively + * FindPlayer_IncludeConnecting - include connecting clients + * @param ... String to match against (integer if FindPlayer_MatchUserId is specified) + * + * @return Client index, or 0 if no client was found + */ +native find_player_ex(FindPlayerFlags:flags, ...); + +/** + * Removes double-quotes from the beginning and end of a string. + * + * @note If the string only has a double-quote at either the start *or* the end, + * and not both, the function will do nothing. + * @note The function does not perform any trimming per-se. But if a + * double-quote is found at the beginning of the string, it will remove + * one ^r (carriage return) character at the end of the string if present, + * even if no matching double-quote is found. This is for convenience. + * + * @param text String to remove double-quotes from + * + * @return 1 if matching double-quotes have been removed, 0 otherwise + */ +native remove_quotes(text[]); + +/** + * Executes a command on the client. + * + * @note Executing malicious commands on the client ("slowhacking") is frowned + * upon. + * @note Valve has introduced a command filter to Counter-Strike 1.6. It is not + * possible to execute many commands if the client has opted in to this. + * + * @param index Client index, use 0 to execute on all clients + * @param command Formatting rules + * @param ... Variable number of formatting parameters + * + * @return Length of formatted command string + * @error If a single client is specified and the index is not within + * the range of 1 to MaxClients, an error will be thrown. + */ +native client_cmd(index, const command[], any:...); + +/** + * Execute a command from the client without actually sending it to the client's + * DLL. + * + * @note This emulates a client command on the server side, and is an excellent + * tool to force a client to do certain actions related to the game. + * @note The command has to stand alone in the command parameter, only add + * arguments using the designated parameters. + * @note Commands emulated using this function will not trigger plugin command + * hooks. For an alternative that does, see amxclient_cmd() + * + * @param index Client index, use 0 to execute from all clients + * @param command Client command to execute on + * @param arg1 Optional command arguments + * @param arg2 Optional command arguments + * + * @noreturn + * @error If a single client is specified and the index is not within + * the range of 1 to MaxClients, an error will be thrown. + */ +native engclient_cmd(index, const command[], const arg1[] = "", const arg2[] = ""); + +/** + * Execute a command from the client without actually sending it to the client's + * DLL. This triggers plugin command hooks. + * + * @note This emulates a client command on the server side, and is an excellent + * tool to force a client to do certain actions related to the game. + * @note The command has to stand alone in the command parameter, only add + * arguments using the designated parameters. + * @note Commands emulated using this function will trigger other plugin's + * command hooks. For an alternative that doesn't, see engclient_cmd() + * + * @param index Client index, use 0 to execute from all clients + * @param command Client command to execute on + * @param arg1 Optional command arguments + * @param arg2 Optional command arguments + * + * @noreturn + * @error If a single client is specified and the index is not within + * the range of 1 to MaxClients, an error will be thrown. + */ +native amxclient_cmd(index, const command[], const arg1[] = "", const arg2[] = ""); + +/** + * Queues a command to be executed from the server console. + * + * @note Warning: This is a potential source of command injection. Do not feed + * client-controlled input (including client names) to this function + * without sanitizing it first. + * @note The queued commands will be executed by the engine on the next frame. + * If you require them to be executed immediately, see server_exec() + * + * @param command Formatting rules + * @param ... Variable number of formatting parameters + * + * @noreturn + */ +native server_cmd(const command[], any:...); + +/** + * Retrieves the name of the currently played map. + * + * @param name Buffer to copy map name to + * @param len Maximum buffer size + * + * @return Number of cells written to buffer + */ +native get_mapname(name[], len); + +/** + * Returns time remaining on map. + * + * @return Time left on map, in seconds + */ +native get_timeleft(); + +/** + * Returns the game time based on the game tick. + * + * @note This time is counted up from map start. If the engine is not processing + * this function will return the same value between calls, which makes it + * unusable for profiling purposes. + * + * @return Game time, in seconds + */ +native Float:get_gametime(); + +/** + * Returns the maxplayers setting of the current server, that is how many + * clients it supports. + * + * @note As of AMXX 1.8.3, this value is also exposed through a dynamic constant + * via the MaxClients variable, declared in amxconst.inc + * + * @return Maxplayers setting + */ +native get_maxplayers(); + +/** + * Retrieves the name of the currently played mod. + * + * @note This retrieves the short name of the mod. Example: for Counter-Strike, + * it will copy "cstrike" to the buffer. + * + * @param name Buffer to copy mod name to + * @param len Maximum size of the buffer + * + * @return Number of cells written to buffer + */ +native get_modname(name[], len); + +/** + * Retrieves the current time using the specified format string. + * + * @note Uses the strftime C function. For a list of valid format parameters, + * see: http://cplusplus.com/reference/clibrary/ctime/strftime.html + * A common example for a format string would be: "%m/%d/%Y - %H:%M:%S" + * + * @param format Format string + * @param output Buffer to copy formatted time string to + * @param len Maximum size of buffer + * + * @return Number of cells written to buffer + */ +native get_time(const format[], output[], len); + +/** + * Retrieves the provided time using the specified format string. + * + * @note Uses the strftime C function. For a list of valid format parameters, + * see: http://cplusplus.com/reference/clibrary/ctime/strftime.html + * A common example for a format string would be: "%m/%d/%Y - %H:%M:%S" + * + * @param output Buffer to copy formatted time string to + * @param len Maximum size of buffer + * @param format Format string + * @param time Unix timestamp, use -1 to use the current time + * + * @return Number of cells written to buffer + * @error If the conversion process fails, an error will be thrown. + */ +native format_time(output[], len, const format[], time = -1); + +/** + * Returns the system time as a unix timestamp (number of seconds since unix + * epoch). + * + * @param offset Optional offset value in seconds + * + * @return Unix time stamp + */ +native get_systime(offset = 0); + +/** + * Converts time strings to unix time stamp. + * + * @note Uses the strptime C function. For a list of valid format parameters, + * see: http://www.cplusplus.com/reference/ctime/strftime/ + * An example for a input/format combination would be: + * Input: "10:32:54 04/02/2013" Format: "%H:%M:%S %m:%d:%Y" + * @note Information missing from the input will be filled with the current + * time and date. + * + * @param input Time string to convert + * @param format Formatting information for conversion + * @param time If different from -1, the converted time will be added to + * this time stamp + * + * @return Unix time stamp + * @error If the conversion process fails, an error will be thrown. + */ +native parse_time(const input[], const format[], time = -1); + +/** + * Calls a function after a specified time has elapsed. + * + * @note Please consider using set_task_ex() instead which allows you to + * use named constants for flags instead of letters. + * + * @param time Time interval to assign + * @param function Function to execute + * @param id Task id to assign + * @param parameter Data to pass through to callback + * @param len Size of data + * @param flags Optional set of flags: + * "a" - repeat timer a set amount of times + * "b" - loop indefinitely until timer is stopped + * "c" - time interval is treated as absolute time after + * map start + * "d" - time interval is treated as absolute time before + * map change + * @param repeat If the "a" flag is set, the task will be repeated this + * many times + * + * @noreturn + * @error If an invalid callback function is provided, an error is + * thrown. + */ +native set_task(Float:time, const function[], id = 0, const any:parameter[] = "", len = 0, const flags[] = "", repeat = 0); + +/** + * Removes all tasks with the specified id. + * + * @param id Task id to search for + * @param outside Will remove tasks set by other plugins if nonzero + * + * @return Number of removed tasks + */ +native remove_task(id = 0, outside = 0); + +/** + * Modifies the time interval of all tasks with the specified id. + * + * @param id Task id to search for + * @param newTime New time interval to set + * @param outside Will affect tasks set by other plugins if nonzero + * + * @return Number of affected tasks + */ +native change_task(id = 0, Float:newTime = 1.0, outside = 0); + +/** + * Returns if a task with the specified id exists. + * + * @param id Task id to search for + * @param outside Search for tasks set by other plugins if nonzero + * + * @return 1 if a task was found, 0 otherwise + */ +native task_exists(id = 0, outside = 0); + +/** + * Sets the specified admin flags to a client. + * + * @note For a list of possible flags, see the ADMIN_* constants in amxconst.inc + * @note This function just adds the flags using a bitwise-or operation. After it + * has run, the flags may not exactly equal the specified bitflag sum. + * @note AMXX stores multiple sets of flags internally, but only flag set + * 0 is actively used. You should not change the value of the third + * parameter from the default. + * + * @param index Client index, 0 to set flags of server + * @param flags Admin flags + * @param id Flag set id, ranging from 0 to 31 + * + * @noreturn + * @error If the index is not within the range of 0 to MaxClients, an + * error will be thrown. + */ +native set_user_flags(index, flags = -1, id = 0); + +/** + * Returns the client's admin flags as a bitflag sum. + * + * @note For a list of possible flags, see the ADMIN_* constants in amxconst.inc + * @note AMXX stores multiple sets of flags internally, but only flag set + * 0 is actively used. You should not change the value of the second + * parameter from the default. + * + * @param index Client index, 0 to set flags of server + * @param id Flag set id, ranging from 0 to 31 + * + * @return Bitflag sum of client's admin flags + * @error If the index is not within the range of 0 to MaxClients, an + * error will be thrown. + */ +native get_user_flags(index, id = 0); + +/** + * Removes the specified admin flags from a client. + * + * @note For a list of possible flags, see the ADMIN_* constants in amxconst.inc + * @note This function just removes the flags using a bitwise-and operation. + * @note AMXX stores multiple sets of flags internally, but only flag set + * 0 is actively used. You should not change the value of the third + * parameter from the default. + * + * @param index Client index, 0 to set flags of server + * @param flags Admin flags + * @param id Flag set id, ranging from 0 to 31 + * + * @noreturn + * @error If the index is not within the range of 0 to MaxClients, an + * error will be thrown. + */ +native remove_user_flags(index, flags = -1, id = 0); + +/** + * Registers a callback to be called when the client executes a command from the + * console. + * + * @note For a list of possible access flags, see the ADMIN_* constants in + * amxconst.inc + * @note Opting in to FlagManager enables the admin privileges to be overwritten + * by the end user via the cmdaccess.ini config file. + * @note Automatic detection for FlagManager will only include a command if it + * has required privileges (flags is not -1) and it is not a command + * starting with "say". + * + * @param client_cmd Command to register + * @param function Callback function + * @param flags Admin privilege flags required + * @param info Command description + * @param FlagManager 0 opts out of flag manager, 1 opts in, -1 selects + * automatically + * @param info_ml If true, the parameter "info" will be looked up as multilingual key + * + * @return Command id, 0 on failure + * @error If an invalid callback function is specified, an error + * will be thrown. + */ +native register_clcmd(const client_cmd[], const function[], flags = -1, const info[] = "", FlagManager = -1, bool:info_ml = false); + +/** + * Registers a callback to be called when the client or server executes a + * command from the console. + * + * @note For a list of possible access flags, see the ADMIN_* constants in + * amxconst.inc + * @note Opting in to FlagManager enables the admin privileges to be overwritten + * by the end user via the cmdaccess.ini config file. + * @note Automatic detection for FlagManager will only include a command if it + * has required privileges (flags is not -1) and it is not a command + * starting with "say". + * + * @param client_cmd Command to register + * @param function Callback function + * @param flags Admin privilege flags required + * @param info Command description + * @param FlagManager 0 opts out of flag manager, 1 opts in, -1 selects + * automatically + * @param info_ml If true, the parameter "info" will be looked up as multilingual key + * + * @return Command id, 0 on failure + * @error If an invalid callback function is specified, an error + * will be thrown. + */ +native register_concmd(const cmd[], const function[], flags = -1, const info[] = "", FlagManager = -1, bool:info_ml = false); + +/** + * Registers a callback to be called when the server executes a command from the + * console. + * + * @note For a list of possible access flags, see the ADMIN_* constants in + * amxconst.inc + * + * @param client_cmd Command to register + * @param function Callback function + * @param flags Admin privilege flags required + * @param info Command description + * @param info_ml If true, the parameter "info" will be looked up as multilingual key + * + * @return Command id, 0 on failure + * @error If an invalid callback function is specified, an error + * will be thrown. + */ +native register_srvcmd(const server_cmd[], const function[], flags = -1, const info[] = "", bool:info_ml = false); + +/** + * Retrieves information about a client command. + * + * @note For a list of possible access flags, see the ADMIN_* constants in + * amxconst.inc + * + * @param index Command index + * @param command Buffer to copy command name to + * @param len1 Maximum name buffer size + * @param flags Variable to store privilege flags to + * @param info Buffer to copy command description to + * @param len2 Maximum description buffer size + * @param flag Only considers commands that can be accessed with + * the specified privilege flags + * @param info_ml Variable to store whether the parameter "info" is a multilingual key + * + * @return 1 on success, 0 if command was not found + */ +native get_clcmd(index, command[], len1, &flags, info[], len2, flag, &bool:info_ml = false); + +/** + * Returns number of registered client commands. + * + * @note For a list of possible access flags, see the ADMIN_* constants in + * amxconst.inc + * + * @param flag Only considers commands that can be accessed with + * the specified privilege flags + * + * @return Number of registered client commands + */ +native get_clcmdsnum(flag); + +/** + * Retrieves information about a server command. + * + * @note For a list of possible access flags, see the ADMIN_* constants in + * amxconst.inc + * + * @param index Command index + * @param command Buffer to copy command name to + * @param len1 Maximum name buffer size + * @param flags Variable to store privilege flags to + * @param info Buffer to copy command description to + * @param len2 Maximum description buffer size + * @param flag Only considers commands that can be accessed with + * the specified privilege flags + * @param info_ml Variable to store whether the parameter "info" is a multilingual key + * + * @return 1 on success, 0 if command was not found + */ +native get_srvcmd(index, server_cmd[], len1, &flags, info[], len2, flag, &bool:info_ml = false); + +/** + * Returns number of registered server commands. + * + * @note For a list of possible access flags, see the ADMIN_* constants in + * amxconst.inc + * + * @param flag Only considers commands that can be accessed with + * the specified privilege flags + * + * @return Number of registered server commands + */ +native get_srvcmdsnum(flag); + +/** + * Retrieves information about a console command. + * + * @note For a list of possible access flags, see the ADMIN_* constants in + * amxconst.inc + * + * @param index Command index + * @param command Buffer to copy command name to + * @param len1 Maximum name buffer size + * @param flags Variable to store privilege flags to + * @param info Buffer to copy command description to + * @param len2 Maximum description buffer size + * @param flag Only considers commands that can be accessed with + * the specified privilege flags + * @param id If set to 0 only server commands will be considered, + * positive will only consider client commands, otherwise + * all console commands will be considered + * @param info_ml Variable to store whether the parameter "info" is a multilingual key + * + * @return 1 on success, 0 if command was not found + */ +native get_concmd(index, cmd[], len1, &flags, info[], len2, flag, id = -1, &bool:info_ml = false); + +/** + * Returns the parent plugin id of a console command. + * + * @note For a list of possible access flags, see the ADMIN_* constants in + * amxconst.inc + * + * @param cid Command index + * @param flag_mask Only considers commands that can be accessed with + * the specified privilege flags. + * @param id_type If set to 0 only server commands will be considered, + * positive will only consider client commands, otherwise + * all console commands will be considered. + * + * @return Plugin id + */ +native get_concmd_plid(cid, flag_mask, id_type); + +/** + * Returns number of registered console commands. + * + * @note For a list of possible access flags, see the ADMIN_* constants in + * amxconst.inc + * + * @param flag Only considers commands that can be accessed with + * the specified privilege flags + * @param id If set to 0 only server commands will be considered, + * positive will only consider client commands, otherwise + * all console commands will be considered + * + * @return Number of registered console commands + */ +native get_concmdsnum(flag, id = -1); + +/** + * Returns unique menu id of a menu. + * + * @param menu Menu name + * @param outside Catch menus outside the calling plugin + * + * @return Menu id + */ +native register_menuid(const menu[], outside = 0); + +/** + * Registers a callback function to a menu id and keys. + * + * @param menuid Menu id + * @param keys Key flags + * @param function Callback function + * + * @noreturn + * @error If an invalid callback function is specified, an error + * will be thrown. + */ +native register_menucmd(menuid, keys, const function[]); + +/** + * Returns if the client is watching a menu. + * + * @note If there is no menu, the id is 0. If the id is negative, then the client + * views a VGUI menu. Otherwise, the id is an id acquired from the + * register_menuid() function. + * + * @param index Client index + * @param id Variable to store menu id to + * @param keys Variable to store menu keys to + * + * @return 1 if client views a menu, 0 otherwise + * @error If the client index is not within the range of 1 to + * MaxClients, an error will be thrown. + */ +native get_user_menu(index, &id, &keys); + +/** + * Forces the server to execute the command queue immediately. + * + * @note Commands can be added to the queue using server_cmd() + * + * @noreturn + */ +native server_exec(); + +/** + * Emits a sound from an entity from the engine. + * + * @note The sample must be precached using precache_sound() so it is available + * in the engine's sound table. + * @note For a list of available channels, see CHAN_* constants in amxconst.inc, + * sounds emitted from the same channel will override each other. + * @note There are helpful reference constants in amxconst.inc for sound volume + * (VOL_*), attenuation (ATTN_*), flags (SND_*), and pitch (PITCH_*). + * + * @param index Entity index, use 0 to emit from all clients + * @param channel Channel to emit from + * @param sample Sound file to emit + * @param vol Volume in percent + * @param att Sound attenuation + * @param flags Emit flags + * @param pitch Sound pitch + * + * @noreturn + */ +native emit_sound(index, channel, const sample[], Float:vol, Float:att, flags, pitch); + +/** + * Returns a random floating point value generated by the engine. + * + * @param a Minimum value (inclusive) + * @param b Maximum value (inclusive) + * + * @return Generated random value + */ +native Float:random_float(Float:a, Float:b); + +/** + * Returns a random integer value generated by the engine. + * + * @param a Minimum value (inclusive) + * @param b Maximum value (inclusive) + * + * @return Generated random value + */ +native random_num(a, b); + +/** + * Returns unique id of a client message. + * + * @note Example usage: get_user_msgid("TextMsg") + * @note The message id is unique as long as the server is running, but might + * change between updates. They should not be hardcoded into plugins. + * @note On first server start, this function will return 0 if used inside + * plugin_precache(). Consider hooking RegUserMsg in order to retrieve + * the correct message id. + * + * @param name Client message name + * + * @return Message id, 0 if message was not found + */ +native get_user_msgid(const name[]); + +/** + * Retrieves the client message name from a message id. + * + * @param msgid Client message id + * @param name Buffer to copy message name to + * @param len Maximum buffer size + * + * @return Number of cells written to buffer, 0 on invalid message id + */ +native get_user_msgname(msgid, name[], len); + +/** + * Returns a unique id for a public variable. + * + * @note Variables declared with the "public" specifier are accessible by-name + * from outside of the declaring plugin. + * @note If multiple plugins declare the same public variable, this native will + * still return a unique id. + * + * @param name Variable name + * + * @return Xvar id on success, -1 on failure + */ +native get_xvar_id(const name[]); + +/** + * Returns if a public variable exists in any loaded plugin. + * + * @param name Variable name + * + * @return 1 if public cvar exists, 0 otherwise + */ +native xvar_exists(const name[]); + +/** + * Returns the integer value of a public variable. + * + * @note If multiple plugins declare the same public variable, they are not + * automatically synchronized. The xvar system accesses only one of all + * public variables directly. Xvars have to be read through the natives or + * the value will be incorrect. + * + * @param id Xvar id, an xvar id can be retrieved using get_xvar_id() + * + * @return Xvar integer value + */ +native get_xvar_num(id); + +/** + * Returns the float value of a public variable. + * + * @note If multiple plugins declare the same public variable, they are not + * automatically synchronized. The xvar system accesses only one of all + * public variables directly. Xvars have to be read through the natives or + * the value will be incorrect. + * + * @param id Xvar id, an xvar id can be retrieved using get_xvar_id() + * + * @return Xvar float value + */ +native Float:get_xvar_float(id); + +/** + * Sets the integer value of a public variable. + * + * @note If multiple plugins declare the same public variable, they are not + * automatically synchronized. The xvar system accesses only one of all + * public variables directly. Xvars have to be set through the natives or + * the xvar will not be updated. + * + * @param id Xvar id, an xvar id can be retrieved using get_xvar_id() + * @param value Value to set + * + * @noreturn + * @error If an invalid xvar id is specified, an error will be thrown. + */ +native set_xvar_num(id, value = 0); + +/** + * Sets the float value of a public variable. + * + * @note If multiple plugins declare the same public variable, they are not + * automatically synchronized. The xvar system accesses only one of all + * public variables directly. Xvars have to be set through the natives or + * the xvar will not be updated. + * + * @param id Xvar id, an xvar id can be retrieved using get_xvar_id() + * @param value Value to set + * + * @noreturn + * @error If an invalid xvar id is specified, an error will be thrown. + */ +native set_xvar_float(id, Float:value = 0.0); + +/** + * Returns if a module is loaded. + * + * @param name Module name + * + * @return Module id of the matching module, -1 otherwise + */ +native is_module_loaded(const name[]); + +/** + * Retrieves info about a module by module index. + * + * @note For a list of possible status flags, see module_* constants in + * amxconst.inc + * + * @param id Module id + * @param name Buffer to copy module name to + * @param nameLen Maximum name buffer size + * @param author Buffer to copy module author to + * @param authorLen Maximum author buffer size + * @param version Buffer to copy module version to + * @param versionLen Maximum version buffer size + * @param status Variable to store module status to + * + * @return Module id on success, -1 on invalid module + */ +native get_module(id, name[], nameLen, author[], authorLen, version[], versionLen, &status); + +/** + * Returns the number of currently registered modules. + * + * @return Number of modules + */ +native get_modulesnum(); + +/** + * Returns if a plugin is loaded by registered name or filename. + * + * @note An example for a registered name would be "Admin Base", while a possible + * filename would be "admin.amxx". + * @note Prior to AMXX 1.80, this function would only search for plugins + * registered names, not the filename. + * @note The plugin name matching is case insensitive, while the filename + * matching is case sensitive. + * + * @param name Plugin name or filename + * @param usefilename If true searches for plugin filename, false searches for + * plugin name + * + * @return Plugin id of the matching plugin, -1 otherwise + */ +native is_plugin_loaded(const name[], bool:usefilename = false); + +/** + * Retrieves info about a plugin by plugin index. + * + * @param index Plugin index, -1 to target calling plugin + * @param filename Buffer to copy plugin filename to + * @param len1 Maximum filename buffer size + * @param name Buffer to copy plugin name to + * @param len2 Maximum name buffer size + * @param version Buffer to copy plugin version to + * @param len3 Maximum version buffer size + * @param author Buffer to copy plugin author to + * @param len4 Maximum author buffer size + * @param status Buffer to copy plugin status flags to + * @param len5 Maximum status buffer size + * @param ... Unused and ignored + * + * @return Plugin index on success, -1 if there is no plugin with given + * index + */ +native get_plugin(index, filename[] = "", len1 = 0, name[] = "", len2 = 0, version[] = "", len3 = 0, author[] = "", len4 = 0, status[] = "", len5 = 0, ...); + +/** + * Returns the number of loaded AMXX plugins. + * + * @return Number of loaded plugins + */ +native get_pluginsnum(); + +/** + * Pauses a plugin so it will not be executed until it is unpaused. + * + * @note This used to be able to pause specific functions, but this functionality + * (along with the flags "b" and "e") has been deprecated. + * @note If used without flag "c" this will pause the calling plugin. + * + * @param flag Pause flags + * "a" - pause plugin + * "c" - search for other plugins using param1 + * "d" - stop plugin, making it unavailable to unpause + * @param param1 Plugin filename + * @param param2 Unused and ignored + * + * @return 1 on success, 0 otherwise + * @error If it is attempted to use the deprecated functionality, + * an error is thrown. + */ +native pause(const flag[], const param1[] = "", const param2[] = ""); + +/** + * Unpauses a plugin so it will resume execution if it was previously paused. + * + * @note This used to be able to unpause specific functions, but this + * functionality (along with the flags "b" and "e") has been deprecated. + * @note Without specifying flag "c" this function will do nothing, as a plugin + * is incapable of unpausing itself. This is a relict of the deprecated + * functionality. + * + * @param flag Pause flags + * "a" - pause plugin + * "c" - search for other plugins using param1 + * @param param1 Plugin filename + * @param param2 Unused and ignored + * + * @return 1 on success, 0 otherwise + * @error If it is attempted to use the deprecated functionality, + * an error is thrown. + */ +native unpause(const flag[], const param1[] = "", const param2[] = ""); + +/** + * Initiates a function call to this or another plugin by function name. + * + * @note This only sets up the function call and covers the pre-requisites. + * Push parameters using the callfunc_push_* set of functions. The call + * will be executed only upon using callfunc_end() + * + * @param func Function name + * @param plugin Plugin filename, if empty the calling plugin is targeted + * The filename has to be the full exact name (e.g. stats.amxx) + * + * @return 1 on success + * 0 on runtime error + * -1 if plugin was not found + * -2 if function was not found + * @error If called while another callfunc has not yet been finished, + * an error is thrown. + */ +native callfunc_begin(const func[], const plugin[] = ""); + +/** + * Initiates a function call to this or another plugin by function id. + * + * @note This only sets up the function call and covers the pre-requisites. + * Push parameters using the callfunc_push_* set of functions. The call + * will be executed only upon using callfunc_end() + * @note The function id can be retrieved by get_func_id() + * + * @param func Function id + * @param plugin Plugin filename, if empty the calling plugin is targeted + * The filename has to be the full exact name (e.g. stats.amxx) + * + * @return 1 on success + * -1 if plugin was not found + * -2 if function is not executable + * @error If called while another callfunc has not yet been finished, + * or the specified function is invalid, an error is thrown. + */ +native callfunc_begin_i(func, plugin = -1); + +/** + * Retrieves a functions id for use with callfunc_begin_i() + * + * @param funcName Function name + * @param pluginId Plugin id, if -1 the calling plugin is targeted + * The plugin id can be retrieved using find_plugin_byfile() + * + * @return >=0 Function id on success + * -1 if plugin or function was not found + */ +native get_func_id(const funcName[], pluginId = -1); + +/** + * Pushes an int value onto the current call. + * + * @param value Int value to push + * + * @noreturn + * @error If called without initiating a callfunc, or the maximum + * amount of parameters is reached, an error is thrown. + */ +native callfunc_push_int(value); + +/** + * Pushes a float value onto the current call. + * + * @param value Float value to push + * + * @noreturn + * @error If called without initiating a callfunc, or the maximum + * amount of parameters is reached, an error is thrown. + */ +native callfunc_push_float(Float: value); + +/** + * Pushes an int value reference onto the current call. + * + * @note Changes made to this value by the called function will be reflected + * in the calling plugin. + * + * @param value Int value to push + * + * @noreturn + * @error If called without initiating a callfunc, or the maximum + * amount of parameters is reached, an error is thrown. + */ +native callfunc_push_intrf(&value); + +/** + * Pushes a float value reference onto the current call. + * + * @note Changes made to this value by the called function will be reflected + * in the calling plugin. + * + * @param value Float value to push + * + * @noreturn + * @error If called without initiating a callfunc, or the maximum + * amount of parameters is reached, an error is thrown. + */ +native callfunc_push_floatrf(&Float:value); + +/** + * Pushes a string onto the current call. + * + * @note This will defy the "const" specifier if copyback is true, which is + * only kept for special backwards compatibility. + * + * @param VALUE String to push + * @param copyback If true, any changes made in the called function will be + * copied back to the calling plugin + * + * @noreturn + * @error If called without initiating a callfunc, or the maximum + * amount of parameters is reached, an error is thrown. + */ +native callfunc_push_str(const VALUE[], bool:copyback = true); + +/** + * Pushes an array onto the current call. + * + * @note This will defy the "const" specifier if copyback is true, which is + * only kept for special backwards compatibility. + * + * @param VALUE Array to push + * @param array_size Size of the array + * @param copyback If true, any changes made in the called function will be + * copied back to the calling plugin + * + * @noreturn + * @error If called without initiating a callfunc, or the maximum + * amount of parameters is reached, an error is thrown. + */ +native callfunc_push_array(const VALUE[], array_size, bool:copyback = true); + +/** + * Completes the call to a function. + * + * @return 1 on success + * -1 if the plugin was not found + * -2 if the function was not found + * @error If called without initiating a callfunc, an error is thrown. + */ +native callfunc_end(); + +/** + * Called when an inconsistent file is encountered by the engine. + * + * @param id Client index + * @param filename Detected file + * @param reason Buffer storing the disconnect reason (can be overwritten) + * + * @return PLUGIN_CONTINUE to let the engine kick the client + * PLUGIN_HANDLED to block the inconsistency kick + */ +forward inconsistent_file(id, const filename[], reason[64]); + +/** + * Forces the clients and server to be running with the same version of a + * specified file. + * + * @note For a list of possible enforcement types, see the force_* constants + * in amxconst.inc + * + * @param force_type Enforcement type + * @param mins Bounding box mins vector + * @param maxs Bounding box maxs vector + * @param filename Filename + * + * @return 1 on success, 0 otherwise + */ +native force_unmodified(force_type, const mins[3], const maxs[3], const filename[]); + +/** + * Calculates the MD5 keysum of a string. + * + * @param szString String to calculate keysum of + * @param md5buffer Buffer to copy the MD5 hash to + * + * @return Number of cells written to the buffer (always 32) + */ +#pragma deprecated Use hash_string() function. Also, see Hash_* constants. +native md5(const szString[], md5buffer[34]); + +/** + * Calculates the MD5 keysum of a file. + * + * @param file Path to file to calculate keysum of + * @param md5buffer Buffer to copy the MD5 hash to + * + * @return Number of cells written to the buffer (always 32) + * @error If the file can not be opened, and error is thrown. + */ +#pragma deprecated Use hash_file() function. Also, see Hash_* constants. +native md5_file(const file[], md5buffer[34]); + +/** + * Generate a hash value (message digest) + * + * @param string String to be hashed. + * @param type Type of selected hashing algorithm. See Hash_* constants in amxconst.inc file. + * @param output Output string to store hash in. + * @param outputSize The maximum size of the output string to store hash in. + * + * @return Number of written bytes. + */ +native hash_string(const string[], const HashType:type, output[], const outputSize); + +/** + * Generate a hash value using the contents of a given file + * + * @param fileName Path of file to be hashed. + * @param type Type of selected hashing algorithm. See Hash_* constants in amxconst.inc file. + * @param output Output string to store hash in. + * @param outputSize The maximum size of the output string to store hash in. + * + * @return Number of written bytes. + * @error If the file couldn't be opened, an error is thrown. + */ +native hash_file(const fileName[], const HashType:type, output[], const outputSize); + +/** + * Returns the internal flags set on the plugin's state. + * + * @param hdr If nonzero, the function will return the pcode rather than + * state flags + * @param plid Plugin id, -1 to target calling plugin + * + * @return Plugin flags + */ +native plugin_flags(hdr = 0, plid = -1); + +/** + * Allows plugins to declare module dependencies using require_module() + * + * @deprecated Module dependency has been automatically handled by the compiler + * since AMXX 1.50, released in 2005. This forward is no longer + * called. + * + * @noreturn + */ +#pragma deprecated Module dependency is now automatically handled by the compiler. This forward is no longer called. +forward plugin_modules(); + +/** + * Adds a module dependency. + * + * @deprecated Module dependency has been automatically handled by the compiler + * since AMXX 1.50, released in 2005. This native has no effect. + * + * @noreturn + */ +#pragma deprecated Module dependency is now automatically handled by the compiler. This native has no effect. +native require_module(const module[]); + +/** + * Returns if the server is 64 bit. + * + * @deprecated As a result of Valve dropping support for 64bit binaries, AMXX is + * also not shipping 64bit builds anymore. This native is basically + * guaranteed to return 0. + * + * @return 1 if the server is 64 bit, 0 otherwise + */ +#pragma deprecated AMXX is not shipping 64bits builds anymore. This native is basically guaranteed to return 0. +native is_amd64_server(); + +/** + * Returns plugin id by filename. + * + * @param filename Filename to match + * @param ignoreCase If nonzero matches case insensitively, case sensitively + * otherwise + * + * @return Plugin id, -1 (INVALID_PLUGIN_ID) on failure + */ +native find_plugin_byfile(const filename[], ignoreCase = 1); + +/** + * Called before plugin_init(), allows the plugin to register natives. + * + * @noreturn + */ +forward plugin_natives(); + +/** + * Registers a native. + * + * @note Style 0 natives call the handler in the following manner: + * + * public native_handler(plugin_id, argc) + * + * plugin_id - plugin calling the native + * argc - number of parameters + * + * @note Style 1 natives are deprecated. Plugins should not use them, they might + * break. + * @note Style 1 natives work a little different. Instead of passing plugin id + * and number of parameters, the handler should be prototyped just like the + * native would be called. For each by-reference parameter, the plugin + * then has to use param_convert() to properly use them. + * @note A native should *never* recurse. Bad things will happen. + * + * @param name Native name + * @param handler Callback function + * @param style Native style + * + * @noreturn + * @error If an invalid callback is specified, an error is thrown. + */ +native register_native(const name[], const handler[], style = 0); + +/** + * Registers the plugin as a library. + * + * @note To mark a library as required, place the following in the include + * file: + * #pragma reqlib + * #if !defined AMXMODX_NOAUTOLOAD + * #pragma loadlib + * #endif + * + * @noreturn + */ +native register_library(const library[]); + +/** + * Logs an error in the native and breaks into the AMXX debugger. + * + * @note This acts as if the calling plugin - the plugin that is calling the + * native, not the plugin calling this function - triggered the error, + * just like when AMXX natives error. + * + * @param error Error number + * @param fmt Formatting rules + * @param ... Variable number of formatting parameters + * + * @noreturn + * @error The function is guaranteed to throw an error, but will make + * it appear as if the plugin calling the native triggered it. + */ +native log_error(error, const fmt[], any:...); + +/** + * Converts a parameter to work as a by-reference parameter. + * + * @deprecated Style 1 natives are deprecated and should be converted to + * style 0. This should not be used. + * + * @note This only needs to be called if the native was registered with style 1. + * @note Remember that arrays (and strings) are always by-reference and need to + * be converted. + * + * @param num Argument to convert, starting from 1 + * + * @noreturn + * @error If used outside of a native callback, or the native was + * created with style 0, an error will be thrown. + */ +native param_convert(num); + +/** + * Retrieves a string from the plugin calling the native. + * + * @param param Argument to retrieve, starting from 1 + * @param dest Buffer to copy string to + * @param maxlen Maximum size of buffer + * + * @return Number of cells copied to buffer + * @error If used outside of a native callback, or the native was + * created with style 1, an error will be thrown. + */ +native get_string(param, dest[], maxlen); + +/** + * Copies a string to the plugin calling the native. + * + * @param param Argument to set, starting from 1 + * @param dest Buffer to copy string from + * @param maxlen Maximum size of buffer + * + * @return Number of cells copied from buffer + * @error If used outside of a native callback, or the native was + * created with style 1, an error will be thrown. + */ +native set_string(param, dest[], maxlen); + +/** + * Returns the integer value of a parameter from the plugin calling the native. + * + * @param param Argument to retrieve, starting from 1 + * + * @return Integer value + * @error If used outside of a native callback, or the native was + * created with style 1, an error will be thrown. + */ +native get_param(param); + +/** + * Returns the float value of a parameter from the plugin calling the native. + * + * @param param Argument to retrieve, starting from 1 + * + * @return Float value + * @error If used outside of a native callback, or the native was + * created with style 1, an error will be thrown. + */ +native Float:get_param_f(param); + +/** + * Returns the integer value of a by-reference parameter from the plugin calling + * the native. + * + * @param param Argument to retrieve, starting from 1 + * + * @return Integer value + * @error If used outside of a native callback, or the native was + * created with style 1, an error will be thrown. + */ +native get_param_byref(param); + +/** + * Returns the float value of a by-reference parameter from the plugin calling + * the native. + * + * @param param Argument to retrieve, starting from 1 + * + * @return Float value + * @error If used outside of a native callback, or the native was + * created with style 1, an error will be thrown. + */ +native Float:get_float_byref(param); + +/** + * Sets the integer value of a by-reference parameter to the plugin calling the + * native. + * + * @param param Argument to set, starting from 1 + * @param value Value to set parameter to + * + * @noreturn + * @error If used outside of a native callback, or the native was + * created with style 1, an error will be thrown. + */ +native set_param_byref(param, value); + +/** + * Sets the float value of a by-reference parameter to the plugin calling the + * native. + * + * @param param Argument to set, starting from 1 + * @param value Value to set parameter to + * + * @noreturn + * @error If used outside of a native callback, or the native was + * created with style 1, an error will be thrown. + */ +native set_float_byref(param, Float:value); + +/** + * Retrieves an array from the plugin calling the native. + * + * @param param Argument to retrieve, starting from 1 + * @param dest Buffer to copy array to + * @param maxlen Size of buffer + * + * @noreturn + * @error If used outside of a native callback, or the native was + * created with style 1, an error will be thrown. + */ +native get_array(param, dest[], size); + +/** + * Retrieves a float array from the plugin calling the native. + * + * @param param Argument to retrieve, starting from 1 + * @param dest Buffer to copy array to + * @param maxlen Size of buffer + * + * @noreturn + * @error If used outside of a native callback, or the native was + * created with style 1, an error will be thrown. + */ +native get_array_f(param, Float:dest[], size); + +/** + * Copies an array to the plugin calling the native. + * + * @param param Argument to set, starting from 1 + * @param source Buffer to copy array from + * @param maxlen Size of buffer + * + * @noreturn + * @error If used outside of a native callback, or the native was + * created with style 1, an error will be thrown. + */ +native set_array(param, const source[], size); + +/** + * Copies a float array to the plugin calling the native. + * + * @param param Argument to set, starting from 1 + * @param source Buffer to copy array from + * @param maxlen Size of buffer + * + * @noreturn + * @error If used outside of a native callback, or the native was + * created with style 1, an error will be thrown. + */ +native set_array_f(param, const Float:source[], size); + +/** + * Allows to trap error messages that occur in a plugin. + * + * @note This can be used to override the debug messages that occur when the + * plugin causes some kind of runtime error. + * @note The handler will be called in the following manner: + * + * public error_filter(error_code, bool:debugging, message[]) + * + * error_code - AMX_ERR_* code. + * debugging - True if the plugin is in debug mode, false otherwise + * message[] - Message sent along with the error + * + * @note The handler should return PLUGIN_CONTINUE to let the error through the + * filter, or PLUGIN_HANDLED to block the error from displaying. + * + * @param handler Function name to call + * + * @noreturn + * @error If an invalid callback function is provided, an error + * is thrown. + */ +native set_error_filter(const handler[]); + +/** + * Returns a trace handle for the item at the top of the traced call stack. + * + * @note Intended for use inside an error handler set with set_error_filter() + * + * @return Trace handle, 0 if no debugging information is available + */ +native dbg_trace_begin(); + +/** + * Returns the next item in a traced call stack. + * + * @param trace Trace handle + * + * @return New trace handle, 0 if no more traces exist + */ +native dbg_trace_next(trace); + +/** + * Retrieves the call stack info for a trace. + * + * @param trace Trace handle + * @param line Variable to set line at which plugin failed to + * @param function Buffer to copy function to + * @param maxLength1 Maximum function buffer size + * @param file Buffer to copy filename to + * @param maxLength2 Maximum filename buffer size + * + * @return 1 on success, 0 if no trace data is available + */ +native dbg_trace_info(trace, &line, function[], maxLength1, file[], maxLength2); + +/** + * Retrieves the formatted error string from a trace. + * + * @note The string format is generally: "Run time error : " + * + * @param buffer Buffer to copy error message to + * @param maxLength Maximum buffer size + * + * @return 1 on success, 0 if no trace data is available + */ +native dbg_fmt_error(buffer[], maxLength); + +/** + * Sets a native filter, letting the plugin intercept and handle an + * automatic native requirement. + * + * @note This has to be used inside the plugin_native() forward, otherwise it + * has no effect. + * @note This is useful for creating plugins that can dynamically decide which + * modules or features to use at runtime, often necessary for cross-mod + * plugins. It allows to deploy a single version of the plugin instead + * of compiling multiple versions for each use-case. + * @note The handler will be called in the following manner: + * + * public native_filter(const native[], index, trap) + * + * native - Native name + * index - Native index + * trap - 0 if native couldn't be found, 1 if native use was attempted + * + * @note The handler should return PLUGIN_CONTINUE to let the error through the + * filter (which will throw a run-time error), or return PLUGIN_HANDLED + * to continue operation. + * @note Returning PLUGIN_CONTINUE if trap is 0 will result in the plugin + * failing to load! + * + * @param handler Function name to call + * + * @return 1 if handler is set successfully, 0 otherwise (called + * outside of plugin_native() forward) + * @error If an invalid callback function is provided, an error is + * thrown. + */ +native set_native_filter(const handler[]); + +/** + * Sets a module/library filter, letting the plugin intercept and handle an + * automatic module requirement. + * + * @note This has to be used inside the plugin_native() forward, otherwise it + * has no effect. + * @note This is useful for creating plugins that can dynamically decide which + * modules or features to use at runtime, often necessary for cross-mod + * plugins. It allows to deploy a single version of the plugin instead + * of compiling multiple versions for each use-case. + * @note For a list of possible libtypes see the LibType enum in amxconst.inc + * @note The handler will be called in the following manner: + * + * public module_filter(const library[], LibType:type) + * + * library - Shortname of library or class that is required + * libtrype - Type of requirement being checked (library/module or class) + * + * @note The handler should return PLUGIN_CONTINUE to let the error through the + * filter (which will result in the plugin failing to load), or + * PLUGIN_HANDLED to imply that load can continue without the module. + * @note Errors occuring inside the handler will not be filtered and cause the + * plugin to fail load as if the handler returned PLUGIN_CONTINUE. + * + * @return 0 on success, -1 if filtering is not available, -2 if handler + * could not be found. + */ +native set_module_filter(const handler[]); + +/** + * Aborts execution of the current callback by throwing an error. + * + * @note Warning: This function should not be used inside error filters, module + * filters (native filters are safe if trap equals 1) or the + * plugin_natives() forward. + * @note The message will automatically be tagged with the plugin's name and the + * log will include a timestamp with the message. + * @note For a list of possible error codes, see AMX_* constants in amxconst.inc + * + * @param error Error code + * @param fmt Formatting rules + * @param ... Variable list of formatting parameters + * + * @noreturn + * @error The function is guaranteed to throw an error, using the + * specified custom log message. + */ +native abort(error, const fmt[] = "", any:...); + +/** + * Returns if a specific module is loaded. + * + * @note This uses the same method AMXX uses internally to see if a module is + * required by a plugin. + * @note Example usage: module_exists("cstrike") + * + * @param logtag Module shortname + * + * @return 1 if module is loaded, 0 otherwise + */ +native module_exists(const logtag[]); + +/** + * Returns if a specific library or class is loaded. + * + * @note This is the newer version of module_exists(), enabling users to + * distinguish between libraries and classes, while module_exists() always + * checks for both types. + * @note For a list of possible types, see the LibType enum in amxconst.inc + * + * @param library Library/Class shortname + * @param type Type to search for + * + * @return 1 if module is loaded, 0 otherwise + */ +native LibraryExists(const library[], LibType:type); + +/** + * Returns the next valid hudchannel for the client. + * + * @note This function uses the same method set_hudmessage() uses to determine + * the next channel if it is set to auto-select. + * + * @param player Client index + * + * @return Valid hudchannel (1-4) + * @error If the index is not within the range of 1 to MaxClients or + * the client is not connected, an error will be thrown. + */ +native next_hudchannel(player); + +/** + * Creates a HUD synchronization object. + * + * @note Create one of these for each section of the screen that contains + * overlapping HUD messages. For example, if using both sides of the + * screen to display three messages that could potentially overlap, + * each side is considered a synchronizable area. You can then use + * ShowSyncHudMsg() to correctly synchronize displaying the HUD message + * with any other messages potentially in its class. + * @note This does not do anything like reserving screen area. Its sole + * purpose is to be able to wipe an old message on an auto-channel and + * ensure that it will not clear a message from another plugin. + * + * @param num Unused and ignored + * @param ... Unused and ignored + * + * @return HUD sync object handle + */ +native CreateHudSyncObj(num = 0, ...); + +/** + * Displays a synchronized HUD message. + * + * @note This will check that the HUD object has its previous display on the + * screen cleared before it proceeds to write another message. It will + * only do this in the case of that channel not having been cleared + * already. + * @note This uses the display parameters set with set_hudmessage(), ignoring + * the selected channel in favor of its own synchronization. + * @note This functions return value behaves differently depending on what is + * used as the client index: If 0 is specified, then the function will + * return 0 if nothing has been sent (no client connected). If either a + * single client is specified, or there is at least one client connected, + * the number of printed characters will refer to the message that is sent + * last, to the client with the highest index. + * + * @param target Client index, use 0 to display to all clients + * @param syncObj HUD sync object handle + * @param fmt Formatting rules + * @param ... Variable number of formatting parameters + * + * @return Number of printed characters + * @error If a single client is specified and the index is not within + * the range of 1 to MaxClients, an error will be thrown. + */ +native ShowSyncHudMsg(target, syncObj, const fmt[], any:...); + +/** + * Clears the display on a HUD sync object. + * + * @note This sends an empty message to the previously occupied HUD channel. + * It is not quite the same as manually sending an empty message to the + * sync object as that would send out two separate messages, one for + * clearing the occupied channel and another using a new channel, which + * will subsequently not mark the sync object as cleared. + * + * @param target Client index, use 0 to display to all clients + * @param syncObj HUD sync object handle + * + * @noreturn + * @error If a single client is specified and the index is not within + * the range of 1 to MaxClients, an error will be thrown. + */ +native ClearSyncHud(target, syncObj); + +/** + * Triggers the software interrupt 3, used for breaking into an attached + * debugger. + * + * @note Warning: This is a debugging function that is not intended for general + * plugin use. Using this function will either halt the server and break + * into the attached debugger, or outright crash the server if no + * debugger is attached. + * + * @noreturn + */ +native int3(); + +/** + * Sets the calling plugin to a failed state. + * + * @note Calling this will cause the calling plugin to completely cease + * operation. It is not possible to recover. + * @note This should be used to gracefully handle fatal errors. The log message + * will appear in the AMXX error log. + * + * @param fmt Formatting rules + * @param ... Variable number of formatting parameters + * + * @noreturn + * @error The function is guaranteed to throw a fatal error, ceasing + * further operation of the plugin. + */ +native set_fail_state(const fmt[], any:...); + +/** + * Returns the reference address of the variable passed in. + * + * @note Addresses are local to the plugin and do not represent a full CPU + * address. + * + * @param ... Variable to retrieve address from + * + * @return Variable address + */ +native get_var_addr(any:...); + +/** + * Returns the value of an address. + * + * @note Addresses can be acquired using get_var_addr() + * + * @param addr Variable address + * + * @return Value at address + * @error If the plugin attempts to access an address outside of the + * stack or heap limits of the plugin, an error will be thrown. + */ +native get_addr_val(addr); + +/** + * Sets the value of an address. + * + * @note Addresses can be acquired using get_var_addr() + * + * @param addr Variable address + * @param val Value to set + * + * @noreturn + * @error If the plugin attempts to access an address outside of the + * stack or heap limits of the plugin, an error will be thrown. + */ +native set_addr_val(addr, val); + +/** + * Creates a global forward that will be called in all plugins. + * + * @note For a list of valid stop types, see the ET_* constants in amxconst.inc + * @note For a list of valid parameter types, see the FP_* constants in + * amxconst.inc + * + * @param name Function name to call + * @param stop_type Treatment of the plugin return values + * @param ... List of parameter types + * + * @return Forward handle, -1 on failure + */ +native CreateMultiForward(const name[], stop_type, ...); + +/** + * Creates a private forward that will be called in a single plugin. + * + * @note Unlike other natives expecting a plugin id, specifying -1 will not + * select the calling plugin, and instead throw an error. + * + * @param plugin_id Plugin to call forward in. The plugin id can be + * retrieved using find_plugin_byfile() + * @param name Function name to call + * @param ... List of parameter types + * + * @return Forward handle, -1 on failure + * @error If an invalid plugin id is specified, an error will be + * thrown. + */ +native CreateOneForward(plugin_id, const name[], ...); + +/** + * Prepares an array for use in a forward. Pass the result ExecuteForward() + * instead of the array itself. + * + * @param array Array to prepare + * @param size Size of array + * @param copyback If nonzero, modifications made by the called plugin(s) + * will be copied back to the caller + * + * @return Special handle for use in ExecuteForward() + */ +native PrepareArray(const array[], size, copyback = 0); + +/** + * Executes a forward. + * + * @note Passing arrays requires them to be prepared using PrepareArray() + * + * @param forward_handle Forward handle + * @param ret Optional variable to store return value in + * @param ... Variable number of parameters to pass through + * + * @return 1 on success, 0 if forward can't be executed + * @error If the number of parameters mismatch from the number + * of parameters that the forward was declared with, + * an error is thrown. + */ +native ExecuteForward(forward_handle, &ret = 0, any:...); + +/** + * Destroys and deallocates a forward. + * + * @note Does not distinguish between private and global forwards. + * + * @param forward_handle Forward handle + * + * @noreturn + */ +native DestroyForward(forward_handle); + +/** + * Sets all elements of array to a specified value. + * + * @param array Array to modify + * @param value Value to set each element to + * @param size Size of array + * + * @noreturn + */ +native arrayset(any:array[], any:value, size); + +/** + * Returns the weapon id associated with a weapon name. + * + * @note The weapon name is case sensitive and has the weapon_* form. + * + * @param name Weapon name + * + * @return Weapon id, or 0 if no id was found + */ +native get_weaponid(const name[]); + +/** + * Adds an admin to the dynamic admin storage for lookup at a later time. + * + * @note For a list of possible access flags, see the ADMIN_* constants in + * amxconst.inc + * @note For a list of possible auth flags, see the FLAG_* constants in + * amxconst.inc + * + * @param AuthData Auth information to set (can be name, IP or SteamID) + * @param Password Password to set + * @param Access Admin access flags + * @param Flags Auth behavior flags + * + * @noreturn + */ +native admins_push(const AuthData[], const Password[], Access, Flags); + +/** + * Returns the number of admins in the dynamic admin storage. + * + * @return Number of admins + */ +native admins_num(); + +/** + * Retrieves information about a dynamically stored admin. + * + * @note For a list of possible props, see the AdminProp enum in amxconst.inc + * + * @param num Admin storage index + * @param Property Admin property to retrieve + * @param Buffer Buffer to copy property information to, if AdminProp_Auth + * or AdminProp_Password is specified + * @param BufferSize Maximum buffer size + * + * @return Property value if AdminProp_Access or AdminProp_Flags + * is requested, 0 otherwise + * @error If an invalid storage index is specified, an error will + * be thrown. + */ +native admins_lookup(num, AdminProp:Property, Buffer[] = "", BufferSize = 0); + +/** + * Clears the list of dynamically stored admins. + * + * @noreturn + */ +native admins_flush(); + +/** + * Returns if a map contains at least one entity with the provided class name. + * + * @param classname Entity classname to match + * + * @return True if an entity is found, false otherwise + */ +native bool:has_map_ent_class(const classname[]); + + +/** + * Called when the map has loaded, and all configs are done executing. + * This includes servercfgfile (server.cfg), amxx.cfg, plugin's config, and + * per-map config. + * + * @note This is best place to initialize plugin functions which are based on cvar data. + * @note This will always be called once and only once per map. It will be + * called few seconds after plugin_cfg(). + * + * @noreturn + */ +forward OnConfigsExecuted(); + +/** + * Called when the map has loaded, right after plugin_cfg() but any time + * before OnConfigsExecuted. It's called after amxx.cfg and all + * AutoExecConfig() exec commands have been added to the server command buffer. + * + * @note This will always be called once and only once per map. + * + * @noreturn + */ +forward OnAutoConfigsBuffered(); + +/** + * Specifies that the given config file should be executed after plugin load. + * + * @note OnConfigsExecuted() will not be called until the config file has executed, + * but it will be called if the execution fails. + * @note The name parameter should not contain dots, otherwise file will not be executed. + * + * @param autoCreate If true, and the config file does not exist, such a config + * file will be automatically created and populated with + * information from the plugin's registered cvars. + * @param name Name of the config file, excluding the .cfg extension. + * If empty, is assumed. + * @param folder Folder under plugins/ to use. + * + * @noreturn + */ +native AutoExecConfig(bool:autoCreate = true, const name[] = "", const folder[] = ""); + +/** + * Creates a single use hook for the next frame. + * + * @param callback Function to be executed on the next frame. + * @param data Optional data to be passed to the callback function. + * + * @note Callback function prototype: + * public function(data) + * + * @noreturn + */ +native RequestFrame(const callback[], any:data = 0); + +// Always keep this at the bottom of this file +#include diff --git a/bin/compiler/include/amxmodx_version.inc b/bin/compiler/include/amxmodx_version.inc new file mode 100644 index 0000000..49ce618 --- /dev/null +++ b/bin/compiler/include/amxmodx_version.inc @@ -0,0 +1,20 @@ + +#if defined _amxmodx_version_included + #endinput +#endif +#define _amxmodx_version_included + +#define AMXX_VERSION_TAG "" +#define AMXX_VERSION_CSET "363871a8" +#define AMXX_VERSION_MAJOR "1" +#define AMXX_VERSION_MAJOR_NUM 1 +#define AMXX_VERSION_MINOR "9" +#define AMXX_VERSION_MINOR_NUM 9 +#define AMXX_VERSION_RELEASE "0" +#define AMXX_VERSION_LOCAL_REV_NUM 5294 +#define AMXX_VERSION_LOCAL_REV "5294" +#define AMXX_VERSION 1.90 +#define AMXX_VERSION_NUM 190 + +stock const AMXX_VERSION_STR[] = "1.9.0.5294"; + \ No newline at end of file diff --git a/bin/compiler/include/cellarray.inc b/bin/compiler/include/cellarray.inc new file mode 100644 index 0000000..3b1cd99 --- /dev/null +++ b/bin/compiler/include/cellarray.inc @@ -0,0 +1,527 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +#if defined _cellarray_included + #endinput +#endif + +#define _cellarray_included + +/** + * Cellarray tag declaration + * + * @note These dynamic arrays are intended to be used for a form of global + * storage without requiring a #define that needs to be increased each + * time the plugin author requires more storage. These are not designed + * to be a full replacement for normal arrays, as those are faster and + * should be used whenever possible. + * @note Plugins are responsible for freeing all Array handles they acquire, + * including those from ArrayClone. Failing to free handles will result + * in the plugin and AMXX leaking memory. + */ +enum Array +{ + Invalid_Array = 0 +}; + + + +/** + * Returns the number of cells required to fit a string of the specified size + * (including the null terminator). + * + * @param size Number of bytes. + * + * @return Minimum number of cells required to fit the byte count. + */ +stock ByteCountToCells(size) +{ + if (!size) + { + return 1; + } + + return (size + 3) / 4; +} + +/** + * Creates a handle to a dynamically sized array. + * + * @note It is very important that the provided cellsize matches up with the + * buffer sizes that are passed with subsequent Array[Get|Set|Push] calls. + * @note Initially the "reserved" parameter was intended to create blank entries + * that would immediately be usable with Array[Get|Set] functions. This + * functionality was never working as intended, and can now be achieved + * using ArrayResize(). + * + * @param cellsize Size of each array entry in cells + * @param reserved Pre-allocates space in the array for the specified + * number of items. The items are not valid to read or set + * until they have actually been pushed into the array. + * + * @return New array handle, which must be freed via ArrayDestroy() + * @error If an invalid cellsize is provided an error will be + * thrown. + */ +native Array:ArrayCreate(cellsize = 1, reserved = 32); + +/** + * Clones an array, returning a new handle with the same size and data. + * + * @param which Array handle + * + * @return Handle to the cloned array on success, 0 otherwise + * @error If an invalid handle is provided an error will be + * thrown. + */ +native Array:ArrayClone(Array:which); + +/** + * Clears all entries from the array. + * + * @param which Array handle + * + * @noreturn + * @error Invalid handle + */ +native ArrayClear(Array:which); + +/** + * Returns the number of elements in the array. + * + * @param which Array handle + * + * @return Number of elements in the array + * @error If an invalid handle is provided an error will be + * thrown. + */ +native ArraySize(Array:which); + +/** + * Resizes an array. + * + * @note If the size is smaller than the current array size the array is + * truncated and data lost. + * + * @param which Array handle + * @param newsize New size + * + * @noreturn + * @error If an invalid handle is provided or the resizing + * operation runs out of memory, an error will be thrown. + */ +native bool:ArrayResize(Array:which, newsize); + +/** + * Retrieves an array of data from a cellarray. + * + * @note If the size parameter is specified as -1 the output buffer has to match + * the size the array was created with. + * + * @param which Array handle + * @param item Item index in the array + * @param output Buffer to copy value to + * @param size If not set, assumes the buffer size is equal to the + * cellsize. Otherwise, the specified size is used. + * + * @return Number of cells copied + * @error If an invalid handle or index is provided an error will + * be thrown. + */ +native ArrayGetArray(Array:which, item, any:output[], size = -1); + +/** + * Returns a single cell of data from an array + * + * @param which Array handle + * @param item Item index in the array + * @param block If the array has a cellsize >1 this optionally specifies + * which block to read from + * @param asChar If true reads the value as a byte instead of a cell + * + * @return Integer value + * @error If an invalid handle, index or block is provided an + * error will be thrown. + */ +native any:ArrayGetCell(Array:which, item, block = 0, bool:asChar = false); + +/** + * Returieves string data from an array. + * + * @param which Array handle + * @param item Item index in the array + * @param output Buffer to copy value to + * @param size Maximum size of the buffer + * + * @return Number of characters copied + * @error If an invalid handle or an invalid index is provided an + * error will be thrown. + */ +native ArrayGetString(Array:which, item, output[], size); + +/** + * Fills an item's data with the contents of an array. + * + * @note If the size parameter is specified as -1 the input buffer has to match + * the size the array was created with. + * @note The item index must already be valid. Use ArrayPushArray to create + * a new array item in the cellarray. + * + * @param which Array handle + * @param item Item index in the array + * @param input Array to copy to the cellarray + * @param size If not set, assumes the buffer size is equal to the + * cellsize. Otherwise, the specified size is used. + * + * @return Number of cells copied + * @error If an invalid handle or an invalid index is provided an + * error will be thrown. + */ +native ArraySetArray(Array:which, item, const any:input[], size =-1); + +/** + * Sets an item's data to a single cell value. + * + * @note The item index must already be valid. Use ArrayPushArray to create + * a new array item in the cellarray. + * + * @param which Array handle + * @param item Item index in the array + * @param input Value to set + * @param block If the array has a cellsize >1 this optionally specifies + * which block to write to + * @param asChar If true writes the value as a byte instead of a cell + * + * @noreturn + * @error If an invalid handle, index or block is provided an + * error will be thrown. + */ +native ArraySetCell(Array:which, item, any:input, block = 0, bool:asChar = false); + +/** + * Sets an item's data to a string value. + * + * @note The input will be truncated if it is longer than the cellsize the array + * was created with. + * @note The item index must already be valid. Use ArrayPushString to create + * a new array item in the cellarray. + * + * @param which Array handle + * @param item Item index in the array + * @param input String to copy to the array + * + * @return Number of characters copied + * @error If an invalid handle or an invalid index is provided an + * error will be thrown. + */ +native ArraySetString(Array:which, item, const input[]); + +/** + * Creates a new item at the end of the cellarray and copies the provided array + * into it. + * + * @note The input will be truncated if it is bigger than the cellsize the array + * was created with. + * + * @param which Array handle + * @param input Array to copy to the cellarray + * @param size If not set, assumes the buffer size is equal to the + * cellsize. Otherwise, the specified size is used. + * + * @return Index of the new entry + * @error If an invalid handle is provided or the resizing + * operation runs out of memory, an error will be thrown. + */ +native ArrayPushArray(Array:which, const any:input[], size = -1); + +/** + * Creates a new item at the end of the array and sets the item's single cell + * value. + * + * @param which Array handle + * @param input Value to set + * + * @return Index of the new entry + * @error If an invalid handle is provided or the resizing + * operation runs out of memory, an error will be thrown. + */ +native ArrayPushCell(Array:which, any:input); + +/** + * Creates a new item at the end of the array and copies the provided string + * into it. + * + * @note The input will be truncated if it is longer than the cellsize the array + * was created with. + * + * @param which Array handle + * @param input String to copy to the array + * + * @return Index of the new entry + * @error If an invalid handle is provided or the resizing + * operation runs out of memory, an error will be thrown. + */ +native ArrayPushString(Array:which, const input[]); + +/** + * Creates a new item behind the specified item and copies the provided array + * into it. All items beyond it get shifted up by one. + * + * @param which Array handle + * @param item Item index in the array + * @param input Array to copy to the cellarray + * + * @noreturn + * @error If an invalid handle or an invalid index is provided an + * error will be thrown. + */ +native ArrayInsertArrayAfter(Array:which, item, const any:input[]); + +/** + * Creates a new item behind the specified item and sets the item's single cell + * value. All items beyond it get shifted up by one. + * + * @param which Array handle + * @param item Item index in the array + * @param input Value to set + * + * @noreturn + * @error If an invalid handle or an invalid index is provided an + * error will be thrown. + */ +native ArrayInsertCellAfter(Array:which, item, any:input); + +/** + * Creates a new item behind the specified item and copies the provided string + * into it. All items beyond it get shifted up by one. + * + * @note The input will be truncated if it is longer than the cellsize the array + * was created with. + * + * @param which Array handle + * @param item Item index in the array + * @param input String to copy to the array + * + * @noreturn + * @error If an invalid handle or an invalid index is provided an + * error will be thrown. + */ +native ArrayInsertStringAfter(Array:which, item, const input[]); + +/** + * Creates a new item in front of the specified item and copies the provided + * array into it. All items beyond it get shifted up by one. + * + * @param which Array handle + * @param item Item index in the array + * @param input Array to copy to the cellarray + * + * @noreturn + * @error If an invalid handle or an invalid index is provided an + * error will be thrown. + */ +native ArrayInsertArrayBefore(Array:which, item, const any:input[]); + +/** + * Creates a new item in front of the specified item and sets the item's single + * cell value. All items beyond it get shifted up by one. + * + * @param which Array handle + * @param item Item index in the array + * @param input Value to set + * + * @noreturn + * @error If an invalid handle or an invalid index is provided an + * error will be thrown. + */ +native ArrayInsertCellBefore(Array:which, item, const any:input); + +/** + * Creates a new item in front of the specified item and copies the provided + * string into it. All items beyond it get shifted up by one. + * + * @note The input will be truncated if it is longer than the cellsize the array + * was created with. + * + * @param which Array handle + * @param item Item index in the array + * @param input String to copy to the array + * + * @noreturn + * @error If an invalid handle or an invalid index is provided an + * error will be thrown. + */ +native ArrayInsertStringBefore(Array:which, item, const input[]); + +/** + * Swaps the position of two items. + * + * @param which Array handle + * @param item1,item2 Item pair to swap + * + * @noreturn + * @error If an invalid handle or an invalid index is provided an + * error will be thrown. + */ +native ArraySwap(Array:which, item1, item2); + +/** + * Deletes an item from the array. All items beyond it get shifted down by one. + * + * @param which Array handle + * @param item Item to delete + * + * @noreturn + * @error If an invalid handle or an invalid index is provided an + * error will be thrown. + */ +native ArrayDeleteItem(Array:which, item); + +/** + * Searches through the array and returns the index of the first occurence of + * the specified string. + * + * @param which Array handle + * @param item String to search for + * + * @return Array index on success, -1 if the string can't be found + * @error Invalid handle. + */ +native ArrayFindString(Array:which, const item[]); + +/** + * Searches through the array and returns the index of the first occurence of + * the specified value. + * + * @param which Array handle + * @param item Value to search for + * + * @return Array index on success, -1 if the value can't be found + * @error If an invalid handle is provided an error will be + * thrown. + */ +native ArrayFindValue(Array:which, any:item); + +/** + * Creates a special handle that can be passed to a string format routine for + * printing as a string (with the %a format option). + * + * @note It is recommended to pass the function as a parameter to the format + * routine directly. The array item must contain a null-terminated string! + * @note Do not save or otherwise use the handles returned by this function. + * @note Example usage: + * console_print(id, "%a", ArrayGetStringHandle(MessageArray, i)); + * + * @param which Array handle + * @param item Item to retrieve handle of + * + * @return Handle to the item + * @error If an invalid handle or an invalid index is provided an + * error will be thrown. + */ +native DoNotUse:ArrayGetStringHandle(Array:which, item); + +/** + * Destroys the array and frees its memory. + * + * @note The function automatically sets the variable passed to it to 0 to aid + * in preventing accidental usage after destroy. + * + * @param which Array to destroy + * + * @return 1 if the Array was destroyed, 0 if nothing had to be + * destroyed (invalid handle) + */ +native ArrayDestroy(&Array:which); + +/** + * Similar to sorting.inc's CustomSort, the sorting algorithm then uses the + * custom comparison function to sort the data. + * + * @note The function is called in the following manner: + * + * public MySortFunc(Array:array, item1, item2, const data[], data_size) + * + * array - Array handle in its current un-sorted state + * item1, item2 - Current item pair being compared + * data[] - Extra data array passed to the sort func + * data_size - Size of extra data + * + * @note The comparison function should return: + * -1 if item1 should go before item2 + * 0 if item1 and item2 are equal + * 1 if item1 should go after item2 + * + * @note All parameters after item2 are optional and do not need to be specified + * and used. + * @note Unlike the sorting.inc version, the array passed to the callback is not + * in mid-sorted state. + * + * @param array Array handle + * @param comparefunc Callback function used for comparison + * @param data Extra data that is passed through to the callback + * @param data_size Size of extra data + * + * @noreturn + * @error If an invalid handle or an invalid callback is provided + * an error will be thrown. + */ +native ArraySort(Array:array, const comparefunc[], data[]="", data_size=0); + +/** + * A faster version of ArraySort, the sorting algorithm then uses the custom + * comparison function to sort the data. + * + * @note The advantage of this function is that the data of the elements being + * compared is directly passed to the function, instead of the item + * indexes that are passed by ArraySort. This removes the need for calling + * ArrayGet[Cell|String|Array] every time before being able to compare the + * elements. + * + * @note For Arrays with a cellsize of 1 (used for storing integers and floats), + * the function is called in the following manner: + * + * public MySortFunc(Array:array, elem1, elem2, const data[], data_size) + * + * array - Array handle in its current un-sorted state + * elem1, elem2 - Current element pair being compared + * data[] - Extra data array passed to the sort func + * data_size - Size of extra data + * + * @note For Arrays with a cellsize larger than 1 (used for storing arrays and + * strings), the function is called in the following manner: + * + * public MySortFunc(Array:array, elem1[], elem2[], const data[], data_size) + * + * array - Array handle in its current un-sorted state + * elem1[], elem2[] - Current element pair being compared + * data[] - Extra data array passed to the sort func + * data_size - Size of extra data + * + * + * @note The comparison function should return: + * -1 if elem1 should go before elem2 + * 0 if elem1 and elem2 are equal + * 1 if elem1 should go after elem2 + * + * @note All parameters after item2 are optional and do not need to be specified + * and used. + * @note Unlike the sorting.inc version, the array passed to the callback is not + * in mid-sorted state. + * + * @param array Array handle + * @param comparefunc Callback function used for comparison + * @param data Extra data that is passed through to the callback + * @param data_size Size of extra data + * + * @noreturn + * @error If an invalid handle or an invalid callback is provided + * an error will be thrown. + */ +native ArraySortEx(Array:array, const comparefunc[], data[]="", data_size=0); diff --git a/bin/compiler/include/cellstack.inc b/bin/compiler/include/cellstack.inc new file mode 100644 index 0000000..15e8567 --- /dev/null +++ b/bin/compiler/include/cellstack.inc @@ -0,0 +1,166 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +#if defined _cellstack_included + #endinput +#endif +#define _cellstack_included + +/** + * Stack tag declaration + * + * @note Plugins are responsible for freeing all Stack handles they acquire. + * Failing to free handles will result in the plugin and AMXX leaking + * memory. + */ +enum Stack +{ + Invalid_Stack = 0 +}; + +/** + * Creates a stack structure. A stack is a LIFO (last in, first out) vector of + * of items. It has O(1) insertion and O(1) removal. + * + * @note Stacks provide only two operations: Push (adding an item to the top) + * and Pop (remove an item from the top, in reverse-push order). + * @note The contents of the stack are uniform; i.e. storing a string and then + * retrieving it as an integer is NOT the same as str_to_num()! + * @note The "blocksize" determines how many cells each stack slot has, it can + * not be changed after creation. + * + * @param blocksize The number of cells each entry in the stack can hold + * + * @return New stack Handle, which must be freed via DestroyStack() + * @error If an invalid blocksize is provided an error will be + * thrown. + */ +native Stack:CreateStack(blocksize = 1); + +/** + * Pushes a value onto the end of the stack, adding a new index. + * + * @note This may safely be used even if the stack has a blocksize greater than + * 1. + * + * @param handle Stack handle + * @param value Value to push + * + * @noreturn + * @error If an invalid handle is provided or the resizing + * operation runs out of memory, an error will be thrown. + */ +native PushStackCell(Stack:handle, any:value); + +/** + * Pushes a string onto the end of a stack, truncating it if it is too long. + * + * @param handle Stack handle + * @param value String to push + * + * @noreturn + * @error If an invalid handle is provided or the resizing + * operation runs out of memory, an error will be thrown. + */ +native PushStackString(Stack:handle, const value[]); + +/** + * Pushes an array of cells onto the end of a stack. The cells are pushed as a + * block (i.e. the entire array takes up one stack slot), rather than pushing + * each cell individually. + * + * @param handle Stack handle + * @param values Block of values to copy + * @param size If not set, the number of elements copied from the array + * will be equal to the blocksize, if set higher than the + * blocksize, the operation will be truncated, + * + * @noreturn + * @error If an invalid handle is provided or the resizing + * operation runs out of memory, an error will be thrown. + */ +native PushStackArray(Stack:handle, const any:values[], size= -1); + +/** + * Pops a cell value from a stack. + * + * @param handle Stack handle + * @param value Variable to store the value in + * @param block Optionally specify which block to read from (useful if the + * blocksize is > 0) + * @param asChar Optionally read as a byte instead of a cell + * + * @return True on success, false if the stack is empty. + * @error If an invalid handle, invalid block or invalid byte is + * provided, an error will be thrown. + */ +native bool:PopStackCell(Stack:handle, &any:value, block = 0, bool:asChar = false); + +/** + * Pops a string value from a stack. + * + * @param handle Stack handle + * @param buffer Buffer to copy string to + * @param maxlength Maximum size of the buffer + * @param written Variable to store number of characters copied to + * + * @return True on success, false if the stack is empty + * @error If an invalid handle is provided an error will be thrown. + */ +native bool:PopStackString(Stack:handle, buffer[], maxlength, &written = 0); + +/** + * Pops an array of cells from a stack. + * + * @param handle Stack handle + * @param buffer Array to copy value to + * @param size Size of buffer, if not set (-1) assumes the size is equal to + * the stack blocksize + * + * @return True on success, false if the stack is empty + * @error If an invalid handle is provided an error will be thrown. + */ +native bool:PopStackArray(Stack:handle, any:buffer[], size = -1); + +/** + * Returns if a stack is empty. + * + * @param handle Stack handle + * + * @return True if empty, false if not empty + * @error If an invalid handle is provided an error will be thrown. + */ +native bool:IsStackEmpty(Stack:handle); + +/** + * Pops a value off a stack, ignoring it completely. + * + * @param handle Stack handle + * + * @return True if a value was popped, false if stack is empty + * @error If an invalid handle is provided an error will be thrown. + */ +stock PopStack(Stack:handle) +{ + new value; + return PopStackCell(handle, value); +} + +/** + * Destroys a stack and frees its memory. + * + * @note The function automatically sets the variable passed to it to 0 to aid + * in preventing accidental usage after destroy. + * + * @param handle Stack to destroy + * + * @return 1 if the Stack was destroyed, 0 if nothing had to be + * destroyed (invalid handle) + */ +native DestroyStack(&Stack:handle); diff --git a/bin/compiler/include/celltrie.inc b/bin/compiler/include/celltrie.inc new file mode 100644 index 0000000..cf69dfe --- /dev/null +++ b/bin/compiler/include/celltrie.inc @@ -0,0 +1,412 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +#if defined _celltrie_included + #endinput +#endif +#define _celltrie_included + +/** + * Hash map tag declaration + * + * @note The word "Trie" in this API is historical. As of AMX Mod X 1.8.3, + * tries have been internally replaced with hash tables, which have O(1) + * insertion time instead of O(n). + * @note Plugins are responsible for freeing all Trie handles they acquire. + * Failing to free handles will result in the plugin and AMXX leaking + * memory. + */ +enum Trie +{ + Invalid_Trie = 0 +}; + +/** + * Hash map iterator tag declaration + * + * @note The word "Trie" in this API is historical. As of AMX Mod X 1.8.3, + * tries have been internally replaced with hash tables, which have O(1) + * insertion time instead of O(n). + * @note Plugins are responsible for freeing all TrieIter handles they acquire. + * Failing to free handles will result in the plugin and AMXX leaking + * memory. + */ +enum TrieIter +{ + Invalid_TrieIter = 0 +} + +/** + * Hash map snapshot tag declaration + * + * @note Plugins are responsible for freeing all Snapshot handles they acquire. + * Failing to free handles will result in the plugin and AMXX leaking + * memory. + */ +enum Snapshot +{ + Invalid_Snapshot = 0 +}; + +/** + * Creates a hash map. A hash map is a container that maps strings (called keys) + * to arbitrary values (cells, arrays or strings). + * + * @note Keys in a hash map are unique so there is no more than one entry in the + * map for any given key. + * @note Insertion, deletion, and lookup in a hash map are all considered to be + * fast operations, amortized to O(1), or constant time. + * + * @return New Map handle, which must be freed via TrieDestroy() + */ +native Trie:TrieCreate(); + +/** + * Clears all entries from a Map. + * + * @param handle Map handle + * + * @error If an invalid handle is provided an error will be + * thrown. + * @noreturn + */ +native TrieClear(Trie:handle); + +/** + * Sets a cell value in a hash map, either inserting a new entry or replacing + * an old one. + * + * @param handle Map handle + * @param key Key string + * @param value Value to store + * @param replace If false the operation will fail if the key is already set + * + * @return 1 on success, 0 otherwise + * @error If an invalid handle is provided an error will be + * thrown. + */ +native TrieSetCell(Trie:handle, const key[], any:value, bool:replace = true); + +/** + * Sets a string value in a hash map, either inserting a new entry or replacing + * an old one. + * + * @param handle Map handle + * @param key Key string + * @param value String to store + * @param replace If false the operation will fail if the key is already set + * + * @return 1 on success, 0 otherwise + * @error If an invalid handle is provided an error will be + * thrown. + */ +native TrieSetString(Trie:handle, const key[], const value[], bool:replace = true); + +/** + * Sets an array value in a hash map, either inserting a new entry or replacing + * an old one. + * + * @param handle Map handle + * @param key Key string + * @param buffer Array to store + * @param size Array size + * @param replace If false the operation will fail if the key is already set + * + * @return 1 on success, 0 otherwise + * @error If an invalid handle is provided an error will be + * thrown. or invalid array size + */ +native TrieSetArray(Trie:handle, const key[], const any:buffer[], size, bool:replace = true); + +/** + * Retrieves a cell value from a hash map. + * + * @param handle Map handle + * @param key Key string + * @param value Variable to store value to + * + * @return True on success, false if either the key is not set or the + * value type does not match (value is string or array) + * @error If an invalid handle is provided an error will be + * thrown. + */ +native bool:TrieGetCell(Trie:handle, const key[], &any:value); + +/** + * Retrieves a string from a hash map. + * + * @param handle Map handle + * @param key Key string + * @param output Buffer to copy the value to + * @param outputsize Maximum size of buffer + * @param size Optional variable to store the number of cells written + * to the buffer in + * + * @return True on success, false if either the key is not set or + * the value type does not match (value is cell or array) + * @error If an invalid handle is provided an error will be + * thrown. + */ +native bool:TrieGetString(Trie:handle, const key[], output[], outputsize, &size = 0); + +/** + * Retrieves a string from a hash map. + * + * @param handle Map handle + * @param key Key string + * @param output Array to copy the value to + * @param outputsize Maximum size of array + * @param size Optional variable to store the number of cells written + * to the array in + * + * @return True on success, false if either the key is not set or + * the value type does not match (value is cell or string) + * @error If an invalid handle or array size is provided an error + * will be thrown. + */ +native bool:TrieGetArray(Trie:handle, const key[], any:output[], outputsize, &size = 0); + +/** + * Removes an entry from a hash map. + * + * @param handle Map handle + * @param key Key string + * + * @return True on success, false if the key was never set + * @error If an invalid handle is provided an error will be + * thrown. + */ +native bool:TrieDeleteKey(Trie:handle, const key[]); + +/** + * Checks a hash map for the existence of an entry. + * + * @param handle Map handle + * @param key Key string + * + * @return True if the key is set, false otherwise + * @error If an invalid handle is provided an error will be + * thrown. + */ +native bool:TrieKeyExists(Trie:handle, const key[]); + +/** + * Destroys a hash map and frees its memory. + * + * @note The function automatically sets the variable passed to it to 0 to aid + * in preventing accidental usage after destroy. + * + * @param handle Map handle + * + * @return 1 on success, 0 if an invalid handle was passed in + */ +native TrieDestroy(&Trie:handle); + +/** + * Returns the number of entries in a hash map. + * + * @param handle Map handle + * + * @return Number of elements in the hash map + * @error If an invalid handle is provided an error will be + * thrown. + */ +native TrieGetSize(Trie:handle); + +/** + * Creates a snapshot of all keys in a hash map. If the map is changed + * afterwards, the changes are not reflected in the snapshot. + * Keys are not sorted. + * + * @param handle Map handle + * + * @return New map snapshot handle, which must be freed via + * TrieSnapshotDestroy() + * @error If an invalid handle is provided an error will be + * thrown. + */ +native Snapshot:TrieSnapshotCreate(Trie:handle); + +/** + * Returns the number of keys in a map snapshot. Note that this may be + * different from the size of the map, since the map can change after the + * snapshot of its keys was taken. + * + * @param handle Map snapshot handle + * + * @return Number of keys + * @error If an invalid handle is provided an error will be + * thrown. + */ +native TrieSnapshotLength(Snapshot:handle); + +/** + * Returns the buffer size required to store a given key. That is, it returns + * the length of the key plus one. + * + * @param handle Map snapshot handle + * @param index Key index (starting from 0) + * + * @return Buffer size required to store the key string + * @error If an invalid handle is provided an error will be + * thrown. or index out of range + */ +native TrieSnapshotKeyBufferSize(Snapshot:handle, index); + +/** + * Retrieves the key string of a given key in a map snapshot. + * + * @param handle Map snapshot handle + * @param index Key index (starting from 0) + * @param buffer String buffer + * @param maxlength Maximum buffer length + * + * @return Number of bytes written to the buffer + * @error If an invalid handle is provided an error will be + * thrown. or index out of range + */ +native TrieSnapshotGetKey(Snapshot:handle, index, buffer[], maxlength); + +/** + * Destroys a map snapshot and frees its memory. + * + * @note The function automatically sets the variable passed to it to 0 to aid + * in preventing accidental usage after destroy. + * + * @param handle Map snapshot handle + * + * @return 1 on success, 0 if an invalid handle was passed in + */ +native TrieSnapshotDestroy(&Snapshot:handle); + + +/** + * Creates an iterator for a map. It provides iterative read-only access to the + * maps contents. + * + * @note Removing or adding keys to the underlying map will invalidate all its + * iterators. Updating values of existing keys is allowed and the changes + * will be immediately reflected in the iterator. + * @note Iterators are designed to be short-lived and not stored, and creating + * them is very cheap. Reading data from an iterator is just as fast as + * reading directly from the map. + * @note Just like in snapshots the keys are not sorted. + * + * @return New iterator handle, which must be freed via TrieIterDestroy(). + * @error Invalid Handle + */ +native TrieIter:TrieIterCreate(Trie:handle); + +/** + * Returns if the iterator has reached its end and no more data can be read. + * + * @param handle Iterator handle + * + * @return True if iterator has reached the end, false otherwise + * @error Invalid Handle + * Iterator has been closed (underlying map destroyed) + * Iterator is outdated + */ +native bool:TrieIterEnded(TrieIter:handle); + +/** + * Advances the iterator to the next key/value pair if one is available. + * + * @param handle Iterator handle + * + * @error Invalid Handle + * Iterator has been closed (underlying map destroyed) + * Iterator is outdated + */ +native TrieIterNext(TrieIter:handle); + +/** + * Retrieves the key the iterator currently points to. + * + * @param handle Iterator handle. + * @param key Buffer to store the current key in. + * @param outputsize Maximum size of string buffer. + * + * @return Nnumber of bytes written to the buffer + * @error Invalid handle + * Iterator has been closed (underlying map destroyed) + * Iterator is outdated + */ +native TrieIterGetKey(TrieIter:handle, key[], outputsize); + +/** + * Retrieves the number of elements in the underlying map. + * + * @note When used on a valid iterator this is exactly the same as calling TrieGetSize on the map directly. + * + * @param handle Iterator handle + * + * @return Number of elements in the map + * @error Invalid handle + * Iterator has been closed (underlying map destroyed) + * Iterator is outdated + */ +native TrieIterGetSize(TrieIter:handle); + +/** + * Retrieves a value at the current position of the iterator. + * + * @param handle Iterator handle + * @param value Variable to store value in + * + * @return True on success, false if the iterator is empty or the current + * value is an array or a string. + * @error Invalid handle + * Iterator has been closed (underlying map destroyed) + * Iterator is outdated + */ +native bool:TrieIterGetCell(TrieIter:handle, &any:value); + +/** + * Retrieves a string at the current position of the iterator. + * + * @param handle Iterator handle + * @param buffer Buffer to store the string in + * @param outputsize Maximum size of string buffer + * @param size Optional parameter to store the number of bytes written to the buffer. + * + * @return True on success, false if the iterator is empty or the current value + * is not a string. + * @error Invalid handle + * Invalid buffer size + * Iterator has been closed (underlying map destroyed) + * Iterator is outdated + */ +native bool:TrieIterGetString(TrieIter:handle, buffer[], outputsize, &size = 0); + +/** + * Retrieves an array at the current position of the iterator. + * + * @param handle Iterator handle + * @param buffer Buffer to store the array + * @param outputsize Maximum size of buffer + * @param size Optional parameter to store the number of bytes written to the buffer + * + * @return True on success, false if the iterator is empty or the current + * value is not an array. + * @error Invalid handle + * Invalid buffer size + * Iterator has been closed (underlying map destroyed) + * Iterator is outdated + */ +native bool:TrieIterGetArray(TrieIter:handle, any:array[], outputsize, &size = 0); + +/** + * Destroys an iterator handle. + * + * @param handle Iterator handle. + * + * @return True on success, false if the value was never set. + */ +native TrieIterDestroy(&TrieIter:handle); diff --git a/bin/compiler/include/core.inc b/bin/compiler/include/core.inc new file mode 100644 index 0000000..d78e9b2 --- /dev/null +++ b/bin/compiler/include/core.inc @@ -0,0 +1,202 @@ +/* Core functions +* +* (c) Copyright 1998-2003, ITB CompuPhase +* +* This file is provided as is (no warranties). +*/ + +#if defined _core_included + #endinput +#endif +#define _core_included + +/** + * Returns the free memory space available to the plugin. + * + * @note This is a debugging function that is not intended for general plugin + * use. + * + * @return Free memory space in bytes + */ +native heapspace(); + +/** + * Returns the function index of a public function declared in the plugin. + * + * @param name Function name + * + * @return Function index > 0 on success, -1 if function was not found + * @error If the function name is too long (longer than 63 characters) + * an error will be thrown. + */ +native funcidx(const name[]); + +/** + * Returns the number of arguments passed into the currently executed function. + * + * @return Number of arguments passed + */ +native numargs(); + +/** + * Retrieves an argument value passed into the currently executed function. + * + * @param arg Argument index + * @param index Index to retrieve from the argument (for arrays and strings) + * + * @return Argument value at given index + */ +native getarg(arg, index = 0); + +/** + * Sets the value of an argument passed into the currently executed function. + * + * @note This is not equal to assigning a new value to a by-reference argument. + * + * @param arg Argument index + * @param index Index to set in the argument (for arrays and strings) + */ +native setarg(arg, index = 0, value); + +/** + * Converts a character to lowercase. + * + * @note This is not UTF8 or locale-safe. + * + * @param c Character to convert + * + * @return Converted character + */ +native tolower(c); + +/** + * Converts a character to uppercase. + * + * @note This is not UTF8 or locale-safe. + * + * @param c Character to convert + * + * @return Converted character + */ +native toupper(c); + +/** + * Swaps the bytes of a value (the lowest byte becomes the highest byte). + * + * @param c Value to swap + * + * @return Byte-swapped value + */ +native swapchars(c); + +/** + * Returns a random number between 0 and a specified upper bound. + * + * @param max Exclusive upper bound + * + * @return Random value + */ +native random(max); + +/** + * Returns the smaller of two provided values. + * + * @param value1 Value one + * @param value2 Value two + * + * @return Smaller of the two values + */ +native min(value1, value2); + +/** + * Returns the bigger of two provided values. + * + * @param value1 Value one + * @param value2 Value two + * + * @return Bigger of the two values + */ +native max(value1, value2); + +/** + * Limits a provided value between two specified bounds. + * + * @param value Value to clamp + * @param min Lower bound + * @param max Upper bound + * + * @return The value if it is between the lower and upper bound, min if + * value is below, max if it is above the specified bounds. + */ +native clamp(value, min = cellmin, max = cellmax); + +/** + * Returns a value raised to a specified exponent. + * + * @param value Value + * @param exponent Exponent to raise value to + * + * @return Value to the power of exponent + */ +native power(value, exponent); + +/** + * Returns the approximated square root of a value. + * + * @note This uses a simple successice approximation algorithm (continuously + * dividing the value) and only deals with integers, this makes it very + * imprecise. + * + * @param value Value + * + * @return Square root of the value + */ +native sqroot(value); + +/** + * Retrieves the current time in hours, minutes and seconds. + * + * @param hour Variable to store hours in + * @param minute Variable to store minutes in + * @param second Variable to store seconds in + * + * @return Unix timestamp + */ +native time(&hour = 0, &minute = 0, &second = 0); + +/** + * Retrieves the current date in year, month and day. + * + * @param year Variable to store year in + * @param month Variable to store month in + * @param day Variable to store day in + * + * @noreturn + */ +native date(&year = 0, &month = 0, &day = 0); + +/** + * Returns the elapsed CPU seconds. + * + * @note This is a debugging function that is not intended for general plugin + * use. + * @note This uses the C clock() function internally and comes with all its + * drawbacks attached. + * + * @param granularity Unused + * + * @return Number of CPU seconds elapsed + */ +native tickcount(&granularity = 0); + +/** + * Returns the absolute value of a number. + * + * @param x Integral value + * + * @return Absolute value of x (x if it is greater than 0, -x otherwise) + */ +stock abs(x) +{ + return x > 0 ? x : -x; +} diff --git a/bin/compiler/include/crxranks.inc b/bin/compiler/include/crxranks.inc new file mode 100644 index 0000000..e491545 --- /dev/null +++ b/bin/compiler/include/crxranks.inc @@ -0,0 +1,309 @@ +#if defined _crxranks_included + #endinput +#endif + +#define _crxranks_included + +#if !defined _crxranks_const_included + #include +#endif + +/** + * Called when the client's level changes. + * + * @param id Client index. + * @param level New level. + * @param levelup True if the client gained a level, false if he lost one. + * @noreturn + */ +forward crxranks_user_level_updated(id, level, bool:levelup) + +/** + * Called right before the client receives XP. + * + * @param id Client index. + * @param xp Amount of XP ready to be received. + * @param source The XP source. + * @return CRXRANKS_STOP to prevent the XP from being added, + * CRXRANKS_CONTINUE to let the XP pass through, + * any integer value to modify the amount of XP that + * is going to be received + */ +forward crxranks_user_receive_xp(id, xp, CRXRanks_XPSources:source) + +/** + * Called right after the client's XP amount changes. + * + * @param id Client index. + * @param xp Amount of XP the client has after the change. + * @param source The XP source that caused the change. + * @noreturn + */ +forward crxranks_user_xp_updated(id, xp, CRXRanks_XPSources:source) + +/** + * Returns the chat prefix set in the plugin's configuration file. + * + * @param buffer Buffer to store the prefix in. + * @param len Maximum buffer length. + * @noreturn + */ +native crxranks_get_chat_prefix(buffer[], len) + +/** + * Returns the flags that clients will receive when they reach the final level. + * + * @param buffer Buffer to store the flags in. + * @param len Maximum buffer length. + * @return Flags as bit value. + */ +native crxranks_get_final_flags(buffer[] = "", len = 0) + +/** + * Returns the HUD info format set in the plugin's configuration file. + * + * @param final If true, it will get the HUD_FORMAT_FINAL settings, otherwise HUD_FORMAT if false. + * @param buffer Buffer to store the HUD info format in. + * @param len Maximum buffer length. + * @noreturn + */ +native crxranks_get_hudinfo_format(bool:final, buffer[], len) + +/** + * Returns the number of available levels. + * + * @return Number of available levels. + */ +native crxranks_get_max_levels() + +/** + * Searches for a rank name by a specific level number. + * + * @param level Level number. + * @param buffer Buffer to store the rank name in. + * @param len Maximum buffer length. + * @return 0 if the level number is out of range, 1 otherwise. + */ +native crxranks_get_rank_by_level(level, buffer[], len) + +/** + * Returns the data saving type set in the plugin's configuration file. + * + * @note You can use the constants CRXRANKS_ST_NICKNAME, CRXRANKS_ST_IP + * and CRXRANKS_ST_STEAMID instead of numbers. + * + * @return 0 if it's set to nickname, 1 for IP and 2 for SteamID. + */ +native CRXRanks_SaveTypes:crxranks_get_save_type() + +/** + * Returns a key value set in the [Settings] section in the plugin's configuration file. + * + * @param key Key to search for. + * @param value Buffer to store the value in. + * @param len Maximum buffer length. + * @return True if the key was found, false otherwise. + */ +native bool:crxranks_get_setting(key[], value[], len) + +/** + * Returns the client's HUD information. + * + * @param id Client index. + * @param buffer Buffer to store the HUD information in. + * @param len Maximum buffer length. + * @noreturn + */ +native crxranks_get_user_hudinfo(id, buffer[], len) + +/** + * Returns the client's current level. + * + * @param id Client index. + * @return Client's current level. + */ +native crxranks_get_user_level(id) + +/** + * Returns the client's next rank. + * + * @param id Client index. + * @param buffer Buffer to store the rank name in. + * @param len Maximum buffer length. + * @noreturn + */ +native crxranks_get_user_next_rank(id, buffer[], len) + +/** + * Returns the XP needed for the client to reach the next level. + * + * @param id Client index. + * @return XP needed for the client to reach the next level. + */ +native crxranks_get_user_next_xp(id) + +/** + * Returns the client's current rank. + * + * @param id Client index. + * @param buffer Buffer to store the rank name in. + * @param len Maximum buffer length. + * @noreturn + */ +native crxranks_get_user_rank(id, buffer[], len) + +/** + * Returns the amount of XP that the client has. + * + * @param id Client index. + * @return Client's current XP. + */ +native crxranks_get_user_xp(id) + +/** + * Returns the vault name set in the plugin's configuration file. + * + * @param buffer Buffer to store the vault name in. + * @param len Maximum buffer length. + * @noreturn + */ +native crxranks_get_vault_name(buffer[], len) + +/** + * Returns the VIP flags set in the plugin's configuration file. + * + * @param buffer Buffer to store the flags in. + * @param len Maximum buffer length. + * @return Flags as bit value. + */ +native crxranks_get_vip_flags(buffer[] = "", len = 0) + +/** + * Returns the amount of XP required for a specific level. + * + * @param level Level number. + * @return -1 if the level is out of range, XP required for that level otherwise. + */ +native crxranks_get_xp_for_level(level) + +/** + * Returns the XP reward that the client will get in a specific sitaution. + * + * @param id Client index. + * @param reward Reward keyword. + * @return XP reward that the client will get. + */ +native crxranks_get_xp_reward(id, reward[]) + +/** + * Gives a specific amount of XP to the client. + * + * @note If the "reward" parameter is set, the plugin will ignore the amount set + * in the "amount" parameter and will attempt to give the XP set in the + * configuration file by the specific keyword set in the "reward" parameter. + * + * @param id Client index. + * @param amount XP amount. + * @param reward Reward keyword. + * @param source XP source. + * @return Amount of XP given. + */ +native crxranks_give_user_xp(id, amount = 0, reward[] = "", CRXRanks_XPSources:source = CRXRANKS_XPS_PLUGIN) + +/** + * Checks if the client has HUD information enabled. + * + * @param id Client index. + * @return True if he has, false otherwise. + */ +native bool:crxranks_has_user_hudinfo(id) + +/** + * Checks if the HUD info system is using DHUD messages. + * + * @return True if it is, false otherwise. + */ +native bool:crxranks_is_hi_using_dhud() + +/** + * Checks if the HUD information system is enabled. + * + * @return True if it is, false otherwise. + */ +native bool:crxranks_is_hud_enabled() + +/** + * Checks if the screen fade when a client loses a level is enabled. + * + * @return True if it is, false otherwise. + */ +native bool:crxranks_is_sfdn_enabled() + +/** + * Checks if the screen fade when a client gains a level is enabled. + * + * @return True if it is, false otherwise. + */ +native bool:crxranks_is_sfup_enabled() + +/** + * Checks if the client is on the final level. + * + * @param id Client index. + * @return True if he is, false otherwise. + */ +native bool:crxranks_is_user_on_final(id) + +/** + * Checks if the client is VIP according to the VIP flags set in the plugin's configuration file. + * + * @param id Client index. + * @return True if he is, false otherwise. + */ +native bool:crxranks_is_user_vip(id) + +/** + * Checks if the plugin is using MySQL to save/load XP. + * + * @return True if it is, false otherwise. + */ +native bool:crxranks_is_using_mysql() + +/** + * Checks if the XP notifier system is enabled. + * + * @return True if it is, false otherwise. + */ +native bool:crxranks_is_xpn_enabled() + +/** + * Checks if the XP notifier system is using DHUD messages. + * + * @return True if it is, false otherwise. + */ +native bool:crxranks_is_xpn_using_dhud() + +/** + * Sets the exact amount of XP that th client has. + * + * @param id Client index. + * @param amount XP amount. + * @param source XP source. + * @return Amount of XP given. + */ +native crxranks_set_user_xp(id, amount, CRXRanks_XPSources:source = CRXRANKS_XPS_PLUGIN) + +/** + * Checks if the plugin's option to use combined events is enabled. + * + * @return True if it is, false otherwise. + */ +native bool:crxranks_using_combined_events() + +/** + * Checks whether the specified XP reward is set in the configuration file. + * + * @param reward The XP reward to check. + * @return True if it is, false otherwise. + */ +native bool:crxranks_xp_reward_is_set(reward[]) \ No newline at end of file diff --git a/bin/compiler/include/crxranks_const.inc b/bin/compiler/include/crxranks_const.inc new file mode 100644 index 0000000..967fd87 --- /dev/null +++ b/bin/compiler/include/crxranks_const.inc @@ -0,0 +1,56 @@ +#if defined _crxranks_const_included + #endinput +#endif + +#define _crxranks_const_included + +/** + * Plugin-specific return codes + */ +#define CRXRANKS_CONTINUE 900300 +#define CRXRANKS_HANDLED 900301 + +/** + * Maximum buffer length for HUD information + */ +const CRXRANKS_MAX_HUDINFO_LENGTH = 192 + +/** + * Maximum buffer length for player information + */ +const CRXRANKS_MAX_PLAYER_INFO_LENGTH = 35 + +/** + * Maximum buffer length for a rank + */ +const CRXRANKS_MAX_RANK_LENGTH = 32 + +/** + * Maximum buffer length for a XP reward + */ +const CRXRANKS_MAX_XP_REWARD_LENGTH = 32 + +/** + * Maximum buffer length for XP as a string + */ +const CRXRANKS_MAX_XP_LENGTH = 11 + +/** + * Save types for crxranks_get_save_type() + */ +enum CRXRanks_SaveTypes +{ + CRXRANKS_ST_NICKNAME = 0, + CRXRANKS_ST_IP, + CRXRANKS_ST_STEAMID +} + +/** + * Types of sources when receiving XP + */ +enum CRXRanks_XPSources +{ + CRXRANKS_XPS_PLUGIN = 0, + CRXRANKS_XPS_REWARD, + CRXRANKS_XPS_ADMIN +} \ No newline at end of file diff --git a/bin/compiler/include/crypto.inc b/bin/compiler/include/crypto.inc new file mode 100644 index 0000000..995c2d1 --- /dev/null +++ b/bin/compiler/include/crypto.inc @@ -0,0 +1,1153 @@ +#if defined _crypto_included + #endinput +#endif +#define _crypto_included + + + +/* Guided by ********************************************************************************************************************* +BASE64: http://www.opensource.apple.com/source/QuickTimeStreamingServer/QuickTimeStreamingServer-452/CommonUtilitiesLib/base64.c +SHA1/SHA2: https://github.com/emn178/js-sha1 / https://github.com/emn178/js-sha512 +CRC32: https://forums.alliedmods.net/showthread.php?t=206640 + +INC by Destro (https://amxmodx-es.com) +*********************************************************************************************************************************/ + + +enum Sha2Bits: { + SHA2_224, + SHA2_256, + SHA2_384, + SHA2_512 +} + +stock SHA1_Data(const data[], size, output[], len) +{ + return __hash_sha1(data, size, output, len) +} + +stock SHA1_File(const file[], output[], len) +{ + return __hash_sha1(file, -1, output, len) +} + +stock SHA2_Data(const data[], size, output[], len, Sha2Bits:bits=SHA2_512) +{ + return __hash_sha2(data, size, bits, output, len) +} + +stock SHA2_File(const file[], output[], len, Sha2Bits:bits=SHA2_512) +{ + return __hash_sha2(file, -1, bits, output, len) +} + +stock MD5_Data(const data[], output[], len) +{ + new buff[34] + md5(data, buff) + + return copy(output, len, buff) +} + +stock MD5_File(const file[], output[], len) +{ + new buff[34] + md5_file(file, buff) + + return copy(output, len, buff) +} + +/* +stock BASE64_Encode(const data[], size=0, output[], len) +stock BASE64_Decode(const data[], output[], len) + +stock CRC32_Data(const data[], size) +stock CRC32_File(const file[]) + +stock encrypt_key(string[]) +stock encrypt(string[], out[], len, numkey) +stock decrypt(encrypted[], out[], len, numkey) +*/ + +/*****************************************************************************************************************/ + +#define READ_FILE_BUFFER 2048 + +stock const gCRC32_Table[] = { + 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f, + 0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988, + 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, 0x90bf1d91, 0x1db71064, 0x6ab020f2, + 0xf3b97148, 0x84be41de, 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7, + 0x136c9856, 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, 0x14015c4f, 0x63066cd9, + 0xfa0f3d63, 0x8d080df5, 0x3b6e20c8, 0x4c69105e, 0xd56041e4, 0xa2677172, + 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b, 0x35b5a8fa, 0x42b2986c, + 0xdbbbc9d6, 0xacbcf940, 0x32d86ce3, 0x45df5c75, 0xdcd60dcf, 0xabd13d59, + 0x26d930ac, 0x51de003a, 0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423, + 0xcfba9599, 0xb8bda50f, 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924, + 0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, 0x76dc4190, 0x01db7106, + 0x98d220bc, 0xefd5102a, 0x71b18589, 0x06b6b51f, 0x9fbfe4a5, 0xe8b8d433, + 0x7807c9a2, 0x0f00f934, 0x9609a88e, 0xe10e9818, 0x7f6a0dbb, 0x086d3d2d, + 0x91646c97, 0xe6635c01, 0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e, + 0x6c0695ed, 0x1b01a57b, 0x8208f4c1, 0xf50fc457, 0x65b0d9c6, 0x12b7e950, + 0x8bbeb8ea, 0xfcb9887c, 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, 0xfbd44c65, + 0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2, 0x4adfa541, 0x3dd895d7, + 0xa4d1c46d, 0xd3d6f4fb, 0x4369e96a, 0x346ed9fc, 0xad678846, 0xda60b8d0, + 0x44042d73, 0x33031de5, 0xaa0a4c5f, 0xdd0d7cc9, 0x5005713c, 0x270241aa, + 0xbe0b1010, 0xc90c2086, 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f, + 0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 0x59b33d17, 0x2eb40d81, + 0xb7bd5c3b, 0xc0ba6cad, 0xedb88320, 0x9abfb3b6, 0x03b6e20c, 0x74b1d29a, + 0xead54739, 0x9dd277af, 0x04db2615, 0x73dc1683, 0xe3630b12, 0x94643b84, + 0x0d6d6a3e, 0x7a6a5aa8, 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1, + 0xf00f9344, 0x8708a3d2, 0x1e01f268, 0x6906c2fe, 0xf762575d, 0x806567cb, + 0x196c3671, 0x6e6b06e7, 0xfed41b76, 0x89d32be0, 0x10da7a5a, 0x67dd4acc, + 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5, 0xd6d6a3e8, 0xa1d1937e, + 0x38d8c2c4, 0x4fdff252, 0xd1bb67f1, 0xa6bc5767, 0x3fb506dd, 0x48b2364b, + 0xd80d2bda, 0xaf0a1b4c, 0x36034af6, 0x41047a60, 0xdf60efc3, 0xa867df55, + 0x316e8eef, 0x4669be79, 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236, + 0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, 0xc5ba3bbe, 0xb2bd0b28, + 0x2bb45a92, 0x5cb36a04, 0xc2d7ffa7, 0xb5d0cf31, 0x2cd99e8b, 0x5bdeae1d, + 0x9b64c2b0, 0xec63f226, 0x756aa39c, 0x026d930a, 0x9c0906a9, 0xeb0e363f, + 0x72076785, 0x05005713, 0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38, + 0x92d28e9b, 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21, 0x86d3d2d4, 0xf1d4e242, + 0x68ddb3f8, 0x1fda836e, 0x81be16cd, 0xf6b9265b, 0x6fb077e1, 0x18b74777, + 0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c, 0x8f659eff, 0xf862ae69, + 0x616bffd3, 0x166ccf45, 0xa00ae278, 0xd70dd2ee, 0x4e048354, 0x3903b3c2, + 0xa7672661, 0xd06016f7, 0x4969474d, 0x3e6e77db, 0xaed16a4a, 0xd9d65adc, + 0x40df0b66, 0x37d83bf0, 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9, + 0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, 0xbad03605, 0xcdd70693, + 0x54de5729, 0x23d967bf, 0xb3667a2e, 0xc4614ab8, 0x5d681b02, 0x2a6f2b94, + 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d +} + +stock const gSHA2_Table[] = { + 0x428A2F98, 0xD728AE22, 0x71374491, 0x23EF65CD, + 0xB5C0FBCF, 0xEC4D3B2F, 0xE9B5DBA5, 0x8189DBBC, + 0x3956C25B, 0xF348B538, 0x59F111F1, 0xB605D019, + 0x923F82A4, 0xAF194F9B, 0xAB1C5ED5, 0xDA6D8118, + 0xD807AA98, 0xA3030242, 0x12835B01, 0x45706FBE, + 0x243185BE, 0x4EE4B28C, 0x550C7DC3, 0xD5FFB4E2, + 0x72BE5D74, 0xF27B896F, 0x80DEB1FE, 0x3B1696B1, + 0x9BDC06A7, 0x25C71235, 0xC19BF174, 0xCF692694, + 0xE49B69C1, 0x9EF14AD2, 0xEFBE4786, 0x384F25E3, + 0x0FC19DC6, 0x8B8CD5B5, 0x240CA1CC, 0x77AC9C65, + 0x2DE92C6F, 0x592B0275, 0x4A7484AA, 0x6EA6E483, + 0x5CB0A9DC, 0xBD41FBD4, 0x76F988DA, 0x831153B5, + 0x983E5152, 0xEE66DFAB, 0xA831C66D, 0x2DB43210, + 0xB00327C8, 0x98FB213F, 0xBF597FC7, 0xBEEF0EE4, + 0xC6E00BF3, 0x3DA88FC2, 0xD5A79147, 0x930AA725, + 0x06CA6351, 0xE003826F, 0x14292967, 0x0A0E6E70, + 0x27B70A85, 0x46D22FFC, 0x2E1B2138, 0x5C26C926, + 0x4D2C6DFC, 0x5AC42AED, 0x53380D13, 0x9D95B3DF, + 0x650A7354, 0x8BAF63DE, 0x766A0ABB, 0x3C77B2A8, + 0x81C2C92E, 0x47EDAEE6, 0x92722C85, 0x1482353B, + 0xA2BFE8A1, 0x4CF10364, 0xA81A664B, 0xBC423001, + 0xC24B8B70, 0xD0F89791, 0xC76C51A3, 0x0654BE30, + 0xD192E819, 0xD6EF5218, 0xD6990624, 0x5565A910, + 0xF40E3585, 0x5771202A, 0x106AA070, 0x32BBD1B8, + 0x19A4C116, 0xB8D2D0C8, 0x1E376C08, 0x5141AB53, + 0x2748774C, 0xDF8EEB99, 0x34B0BCB5, 0xE19B48A8, + 0x391C0CB3, 0xC5C95A63, 0x4ED8AA4A, 0xE3418ACB, + 0x5B9CCA4F, 0x7763E373, 0x682E6FF3, 0xD6B2B8A3, + 0x748F82EE, 0x5DEFB2FC, 0x78A5636F, 0x43172F60, + 0x84C87814, 0xA1F0AB72, 0x8CC70208, 0x1A6439EC, + 0x90BEFFFA, 0x23631E28, 0xA4506CEB, 0xDE82BDE9, + 0xBEF9A3F7, 0xB2C67915, 0xC67178F2, 0xE372532B, + 0xCA273ECE, 0xEA26619C, 0xD186B8C7, 0x21C0C207, + 0xEADA7DD6, 0xCDE0EB1E, 0xF57D4F7F, 0xEE6ED178, + 0x06F067AA, 0x72176FBA, 0x0A637DC5, 0xA2C898A6, + 0x113F9804, 0xBEF90DAE, 0x1B710B35, 0x131C471B, + 0x28DB77F5, 0x23047D84, 0x32CAAB7B, 0x40C72493, + 0x3C9EBE0A, 0x15C9BEBC, 0x431D67C4, 0x9C100D4C, + 0x4CC5D4BE, 0xCB3E42B6, 0x597F299C, 0xFC657E2A, + 0x5FCB6FAB, 0x3AD6FAEC, 0x6C44198C, 0x4A475817 +} + +stock const gSHA_HEXCHAR[] = "0123456789abcdef" +stock const gSHA_EXTRA[] = { -2147483648, 8388608, 32768, 128 } +stock const gSHA_SHIFT[] = { 24, 16, 8, 0 } + +stock gEncryptTable[96] // dYm4urtizlp2y@h.qsbT67n5oQf8xwU91VvcPZeB3WAk0MNHJFGKLjSgCaRDOEIX +stock gEncryptTableLen + +stock const gBase64_Fill = '=' +stock const gBase64_Table[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" +stock const gDecode_Table[256] = +{ + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 62, 64, 64, 64, 63, + 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 64, 64, 64, 64, 64, 64, + 64, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 64, 64, 64, 64, 64, + 64, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, + 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64 +}; + + +stock BASE64_Encode(const data[], size=0, output[], len) +{ + new write, i + if(!size) size = strlen(data) + + for(i = 0; i < (size - 2); i += 3) + { + if((write + 4) >= len) + { + output[0] = '^0'; + return 0; + } + + output[write++] = gBase64_Table[(data[i] >> 2) & 0x3F]; + output[write++] = gBase64_Table[((data[i] & 0x3) << 4) | ((data[i + 1] & 0xF0) >> 4)]; + output[write++] = gBase64_Table[((data[i + 1] & 0xF) << 2) | ((data[i + 2] & 0xC0) >> 6)]; + output[write++] = gBase64_Table[data[i + 2] & 0x3F]; + } + + if(i < size) + { + if((write + 4) >= len) + { + output[0] = '^0'; + return 0; + } + + output[write++] = gBase64_Table[(data[i] >> 2) & 0x3F]; + + if(i == (size - 1)) + { + output[write++] = gBase64_Table[((data[i] & 0x3) << 4)]; + output[write++] = gBase64_Fill; + } + else + { + output[write++] = gBase64_Table[((data[i] & 0x3) << 4) | ((data[i + 1] & 0xF0) >> 4)]; + output[write++] = gBase64_Table[((data[i + 1] & 0xF) << 2)]; + } + + output[write++] = gBase64_Fill; + } + + output[write] = '^0'; + return write; +} + + +stock BASE64_Decode(const data[], output[], len) +{ + new write, read, nprbytes + + while(gDecode_Table[data[read++]] <= 63) { } + + nprbytes = read - 1; + read = 0 + + while(nprbytes > 4) + { + if((write + 3) >= len) + { + output[0] = '^0'; + return 0; + } + + output[write++] = (gDecode_Table[data[read]] << 2 | gDecode_Table[data[read+1]] >> 4); + output[write++] = (gDecode_Table[data[read+1]] << 4 | gDecode_Table[data[read+2]] >> 2); + output[write++] = (gDecode_Table[data[read+2]] << 6 | gDecode_Table[data[read+3]]); + + read += 4; + nprbytes -= 4; + } + + if((write + 1 + nprbytes) >= len) + { + output[0] = '^0'; + return 0; + } + + if(nprbytes > 1) + output[write++] = (gDecode_Table[data[read]] << 2 | gDecode_Table[data[read+1]] >> 4); + + if(nprbytes > 2) + output[write++] = (gDecode_Table[data[read+1]] << 4 | gDecode_Table[data[read+2]] >> 2); + + if(nprbytes > 3) + output[write++] = (gDecode_Table[data[read+2]] << 6 | gDecode_Table[data[read+3]]); + + + output[write] = '^0'; + return write; +} + +stock CRC32_Data(const data[], size) +{ + new crc = 0xFFFFFFFF + + for (new i = 0; i < size; i++) + { + crc = gCRC32_Table[(crc ^ data[i]) & 0xFF] ^ ((crc >> 8) & 0x00FFFFFF) + } + + return crc ^ 0xFFFFFFFF +} + +stock CRC32_File(const file[]) +{ + new fp = fopen(file, "rb") + if(!fp) return 0 + + new crc = 0xFFFFFFFF; + new data[READ_FILE_BUFFER], readsize, i; + + while((readsize = fread_blocks(fp, data, READ_FILE_BUFFER, BLOCK_CHAR)) > 0) + { + for (i = 0; i < readsize; i++) + { + crc = gCRC32_Table[(crc ^ data[i]) & 0xFF] ^ ((crc >> 8) & 0x00FFFFFF) + } + } + + fclose(fp) + + return crc ^ 0xFFFFFFFF +} + +stock __hash_sha1(const dataORfile[], size, output[], len) +{ + new h0, h1, h2, h3, h4, block, blocks[160], code, end, t, f, + i, j, index, start, bytes, + fp, length, totalread, data[READ_FILE_BUFFER], data_start; + + if(size == -1) + { + fp = fopen(dataORfile, "rb"); + if(!fp) + { + copy(output, len, ""); + return false; + } + + fseek(fp, 0, SEEK_END); + length = ftell(fp); + if(length == 0) + { + fclose(fp); + copy(output, len, ""); + return false; + } + fseek(fp, 0, SEEK_SET); + + totalread = fread_blocks(fp, data, READ_FILE_BUFFER, BLOCK_CHAR); + } + else { + length = size; + } + + h0 = 0x67452301; + h1 = 0xEFCDAB89; + h2 = 0x98BADCFE; + h3 = 0x10325476; + h4 = 0xC3D2E1F0; + + do + { + blocks[0] = block; + blocks[16] = blocks[1] = blocks[2] = blocks[3] = + blocks[4] = blocks[5] = blocks[6] = blocks[7] = + blocks[8] = blocks[9] = blocks[10] = blocks[11] = + blocks[12] = blocks[13] = blocks[14] = blocks[15] = 0; + + for (i = start;index < length && i < 64; ++index) + { + if(size == -1) + { + if(index >= totalread) + { + data_start = totalread; + totalread += fread_blocks(fp, data, READ_FILE_BUFFER, BLOCK_CHAR) + + } + + code = data[index-data_start]; + } + else code = dataORfile[index]; + + + if(code < 0) code = 256 + code + + blocks[i >> 2] |= code << gSHA_SHIFT[i++ & 3]; + } + + + bytes += i - start; + start = i - 64; + + if(index == length) + { + blocks[i >> 2] |= gSHA_EXTRA[i & 3]; + ++index; + } + + block = blocks[16]; + if(index > length && i < 56) + { + blocks[15] = bytes << 3; + end = true; + } + + for(j = 16;j < 80;++j) + { + t = blocks[j - 3] ^ blocks[j - 8] ^ blocks[j - 14] ^ blocks[j - 16]; + blocks[j] = (t << 1) | (t >>> 31); + } + + new a = h0, b = h1, c = h2, d = h3, e = h4; + for(j = 0;j < 20;j += 5) + { + f = (b & c) | ((~b) & d); + t = (a << 5) | (a >>> 27); + e = t + f + e + 1518500249 + blocks[j] << 0; + b = (b << 30) | (b >>> 2); + + f = (a & b) | ((~a) & c); + t = (e << 5) | (e >>> 27); + d = t + f + d + 1518500249 + blocks[j + 1] << 0; + a = (a << 30) | (a >>> 2); + + f = (e & a) | ((~e) & b); + t = (d << 5) | (d >>> 27); + c = t + f + c + 1518500249 + blocks[j + 2] << 0; + e = (e << 30) | (e >>> 2); + + f = (d & e) | ((~d) & a); + t = (c << 5) | (c >>> 27); + b = t + f + b + 1518500249 + blocks[j + 3] << 0; + d = (d << 30) | (d >>> 2); + + f = (c & d) | ((~c) & e); + t = (b << 5) | (b >>> 27); + a = t + f + a + 1518500249 + blocks[j + 4] << 0; + c = (c << 30) | (c >>> 2); + } + + for(;j < 40;j += 5) + { + f = b ^ c ^ d; + t = (a << 5) | (a >>> 27); + e = t + f + e + 1859775393 + blocks[j] << 0; + b = (b << 30) | (b >>> 2); + + f = a ^ b ^ c; + t = (e << 5) | (e >>> 27); + d = t + f + d + 1859775393 + blocks[j + 1] << 0; + a = (a << 30) | (a >>> 2); + + f = e ^ a ^ b; + t = (d << 5) | (d >>> 27); + c = t + f + c + 1859775393 + blocks[j + 2] << 0; + e = (e << 30) | (e >>> 2); + + f = d ^ e ^ a; + t = (c << 5) | (c >>> 27); + b = t + f + b + 1859775393 + blocks[j + 3] << 0; + d = (d << 30) | (d >>> 2); + + f = c ^ d ^ e; + t = (b << 5) | (b >>> 27); + a = t + f + a + 1859775393 + blocks[j + 4] << 0; + c = (c << 30) | (c >>> 2); + } + + for(;j < 60;j += 5) + { + f = (b & c) | (b & d) | (c & d); + t = (a << 5) | (a >>> 27); + e = t + f + e - 1894007588 + blocks[j] << 0; + b = (b << 30) | (b >>> 2); + + f = (a & b) | (a & c) | (b & c); + t = (e << 5) | (e >>> 27); + d = t + f + d - 1894007588 + blocks[j + 1] << 0; + a = (a << 30) | (a >>> 2); + + f = (e & a) | (e & b) | (a & b); + t = (d << 5) | (d >>> 27); + c = t + f + c - 1894007588 + blocks[j + 2] << 0; + e = (e << 30) | (e >>> 2); + + f = (d & e) | (d & a) | (e & a); + t = (c << 5) | (c >>> 27); + b = t + f + b - 1894007588 + blocks[j + 3] << 0; + d = (d << 30) | (d >>> 2); + + f = (c & d) | (c & e) | (d & e); + t = (b << 5) | (b >>> 27); + a = t + f + a - 1894007588 + blocks[j + 4] << 0; + c = (c << 30) | (c >>> 2); + } + + for(;j < 80;j += 5) + { + f = b ^ c ^ d; + t = (a << 5) | (a >>> 27); + e = t + f + e - 899497514 + blocks[j] << 0; + b = (b << 30) | (b >>> 2); + + f = a ^ b ^ c; + t = (e << 5) | (e >>> 27); + d = t + f + d - 899497514 + blocks[j + 1] << 0; + a = (a << 30) | (a >>> 2); + + f = e ^ a ^ b; + t = (d << 5) | (d >>> 27); + c = t + f + c - 899497514 + blocks[j + 2] << 0; + e = (e << 30) | (e >>> 2); + + f = d ^ e ^ a; + t = (c << 5) | (c >>> 27); + b = t + f + b - 899497514 + blocks[j + 3] << 0; + d = (d << 30) | (d >>> 2); + + f = c ^ d ^ e; + t = (b << 5) | (b >>> 27); + a = t + f + a - 899497514 + blocks[j + 4] << 0; + c = (c << 30) | (c >>> 2); + } + + h0 = h0 + a << 0; + h1 = h1 + b << 0; + h2 = h2 + c << 0; + h3 = h3 + d << 0; + h4 = h4 + e << 0; + } while(!end); + + if(fp) fclose(fp) + + new hex[41], pos + hex[pos++] = gSHA_HEXCHAR[(h0 >> 28) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h0 >> 24) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h0 >> 20) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h0 >> 16) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h0 >> 12) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h0 >> 8) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h0 >> 4) & 0x0F];hex[pos++] = gSHA_HEXCHAR[h0 & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h1 >> 28) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h1 >> 24) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h1 >> 20) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h1 >> 16) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h1 >> 12) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h1 >> 8) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h1 >> 4) & 0x0F];hex[pos++] = gSHA_HEXCHAR[h1 & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h2 >> 28) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h2 >> 24) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h2 >> 20) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h2 >> 16) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h2 >> 12) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h2 >> 8) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h2 >> 4) & 0x0F];hex[pos++] = gSHA_HEXCHAR[h2 & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h3 >> 28) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h3 >> 24) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h3 >> 20) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h3 >> 16) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h3 >> 12) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h3 >> 8) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h3 >> 4) & 0x0F];hex[pos++] = gSHA_HEXCHAR[h3 & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h4 >> 28) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h4 >> 24) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h4 >> 20) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h4 >> 16) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h4 >> 12) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h4 >> 8) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h4 >> 4) & 0x0F];hex[pos++] = gSHA_HEXCHAR[h4 & 0x0F] + + copy(output, len, hex) + return true; +} + +stock __hash_sha2(const dataORfile[], size, Sha2Bits:bits, output[], len) +{ + new h0h, h0l, h1h, h1l, h2h, h2l, h3h, h3l, + h4h, h4l, h5h, h5l, h6h, h6l, h7h, h7l, block, blocks[160], code, end, + i, j, index, start, bytes, + s0h, s0l, s1h, s1l, c1, c2, c3, c4, + abh, abl, dah, dal, cdh, cdl, bch, bcl, + majh, majl, t1h, t1l, t2h, t2l, chh, chl, + fp, length, totalread, data[READ_FILE_BUFFER], data_start; + + if(size == -1) + { + fp = fopen(dataORfile, "rb") + if(!fp) + { + copy(output, len, "") + return false + } + + fseek(fp, 0, SEEK_END) + length = ftell(fp) + if(length == 0) + { + fclose(fp) + copy(output, len, "") + return false + } + fseek(fp, 0, SEEK_SET) + + totalread = fread_blocks(fp, data, READ_FILE_BUFFER, BLOCK_CHAR) + } + else { + length = strlen(dataORfile) + } + + + if(bits == SHA2_384) + { + h0h = 0xCBBB9D5D; + h0l = 0xC1059ED8; + h1h = 0x629A292A; + h1l = 0x367CD507; + h2h = 0x9159015A; + h2l = 0x3070DD17; + h3h = 0x152FECD8; + h3l = 0xF70E5939; + h4h = 0x67332667; + h4l = 0xFFC00B31; + h5h = 0x8EB44A87; + h5l = 0x68581511; + h6h = 0xDB0C2E0D; + h6l = 0x64F98FA7; + h7h = 0x47B5481D; + h7l = 0xBEFA4FA4; + } + else if(bits == SHA2_256) + { + h0h = 0x22312194; + h0l = 0xFC2BF72C; + h1h = 0x9F555FA3; + h1l = 0xC84C64C2; + h2h = 0x2393B86B; + h2l = 0x6F53B151; + h3h = 0x96387719; + h3l = 0x5940EABD; + h4h = 0x96283EE2; + h4l = 0xA88EFFE3; + h5h = 0xBE5E1E25; + h5l = 0x53863992; + h6h = 0x2B0199FC; + h6l = 0x2C85B8AA; + h7h = 0x0EB72DDC; + h7l = 0x81C52CA2; + } + else if(bits == SHA2_224) + { + h0h = 0x8C3D37C8; + h0l = 0x19544DA2; + h1h = 0x73E19966; + h1l = 0x89DCD4D6; + h2h = 0x1DFAB7AE; + h2l = 0x32FF9C82; + h3h = 0x679DD514; + h3l = 0x582F9FCF; + h4h = 0x0F6D2B69; + h4l = 0x7BD44DA8; + h5h = 0x77E36F73; + h5l = 0x04C48942; + h6h = 0x3F9D85A8; + h6l = 0x6A1D36C8; + h7h = 0x1112E6AD; + h7l = 0x91D692A1; + } + else { // 512 + h0h = 0x6A09E667; + h0l = 0xF3BCC908; + h1h = 0xBB67AE85; + h1l = 0x84CAA73B; + h2h = 0x3C6EF372; + h2l = 0xFE94F82B; + h3h = 0xA54FF53A; + h3l = 0x5F1D36F1; + h4h = 0x510E527F; + h4l = 0xADE682D1; + h5h = 0x9B05688C; + h5l = 0x2B3E6C1F; + h6h = 0x1F83D9AB; + h6l = 0xFB41BD6B; + h7h = 0x5BE0CD19; + h7l = 0x137E2179; + bits = SHA2_512; + } + + block = 0; + + do { + blocks[0] = block; + blocks[1] = blocks[2] = blocks[3] = blocks[4] = + blocks[5] = blocks[6] = blocks[7] = blocks[8] = + blocks[9] = blocks[10] = blocks[11] = blocks[12] = + blocks[13] = blocks[14] = blocks[15] = blocks[16] = + blocks[17] = blocks[18] = blocks[19] = blocks[20] = + blocks[21] = blocks[22] = blocks[23] = blocks[24] = + blocks[25] = blocks[26] = blocks[27] = blocks[28] = + blocks[29] = blocks[30] = blocks[31] = blocks[32] = 0; + + for (i = start;index < length && i < 128; ++index) + { + if(size == -1) + { + if(index >= totalread) + { + data_start = totalread; + totalread += fread_blocks(fp, data, READ_FILE_BUFFER, BLOCK_CHAR) + } + + code = data[index-data_start]; + } + else code = dataORfile[index]; + + if(code < 0) code = 256 + code + + blocks[i >> 2] |= code << gSHA_SHIFT[i++ & 3]; + } + + bytes += i - start; + start = i - 128; + + if(index == length) + { + blocks[i >> 2] |= gSHA_EXTRA[i & 3]; + ++index; + } + + block = blocks[32]; + if(index > length && i < 112) + { + blocks[31] = bytes << 3; + end = true; + } + + for(j = 32;j < 160;j += 2) + { + t1h = blocks[j - 30]; + t1l = blocks[j - 29]; + s0h = ((t1h >>> 1) | (t1l << 31)) ^ ((t1h >>> 8) | (t1l << 24)) ^ (t1h >>> 7); + s0l = ((t1l >>> 1) | (t1h << 31)) ^ ((t1l >>> 8) | (t1h << 24)) ^ ((t1l >>> 7) | t1h << 25); + + t1h = blocks[j - 4]; + t1l = blocks[j - 3]; + s1h = ((t1h >>> 19) | (t1l << 13)) ^ ((t1l >>> 29) | (t1h << 3)) ^ (t1h >>> 6); + s1l = ((t1l >>> 19) | (t1h << 13)) ^ ((t1h >>> 29) | (t1l << 3)) ^ ((t1l >>> 6) | t1h << 26); + + t1h = blocks[j - 32]; + t1l = blocks[j - 31]; + t2h = blocks[j - 14]; + t2l = blocks[j - 13]; + + c1 = (t2l & 0xFFFF) + (t1l & 0xFFFF) + (s0l & 0xFFFF) + (s1l & 0xFFFF); + c2 = (t2l >>> 16) + (t1l >>> 16) + (s0l >>> 16) + (s1l >>> 16) + (c1 >>> 16); + c3 = (t2h & 0xFFFF) + (t1h & 0xFFFF) + (s0h & 0xFFFF) + (s1h & 0xFFFF) + (c2 >>> 16); + c4 = (t2h >>> 16) + (t1h >>> 16) + (s0h >>> 16) + (s1h >>> 16) + (c3 >>> 16); + + blocks[j] = (c4 << 16) | (c3 & 0xFFFF); + blocks[j + 1] = (c2 << 16) | (c1 & 0xFFFF); + } + + new ah = h0h, al = h0l, bh = h1h, bl = h1l, ch = h2h, cl = h2l, dh = h3h, dl = h3l, eh = h4h, el = h4l, fh = h5h, fl = h5l, gh = h6h, gl = h6l, hh = h7h, hl = h7l; + bch = bh & ch; + bcl = bl & cl; + + for(j = 0;j < 160;j += 8) + { + s0h = ((ah >>> 28) | (al << 4)) ^ ((al >>> 2) | (ah << 30)) ^ ((al >>> 7) | (ah << 25)); + s0l = ((al >>> 28) | (ah << 4)) ^ ((ah >>> 2) | (al << 30)) ^ ((ah >>> 7) | (al << 25)); + + s1h = ((eh >>> 14) | (el << 18)) ^ ((eh >>> 18) | (el << 14)) ^ ((el >>> 9) | (eh << 23)); + s1l = ((el >>> 14) | (eh << 18)) ^ ((el >>> 18) | (eh << 14)) ^ ((eh >>> 9) | (el << 23)); + + abh = ah & bh; + abl = al & bl; + majh = abh ^ (ah & ch) ^ bch; + majl = abl ^ (al & cl) ^ bcl; + + chh = (eh & fh) ^ (~eh & gh); + chl = (el & fl) ^ (~el & gl); + + t1h = blocks[j]; + t1l = blocks[j + 1]; + t2h = gSHA2_Table[j]; + t2l = gSHA2_Table[j + 1]; + + c1 = (t2l & 0xFFFF) + (t1l & 0xFFFF) + (chl & 0xFFFF) + (s1l & 0xFFFF) + (hl & 0xFFFF); + c2 = (t2l >>> 16) + (t1l >>> 16) + (chl >>> 16) + (s1l >>> 16) + (hl >>> 16) + (c1 >>> 16); + c3 = (t2h & 0xFFFF) + (t1h & 0xFFFF) + (chh & 0xFFFF) + (s1h & 0xFFFF) + (hh & 0xFFFF) + (c2 >>> 16); + c4 = (t2h >>> 16) + (t1h >>> 16) + (chh >>> 16) + (s1h >>> 16) + (hh >>> 16) + (c3 >>> 16); + + t1h = (c4 << 16) | (c3 & 0xFFFF); + t1l = (c2 << 16) | (c1 & 0xFFFF); + + c1 = (majl & 0xFFFF) + (s0l & 0xFFFF); + c2 = (majl >>> 16) + (s0l >>> 16) + (c1 >>> 16); + c3 = (majh & 0xFFFF) + (s0h & 0xFFFF) + (c2 >>> 16); + c4 = (majh >>> 16) + (s0h >>> 16) + (c3 >>> 16); + + t2h = (c4 << 16) | (c3 & 0xFFFF); + t2l = (c2 << 16) | (c1 & 0xFFFF); + + c1 = (dl & 0xFFFF) + (t1l & 0xFFFF); + c2 = (dl >>> 16) + (t1l >>> 16) + (c1 >>> 16); + c3 = (dh & 0xFFFF) + (t1h & 0xFFFF) + (c2 >>> 16); + c4 = (dh >>> 16) + (t1h >>> 16) + (c3 >>> 16); + + hh = (c4 << 16) | (c3 & 0xFFFF); + hl = (c2 << 16) | (c1 & 0xFFFF); + + c1 = (t2l & 0xFFFF) + (t1l & 0xFFFF); + c2 = (t2l >>> 16) + (t1l >>> 16) + (c1 >>> 16); + c3 = (t2h & 0xFFFF) + (t1h & 0xFFFF) + (c2 >>> 16); + c4 = (t2h >>> 16) + (t1h >>> 16) + (c3 >>> 16); + + dh = (c4 << 16) | (c3 & 0xFFFF); + dl = (c2 << 16) | (c1 & 0xFFFF); + + s0h = ((dh >>> 28) | (dl << 4)) ^ ((dl >>> 2) | (dh << 30)) ^ ((dl >>> 7) | (dh << 25)); + s0l = ((dl >>> 28) | (dh << 4)) ^ ((dh >>> 2) | (dl << 30)) ^ ((dh >>> 7) | (dl << 25)); + + s1h = ((hh >>> 14) | (hl << 18)) ^ ((hh >>> 18) | (hl << 14)) ^ ((hl >>> 9) | (hh << 23)); + s1l = ((hl >>> 14) | (hh << 18)) ^ ((hl >>> 18) | (hh << 14)) ^ ((hh >>> 9) | (hl << 23)); + + dah = dh & ah; + dal = dl & al; + majh = dah ^ (dh & bh) ^ abh; + majl = dal ^ (dl & bl) ^ abl; + + chh = (hh & eh) ^ (~hh & fh); + chl = (hl & el) ^ (~hl & fl); + + t1h = blocks[j + 2]; + t1l = blocks[j + 3]; + t2h = gSHA2_Table[j + 2]; + t2l = gSHA2_Table[j + 3]; + + c1 = (t2l & 0xFFFF) + (t1l & 0xFFFF) + (chl & 0xFFFF) + (s1l & 0xFFFF) + (gl & 0xFFFF); + c2 = (t2l >>> 16) + (t1l >>> 16) + (chl >>> 16) + (s1l >>> 16) + (gl >>> 16) + (c1 >>> 16); + c3 = (t2h & 0xFFFF) + (t1h & 0xFFFF) + (chh & 0xFFFF) + (s1h & 0xFFFF) + (gh & 0xFFFF) + (c2 >>> 16); + c4 = (t2h >>> 16) + (t1h >>> 16) + (chh >>> 16) + (s1h >>> 16) + (gh >>> 16) + (c3 >>> 16); + + t1h = (c4 << 16) | (c3 & 0xFFFF); + t1l = (c2 << 16) | (c1 & 0xFFFF); + + c1 = (majl & 0xFFFF) + (s0l & 0xFFFF); + c2 = (majl >>> 16) + (s0l >>> 16) + (c1 >>> 16); + c3 = (majh & 0xFFFF) + (s0h & 0xFFFF) + (c2 >>> 16); + c4 = (majh >>> 16) + (s0h >>> 16) + (c3 >>> 16); + + t2h = (c4 << 16) | (c3 & 0xFFFF); + t2l = (c2 << 16) | (c1 & 0xFFFF); + + c1 = (cl & 0xFFFF) + (t1l & 0xFFFF); + c2 = (cl >>> 16) + (t1l >>> 16) + (c1 >>> 16); + c3 = (ch & 0xFFFF) + (t1h & 0xFFFF) + (c2 >>> 16); + c4 = (ch >>> 16) + (t1h >>> 16) + (c3 >>> 16); + + gh = (c4 << 16) | (c3 & 0xFFFF); + gl = (c2 << 16) | (c1 & 0xFFFF); + + c1 = (t2l & 0xFFFF) + (t1l & 0xFFFF); + c2 = (t2l >>> 16) + (t1l >>> 16) + (c1 >>> 16); + c3 = (t2h & 0xFFFF) + (t1h & 0xFFFF) + (c2 >>> 16); + c4 = (t2h >>> 16) + (t1h >>> 16) + (c3 >>> 16); + + ch = (c4 << 16) | (c3 & 0xFFFF); + cl = (c2 << 16) | (c1 & 0xFFFF); + + s0h = ((ch >>> 28) | (cl << 4)) ^ ((cl >>> 2) | (ch << 30)) ^ ((cl >>> 7) | (ch << 25)); + s0l = ((cl >>> 28) | (ch << 4)) ^ ((ch >>> 2) | (cl << 30)) ^ ((ch >>> 7) | (cl << 25)); + + s1h = ((gh >>> 14) | (gl << 18)) ^ ((gh >>> 18) | (gl << 14)) ^ ((gl >>> 9) | (gh << 23)); + s1l = ((gl >>> 14) | (gh << 18)) ^ ((gl >>> 18) | (gh << 14)) ^ ((gh >>> 9) | (gl << 23)); + + cdh = ch & dh; + cdl = cl & dl; + majh = cdh ^ (ch & ah) ^ dah; + majl = cdl ^ (cl & al) ^ dal; + + chh = (gh & hh) ^ (~gh & eh); + chl = (gl & hl) ^ (~gl & el); + + t1h = blocks[j + 4]; + t1l = blocks[j + 5]; + t2h = gSHA2_Table[j + 4]; + t2l = gSHA2_Table[j + 5]; + + c1 = (t2l & 0xFFFF) + (t1l & 0xFFFF) + (chl & 0xFFFF) + (s1l & 0xFFFF) + (fl & 0xFFFF); + c2 = (t2l >>> 16) + (t1l >>> 16) + (chl >>> 16) + (s1l >>> 16) + (fl >>> 16) + (c1 >>> 16); + c3 = (t2h & 0xFFFF) + (t1h & 0xFFFF) + (chh & 0xFFFF) + (s1h & 0xFFFF) + (fh & 0xFFFF) + (c2 >>> 16); + c4 = (t2h >>> 16) + (t1h >>> 16) + (chh >>> 16) + (s1h >>> 16) + (fh >>> 16) + (c3 >>> 16); + + t1h = (c4 << 16) | (c3 & 0xFFFF); + t1l = (c2 << 16) | (c1 & 0xFFFF); + + c1 = (majl & 0xFFFF) + (s0l & 0xFFFF); + c2 = (majl >>> 16) + (s0l >>> 16) + (c1 >>> 16); + c3 = (majh & 0xFFFF) + (s0h & 0xFFFF) + (c2 >>> 16); + c4 = (majh >>> 16) + (s0h >>> 16) + (c3 >>> 16); + + t2h = (c4 << 16) | (c3 & 0xFFFF); + t2l = (c2 << 16) | (c1 & 0xFFFF); + + c1 = (bl & 0xFFFF) + (t1l & 0xFFFF); + c2 = (bl >>> 16) + (t1l >>> 16) + (c1 >>> 16); + c3 = (bh & 0xFFFF) + (t1h & 0xFFFF) + (c2 >>> 16); + c4 = (bh >>> 16) + (t1h >>> 16) + (c3 >>> 16); + + fh = (c4 << 16) | (c3 & 0xFFFF); + fl = (c2 << 16) | (c1 & 0xFFFF); + + c1 = (t2l & 0xFFFF) + (t1l & 0xFFFF); + c2 = (t2l >>> 16) + (t1l >>> 16) + (c1 >>> 16); + c3 = (t2h & 0xFFFF) + (t1h & 0xFFFF) + (c2 >>> 16); + c4 = (t2h >>> 16) + (t1h >>> 16) + (c3 >>> 16); + + bh = (c4 << 16) | (c3 & 0xFFFF); + bl = (c2 << 16) | (c1 & 0xFFFF); + + s0h = ((bh >>> 28) | (bl << 4)) ^ ((bl >>> 2) | (bh << 30)) ^ ((bl >>> 7) | (bh << 25)); + s0l = ((bl >>> 28) | (bh << 4)) ^ ((bh >>> 2) | (bl << 30)) ^ ((bh >>> 7) | (bl << 25)); + + s1h = ((fh >>> 14) | (fl << 18)) ^ ((fh >>> 18) | (fl << 14)) ^ ((fl >>> 9) | (fh << 23)); + s1l = ((fl >>> 14) | (fh << 18)) ^ ((fl >>> 18) | (fh << 14)) ^ ((fh >>> 9) | (fl << 23)); + + bch = bh & ch; + bcl = bl & cl; + majh = bch ^ (bh & dh) ^ cdh; + majl = bcl ^ (bl & dl) ^ cdl; + + chh = (fh & gh) ^ (~fh & hh); + chl = (fl & gl) ^ (~fl & hl); + + t1h = blocks[j + 6]; + t1l = blocks[j + 7]; + t2h = gSHA2_Table[j + 6]; + t2l = gSHA2_Table[j + 7]; + + c1 = (t2l & 0xFFFF) + (t1l & 0xFFFF) + (chl & 0xFFFF) + (s1l & 0xFFFF) + (el & 0xFFFF); + c2 = (t2l >>> 16) + (t1l >>> 16) + (chl >>> 16) + (s1l >>> 16) + (el >>> 16) + (c1 >>> 16); + c3 = (t2h & 0xFFFF) + (t1h & 0xFFFF) + (chh & 0xFFFF) + (s1h & 0xFFFF) + (eh & 0xFFFF) + (c2 >>> 16); + c4 = (t2h >>> 16) + (t1h >>> 16) + (chh >>> 16) + (s1h >>> 16) + (eh >>> 16) + (c3 >>> 16); + + t1h = (c4 << 16) | (c3 & 0xFFFF); + t1l = (c2 << 16) | (c1 & 0xFFFF); + + c1 = (majl & 0xFFFF) + (s0l & 0xFFFF); + c2 = (majl >>> 16) + (s0l >>> 16) + (c1 >>> 16); + c3 = (majh & 0xFFFF) + (s0h & 0xFFFF) + (c2 >>> 16); + c4 = (majh >>> 16) + (s0h >>> 16) + (c3 >>> 16); + + t2h = (c4 << 16) | (c3 & 0xFFFF); + t2l = (c2 << 16) | (c1 & 0xFFFF); + + c1 = (al & 0xFFFF) + (t1l & 0xFFFF); + c2 = (al >>> 16) + (t1l >>> 16) + (c1 >>> 16); + c3 = (ah & 0xFFFF) + (t1h & 0xFFFF) + (c2 >>> 16); + c4 = (ah >>> 16) + (t1h >>> 16) + (c3 >>> 16); + + eh = (c4 << 16) | (c3 & 0xFFFF); + el = (c2 << 16) | (c1 & 0xFFFF); + + c1 = (t2l & 0xFFFF) + (t1l & 0xFFFF); + c2 = (t2l >>> 16) + (t1l >>> 16) + (c1 >>> 16); + c3 = (t2h & 0xFFFF) + (t1h & 0xFFFF) + (c2 >>> 16); + c4 = (t2h >>> 16) + (t1h >>> 16) + (c3 >>> 16); + + ah = (c4 << 16) | (c3 & 0xFFFF); + al = (c2 << 16) | (c1 & 0xFFFF); + } + + c1 = (h0l & 0xFFFF) + (al & 0xFFFF); + c2 = (h0l >>> 16) + (al >>> 16) + (c1 >>> 16); + c3 = (h0h & 0xFFFF) + (ah & 0xFFFF) + (c2 >>> 16); + c4 = (h0h >>> 16) + (ah >>> 16) + (c3 >>> 16); + + h0h = (c4 << 16) | (c3 & 0xFFFF); + h0l = (c2 << 16) | (c1 & 0xFFFF); + + c1 = (h1l & 0xFFFF) + (bl & 0xFFFF); + c2 = (h1l >>> 16) + (bl >>> 16) + (c1 >>> 16); + c3 = (h1h & 0xFFFF) + (bh & 0xFFFF) + (c2 >>> 16); + c4 = (h1h >>> 16) + (bh >>> 16) + (c3 >>> 16); + + h1h = (c4 << 16) | (c3 & 0xFFFF); + h1l = (c2 << 16) | (c1 & 0xFFFF); + + c1 = (h2l & 0xFFFF) + (cl & 0xFFFF); + c2 = (h2l >>> 16) + (cl >>> 16) + (c1 >>> 16); + c3 = (h2h & 0xFFFF) + (ch & 0xFFFF) + (c2 >>> 16); + c4 = (h2h >>> 16) + (ch >>> 16) + (c3 >>> 16); + + h2h = (c4 << 16) | (c3 & 0xFFFF); + h2l = (c2 << 16) | (c1 & 0xFFFF); + + c1 = (h3l & 0xFFFF) + (dl & 0xFFFF); + c2 = (h3l >>> 16) + (dl >>> 16) + (c1 >>> 16); + c3 = (h3h & 0xFFFF) + (dh & 0xFFFF) + (c2 >>> 16); + c4 = (h3h >>> 16) + (dh >>> 16) + (c3 >>> 16); + + h3h = (c4 << 16) | (c3 & 0xFFFF); + h3l = (c2 << 16) | (c1 & 0xFFFF); + + c1 = (h4l & 0xFFFF) + (el & 0xFFFF); + c2 = (h4l >>> 16) + (el >>> 16) + (c1 >>> 16); + c3 = (h4h & 0xFFFF) + (eh & 0xFFFF) + (c2 >>> 16); + c4 = (h4h >>> 16) + (eh >>> 16) + (c3 >>> 16); + + h4h = (c4 << 16) | (c3 & 0xFFFF); + h4l = (c2 << 16) | (c1 & 0xFFFF); + + c1 = (h5l & 0xFFFF) + (fl & 0xFFFF); + c2 = (h5l >>> 16) + (fl >>> 16) + (c1 >>> 16); + c3 = (h5h & 0xFFFF) + (fh & 0xFFFF) + (c2 >>> 16); + c4 = (h5h >>> 16) + (fh >>> 16) + (c3 >>> 16); + + h5h = (c4 << 16) | (c3 & 0xFFFF); + h5l = (c2 << 16) | (c1 & 0xFFFF); + + c1 = (h6l & 0xFFFF) + (gl & 0xFFFF); + c2 = (h6l >>> 16) + (gl >>> 16) + (c1 >>> 16); + c3 = (h6h & 0xFFFF) + (gh & 0xFFFF) + (c2 >>> 16); + c4 = (h6h >>> 16) + (gh >>> 16) + (c3 >>> 16); + + h6h = (c4 << 16) | (c3 & 0xFFFF); + h6l = (c2 << 16) | (c1 & 0xFFFF); + + c1 = (h7l & 0xFFFF) + (hl & 0xFFFF); + c2 = (h7l >>> 16) + (hl >>> 16) + (c1 >>> 16); + c3 = (h7h & 0xFFFF) + (hh & 0xFFFF) + (c2 >>> 16); + c4 = (h7h >>> 16) + (hh >>> 16) + (c3 >>> 16); + + h7h = (c4 << 16) | (c3 & 0xFFFF); + h7l = (c2 << 16) | (c1 & 0xFFFF); + } while(!end); + + if(fp) fclose(fp) + + new hex[129], pos + hex[pos++] = gSHA_HEXCHAR[(h0h >> 28) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h0h >> 24) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h0h >> 20) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h0h >> 16) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h0h >> 12) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h0h >> 8) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h0h >> 4) & 0x0F];hex[pos++] = gSHA_HEXCHAR[h0h & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h0l >> 28) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h0l >> 24) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h0l >> 20) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h0l >> 16) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h0l >> 12) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h0l >> 8) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h0l >> 4) & 0x0F];hex[pos++] = gSHA_HEXCHAR[h0l & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h1h >> 28) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h1h >> 24) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h1h >> 20) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h1h >> 16) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h1h >> 12) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h1h >> 8) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h1h >> 4) & 0x0F];hex[pos++] = gSHA_HEXCHAR[h1h & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h1l >> 28) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h1l >> 24) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h1l >> 20) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h1l >> 16) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h1l >> 12) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h1l >> 8) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h1l >> 4) & 0x0F];hex[pos++] = gSHA_HEXCHAR[h1l & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h2h >> 28) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h2h >> 24) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h2h >> 20) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h2h >> 16) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h2h >> 12) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h2h >> 8) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h2h >> 4) & 0x0F];hex[pos++] = gSHA_HEXCHAR[h2h & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h2l >> 28) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h2l >> 24) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h2l >> 20) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h2l >> 16) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h2l >> 12) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h2l >> 8) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h2l >> 4) & 0x0F];hex[pos++] = gSHA_HEXCHAR[h2l & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h3h >> 28) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h3h >> 24) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h3h >> 20) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h3h >> 16) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h3h >> 12) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h3h >> 8) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h3h >> 4) & 0x0F];hex[pos++] = gSHA_HEXCHAR[h3h & 0x0F] + + if(bits >= SHA2_256) + { + hex[pos++] = gSHA_HEXCHAR[(h3l >> 28) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h3l >> 24) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h3l >> 20) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h3l >> 16) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h3l >> 12) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h3l >> 8) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h3l >> 4) & 0x0F]; hex[pos++] = gSHA_HEXCHAR[h3l & 0x0F] + } + + if(bits >= SHA2_384) + { + hex[pos++] = gSHA_HEXCHAR[(h4h >> 28) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h4h >> 24) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h4h >> 20) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h4h >> 16) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h4h >> 12) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h4h >> 8) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h4h >> 4) & 0x0F]; hex[pos++] = gSHA_HEXCHAR[h4h & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h4l >> 28) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h4l >> 24) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h4l >> 20) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h4l >> 16) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h4l >> 12) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h4l >> 8) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h4l >> 4) & 0x0F]; hex[pos++] = gSHA_HEXCHAR[h4l & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h5h >> 28) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h5h >> 24) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h5h >> 20) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h5h >> 16) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h5h >> 12) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h5h >> 8) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h5h >> 4) & 0x0F]; hex[pos++] = gSHA_HEXCHAR[h5h & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h5l >> 28) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h5l >> 24) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h5l >> 20) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h5l >> 16) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h5l >> 12) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h5l >> 8) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h5l >> 4) & 0x0F]; hex[pos++] = gSHA_HEXCHAR[h5l & 0x0F] + } + + if(bits == SHA2_512) + { + hex[pos++] = gSHA_HEXCHAR[(h6h >> 28) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h6h >> 24) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h6h >> 20) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h6h >> 16) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h6h >> 12) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h6h >> 8) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h6h >> 4) & 0x0F]; hex[pos++] = gSHA_HEXCHAR[h6h & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h6l >> 28) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h6l >> 24) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h6l >> 20) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h6l >> 16) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h6l >> 12) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h6l >> 8) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h6l >> 4) & 0x0F]; hex[pos++] = gSHA_HEXCHAR[h6l & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h7h >> 28) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h7h >> 24) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h7h >> 20) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h7h >> 16) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h7h >> 12) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h7h >> 8) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h7h >> 4) & 0x0F]; hex[pos++] = gSHA_HEXCHAR[h7h & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h7l >> 28) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h7l >> 24) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h7l >> 20) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h7l >> 16) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h7l >> 12) & 0x0F];hex[pos++] = gSHA_HEXCHAR[(h7l >> 8) & 0x0F] + hex[pos++] = gSHA_HEXCHAR[(h7l >> 4) & 0x0F]; hex[pos++] = gSHA_HEXCHAR[h7l & 0x0F] + } + + copy(output, len, hex) + return true; +} + +stock encrypt_init(table[]) +{ + copy(gEncryptTable, charsmax(gEncryptTable), table) + gEncryptTableLen = strlen(gEncryptTable) - 1 +} + +stock encrypt_key(string[]) +{ + new int[1] + for(new i; i < 4 && string[i]; i++) int{i} = string[i] + + return 1+int[0]%255 +} + +stock encrypt(string[], out[], len, numkey) +{ + if(!gEncryptTableLen) return; + + new charid, i + for(i=0; string[i] && i <= len;i++) + { + charid = table_find_char(string[i]) + if(charid == -1) out[i] = string[i] + else out[i] = gEncryptTable[(charid+numkey)%gEncryptTableLen] + } +} + +stock decrypt(encrypted[], out[], len, numkey) +{ + if(!gEncryptTableLen) return; + + new charid, i + for(i=0; encrypted[i] && i <= len;i++) + { + charid = table_find_char(encrypted[i]) + if(charid == -1) out[i] = encrypted[i] + else out[i] = gEncryptTable[(charid-numkey)%gEncryptTableLen] + } +} + +stock table_find_char(character) +{ + for(new i; gEncryptTable[i]; i++) if(gEncryptTable[i] == character) return i + + return -1 +} +/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE +*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang11274\\ f0\\ fs16 \n\\ par } +*/ diff --git a/bin/compiler/include/cssdk_const.inc b/bin/compiler/include/cssdk_const.inc new file mode 100644 index 0000000..821bbe9 --- /dev/null +++ b/bin/compiler/include/cssdk_const.inc @@ -0,0 +1,1585 @@ +#if defined _cssdk_const_included + #endinput +#endif +#define _cssdk_const_included + +/** +* Basic constants +*/ +#define BIT(%0) (1<<(%0)) + +#define NULLENT -1 + +#define MAX_WEAPONS 32 +#define MAX_CLIENTS 32 // Max # of clients allowed in a server. +#define MAX_ITEM_TYPES 6 // hud item selection slots + +#define MAX_EDICT_BITS 11 // How many bits to use to encode an edict. # of bits needed to represent max edicts +#define MAX_EDICTS (1< + +/** + * Retrieves the client's current weapon statistics. + * + * @note For a list of default CS weapon ids see the CSW_* constants in + * amxconst.inc, this function also works on custom weapons. + * @note For a list of possible body hitplaces see the HIT_* constants in + * amxconst.inc + * @note For a list of possible stat constants see the STATSX_* constants in + * amxconst.inc + * @note The fields in the statistics are: + * 0 - Kills + * 1 - Deaths + * 2 - Headshots + * 3 - Teamkills + * 4 - Shots + * 5 - Hits + * 6 - Damage + * + * @param index Client index + * @param wpnindex Weapon id, or 0 to retrieve total statistics across all + * weapons + * @param stats Buffer to copy statistics to + * @param bodyhits Buffer to copy body hits to + * + * @return 1 on success, 0 if no statistics are available for the weapon + * id + * @error If an invalid client index or weapon id is provided, an + * error will be thrown. + */ +native get_user_wstats(index, wpnindex, stats[STATSX_MAX_STATS], bodyhits[MAX_BODYHITS]); + +/** + * Retrieves the client's weapon statistics from the current round. + * + * @note For a list of default CS weapon ids see the CSW_* constants in + * amxconst.inc, this function also works on custom weapons. + * @note For a list of possible body hitplaces see the HIT_* constants in + * amxconst.inc + * @note For a list of possible stat constants see the STATSX_* constants in + * amxconst.inc + * @note The fields in the statistics are: + * 0 - Kills + * 1 - Deaths + * 2 - Headshots + * 3 - Teamkills + * 4 - Shots + * 5 - Hits + * 6 - Damage + * + * @param index Client index + * @param wpnindex Weapon id, or 0 to retrieve total statistics across all + * weapons + * @param stats Buffer to copy statistics to + * @param bodyhits Buffer to copy body hits to + * + * @return 1 on success, 0 if no statistics are available for the + * weapon id + * @error If an invalid client index or weapon id is provided, an + * error will be thrown. + */ +native get_user_wrstats(index, wpnindex, stats[STATSX_MAX_STATS], bodyhits[MAX_BODYHITS]); + +/** + * Retrieves the client's weapon statistics from the permanent storage on the + * server. + * + * @note The permanent storage is updated on every respawn or client disconnect. + * @note Player rank is determined by the customizable "get_score" function in + * "data/csstats.amxx". By default it uses the difference of kills to + * deaths/teamkills. + * @note For a list of possible body hitplaces see the HIT_* constants in + * amxconst.inc + * @note For a list of possible stat constants see the STATSX_* constants in + * amxconst.inc + * @note The fields in the statistics are: + * 0 - Kills + * 1 - Deaths + * 2 - Headshots + * 3 - Teamkills + * 4 - Shots + * 5 - Hits + * 6 - Damage + * 7 - Rank + * + * @param index Client index + * @param stats Buffer to copy statistics to + * @param bodyhits Buffer to copy body hits to + * + * @return Players rank > 0 on success, or 0 if player is not ranked + * and no statistics are available + * @error If an invalid client index is provided, an error will be + * thrown. + */ +native get_user_stats(index, stats[STATSX_MAX_STATS], bodyhits[MAX_BODYHITS]); + +/** + * Retrieves the client's statistics from the current round. + * + * @note For a list of possible body hitplaces see the HIT_* constants in + * amxconst.inc + * @note For a list of possible stat constants see the STATSX_* constants in + * amxconst.inc + * @note The fields in the statistics are: + * 0 - Kills + * 1 - Deaths + * 2 - Headshots + * 3 - Teamkills + * 4 - Shots + * 5 - Hits + * 6 - Damage + * + * @param index Client index + * @param stats Buffer to copy statistics to + * @param bodyhits Buffer to copy body hits to + * + * @return 1 on success, 0 if no statistics are available + * @error If an invalid client index is provided, an error will be + * thrown. + */ +native get_user_rstats(index, stats[STATSX_MAX_STATS], bodyhits[MAX_BODYHITS]); + +/** + * Retrieves the client's statistics inflicted upon another client from the + * current round. + * + * @note For a list of possible body hitplaces see the HIT_* constants in + * amxconst.inc + * @note For a list of possible stat constants see the STATSX_* constants in + * amxconst.inc + * @note The fields in the statistics are: + * 0 - Kills + * 1 - Deaths + * 2 - Headshots + * 3 - Teamkills + * 4 - Shots + * 5 - Hits + * 6 - Damage + * + * @param index Client index + * @param victim Victim client index, or 0 to retrieve the statistics against + * all victims + * @param stats Buffer to copy statistics to + * @param bodyhits Buffer to copy body hits to + * @param wpnname Optional buffer to copy last used weapon name to + * @param len Maximum buffer size + * + * @return 1 on success, 0 if no statistics are available against the + * specified victim + * @error If an invalid client index is provided, an error will be + * thrown. + */ +native get_user_vstats(index, victim, stats[STATSX_MAX_STATS], bodyhits[MAX_BODYHITS], wpnname[] = "", len = 0); + +/** + * Retrieves the client's statistics received from another client from the + * current round. + * + * @note For a list of possible body hitplaces see the HIT_* constants in + * amxconst.inc + * @note For a list of possible stat constants see the STATSX_* constants in + * amxconst.inc + * @note The fields in the statistics are: + * 0 - Kills + * 1 - Deaths + * 2 - Headshots + * 3 - Teamkills + * 4 - Shots + * 5 - Hits + * 6 - Damage + * + * @param index Client index + * @param wpnindex Attacker client index, or 0 to retrieve the statistics from + * all attackers + * @param stats Buffer to copy statistics to + * @param bodyhits Buffer to copy body hits to + * @param wpnname Optional buffer to copy last used weapon name to + * @param len Maximum buffer size + * + * @return 1 on success, 0 if no statistics are available against the + * specified attacker + * @error If an invalid client index is provided, an error will be + * thrown. + */ +native get_user_astats(index, wpnindex, stats[STATSX_MAX_STATS], bodyhits[MAX_BODYHITS], wpnname[] = "", len = 0); + +/** + * Resets the current round weapon, attacker and victim statistics. + * + * @param index Client index + * + * @noreturn + * @error If an invalid client index is provided, an error will be + * thrown. + */ +native reset_user_wstats(index); + +/** + * Retrieves statistics from the permanent storage on the server via iterative, + * incremental access. + * + * @note The permanent storage is updated on every respawn or client disconnect. + * @note Player rank is determined by the customizable "get_score" function in + * "data/csstats.amxx". By default it uses the difference of kills to + * deaths/teamkills. + * @note For a list of possible body hitplaces see the HIT_* constants in + * amxconst.inc + * @note For a list of possible stat constants see the STATSX_* constants in + * amxconst.inc + * @note The fields in the statistics are: + * 0 - Kills + * 1 - Deaths + * 2 - Headshots + * 3 - Teamkills + * 4 - Shots + * 5 - Hits + * 6 - Damage + * 7 - Rank + * + * @param index Rank index + * @param stats Buffer to copy statistics to + * @param bodyhits Buffer to copy body hits to + * @param name Buffer to copy client name to + * @param len Maximum name buffer size + * @param authid Buffer to copy client auth id to + * @param authidlen Maximum authid buffer size + * + * @return Next rank index (> 0 and > index), or 0 if no more + * statistics exist + */ +native get_stats(index, stats[STATSX_MAX_STATS], bodyhits[MAX_BODYHITS], name[], len, authid[] = "", authidlen = 0); + +/** + * Returns the number of all entries in the permanent statistics storage. + * + * @return Number of entries in statistics storage + */ +native get_statsnum(); + +/** + * Retrieves the client's objective statistics from the permanent storage. + * + * @note The permanent storage is updated on every respawn or client disconnect. + * @note For a list of possible stat constants see the STATSX_* constants in + * amxconst.inc + * @note The fields in the statistics are: + * 0 - total defusions + * 1 - bomb defused + * 2 - bomb plants + * 3 - bomb explosions + * + * @param index Client index + * @param stats Buffer to copy statistics to + * + * @return Players rank > 0 on success, or 0 if player is not ranked + * and no statistics are available + * @error If an invalid client index is provided, an error will be + * thrown. + */ +native get_user_stats2(index, stats[STATSX_MAX_OBJECTIVE]); + +/** + * Retrieves objective statistics from the permanent storage on the server via + * iterative, incremental access. + * + * @note The permanent storage is updated on every respawn or client disconnect. + * @note For a list of possible stat constants see the STATSX_* constants in + * amxconst.inc + * @note The fields in the statistics are: + * 0 - total defusions + * 1 - bomb defused + * 2 - bomb plants + * 3 - bomb explosions + * + * @param index Client index + * @param stats Buffer to copy statistics to + * @param authid Buffer to copy client auth id to + * @param authidlen Maximum authid buffer size + * + * @return Next rank index (> 0 and > index), or 0 if no more + * statistics exist + */ +native get_stats2(index, stats[STATSX_MAX_OBJECTIVE], authid[] = "", authidlen = 0); diff --git a/bin/compiler/include/csstats_const.inc b/bin/compiler/include/csstats_const.inc new file mode 100644 index 0000000..a392d1b --- /dev/null +++ b/bin/compiler/include/csstats_const.inc @@ -0,0 +1,29 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Counter-Strike Functions +// + +#if defined _csstats_const_included + #endinput +#endif +#define _csstats_const_included + +/** + * Constants for objective based statistics + */ +enum +{ + STATSX_TOTAL_DEFUSIONS = 0, + STATSX_BOMBS_DEFUSED, + STATSX_BOMBS_PLANTED, + STATSX_BOMB_EXPLOSIONS, + STATSX_MAX_OBJECTIVE +} diff --git a/bin/compiler/include/cstrike.inc b/bin/compiler/include/cstrike.inc new file mode 100644 index 0000000..bb366f4 --- /dev/null +++ b/bin/compiler/include/cstrike.inc @@ -0,0 +1,1287 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Counter-Strike Functions +// + +#if defined _cstrike_included + #endinput +#endif +#define _cstrike_included + +#pragma reqlib cstrike +#if !defined AMXMODX_NOAUTOLOAD + #pragma loadlib cstrike +#endif + +#include + +/** + * Returns client's deaths. + * + * @param index Client index + * + * @return Client deaths + * @error If the client index is not within the range of 1 to + * MaxClients, or the client is not connected, an error will be + * thrown. + */ +native cs_get_user_deaths(index); + +/** + * Sets client's deaths. + * + * @param index Client index + * @param newdeaths New value to set + * @param scoreboard If true the scoreboard will be updated to reflect the new value. + * + * @noreturn + * @error If the client index is not within the range of 1 to + * MaxClients, or the client is not connected, an error + * will be thrown. + */ +native cs_set_user_deaths(index, newdeaths, bool:scoreboard = true); + +/** + * Returns index of the entity that a hostage is following. + * + * @note Hostages can theoretically follow any entity in the game, so the + * returned entity index is not necessarily a client index. + * + * @param index Hostage entity index + * + * @return Entity index if hostage is following something, 0 otherwise + * @error If the provided entity index is not a hostage, an error will + * be thrown. + */ +native cs_get_hostage_foll(index); + +/** + * Sets hostage to follow an entity. + * + * @note Hostages can theoretically follow any entity in the game, so the + * followedindex does not have to be a client index. + * + * @param index Hostage entity index + * @param followedindex New entity to follow + * + * @noreturn + * @error If the provided entity index is not a hostage, an + * error will be thrown. + */ +native cs_set_hostage_foll(index, followedindex = 0); + +/** + * Returns unique id of a hostage. + * + * @param index Hostage entity index + * + * @return Unique hostage id + * @error If the provided entity index is not a hostage, an error will + * be thrown. + */ +native cs_get_hostage_id(index); + +/** + * Returns amount of ammo in the client's backpack for a specific weapon. + * + * @note For a list of possible weapon ids see the CSW_* constants in + * amxconst.inc + * @note Some weapons share ammo types and therefore ammo backpack pools. List + * of ammo types: + * ammo_338magnum - awp + * ammo_762nato - scout, ak47, g3sg1 + * ammo_556natobox - m249 + * ammo_556nato - famas, m4a1, aug, sg550, galil, sg552 + * ammo_buckshot - m3, xm1014 + * ammo_45acp - usp, ump45, mac10 + * ammo_57mm - fiveseven, p90 + * ammo_50ae - deagle + * ammo_357sig - p228 + * ammo_9mm - glock, mp5, tmp, elites + * / - hegrenade + * / - flashbang + * / - smokegrenade + * + * @param index Client index + * @param weapon Weapon id + * + * @return Amount of ammo in backpack + * @error If the client index is not within the range of 1 to + * MaxClients, the client is not connected, or an invalid + * weapon id is provided, an error will be thrown. + */ +native cs_get_user_bpammo(index, weapon); + +/** + * Sets amount of ammo in the client's backpack for a specific weapon. + * + * @note For a list of possible weapon ids see the CSW_* constants in + * amxconst.inc + * @note Some weapons share ammo types and therefore ammo backpack pools. List + * of ammo types: + * ammo_338magnum - awp + * ammo_762nato - scout, ak47, g3sg1 + * ammo_556natobox - m249 + * ammo_556nato - famas, m4a1, aug, sg550, galil, sg552 + * ammo_buckshot - m3, xm1014 + * ammo_45acp - usp, ump45, mac10 + * ammo_57mm - fiveseven, p90 + * ammo_50ae - deagle + * ammo_357sig - p228 + * ammo_9mm - glock, mp5, tmp, elites + * / - hegrenade + * / - flashbang + * / - smokegrenade + * + * @param index Client index + * @param weapon Weapon id + * @param amount New backpack ammo amount to set + * + * @noreturn + * @error If the client index is not within the range of 1 to + * MaxClients, the client is not connected, or an invalid + * weapon id is provided, an error will be thrown. + */ +native cs_set_user_bpammo(index, weapon, amount); + +/** + * Returns if the client has a defuse kit. + * + * @param index Client index + * + * @return 1 if the client has a defuse kit, 0 otherwise + * @error If the client index is not within the range of 1 to + * MaxClients, the client is not connected, or an invalid + * weapon id is provided, an error will be thrown. + */ +native cs_get_user_defuse(index); + +/** + * Sets the client's defusekit status and allows to set a custom HUD icon and + * color. + * + * @param index Client index + * @param defusekit If nonzero the client will have a defusekit, otherwise + * it will be removed + * @param r Red component of icon color + * @param g Green component of icon color + * @param b Blue component of icon color + * @param icon HUD sprite to use as icon + * @param flash If nonzero the icon will flash red + * + * @noreturn + * @error If the client index is not within the range of 1 to + * MaxClients, or the client is not connected, an error + * will be thrown. + */ +native cs_set_user_defuse(index, defusekit = 1, r = 0, g = 160, b = 0, icon[] = "defuser", flash = 0); + +/** + * Returns if the client is inside a buyzone. + * + * @param index Client index + * + * @return 1 if the client is inside a buyzone, 0 otherwise + * @error If the client index is not within the range of 1 to + * MaxClients, or the client is not connected, an error will be + * thrown. + */ +native cs_get_user_buyzone(index); + +/** + * Returns if the client has a primary weapon or a shield in the inventory. + * + * @param index Client index + * + * @return 1 if the client has a primary weapon or shield in the + * inventory, 0 otherwise + * @error If the client index is not within the range of 1 to + * MaxClients, or the client is not connected, an error will be + * thrown. + */ +native cs_get_user_hasprim(index); + +/** + * Retrieves the client's player model. + * + * @param index Client index + * @param model Buffer to copy model to + * @param len Maximum buffer size + * + * @return Number of cells written to buffer + * @error If the client index is not within the range of 1 to + * MaxClients, or the client is not connected, an error will be + * thrown. + */ +native cs_get_user_model(index, model[], len); + +/** + * Sets the client's player model. + * + * @note This is not a one-time set. The CStrike module will remember the + * selected model and try to prevent attempts at changing the player + * model, or immediately re-apply it if necessary. + * @note Updating modelindex is useful for custom models which don't have + * the same structure as the default ones (hitbox, etc..). Model must + * be precached before. + * + * @param index Client index + * @param model Model name + * @param update_index If true, the modelindex is updated as well + * + * @noreturn + * @error If the client index is not within the range of 1 to + * MaxClients, the client is not connected, the provided + * model is empty, or if modeindex is updated and the + * provided model is not precached, an error will be thrown. + */ +native cs_set_user_model(index, const model[], bool:update_index = false); + +/** + * Resets the client's model. + * + * @note This lifts the model-lock set by a previous cs_set_user_model() call. + * + * @param index Client index + * + * @noreturn + * @error If the client index is not within the range of 1 to + * MaxClients, or the client is not connected, an error will be + * thrown. + */ +native cs_reset_user_model(index); + +/** + * Returns the client's amount of money. + * + * @param index Client index + * + * @return Amount of money + * @error If the client index is not within the range of 1 to + * MaxClients, or the client is not connected, an error will be + * thrown. + */ +native cs_get_user_money(index); + +/** + * Sets the client's amount of money. + * + * @param index Client index + * @param money New amount to set + * @param flash If nonzero the HUD will flash the difference between new + * and old amount in red or green + * + * @noreturn + * @error If the client index is not within the range of 1 to + * MaxClients, or the client is not connected, an error will be + * thrown. + */ +native cs_set_user_money(index, money, flash = 1); + +/** + * Returns if the client's has night vision goggles. + * + * @param index Client index + * + * @return 1 if user has NVG, 0 otherwise + * @error If the client index is not within the range of 1 to + * MaxClients, or the client is not connected, an error will be + * thrown. + */ +native cs_get_user_nvg(index); + +/** + * Sets the client's night vision goggles. + * + * @param index Client index + * @param nvgoogles If nonzero the NVG will be added to the client's + * inventory, otherwise they will be removed from it + * + * @noreturn + * @error If the client index is not within the range of 1 to + * MaxClients, or the client is not connected, an error + * will be thrown. + */ +native cs_set_user_nvg(index, nvgoggles = 1); + +/** + * Returns if the client has the ability to plant the bomb. + * + * @note Only with this set can the client plant the bomb within the usual bomb + * target areas. If this is not set the user can not plant the bomb, even + * when he has one in the inventory. + * + * @param index Client index + * + * @return 1 if the client is able to plant the bomb, 0 otherwise + * @error If the client index is not within the range of 1 to + * MaxClients, or the client is not connected, an error will be + * thrown. + */ +native cs_get_user_plant(index); + +/** + * Sets the client's ability to plant the bomb and displays or hides the bomb + * HUD icon. + * + * @note Only with this set can the client plant the bomb within the usual bomb + * target areas. If this is not set the user can not plant the bomb, even + * when he has one in the inventory. This is only correctly set when the + * client touches a bomb and picks it up "manually" (only possible for + * Terrorists), so this should be used if the bomb is added to the + * inventory through other means. + * + * @param index Client index + * @param plant If nonzero the client will be able to plant the bomb, + * otherwise he will be unable to + * @param showbombicon If nonzero the green C4 icon will be displayed on the + * client's hud, otherwise it will be hidden + * + * @return 1 if the client is able to plant the bomb, 0 otherwise + * @error If the client index is not within the range of 1 to + * MaxClients, or the client is not connected, an error + * will be thrown. + */ +native cs_set_user_plant(index, plant = 1, showbombicon = 1); + +/** + * Sets the client's team without killing the player, and sets the client model. + * + * @note For a list of valid team ids see the CsTeams enum, and for a list of + * valid internal model ids see the CsInternalModel enum. + * + * @param index Client index + * @param team Team id + * @param model Internal model id, if CS_DONTCHANGE the game will choose the model + * or if CS_NORESET the game will not update it. + * @param send_teaminfo If true, a TeamInfo message will be sent + * + * @noreturn + * @error If the client index is not within the range of 1 to + * MaxClients, or the client is not connected, an error will be + * thrown. + */ +native cs_set_user_team(index, any:team, any:model = CS_DONTCHANGE, bool:send_teaminfo = true); + +/** + * Returns the client's team and optionally the model id. + * + * @note For a list of valid team ids see the CsTeams enum, and for a list of + * valid internal model ids see the CsInternalModel enum. + * + * @param index Client index + * @param model Optional variable to store model id in + * + * @return Team id + * @error If the client index is not within the range of 1 to + * MaxClients, or the client is not connected, an error will be + * thrown. + */ +native CsTeams:cs_get_user_team(index, &any:model = CS_DONTCHANGE); + +/** + * Returns if the client is a VIP. + * + * @param index Client index + * + * @return 1 if the client is a VIP, 0 otherwise + * @error If the client index is not within the range of 1 to + * MaxClients, or the client is not connected, an error will be + * thrown. + */ +native cs_get_user_vip(index); + +/** + * Sets the client's VIP status and displayed model and scoreboard flag. + * + * @note This is mostly useful for removing VIP status so the client can change + * teams and/or buy items properly. It does not alter gameplay, the player + * that is selected as VIP at the start of a round will retain the + * internal VIP status and remain the primary objective for the game mode. + * + * @param index Client index + * @param vip If nonzero the client will be made a VIP, otherwise the + * VIP status will be removed + * @param model If nonzero the client's model will be changed to the VIP + * model, otherwise a random CT model will be selected + * @param scoreboard If nonzero the scoreboard will be updated to reflect the + * new VIP status + * + * @noreturn + * @error If the client index is not within the range of 1 to + * MaxClients, or the client is not connected, an error + * will be thrown. + */ +native cs_set_user_vip(index, vip = 1, model = 1, scoreboard = 1); + +/** + * Returns if the client has committed a team kill in the current round. + * + * @note If this is set to 1 the client will be punished at the start of the + * next round depending on the value of the mp_tkpunish cvar. The team + * kill status is then reset. + * + * @param index Client index + * + * @return 1 if the client has committed a team kill, 0 otherwise + * @error If the client index is not within the range of 1 to + * MaxClients, or the client is not connected, an error will be + * thrown. + */ +native cs_get_user_tked(index); + +/** + * Sets the client's team kill status, indicating whether the client has + * committed a team kill in the current round. + * + * @note If this is set to 1 the client will be punished at the start of the + * next round depending on the value of the mp_tkpunish cvar. The team + * kill status is then reset. + * + * @param index Client index + * @param tk Team kill status + * @param subtract Amount of frags to subtract, negative values add frags + * + * @noreturn + * @error If the client index is not within the range of 1 to + * MaxClients, or the client is not connected, an error will be + * thrown. + */ +native cs_set_user_tked(index, tk = 1, subtract = 1); + +/** + * Returns if the client is currently driving a vehicle and if so, indicates + * the speed. + * + * @param index Client index + * + * @return 0 if the client is not driving, 1 if driving a vehicle but + * not moving, 2 to 4 if driving positive speeds, 5 if + * driving at a negative speed (backing), see TRAIN_* constants + * in hlsdk_const.inc + * @error If the client index is not within the range of 1 to + * MaxClients, or the client is not connected, an error will be + * thrown. + */ +native cs_get_user_driving(index); + +/** + * Returns if the client has a shield in the inventory. + * + * @param index Client index + * + * @return 1 if the client has a shield, 0 otherwise + * @error If the client index is not within the range of 1 to + * MaxClients, or the client is not connected, an error will be + * thrown. + */ +native cs_get_user_shield(index); + +/** + * Returns if the client is using a stationary gun. + * + * @param index Client index + * + * @return 1 if the client uses a stationary gun, 0 otherwise + * @error If the client index is not within the range of 1 to + * MaxClients, or the client is not connected, an error will be + * thrown. + */ +native cs_get_user_stationary(index); + +/** + * Returns the client's armor value and retrieves the type of armor. + * + * @note For a list of possible armor types see the CsArmorType enum. + * + * @param index Client index + * @param armortype Variable to store armor type in + * + * @return Amount of armor, 0 if client has no armor + * @error If the client index is not within the range of 1 to + * MaxClients, or the client is not connected, an error + * will be thrown. + */ +native cs_get_user_armor(index, &CsArmorType:armortype = CS_ARMOR_NONE); + +/** + * Sets the client's armor value the type of armor. + * + * @note For a list of possible armor types see the CsArmorType enum. + * @note Sends the appropriate message to update the client's HUD. + * + * @param index Client index + * @param armorvalue Amount of armor to set + * @param armortype CS armor type + * + * @noreturn + * @error If the client index is not within the range of 1 to + * MaxClients, or the client is not connected, an error + * will be thrown. + */ +native cs_set_user_armor(index, armorvalue, CsArmorType:armortype); + +/** + * Returns if the weapon is in burst mode. + * + * @note Only the Glock and Famas can return 1 as they are the only guns in the + * game that have a burst fire mode. + * @note This native does not verify that the provided entity is a weapon + * entity. It will return incorrect values for non-weapon entities. + * + * @param index Weapon entity index + * + * @return 1 if the weapon is in burst mode, 0 otherwise + * @error If an invalid entity index or a client index is provided, + * an error will be thrown. + */ +native cs_get_weapon_burst(index); + +/** + * Sets the weapon's burst mode. + * + * @note Only the Glock and Famas can be set to burst fire mode as they are the + * only guns in the game that provide such a mode. + * @note This native does not verify that the provided entity is a weapon + * entity. It will result in undefined behavior if used on non-weapon + * entities. + * + * @param index Weapon entity index + * @param burstmode If nonzero the weapon will be put into burstmode, + * otherwise the burst mode will be removed + * + * @return 1 if burst mode set successfully, 0 if entity is not + * an applicable weapon + * @error If an invalid entity index or a client index is + * provided, an error will be thrown. + */ +native cs_set_weapon_burst(index, burstmode = 1); + +/** + * Returns if the weapon is in silenced mode. + * + * @note Only the USP and M4A1 can return 1 as they are the only guns in the + * game that have a silenced fire mode. + * @note This native does not verify that the provided entity is a weapon + * entity. It will return incorrect values for non-weapon entities. + * + * @param index Weapon entity index + * + * @return 1 if the weapon is in silenced mode, 0 otherwise + * @error If an invalid entity index or a client index is provided, + * an error will be thrown. + */ +native cs_get_weapon_silen(index); + +/** + * Sets the weapon's silenced mode. + * + * @note Only the USP and M4A1 can be set to silenced fire mode as they are the + * only guns in the game that provide such a mode. + * @note This native does not verify that the provided entity is a weapon + * entity. It will result in undefined behavior if used on non-weapon + * entities. + * + * @param index Weapon entity index + * @param silence If nonzero the weapon will be put into silenced + * mode, otherwise the silenced mode will be removed + * @param draw_animation If 1 and the weapon is currently held by a + * client, the appropriate weapon animation will be + * played + * If 2, same as 1 but follows game behavior by playing + * the associated player's model sequence and disallowing + * firing while animation is playing. + * + * @return 1 if silenced mode set successfully, 0 if entity is + * not an applicable weapon + * @error If an invalid entity index or a client index is + * provided, an error will be thrown. + */ +native cs_set_weapon_silen(index, silence = 1, draw_animation = 1); + +/** + * Returns the amount of ammo in weapon's magazine. + * + * @note This native does not verify that the provided entity is a weapon + * entity. It will return incorrect values for non-weapon entities. + * + * @param index Weapon entity index + * + * @return Amount of ammo in magazine + * @error If an invalid entity index or a client index is provided, + * an error will be thrown. + */ +native cs_get_weapon_ammo(index); + +/** + * Sets the amount of ammo in weapon's clip. + * + * @note This native does not verify that the provided entity is a weapon + * entity. It will result in undefined behavior if used on non-weapon + * entities. + * + * @param index Weapon entity index + * @param newammo New ammo amount + * + * @noreturn + * @error If an invalid entity index or a client index is provided, + * an error will be thrown. + */ +native cs_set_weapon_ammo(index, newammo); + +/** + * Returns the weapon id of an entity. + * + * @note For a list of possible weapon ids see the CSW_* constants in + * amxconst.inc + * @note This native does not verify that the provided entity is a weapon + * entity. It will return incorrect values for non-weapon entities. + * + * @param index Weapon entity index + * + * @return Weapon id + * @error If an invalid entity index or a client index is provided, + * an error will be thrown. + */ +native cs_get_weapon_id(index); + +/** + * Returns if "no knives" mode is enabled. + * + * @note "No knives" mode means that the CStrike module will prevent the game + * from creating (and thus attaching) "weapon_knife" entities. This means + * that clients will spawn without knives, but knives can still be put + * into the client inventories directly. + * + * @return 1 if "no knives" mode is enabled, 0 otherwise + */ +native cs_get_no_knives(); + +/** + * Enables or disables the "no knives" mode. + * + * @note "No knives" mode means that the CStrike module will prevent the game + * from creating (and thus attaching) "weapon_knife" entities. This means + * that clients will spawn without knives, but knives can still be put + * into the client inventories directly. + * + * @param noknives If nonzero enable "no knives" mode, disable otherwise + * + * @noreturn + */ +native cs_set_no_knives(noknives = 0); + +/** + * Sets a dead client up for spawning. + * + * @note This sets the client deadflag and triggers a client think, effectively + * making the game respawn the client. Should only be used on dead + * clients. + * + * @param player Client index + * + * @noreturn + * @error If the client index is not within the range of 1 to + * MaxClients, or the client is not connected, an error will be + * thrown. + */ +native cs_user_spawn(player); + +/** + * Returns the armoury entity's weapon id. + * + * @note Not all weapon ids are supported by Counter-Strike, an armoury entity + * can not be a pistol, a knife or a bomb for exmaple. The full list is: + * CSW_SCOUT, CSW_HEGRENADE, CSW_XM1014, CSW_MAC10, CSW_AUG, + * CSW_SMOKEGRENADE, CSW_AWP, CSW_MP5NAVY, CSW_M249, CSW_M3, CSW_M4A1, + * CSW_TMP, CSW_G3SG1, CSW_VEST, CSW_VESTHELM, CSW_FLASHBANG, + * CSW_SG552, CSW_AK47, CSW_P90 + * + * @param index Armoury entity index + * @param count Optional variable to store in the number of times that an item can be retrieved + * from the same entity before being hidden + * + * @return Weapon id + * @error If a non-armoury entity is provided, an error will be + * thrown. + */ +native cs_get_armoury_type(index, &count = 1); + +/** + * Sets the amoury entity type. + * + * @note Not all weapon ids are supported by Counter-Strike, an armoury entity + * can not be a pistol, a knife or a bomb for exmaple. The full list is: + * CSW_SCOUT, CSW_HEGRENADE, CSW_XM1014, CSW_MAC10, CSW_AUG, + * CSW_SMOKEGRENADE, CSW_AWP, CSW_MP5NAVY, CSW_M249, CSW_M3, CSW_M4A1, + * CSW_TMP, CSW_G3SG1, CSW_VEST, CSW_VESTHELM, CSW_FLASHBANG, + * CSW_SG552, CSW_AK47, CSW_P90 + * @note This does not update the entity model. + * @note On restart, entity is always unhidden and the count is restored (this can not be below 1). + * + * @param index Armoury entity index + * @param type Weapon id + * @param count Number of times that an item can be retrieved from + * the same entity before being hidden + * If zero, the entity is hidden + * If below zero, nothing is set + * @noreturn + * @error If a non-armoury entity is provided, an error will be + * thrown. + */ +native cs_set_armoury_type(index, type, count = -1); + +/** + * Returns the weapon entity index that was packed into a weaponbox. + * + * @param weaponboxIndex Weaponbox entity index + * + * @return Weapon entity index on success or 0 if no weapon can be found + * @error If a non-weaponbox entity is provided or the entity is invalid, an error will be + * thrown. + */ +native cs_get_weaponbox_item(weaponboxIndex); + +/** + * Returns the map zones the client is inside of as a bitflag value. + * + * @note If the user does not have the ability to plant (cs_get_user_plant() + * returns 0) then the bitflag will not contain CS_MAPZONE_BOMBTARGET. + * @nore For a list of possible zone flags see the CS_MAPZONE_* constants. + * + * @param index Client index + * + * @return Bitflag value of map zones + * @error If the client index is not within the range of 1 to + * MaxClients, or the client is not connected, an error will be + * thrown. + */ +native cs_get_user_mapzones(index); + +/** + * Sets a zoom type on the client. + * + * @note Zoom types are not tied to their intended weapons, so any zoom type can + * be combined with any weapon. + * @note For a list of possible zoom types see the zoom type enum above + * (CS_*_ZOOM constants). + * + * @param index Client index + * @param type Zoom type + * @param mode If zero (blocking) the client will be forced to use the zoom + * type set and won't be able to change it until it is reset + * with CS_RESET_ZOOM, otherwise the user can restore back to + * normal as usual + * + * @noreturn + * @error If the client index is not within the range of 1 to + * MaxClients, the client is not connected, or an invalid zoom + * type is provided, an error will be thrown. + */ +native cs_set_user_zoom(index, type, mode); + +/** + * Returns if the client is zooming. + * + * @note For a list of possible zoom types see the zoom type enum above + * (CS_*_ZOOM constants). + * + * @param index Client index + * + * @return Zoom type if the user is zoomed in, 0 otherwise + * @error If the client index is not within the range of 1 to + * MaxClients, or the client is not connected, an error will be + * thrown. + */ +native cs_get_user_zoom(index); + +/** + * Returns if a submodel is set on the client. + * + * @note In Counter-Strike the submodel setting determines whether the user has + * a bomb backpack (if a Terrorist) or a defuse kit (if a CT) on their + * model. + * + * @param index Client index + * + * @return 1 if submodel is set, 0 otherwise + * @error If the client index is not within the range of 1 to + * MaxClients, or the client is not connected, an error will be + * thrown. + */ +native cs_get_user_submodel(index); + +/** + * Sets the submodel on a client. + * + * @note In Counter-Strike the submodel setting determines whether the user has + * a bomb backpack (if a Terrorist) or a defuse kit (if a CT) on their + * model. + * + * @param index Client index + * @param value If nonzero the submodel is set, otherwise it is removed + * + * @noreturn + * @error If the client index is not within the range of 1 to + * MaxClients, or the client is not connected, an error will be + */ +native cs_set_user_submodel(index, value); + +/** + * Returns the client's last activity time. + * + * @note This is the time that the internal Counter-Strike afk kicker uses to + * see who has been inactive too long. + * + * @param index Client index + * + * @return Last activity time + * @error If the client index is not within the range of 1 to + * MaxClients, or the client is not connected, an error will be + */ +native Float:cs_get_user_lastactivity(index); + +/** + * Sets the client's last activity time. + * + * @note This is the time that the internal Counter-Strike afk kicker uses to + * see who has been inactive too long. + * + * @param index Client index + * @param value New last activity time + * + * @noreturn + * @error If the client index is not within the range of 1 to + * MaxClients, or the client is not connected, an error will be + */ +native cs_set_user_lastactivity(index, Float:value); + +/** + * Returns the amount of hostages that the client has killed. + * + * @note This is the value that the internal Counter-Strike hostage punisher + * uses to determine if a client should be kicked, depending on the + * value of the mp_hostagepenalty value. + * + * @param index Client index + * + * @return Amount of hostages killed + * @error If the client index is not within the range of 1 to + * MaxClients, or the client is not connected, an error will be + */ +native cs_get_user_hostagekills(index); + +/** + * Sets the amount of hostages that the client has killed. + * + * @note This is the value that the internal Counter-Strike hostage punisher + * uses to determine if a client should be kicked, depending on the + * value of the mp_hostagepenalty value. The punisher only checks this + * value when a hostage is killed, so setting this will not cause the + * client to be kicked until they actually kill a hostage. + * + * @param index Client index + * @param value New amount of hostages killed + * + * @noreturn + * @error If the client index is not within the range of 1 to + * MaxClients, or the client is not connected, an error will be + */ +native cs_set_user_hostagekills(index, value); + +/** + * Returns the last time a hostage was used. + * + * @param index Hostage entity + * + * @return Last use time + * @error If the provided entity index is not a hostage, an error will + * be thrown. + */ +native Float:cs_get_hostage_lastuse(index); + +/** + * Sets the last time a hostage was used. + * + * @param index Hostage entity + * @param value New last use time + * + * @noreturn + * @error If the provided entity index is not a hostage, an error will + * be thrown. + */ +native cs_set_hostage_lastuse(index, Float:value); + +/** + * Returns the next time a hostage can be used. + * + * @param index Hostage entity + * + * @return Next use time + * @error If the provided entity index is not a hostage, an error will + * be thrown. + */ +native Float:cs_get_hostage_nextuse(index); + +/** + * Sets the next time a hostage can be used. + * + * @param index Hostage entity + * @param value New next use time + * + * @noreturn + * @error If the provided entity index is not a hostage, an error will + * be thrown. + */ +native cs_set_hostage_nextuse(index, Float:value); + +/** + * Returns the game time at which the bomb will explode. + * + * @param index C4 entity + * + * @return Explosion time + * @error If the provided entity index is not a bomb, an error will be + * thrown. + */ +native Float:cs_get_c4_explode_time(index); + +/** + * Sets the game time at which the bomb will explode. + * + * @param index C4 entity + * @param value New explosion time + * + * @noreturn + * @error If the provided entity index is not a bomb, an error will be + * thrown. + */ +native cs_set_c4_explode_time(index, Float:value); + +/** + * Returns if the bomb is being defused. + * + * @param c4index C4 entity + * + * @return 1 if the bomb is being defused, 0 otherwise + * @error If the provided entity index is not a bomb, an error will be + * thrown. + */ +native bool:cs_get_c4_defusing(c4index); + +/** + * Sets if the bomb is being defused. + * + * @param c4index C4 entity + * @param defusing True if the bomb should be defused, false otherwise + * + * @noreturn + * @error If the provided entity index is not a bomb, an error will be + * thrown. + */ +native cs_set_c4_defusing(c4index, bool:defusing); + +/** + * Creates an entity using Counter-Strike's custom CreateNamedEntity wrapper. + * + * @note Unlike other mods CS keeps track of entities using a custom hashtable. + * This function adds entities to this hashtable, providing benefits over + * the default CreateNamedEntity (used by create_entity() for example): + * - Storing entities in a hashtable allows CS to improve classname lookup + * performance compared to functions like FindEntityByString (used by + * find_ent_by_class() for example) that usually have to loop + * through all entities incrementally. + * - As CS exclusively uses the hashtable for classname lookup, entities + * created using the default engine functions will not be found by the + * game. For example "weaponbox" entities are supposed to be + * automatically cleaned up on round restart but are not considered if + * they have not been added to the hashtable. + * @note The faster hashtable lookup can be utilized with cs_find_ent_by_class() + * @note When creating an entity the classname has to be valid in the mod, as + * the engine needs to link the entity to an existing class internally. + * The classname string that is stored in the entvar struct + * (EV_SZ_classname) is separate from this association and can later be + * freely changed to serve other purposes. + * + * @param classname Entity class name + * + * @return Index of the created entity (> 0), 0 otherwise + */ +native cs_create_entity(const classname[]); + +/** + * Finds an entity in the world using Counter-Strike's custom FindEntityByString + * wrapper. + * + * @note Unlike other mods CS keeps track of entities using a custom hashtable. + * This function utilizes the hasthable and allows for considerably faster + * classname lookup compared to the default FindEntityByString (used by + * find_ent_by_class() for example). + * @note This exclusively considers entities in the hashtable, created by the + * game itself, using cs_create_entity(), or added via cs_set_ent_class(). + * + * @param start_index Entity index to start searching from. -1 to start from + * the first entity + * @param classname Classname to search for + * + * @return Entity index > 0 if found, 0 otherwise + */ +native cs_find_ent_by_class(start_index, const classname[]); + +/** + * Finds an entity in the world using Counter-Strike's custom FindEntityByString + * wrapper, matching by owner. + * + * @note Unlike other mods CS keeps track of entities using a custom hashtable. + * This function utilizes the hasthable and allows for considerably faster + * classname lookup compared to the default FindEntityByString (used by + * find_ent_by_owner() for example). + * @note This exclusively considers entities in the hashtable, created by the + * game itself, using cs_create_entity(), or added via cs_set_ent_class(). + * + * @param start_index Entity index to start searching from. -1 to start from + * the first entity + * @param classname Classname to search for + * @param owner Entity index to search for entity's owner + * + * @return Entity index > 0 if found, 0 otherwise + */ +native cs_find_ent_by_owner(start_index, const classname[], owner); + +/** + * Sets a custom classname of an entity. + * + * @note Unlike other mods CS keeps track of entities using a custom hashtable. + * This function adds or updates the classname in the hasthable as well. + * This is useful for use with cs_find_ent_by_class() and cs_find_ent_by_owner(). + * + * @param index Entity index + * @param classname Classname to update for + * + * @noreturn + */ +native cs_set_ent_class(index, const classname[]); + +/** + * Returns the item id associated with an item name and its aliases. + * + * @note The item name is case sensitive an can be with or without + * weapon_ and item_ prefixes. This can be a command alias as well. + * Values examples: ak47, weapon_ak47, kevlar, item_kevlar, vest, bullpup, ... + * + * @param name Alias or classname + * @param classid If item is a weapon, variable to store the associated + * weapon class id in (CS_WEAPONCLASS_* constants) + * + * @return Item id (CSI_* constants) + */ +native any:cs_get_item_id(const name[], &CsWeaponClassType:classid = CS_WEAPONCLASS_NONE); + +/** + * Returns the alias name associated with an item index. + * + * @param itemid Item id (CSI_* constants) + * @param name Buffer to store alias name to + * @param name_maxlen Maximum buffer size + * @param altname Optional buffer to store if available alternative alias name to + * @param altname_maxlen Maximum buffer size + * + * @return True if alias is found, false otherwise + */ +native bool:cs_get_item_alias(itemid, name[], name_maxlen, altname[] = "", altname_maxlen = 0); + +/** + * Returns an item name associated with a command alias. + * + * @note The alias is case sensitive. + * @note If not an alias to a weapon, buffer will be set with the original alias. + * + * @param alias Alias name + * @param itemname Buffer to store item name to + * @param maxlength Maximum buffer size + * + * @return True if alias is translated, false otherwise + */ +native bool:cs_get_translated_item_alias(const alias[], itemname[], maxlength); + +/** + * Returns some information about a weapon. + * + * @param weapon_id Weapon id, see CSW_* constants + * @param type Info type, see CS_WEAPONINFO_* constants + * + * @return Weapon information value + * @error If weapon_id and type are out of bound, an error will be thrown. + */ +native any:cs_get_weapon_info(weapon_id, CsWeaponInfo:type); + +/** + * Returns active weapon entity. + * + * @param playerIndex Player index + * + * @return Weapon entity index on success or 0 if there is no active weapon + * @error If the client index is not within the range of 1 to + * maxClients, or the client is not connected, an error will be + * thrown. + */ +native cs_get_user_weapon_entity(playerIndex); + +/** + * Returns weapon index of the active weapon. + * + * @note More reliable than get_user_weapon. + * + * @param playerIndex Player index + * @param clip Optional variable to store clip ammo to + * @param ammo Optional variable to store backpack ammo to + * + * @return Weapon index on success or 0 if there is no active weapon + * @error If the client index is not within the range of 1 to + * maxClients, or the client is not connected, an error will be + * thrown. + */ +native cs_get_user_weapon(playerIndex, &clip = 0, &ammo = 0); + +/** + * Returns a weapon class id associated with a weapon id. + * + * @param weapon_id Weapon id (CSI_* constants) + * + * @return Weapon class id (CS_WEAPONCLASS_* constants) + */ +stock CsWeaponClassType:cs_get_weapon_class(weapon_id) +{ + new CsWeaponClassType:type = CS_WEAPONCLASS_NONE; + + if (cs_is_valid_itemid(weapon_id, .weapon_only = true) || weapon_id == CSI_SHIELD) + { + switch (weapon_id) + { + case CSI_SHIELDGUN, CSI_SHIELD: + { + type = CS_WEAPONCLASS_PISTOL; + } + case CSI_KNIFE: + { + type = CS_WEAPONCLASS_KNIFE; + } + default: + { + new const bits = (1 << weapon_id); + + if(bits & CSI_ALL_PISTOLS) + { + type = CS_WEAPONCLASS_PISTOL; + } + else if(bits & CSI_ALL_GRENADES) + { + type = CS_WEAPONCLASS_GRENADE; + } + else if(bits & CSI_ALL_SMGS) + { + type = CS_WEAPONCLASS_SUBMACHINEGUN; + } + else if(bits & CSI_ALL_SHOTGUNS) + { + type = CS_WEAPONCLASS_SHOTGUN; + } + else if(bits & CSI_ALL_MACHINEGUNS) + { + type = CS_WEAPONCLASS_MACHINEGUN; + } + else if(bits & CSI_ALL_RIFLES) + { + type = CS_WEAPONCLASS_RIFLE; + } + else if(bits & CSI_ALL_SNIPERRIFLES) + { + type = CS_WEAPONCLASS_SNIPERRIFLE; + } + } + } + } + + return type; +} + +/** + * Checks whether an item id is not out of bounds. + * + * @param id Item id (CSI_* constants) + * @param weapon_only If true, only the real weapon ids will be checked, + * including shield as well + * + * @return True if item id is valid, false otherwise + */ +stock bool:cs_is_valid_itemid(id, bool:weapon_only = false) +{ + if (id <= CSI_NONE) + { + return false; + } + + if (id > CSI_LAST_WEAPON && id != CSI_SHIELDGUN && weapon_only) + { + return false; + } + + if (id >= CSI_MAX_COUNT) + { + return false; + } + + return true; +} + +/** + * Called when CS internally fires a command to a player. + * + * @note This is most notably used by the rebuy/autobuy functionality, + * Condition Zero also uses this to pass commands to bots internally. + * + * @param id Client index + * @param cmd Command string + * + * @return PLUGIN_CONTINUE to let the command continue + * PLUGIN_HANDLED to block the command + */ +forward CS_InternalCommand(id, const cmd[]); + +/** + * Called when a client attempts to purchase an item. + * + * @note This is called immediately when the client issues a buy command. The + * game has not yet checked if the client can actually buy the weapon. + * @note For a list of possible item ids see the CSI_* constants. + * + * @param index Client index + * @param item Item id + * + * @return PLUGIN_CONTINUE to let the buy attempt continue + * PLUGIN_HANDLED to block the buy attempt + */ +forward CS_OnBuyAttempt(index, item); + +/** + * Called when a client purchases an item. + * + * @note This is called right before the user receives the item and before the + * money is deducted from their cash reserves. + * @note For a list of possible item ids see the CSI_* constants. + * + * @param index Client index + * @param item Item id + * + * @return PLUGIN_CONTINUE to let the buy continue + * PLUGIN_HANDLED to block the buy + */ +forward CS_OnBuy(index, item); diff --git a/bin/compiler/include/cstrike_const.inc b/bin/compiler/include/cstrike_const.inc new file mode 100644 index 0000000..00d3b85 --- /dev/null +++ b/bin/compiler/include/cstrike_const.inc @@ -0,0 +1,521 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Counter-Strike Functions +// + +#if defined _cstrike_const_included + #endinput +#endif +#define _cstrike_const_included + +/** + * IDs of weapons in CS + */ +#define CSW_NONE 0 +#define CSW_P228 1 +#define CSW_GLOCK 2 // Unused by game, See CSW_GLOCK18. +#define CSW_SCOUT 3 +#define CSW_HEGRENADE 4 +#define CSW_XM1014 5 +#define CSW_C4 6 +#define CSW_MAC10 7 +#define CSW_AUG 8 +#define CSW_SMOKEGRENADE 9 +#define CSW_ELITE 10 +#define CSW_FIVESEVEN 11 +#define CSW_UMP45 12 +#define CSW_SG550 13 +#define CSW_GALI 14 +#define CSW_GALIL 14 +#define CSW_FAMAS 15 +#define CSW_USP 16 +#define CSW_GLOCK18 17 +#define CSW_AWP 18 +#define CSW_MP5NAVY 19 +#define CSW_M249 20 +#define CSW_M3 21 +#define CSW_M4A1 22 +#define CSW_TMP 23 +#define CSW_G3SG1 24 +#define CSW_FLASHBANG 25 +#define CSW_DEAGLE 26 +#define CSW_SG552 27 +#define CSW_AK47 28 +#define CSW_KNIFE 29 +#define CSW_P90 30 +#define CSW_VEST 31 // Custom +#define CSW_VESTHELM 32 // Custom +#define CSW_SHIELDGUN 99 +#define CSW_LAST_WEAPON CSW_P90 + +const CSW_ALL_WEAPONS = (~(1< + +#pragma reqclass xstats +#if !defined AMXMODX_NOAUTOLOAD + #pragma defclasslib xstats csx +#endif + +/** + * Map objective flags returned by get_map_objectives(). + */ +enum MapObjective +{ + MapObjective_Bomb = (1<<0), + MapObjective_Hostage = (1<<1), + MapObjective_Vip = (1<<2), + MapObjective_Escape = (1<<3), +}; + +/** + * Called after a client attacks another client. + * + * @note For a list of possible weapon ids see the CSW_* constants in + * amxconst.inc + * @note For a list of possible body hitplaces see the HIT_* constants in + * amxconst.inc + * + * @param attacker Attacker client index + * @param victim Victim client index + * @param damage Damage dealt to victim + * @param wpnindex Weapon id + * @param hitplace Body hitplace + * @param ta If nonzero the attack was a team attack + * + * @noreturn + */ +forward client_damage(attacker, victim, damage, wpnindex, hitplace, TA); + +/** + * Called after a client death. + * + * @note For a list of possible weapon ids see the CSW_* constants in + * amxconst.inc + * @note For a list of possible body hitplaces see the HIT_* constants in + * amxconst.inc + * + * @param attacker Attacker client index + * @param victim Victim client index + * @param wpnindex Weapon id + * @param hitplace Body hitplace + * @param tk If nonzero the death was a teamkill + * + * @noreturn + */ +forward client_death(killer, victim, wpnindex, hitplace, TK); + +/** + * Called after a grenade was thrown. + * + * @note Weapon id is one of CSW_HEGRENADE, CSW_SMOKEGRENADE or CSW_FLASHBANG. + * + * @param index Client index + * @param greindex Grenade entity index + * @param wId Weapon id + * + * @noreturn + */ +forward grenade_throw(index, greindex, wId); + +/** + * Called after a bomb plant attempt has started. + * + * @param planter Planter client index + * + * @noreturn + */ +forward bomb_planting(planter); + +/** + * Called after a bomb plant has finished. + * + * @param planter Planter client index + * + * @noreturn + */ +forward bomb_planted(planter); + +/** + * Called when the bomb exploded. + * + * @param planter Planter client index + * @param defuser Defuser client index, if applicable + * + * @noreturn + */ +forward bomb_explode(planter, defuser); + +/** + * Called after a bomb defuse attempt has started. + * + * @param defuser Defuser client index + * + * @noreturn + */ +forward bomb_defusing(defuser); + +/** + * Called after a bomb defuse has finished. + * + * @param defuser Defuser client index + * + * @noreturn + */ +forward bomb_defused(defuser); + +/** + * @section Shared natives + */ + +/** + * Adds a custom weapon to the stats system. + * + * @note The weapon name should be the full display name of the gun such as + * "Desert Eagle" while the logname should be "weapon_deagle". + * + * @param wpnname Full weapon name + * @param melee If nonzero the weapon will be considered a melee weapon + * @param logname Weapon short name + * + * @return Cusom weapon id (>0) on success, 0 if no more custom weapons + * can be added + */ +native custom_weapon_add(const wpnname[], melee = 0, const logname[] = ""); + +/** + * Triggers a damage event on a custom weapon, adding it to the internal stats. + * + * @note This will also call the client_damage() and client_kill() forwards if + * applicable. + * @note For a list of possible body hitplaces see the HIT_* constants in + * amxconst.inc + * + * @param weapon Custom weapon id + * @param att Attacker client index + * @param vic Victim client index + * @param damage Damage dealt + * @param hitplace Optional body hitplace + * + * @noreturn + * @error If the weapon id is not a custom weapon, an invalid client + * index, damage value or hitplace is provided, an error will + * be thrown. + */ +native custom_weapon_dmg(weapon, att, vic, damage, hitplace = 0); + +/** + * Adds a shot event on a custom weapon to the internal stats. + * + * @param weapon Custom weapon id + * @param index Client index + * + * @noreturn + * @error If the weapon id is not a custom weapon or an invalid client + * index is provided, an error will be thrown. + */ +native custom_weapon_shot(weapon, index); + +/** + * Returns if the weapon is considered a melee weapon. + * + * @note For a list of default CS weapon ids see the CSW_* constants in + * amxconst.inc, this function also works on custom weapons. + * @note For the default CS weapons this obviously returns true only for + * CSW_KNIFE. + * + * @param wpnindex Weapon id + * + * @return 1 if weapon is a melee weapon, 0 + * @error If an invalid weapon id is provided an error will be thrown. + */ +native xmod_is_melee_wpn(wpnindex); + +/** + * Retrieves the full weapon name of a weapon id. + * + * @note For a list of default CS weapon ids see the CSW_* constants in + * amxconst.inc, this function also works on custom weapons. + * @note For the default CS weapons this obviously returns true only for + * CSW_KNIFE. + * + * @param wpnindex Weapon id + * @param name Buffer to copy weapon name to + * @param len Maximmum buffer size + * + * @return Number of cells written to buffer + * @error If an invalid weapon id is provided an error will be thrown. + */ +native xmod_get_wpnname(wpnindex, name[], len); + +/** + * Retrieves the weapon log name of a weapon id. + * + * @note For a list of default CS weapon ids see the CSW_* constants in + * amxconst.inc, this function also works on custom weapons. + * @note For the default CS weapons this obviously returns true only for + * CSW_KNIFE. + * + * @param wpnindex Weapon id + * @param name Buffer to copy weapon log name to + * @param len Maximmum buffer size + * + * @return Number of cells written to buffer + * @error If an invalid weapon id is provided an error will be thrown. + */ +native xmod_get_wpnlogname(wpnindex, name[], len); + +/** + * Returns the maximum amount of weapons that the stats system supports. + * + * @return Maximum number of weapons supported + */ +native xmod_get_maxweapons(); + +/** + * Returns the number of stats tracked by the stats system. + * + * @return Number of stats tracked + */ +native xmod_get_stats_size(); + +/** + * @endsection Shared natives + */ + +/** + * Returns the current map's objectives as a bitflag value. + * + * @note For a list of possible map objective flags see the MapObjective enum. + * + * @return Bitflag value of map objectives + */ +native MapObjective:get_map_objectives(); diff --git a/bin/compiler/include/cvars.inc b/bin/compiler/include/cvars.inc new file mode 100644 index 0000000..2e86f9a --- /dev/null +++ b/bin/compiler/include/cvars.inc @@ -0,0 +1,547 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +#if defined _cvars_included + #endinput +#endif +#define _cvars_included + +/** + * CVAR flags for create_cvar() and register_cvar(). + */ +#define FCVAR_NONE 0 // No special behavior +#define FCVAR_ARCHIVE 1 // Cvar will be saved to vars.rc Set to cause it to be saved to vars.rc +#define FCVAR_USERINFO 2 // Cvar changes the client's info string +#define FCVAR_SERVER 4 // Clients get notified when cvar value is changed +#define FCVAR_EXTDLL 8 // Defined by an external DLL +#define FCVAR_CLIENTDLL 16 // Defined by the client DLL +#define FCVAR_PROTECTED 32 // Cvar value is masked from outside access, should be used for sensitive cvars like passwords +#define FCVAR_SPONLY 64 // Cvar can't be changed by clients connected to a multiplayer server +#define FCVAR_PRINTABLEONLY 128 // The cvar string value can not contain unprintable characters +#define FCVAR_UNLOGGED 256 // If the cvar is FCVAR_SERVER, don't log changes to a file/the console +#define FCVAR_NOEXTRAWHITEPACE 512 // Automatically strips trailing/leading white space from the string value + +/** + * Cvar bound constants used with [get|set]_pcvar_bounds(). + */ +enum CvarBounds +{ + CvarBound_Upper = 0, + CvarBound_Lower +}; + +/** + * Creates a new cvar for the engine. + * + * @note This has the same effect as register_cvar() but provides more options. + * @note For a list of possible cvar flags see FCVAR_* constants above. + * @note If an already existing cvar is registered it will not be duplicated. + * The default value is only set when the cvar is registered for the very + * first time since the server was started. Cvar bounds are overwritten + * by the create_cvar() call just as if they were re-set using + * set_pcvar_bounds(). + * @note The returned cvar pointer should be used with the get_pcvar_* and + * set_pcvar_* set of functions. + * + * @param name Cvar name + * @param string Default cvar value + * @param flags Optional bitsum of flags specifying cvar behavior + * @param description Optional description of the cvar + * @param has_min Optional boolean that specifies if the cvar has a + * minimum value + * @param min_val Minimum floating point value + * @param has_max Optional boolean that specifies if the cvar has a + * maximum value + * @param max_val Maximum floating point value + * + * @return Unique cvar pointer + * @error If invalid bounds are provided (min_val > max_val or + * vice versa), an error will be thrown. + */ +native create_cvar(const name[], const string[], flags = FCVAR_NONE, const description[] = "", bool:has_min = false, Float:min_val = 0.0, bool:has_max = false, Float:max_val = 0.0); + +/** + * Registers a new cvar for the engine. + * + * @note Deprecated. Consider to use create_cvar for more options. + * @note For a list of possible cvar flags see FCVAR_* constants in amxconst.inc + * @note If an already existing cvar is registered it will not be duplicated. + * The default value is only set when the cvar is registered for the very + * first time since the server was started. + * @note The returned cvar pointer should be used with the get_pcvar_* and + * set_pcvar_* set of functions. + * + * @param name Cvar name + * @param string Default cvar value + * @param flags Optional bitsum of flags specifying cvar behavior + * @param fvalue Unused + * + * @return Unique cvar pointer + */ +native register_cvar(const name[], const string[], flags = FCVAR_NONE, Float:fvalue = 0.0); + +/** + * Returns if a cvar is registered on the server. + * + * @param cvar Cvar name to check + * + * @return 1 if the cvar exists, 0 otherwise + */ +native cvar_exists(const cvar[]); + +/** + * Returns the cvar pointer of the specified cvar. + * + * @note A pointer is also returned by register_cvar() and create_cvar(). + * Plugins can (and should) retrieve and use pointers for already existing + * mod cvars. + * + * @param cvar Cvar name to find + * + * @return Cvar pointer on success, 0 if cvar was not found + */ +native get_cvar_pointer(const cvar[]); + +/** + * Creates a hook for when a cvar's value is changed. + * + * @note Changing the cvar value from within this forward can lead to infinite + * recursion and should be avoided. + * @note The callback will be called in the following manner: + * + * public cvar_change_callback(pcvar, const old_value[], const new_value[]) + * + * pcvar - Pointer to cvar that was changed + * old_value - Buffer containing the previous value of the cvar + * new_value - Buffer containing the new value of the cvar + * + * The return value is ignored + * + * @param pcvar Pointer to cvar + * @param callback Name of callback function + * + * @return Callback handle that can be used with + * [disable|enable]_cvar_hook + * @error If an invalid cvar pointer or callback function is provided, + * an error will be thrown. + */ +native cvarhook:hook_cvar_change(pcvar, const callback[]); + +/** + * Disables a cvar hook, stopping it from being called. + * + * @note Use the handle returned by hook_cvar_change as the parameter here. + * + * @param handle Forward to disable + * @error If an invalid hook handle is provided, an error will be + * thrown. + */ +native disable_cvar_hook(cvarhook:handle); + +/** + * Enables a cvar hook, restoring it to being called. + * + * @note Use the handle returned by hook_cvar_change as the parameter here. + * + * @param handle Forward to enable + * @error If an invalid hook handle is provided, an error will be + * thrown. + */ +native enable_cvar_hook(cvarhook:handle); + +/** + * Returns flags of a cvar. The cvar is accessed by name. + * + * @note For a list of possible flags see the FCVAR_* constants in amxconst.inc + * @note Accessing a Cvar by name is slower than direct pointer access, which is + * why the otherwise equivalent get_pcvar_flags() function should be used + * instead. + * + * @param cvar Cvar name to retrieve flags from + * + * @return Flag value + */ +native get_cvar_flags(const cvar[]); + +/** + * Sets specified flags to a cvar. The cvar is accessed by name. + * + * @note Not permitted for the "amx_version", "amxmodx_version", "fun_version" + * and "sv_cheats" cvars. + * @note For a list of possible flags see the FCVAR_* constants in amxconst.inc + * @note This function just adds the flags using a bitwise-or operation. After + * it has run the flags may not exactly equal the specified bitflag sum. + * @note Accessing a Cvar by name is slower than direct pointer access, which is + * why the otherwise equivalent set_pcvar_flags() function should be used + * instead. + * + * @param cvar Cvar name to remove flags from + * @param flags Bitflag sum of flags to set + * + * @return 1 on success, 0 if cvar does not exist or is not permitted + */ +native set_cvar_flags(const cvar[], flags); + +/** + * Removes specified flags from a cvar. The cvar is accessed by name. + * + * @note Not permitted for the "amx_version", "amxmodx_version", "fun_version" + * and "sv_cheats" cvars. + * @note For a list of possible flags see the FCVAR_* constants in amxconst.inc + * @note This function removes the flags using a bitwise-and operation. + * @note Accessing a Cvar by name is slower than direct pointer access, which is + * why the set_pcvar_flags() function should be used instead. + * + * @param cvar Cvar name to remove flags from + * @param flags Bitflag sum of flags to remove + * + * @return 1 on success, 0 if cvar does not exist or is not permitted + */ +native remove_cvar_flags(const cvar[], flags=-1); + +/** + * Gets a string value from a cvar. The cvar is accessed by name. + * + * @note Accessing a Cvar by name is slower than direct pointer access, which is + * why the otherwise equivalent get_pcvar_string() function should be used + * instead. + * + * @param cvar Cvar name to retrieve value from + * @param output Buffer to copy cvar value to + * @param iLen Maximum size of the buffer + * + * @return Number of cells written to buffer. + */ +native get_cvar_string(const cvarname[], output[], iLen); + +/** + * Sets a cvar to a given string value. The cvar is accessed by name. + * + * @note Accessing a Cvar by name is slower than direct pointer access, which is + * why the otherwise equivalent set_pcvar_string() function should be used + * instead. + * + * @param cvar Cvar name to set value of + * @param value Value to set cvar to + * + * @noreturn + */ +native set_cvar_string(const cvar[], const value[]); + +/** + * Returns a floating value from a cvar. The cvar is accessed by name. + * + * @note Accessing a Cvar by name is slower than direct pointer access, which is + * why the otherwise equivalent get_pcvar_float() function should be used + * instead. + * + * @param cvarname Cvar name to retrieve value from + * + * @return Cvar value, converted to float + */ +native Float:get_cvar_float(const cvarname[]); + +/** + * Sets a cvar to a given float value. The cvar is accessed by name. + * + * @note Accessing a Cvar by name is slower than direct pointer access, which is + * why the otherwise equivalent set_pcvar_float() function should be used + * instead. + * + * @param cvar Cvar name to set value of + * @param value Value to set cvar to + * + * @noreturn + */ +native set_cvar_float(const cvar[], Float:value); + +/** + * Returns an integer value from a cvar. The cvar is accessed by name. + * + * @note Accessing a Cvar by name is slower than direct pointer access, which is + * why the otherwise equivalent get_pcvar_num() function should be used + * instead. + * + * @param cvarname Cvar name to retrieve value from + * + * @return Cvar value, converted to int + */ +native get_cvar_num(const cvarname[]); + +/** + * Sets a cvar to a given integer value. The cvar is accessed by name. + * + * @note Accessing a Cvar by name is slower than direct pointer access, which is + * why the otherwise equivalent set_pcvar_num() function should be used + * instead. + * + * @param cvar Cvar name to set value of + * @param value Value to set cvar to + * + * @noreturn + */ +native set_cvar_num(const cvarname[], value); + +/** + * Returns flags of a cvar via direct pointer access. + * + * @note For a list of possible flags see the FCVAR_* constants in amxconst.inc + * + * @param pcvar Pointer to cvar to retrieve flags from + * + * @return 1 on success, 0 if cvar pointer is invalid + * @error If an invalid cvar pointer is provided, an error will be + * thrown. + */ +native get_pcvar_flags(pcvar); + +/** + * Sets specified flags to a cvar via direct pointer access. + * + * @note For a list of possible flags see the FCVAR_* constants in amxconst.inc + * @note This function directly sets the provided bitflag, unlike set_cvar_flags + * which adds them using a bitwise OR. + * + * @param pcvar Pointer to cvar to set flags of + * @param flags Bitflag sum of flags to set + * + * @return 1 on success, 0 if cvar does not exist or is not permitted + * @error If an invalid cvar pointer is provided, an error will be + * thrown. + */ +native set_pcvar_flags(pcvar, flags); + +/** + * Returns an integer value from a cvar via direct pointer access. + * + * @param pcvar Pointer to cvar to retrieve value from + * + * @return Cvar value, converted to int + * @error If an invalid cvar pointer is provided, an error will be + * thrown. + */ +native get_pcvar_num(pcvar); + +/** + * Returns an boolean value from a cvar via direct pointer access. + * + * @param pcvar Pointer to cvar to retrieve value from + * + * @return Cvar value, converted to bool + * @error If an invalid cvar pointer is provided, an error will be + * thrown. + */ +native bool:get_pcvar_bool(pcvar); + +/** + * Sets an integer value to a cvar via direct pointer access. + * + * @param pcvar Pointer to cvar to set value of + * @param num Value to set cvar to + * + * @noreturn + * @error If an invalid cvar pointer is provided, an error will be + * thrown. + */ +native set_pcvar_num(pcvar, num); + +/** + * Sets a boolean value to a cvar via direct pointer access. + * + * @param pcvar Pointer to cvar to set value of + * @param num Value to set cvar to + * + * @noreturn + * @error If an invalid cvar pointer is provided, an error will be + * thrown. + */ +native set_pcvar_bool(pcvar, bool:num); + +/** + * Returns a float value from a cvar via direct pointer access. + * + * @param pcvar Pointer to cvar to retrieve value from + * + * @return Cvar value, converted to float + * @error If an invalid cvar pointer is provided, an error will be + * thrown. + */ +native Float:get_pcvar_float(pcvar); + +/** + * Sets a float value to a cvar via direct pointer access. + * + * @param pcvar Pointer to cvar to set value of + * @param num Value to set cvar to + * + * @noreturn + * @error If an invalid cvar pointer is provided, an error will be + * thrown. + */ +native set_pcvar_float(pcvar, Float:num); + +/** + * Returns a string value from a cvar via direct pointer access. + * + * @param pcvar Pointer to cvar to retrieve value from + * @param string Buffer to copy cvar value to + * @param maxlen Maximum size of the buffer + * + * @return Number of cells written to buffer. + * @error If an invalid cvar pointer is provided, an error will be + * thrown. + */ +native get_pcvar_string(pcvar, string[], maxlen); + +/** + * Sets a string value to a cvar via direct pointer access. + * + * @param pcvar Pointer to cvar to retrieve value from + * @param string Value to set cvar to + * + * @noreturn + * @error If an invalid cvar pointer is provided, an error will be + * thrown. + */ +native set_pcvar_string(pcvar, const string[]); + +/** + * Retrieves the specified value boundary of a cvar. + * + * @param pcvar Pointer to cvar + * @param type Type of boundary to retrieve + * @param value Variable to store the specified boundary to + * + * @return True if the cvar has a boundary set, false otherwise + * @error If an invalid cvar pointer or boundary type is provided, + * an error will be thrown. + */ +native bool:get_pcvar_bounds(pcvar, CvarBounds:type, &Float:value); + +/** + * Sets the specified boundary of a cvar. + * + * @param pcvar Pointer to cvar + * @param type Type of boundary to set + * @param set If true the cvar boundary will be set, otherwise it will be + * removed (value is ignored) + * @param value Floating point value to use as the boundary + * + * @noreturn + * @error If an invalid cvar pointer or boundary type is provided, an + * error will be thrown. + */ +native set_pcvar_bounds(pcvar, CvarBounds:type, bool:set, Float:value = 0.0); + +/** + * Binds a cvar's integer value to a global variable. The variable will then + * always contain the current cvar value as it is automatically kept up to date. + * + * @note The variable *has* to be a global or a static variable. Local variables + * created within functions can not be used for technical reasons. + * @note Variables can not be bound to multiple cvars. + * + * @param pcvar Pointer to cvar + * @param var Global variable to keep updated + * + * @noreturn + * @error If an invalid cvar pointer or variable is provided, an error + * will be thrown. + */ +native bind_pcvar_num(pcvar, &any:var); + +/** + * Binds a cvar's float value to a global variable. The variable will then + * always contain the current cvar value as it is automatically kept up to date. + * + * @note The variable *has* to be a global or a static variable. Local variables + * created within functions can not be used for technical reasons. + * @note Variables can not be bound to multiple cvars. + * + * @param pcvar Pointer to cvar + * @param var Global variable to keep updated + * + * @noreturn + * @error If an invalid cvar pointer or variable is provided, an error + * will be thrown. + */ +native bind_pcvar_float(pcvar, &Float:var); + +/** + * Binds a cvar's string value to a global array. The array will then + * always contain the current cvar value as it is automatically kept up to date. + * + * @note The array *has* to be a global or a static array. Local arrays + * created within functions can not be used for technical reasons. + * @note Arrays can not be bound to multiple cvars. + * + * @param pcvar Pointer to cvar + * @param var Global array to keep updated + * @param varlen Maximum length of string array + * + * @noreturn + * @error If an invalid cvar pointer or variable is provided, an error + * will be thrown. + */ +native bind_pcvar_string(pcvar, any:var[], varlen); + +/** + * Returns the number of plugin-registered cvars. + * + * @return Number of registered cvars + */ +native get_plugins_cvarsnum(); + +/** + * Retrieves information about a plugin-registered cvar via iterative access. + * + * @note The returned cvar pointer should be used with the get_pcvar_* and + * set_pcvar_* set of functions. + * @note The cvar index does not equal the cvar pointer. It is the internal + * AMXX id of a cvar, incremented for each registered cvar. + * + * @param num Index to retrieve + * @param name Buffer to copy cvar name to + * @param namelen Maximum buffer size + * @param flags Variable to store cvar flags to + * @param plugin_id Variable to store id of the registering plugin to + * @param pcvar_handle Variable to store cvar pointer to + * @param description Variable to store cvar description to + * @param desc_len Maximum length of string buffer + * + * @return 1 on success, 0 if index is invalid + */ +native get_plugins_cvar(num, name[], namelen, &flags = 0, &plugin_id = 0, &pcvar_handle = 0, description[] = "", desc_len = 0); + +/** + * Dispatches a client cvar query, allowing the plugin to query for its value on + * the client. + * + * @note The callback will be called in the following manner: + * + * public cvar_query_callback(id, const cvar[], const value[], const param[]) + * + * id - Client index + * cvar - Cvar queried + * value - Cvar value on the client + * param - Optional extra data + * + * @param id Client index + * @param cvar Cvar to query + * @param resultFunc Callback function + * @param paramlen Size of extra data + * @param params Extra data to pass through to callback + * + * @noreturn + * @error If the client index is not within the range of 1 to + * MaxClients, the client is not connected, the callback + * function is invalid or the querying process encounters + * a problem, an error will be thrown. + */ +native query_client_cvar(id, const cvar[], const resultFunc[], paramlen = 0, const params[] = ""); diff --git a/bin/compiler/include/datapack.inc b/bin/compiler/include/datapack.inc new file mode 100644 index 0000000..8c9f86f --- /dev/null +++ b/bin/compiler/include/datapack.inc @@ -0,0 +1,161 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +#if defined _datapack_included + #endinput +#endif +#define _datapack_included + +/** + * Datapack tag declaration + * + * @note Datapacks provide a way to store and move around arbitrary amounts (and + * types) of data in AMX Mox X. Data is packed into a single cell value - + * the DataPack handle. This handle can be passed around more easily, can + * be returned by functions and can simulate advanced concepts like string + * consummation. + * @note Plugins are responsible for freeing all datapack handles they acquire. + * Failing to free handles will result in the plugin and AMXX leaking + * memory. + */ +enum DataPack +{ + Invalid_DataPack = 0 +}; + +/** + * Creates a new datapack. + * + * @return New datapack handle, which must be freed via DestroyDataPack(). + */ +native DataPack:CreateDataPack(); + +/** + * Packs a cell value into a datapack. + * + * @param pack Datapack handle + * @param cell Cell value to pack + * + * @noreturn + * @error If an invalid handle is provided, an error will be thrown. + */ +native WritePackCell(DataPack:pack, any:cell); + +/** + * Packs a float value into a datapack. + * + * @param pack Datapack handle + * @param val Float value to pack + * + * @noreturn + * @error If an invalid handle is provided, an error will be thrown. + */ +native WritePackFloat(DataPack:pack, Float:val); + +/** + * Packs a string into a datapack. + * + * @param pack Datapack handle + * @param str String to pack + * + * @return Length of copied string + * @error If an invalid handle is provided, an error will be thrown. + */ +native WritePackString(DataPack:pack, const str[]); + +/** + * Reads a cell from a Datapack. + * + * @param pack Datapack handle + * + * @return Cell value + * @error If an invalid handle is provided, or not enough data is left + * in the datapack, an error will be thrown. + */ +native any:ReadPackCell(DataPack:pack); + +/** + * Reads a float from a datapack. + * + * @param pack Datapack handle + * + * @return Float value + * @error If an invalid handle is provided, or not enough data is left + * in the datapack, an error will be thrown. + */ +native Float:ReadPackFloat(DataPack:pack); + +/** + * Reads a string from a Datapack. + * + * @param pack Datapack handle + * @param buffer Buffer to copy string to + * @param maxlen Maximum size of buffer + * + * @return Number of cells written to buffer + * @error If an invalid handle is provided, or not enough data is left + * in the datapack, an error will be thrown. + */ +native ReadPackString(DataPack:pack, buffer[], maxlen); + +/** + * Resets the datapack read/write position to the start. + * + * @param pack Datapack handle + * @param clear If true, clears the contained data + * + * @noreturn + * @error If an invalid handle is provided, an error will be thrown. + */ +native ResetPack(DataPack:pack, bool:clear = false); + +/** + * Returns the datapack read/write position. + * + * @param pack Datapack handle + * + * @return Position in the datapack, only usable with calls to SetPackPosition + * @error If an invalid handle is provided, an error will be thrown. + */ +native DataPackPos:GetPackPosition(DataPack:pack); + +/** + * Sets the datapack read/write position. + * + * @note This should only ever be used with (known to be valid) positions + * returned by GetPackPosition(). It is not possible for plugins to safely + * compute datapack positions. + * + * @param pack Datapack handle + * @param position New position to set + * + * @noreturn + * @error If an invalid handle is provided, or the new position is + * out of datapack bounds, an error will be thrown. + */ +native SetPackPosition(DataPack:pack, DataPackPos:position); + +/** + * Returns if the datapack has reached its end and no more data can be read. + * + * @param pack Datapack handle + * + * @return True if datapack has reached the end, false otherwise + * @error If an invalid handle is provided, an error will be thrown. + */ +native bool:IsPackEnded(DataPack:pack); + +/** + * Destroys the datapack and frees its memory. + * + * @param pack Datapack handle + * + * @return True if disposed, false otherwise + */ +native DestroyDataPack(&DataPack:pack); diff --git a/bin/compiler/include/dbi.inc b/bin/compiler/include/dbi.inc new file mode 100644 index 0000000..b84ee0f --- /dev/null +++ b/bin/compiler/include/dbi.inc @@ -0,0 +1,154 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// SQL Database API +// + +// +// Notes - Read the comments! Make sure your plugins use +// nice ANSI SQL and don't use database column names like "key" +// otherwise this API will be a nightmare +// +// Never do error checking with the not operator! This is bad: +// if (!dbi_query()) +// You should do: +// ret = dbi_query() +// if (ret < 0) +// This is because DBI functions can and will return negative numbers +// Negative numbers evaluate to "true" in AMX. +// + +#if defined _dbi_included + #endinput +#endif +#define _dbi_included + +// You can't include SQLX first! +// there's really no reason to anyway. +#assert !defined _sqlx_included + +#pragma reqclass dbi + +enum Sql +{ + SQL_FAILED=0, + SQL_OK +}; + +enum Result +{ + RESULT_FAILED=-1, + RESULT_NONE, + RESULT_OK +}; + +/* This will return a number equal to or below 0 on failure. + * If it does fail, the error will be mirrored in dbi_error() + * The return value will otherwise be a resource handle, not an + * OK code or cell pointer. + */ +native Sql:dbi_connect(_host[], _user[], _pass[], _dbname[], _error[]="", _maxlength=0); + +/* This will do a simple query execution on the SQL server. + * If it fails, it will return a number BELOW ZERO (0) + * If zero, it succeeded with NO RETURN RESULT. + * If greater than zero, make sure to call dbi_free_result() on it! + * The return is a handle to the result set + */ +native Result:dbi_query(Sql:_sql, _query[], any:...); + +/* Has the same usage as dbi_query, but this native returns by + * reference the number of rows affected in the query. If the + * query fails rows will be equal to -1. + */ +native Result:dbi_query2(Sql:_sql, &rows, _query[], any:...); + +/* Returns 0 on failure or End of Results. + * Advances result pointer by one row. + */ +native dbi_nextrow(Result:_result); + +/* Gets a field by number. Returns 0 on failure. + * Although internally fields always start from 0, + * This function takes fieldnum starting from 1. + * No extra params: returns int + * One extra param: returns Float: byref + * Two extra param: Stores string with length + */ +native dbi_field(Result:_result, _fieldnum, any:... ); + +/* Gets a field by name. Returns 0 on failure. + * One extra param: returns Float: byref + * Two extra param: Stores string with length + */ +native dbi_result(Result:_result, _field[], any:... ); + +/* Returns the number of rows returned from a query + */ +native dbi_num_rows(Result:_result); + +/* Frees memory used by a result handle. Do this or get memory leaks. + */ +native dbi_free_result(&Result:result); + +/* Closes a database handle. Internally, it will also + * mark the handle as free, so this particular handle may + * be re-used in the future to save time. + */ +native dbi_close(&Sql:_sql); + +/* Returns an error message set. For PGSQL and MySQL, + * this is a direct error return from the database handle/API. + * For MSSQL, it returns the last error message found from a + * thrown exception. + */ +native dbi_error(Sql:_sql, _error[], _len); + +/* Returns the type of database being used. So far: + * "mysql", "pgsql", "mssql", "sqlite" + */ +native dbi_type(_type[], _len); + +/* Returns the number of fields/colums in a result set. + * Unlike dbi_nextrow, you must pass a valid result handle. + */ +native dbi_num_fields(Result:result); + +/* Retrieves the name of a field/column in a result set. + * Requires a valid result handle, and columns are numbered 1 to n. + */ +native dbi_field_name(Result:result, field, name[], maxLength); + +/* This function can be used to find out if a table in a Sqlite database exists. + */ +stock bool:sqlite_table_exists(Sql:sql, table[]) +{ + new bool:exists; + new query[128]; + format(query, 127, "SELECT name FROM sqlite_master WHERE type='table' AND name='%s' LIMIT 1;", table); + + new Result:result = dbi_query(sql, query); + + if (dbi_nextrow(result)) + { + exists = true; + } + else + { + exists = false; + } + + if (result > RESULT_NONE) + { + dbi_free_result(result); + } + + return exists; +} diff --git a/bin/compiler/include/debug.inc b/bin/compiler/include/debug.inc new file mode 100644 index 0000000..c14a3ad --- /dev/null +++ b/bin/compiler/include/debug.inc @@ -0,0 +1,299 @@ +/********************************* + *** Debug Utility By Destro *** + +- Activar: +#define DEBUG_ENABLE + +- Configuracion opcional: + +// Si el nivel es menor al numero de la función (debug_console1/2/3() y debug_log1/2/3()), se comporta como debug_hidden() +#define DEBUG_LEVEL 3 // default: 3 + +// Números de registros que se muestran al usar debug_end() +#define DEBUG_MAX_RECORDS // defaukt: 20 + +#define DEBUG_ENABLE_GAMETIME // Agrega el gametime al mensaje +#define DEBUG_ENABLE_CLIENT // Los mensajes tambien se muestran a todos los jugadores +#define DEBUG_ONLY_CONSOLE // debug_log() y debug_hidden() funcionan como debug_console() +#define DEBUG_ONLY_LOGS // debug_console() y debug_hidden() funcionan como debug_log() +#define DEBUG_HIDDEN_ALL // debug_log() y debug_console() funcionan como debug_hidden() +#define DEBUG_LOGFILE "debug.log" // Define el nombre del archivo Log, si no se define usa "debug_%PLUGIN%.log" + + +- Funciones (funciones falsa): +# Inicializa variables, usar en plugin_init/precache() +@ debug_init() + +# Guarda en el Log los ultimos registros +@ debug_end() + +# Muestra mensaje en la consola del servidor +@ debug_console1(info[], any:...) +@ debug_console2(info[], any:...) +@ debug_console3(info[], any:...) + +# Muestra mensaje en la consola del servidor y tambien lo guarda en Log +@ debug_log1(info[], any:...) +@ debug_log2(info[], any:...) +@ debug_log3(info[], any:...) + +# No muestra mensaje, solo se puede ver al utilizar debug_end() +@ debug_hidden(info[], any:...) + +# Calcula los milisegundos entre Start y End +@ debug_performance_start(keyname) +@ debug_performance_end(keyname, info[], any:...) + +***********************************************************************/ + +/* AMXX Editor 3.0 */ +/*@fakefunc: debug_console1(const fmt[], any:...)*/ +/*@fakefunc: debug_console2(const fmt[], any:...)*/ +/*@fakefunc: debug_console3(const fmt[], any:...)*/ + +/*@fakefunc: debug_log1(const fmt[], any:...)*/ +/*@fakefunc: debug_log2(const fmt[], any:...)*/ +/*@fakefunc: debug_log3(const fmt[], any:...)*/ +/*@fakefunc: debug_hidden(const fmt[], any:...)*/ + +#if defined _debug_included + #endinput +#endif +#define _debug_included + +#if !defined DEBUG_LEVEL + #define DEBUG_LEVEL 3 +#endif + +#if !defined DEBUG_MAX_RECORDS + #define DEBUG_MAX_RECORDS 20 +#endif + +#define DEBUG_DRAW_NONE 0 +#define DEBUG_DRAW_CONSOLE 1 +#define DEBUG_DRAW_LOG 2 + +#if defined DEBUG_ENABLE + #define __DEBUG_BUFF 256 + #define __DEBUG_MAXLINES 500 + + stock __debug_list[DEBUG_MAX_RECORDS][__DEBUG_BUFF], Float:__debug_list_gametime[DEBUG_MAX_RECORDS] + stock __debug_list_loop, __debug_list_size, Float:__debug_gametime, Float:__debug_performancetime + stock __debug_logfile[64], __debug_amxxfile[32], __debug_mapname[32], __debug_date[32] + + #if defined DEBUG_ONLY_CONSOLE + #define debug_console1(%1) __debug(DEBUG_DRAW_CONSOLE,1,%1) + #define debug_console2(%1) __debug(DEBUG_DRAW_CONSOLE,2,%1) + #define debug_console3(%1) __debug(DEBUG_DRAW_CONSOLE,3,%1) + #define debug_log1(%1) __debug(DEBUG_DRAW_CONSOLE,1,%1) + #define debug_log2(%1) __debug(DEBUG_DRAW_CONSOLE,2,%1) + #define debug_log3(%1) __debug(DEBUG_DRAW_CONSOLE,3,%1) + #define debug_hidden(%1) __debug(DEBUG_DRAW_CONSOLE,1,%1) + + #else + #if defined DEBUG_ONLY_LOGS + + #define debug_console1(%1) __debug(DEBUG_DRAW_LOG,1,%1) + #define debug_console2(%1) __debug(DEBUG_DRAW_LOG,2,%1) + #define debug_console3(%1) __debug(DEBUG_DRAW_LOG,3,%1) + #define debug_log1(%1) __debug(DEBUG_DRAW_LOG,1,%1) + #define debug_log2(%1) __debug(DEBUG_DRAW_LOG,2,%1) + #define debug_log3(%1) __debug(DEBUG_DRAW_LOG,3,%1) + #define debug_hidden(%1) __debug(DEBUG_DRAW_LOG,1,%1) + + #else + #if defined DEBUG_HIDDEN_ALL + + #define debug_console1(%1) __debug(DEBUG_DRAW_NONE,1,%1) + #define debug_console2(%1) __debug(DEBUG_DRAW_NONE,2,%1) + #define debug_console3(%1) __debug(DEBUG_DRAW_NONE,3,%1) + #define debug_log1(%1) __debug(DEBUG_DRAW_NONE,1,%1) + #define debug_log2(%1) __debug(DEBUG_DRAW_NONE,2,%1) + #define debug_log3(%1) __debug(DEBUG_DRAW_NONE,3,%1) + #define debug_hidden(%1) __debug(DEBUG_DRAW_NONE,1,%1) + + #else + + #define debug_console1(%1) __debug(DEBUG_DRAW_CONSOLE,1,%1) + #define debug_console2(%1) __debug(DEBUG_DRAW_CONSOLE,2,%1) + #define debug_console3(%1) __debug(DEBUG_DRAW_CONSOLE,3,%1) + #define debug_log1(%1) __debug(DEBUG_DRAW_LOG,1,%1) + #define debug_log2(%1) __debug(DEBUG_DRAW_LOG,2,%1) + #define debug_log3(%1) __debug(DEBUG_DRAW_LOG,3,%1) + #define debug_hidden(%1) __debug(DEBUG_DRAW_NONE,1,%1) + + #endif + #endif + #endif + + + #define debug_performance_start(%1) \ + new __debug_tick_%1 = tickcount() + + #define debug_performance_end(%1,%2) \ + __debug_log_write("[DEBUG Performance] ^"%s^" -> (%dms)",%2,tickcount()-__debug_tick_%1) + + #define __debug_check_init() if(!__debug_amxxfile[0]) debug_init() + + stock debug_init() + { + get_plugin(-1, __debug_amxxfile, 31) + replace(__debug_amxxfile, 31, ".amxx", "") + + get_mapname(__debug_mapname, 31) + + get_localinfo("amxx_logs", __debug_logfile, 63) + #if defined DEBUG_LOGFILE + format(__debug_logfile, 63 "%s/%s", __debug_logfile, DEBUG_LOGFILE) + #else + format(__debug_logfile, 63, "%s/debug_%s.log", __debug_logfile, __debug_amxxfile) + #endif + + __debug_update_date() + __debug_log_write("[DEBUG START: %s] - Map: ^"%s^" | Plugin: ^"%s^"", __debug_date, __debug_mapname, __debug_amxxfile) + } + + stock debug_end() + { + __debug_check_init() + + __debug_gametime = get_gametime() + + __debug_update_date() + __debug_log_write("[DEBUG END: %s] - Map: ^"%s^" | Plugin: ^"%s^"", __debug_date, __debug_mapname, __debug_amxxfile) + + if(__debug_list_size == 0) + { + __debug_log_write("# [ Empty Records List ]") + __debug_log_write("----------------------------------------------------------------------^n") + return + } + + new Float:last_gametime, slot + + slot = __debug_list_loop - 1 + if(slot < 0) slot += __debug_list_size + + last_gametime = __debug_list_gametime[slot] + + __debug_log_write("# - GameTime: (%.4f) | Last: (%.4f) | Difference: (%dms)", __debug_gametime, last_gametime, floatround((__debug_gametime - last_gametime) * 1000.0)) + __debug_log_write("# - Records List:") + + for(new count=__debug_list_size; count > 0; count--) + { + slot = __debug_list_loop - count + if(slot < 0) slot += __debug_list_size + + if(__debug_gametime == __debug_list_gametime[slot]) + __debug_log_write("#%2d: (curframe) - [%s]", count, __debug_list[slot]) + else + __debug_log_write("#%2d: (%dms) - [%s]", count, floatround((__debug_gametime - __debug_list_gametime[slot]) * 1000.0), __debug_list[slot]) + } + + __debug_log_write("----------------------------------------------------------------------^n") + } + + stock __debug(drawmode, level, const info[], any:...) + { + static slot + if(__debug_list_size == DEBUG_MAX_RECORDS) + { + slot = __debug_list_loop++ + __debug_list_loop = __debug_list_loop % DEBUG_MAX_RECORDS + } + else slot = __debug_list_size++ + + vformat(__debug_list[slot], __DEBUG_BUFF-1, info, 4) + __debug_list_gametime[slot] = __debug_gametime = get_gametime() + + if(drawmode == DEBUG_DRAW_NONE || level > DEBUG_LEVEL) + return + + #if defined DEBUG_ENABLE_CLIENT + client_print(0, print_console, "[DEBUG, GameTime: (%.3f)] %s", __debug_gametime, __debug_list[slot]) + #endif + + if(drawmode == DEBUG_DRAW_CONSOLE) + { + #if defined DEBUG_GAMETIME + server_print("[DEBUG, GameTime: (%.3f)] %s", __debug_gametime, __debug_list[slot]) + #if defined DEBUG_ENABLE_CLIENT + client_print(0, print_console, "[DEBUG, GameTime: (%.3f)] %s", __debug_gametime, __debug_list[slot]) + #endif + #else + server_print("[DEBUG] %s", __debug_list[slot]) + #if defined DEBUG_ENABLE_CLIENT + client_print(0, print_console, "[DEBUG] %s", __debug_list[slot]) + #endif + #endif + } + else + { + #if defined DEBUG_GAMETIME + __debug_log_write("[DEBUG, GameTime: (%.3f)] %s", __debug_gametime, __debug_list[slot]) + #else + __debug_log_write("[DEBUG] %s", __debug_list[slot]) + #endif + } + } + + stock __debug_update_date() + { + get_time("%d/%m/%Y - %H:%M:%S", __debug_date, 31) + } + + stock __debug_log_clear() + { + __debug_check_init() + + delete_file(__debug_logfile) + + __debug_update_date() + __debug_log_write("[DEBUG CLEAR: %s] - Map: ^"%s^" | Plugin: ^"%s^"", __debug_date, __debug_mapname, __debug_amxxfile) + } + + stock __debug_log_write(const info[], any:...) + { + __debug_check_init() + + static buff[__DEBUG_BUFF], lines + + if(++lines > __DEBUG_MAXLINES) + { + lines = 0 + __debug_log_clear() + } + + + vformat(buff, charsmax(buff), info, 2) + + write_file(__debug_logfile, buff) + server_print(buff) + + #if defined DEBUG_ENABLE_CLIENT + client_print(0, print_console, buff) + #endif + } + +#else + + #define debug_init(%1) {} + #define debug_end(%1) {} + + #define debug_console1(%1) {} + #define debug_console2(%1) {} + #define debug_console3(%1) {} + + #define debug_log1(%1) {} + #define debug_log2(%1) {} + #define debug_log3(%1) {} + + #define debug_hidden(%1) {} + + #define debug_performance_start(%1) {} + #define debug_performance_end(%1) {} + + #define __debug(%1) {} + +#endif + diff --git a/bin/compiler/include/dodconst.inc b/bin/compiler/include/dodconst.inc new file mode 100644 index 0000000..14807e5 --- /dev/null +++ b/bin/compiler/include/dodconst.inc @@ -0,0 +1,152 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +#if defined _dodconst_included + #endinput +#endif +#define _dodconst_included + +/* DoD teams */ +#define ALLIES 1 +#define AXIS 2 + +#define FT_NEW 1<<0 +#define FT_OLD 1<<1 + +#define STAMINA_SET 0 +#define STAMINA_RESET 1 + +#define FUSE_SET 0 +#define FUSE_RESET 1 + +#define DODMAX_WEAPONS 46 // 5 slots for custom weapons + +// DoD Weapon Types +enum +{ + DODWT_PRIMARY = 0, + DODWT_SECONDARY, + DODWT_MELEE, + DODWT_GRENADE, + DODWT_OTHER +}; + +// Ammo Channels +#define AMMO_SMG 1 // thompson, greasegun, sten, mp40 +#define AMMO_ALTRIFLE 2 // carbine, k43, mg34 +#define AMMO_RIFLE 3 // garand, enfield, scoped enfield, k98, scoped k98 +#define AMMO_PISTOL 4 // colt, webley, luger +#define AMMO_SPRING 5 // springfield +#define AMMO_HEAVY 6 // bar, bren, stg44, fg42, scoped fg42 +#define AMMO_MG42 7 // mg42 +#define AMMO_30CAL 8 // 30cal +#define AMMO_GREN 9 // grenades (should be all 3 types) +#define AMMO_ROCKET 13 // bazooka, piat, panzerschreck +enum { + PS_NOPRONE =0, + PS_PRONE, + PS_PRONEDEPLOY, + PS_DEPLOY, +}; + +/* info types for dod_get_map_info native */ +enum { + MI_ALLIES_TEAM = 0, + MI_ALLIES_PARAS, + MI_AXIS_PARAS, +}; + +/* DoD weapons */ +enum { + DODW_AMERKNIFE = 1, + DODW_GERKNIFE, + DODW_COLT, + DODW_LUGER, + DODW_GARAND, + DODW_SCOPED_KAR, + DODW_THOMPSON, + DODW_STG44, + DODW_SPRINGFIELD, + DODW_KAR, + DODW_BAR, + DODW_MP40, + DODW_HANDGRENADE, + DODW_STICKGRENADE, + DODW_STICKGRENADE_EX, + DODW_HANDGRENADE_EX, + DODW_MG42, + DODW_30_CAL, + DODW_SPADE, + DODW_M1_CARBINE, + DODW_MG34, + DODW_GREASEGUN, + DODW_FG42, + DODW_K43, + DODW_ENFIELD, + DODW_STEN, + DODW_BREN, + DODW_WEBLEY, + DODW_BAZOOKA, + DODW_PANZERSCHRECK, + DODW_PIAT, + DODW_SCOPED_FG42, + DODW_FOLDING_CARBINE, + DODW_KAR_BAYONET, + DODW_SCOPED_ENFIELD, + DODW_MILLS_BOMB, + DODW_BRITKNIFE, + DODW_GARAND_BUTT, + DODW_ENFIELD_BAYONET, + DODW_MORTAR, + DODW_K43_BUTT, +}; + +/* DoD Classes */ +enum { + DODC_GARAND = 1, + DODC_CARBINE, + DODC_THOMPSON, + DODC_GREASE, + DODC_SNIPER, + DODC_BAR, + DODC_30CAL, + DODC_BAZOOKA, + //DODC_ALLIES_MORTAR, + DODC_KAR = 10, + DODC_K43, + DODC_MP40, + DODC_MP44, + DODC_SCHARFSCHUTZE, + DODC_FG42, + DODC_SCOPED_FG42, + DODC_MG34, + DODC_MG42, + DODC_PANZERJAGER, + //DODC_AXIS_MORTAR, + DODC_ENFIELD = 21, + DODC_STEN, + DODC_MARKSMAN, + DODC_BREN, + DODC_PIAT, + //DODC_BRIT_MORTAR, +}; + +/* DoD stats constants */ +enum { + DODX_KILLS = 0, + DODX_DEATHS, + DODX_HEADSHOTS, + DODX_TEAMKILLS, + DODX_SHOTS, + DODX_HITS, + DODX_DAMAGE, + DODX_POINTS, + DODX_RANK, + DODX_MAX_STATS +} diff --git a/bin/compiler/include/dodfun.inc b/bin/compiler/include/dodfun.inc new file mode 100644 index 0000000..cc8ea1e --- /dev/null +++ b/bin/compiler/include/dodfun.inc @@ -0,0 +1,152 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// DoD Fun Functions +// + +#if defined _dodfun_included + #endinput +#endif +#define _dodfun_included + +#include + +#pragma reqlib dodfun +#if !defined AMXMODX_NOAUTOLOAD + #pragma loadlib dodfun +#endif + +/* Function is called after grenade throw */ +forward grenade_throw(index,greindex,wId); + +/* Function is called after a rocket is shot */ +forward rocket_shoot(index,rocketindex,wId); + +/* Example: for full stamina use dod_player_stamina(1,STAMINA_SET,100,100) */ +/* value is from 0 - 100 */ +native dod_set_stamina(index,set=STAMINA_SET,minvalue=0,maxvalue=100); + +/* Sets fuse for grenades. Valid number is from 0.1-20.0 */ +/* types : new or preprimed */ +native dod_set_fuse(index,set=FUSE_SET,Float:newFuse=5.0, Type=FT_NEW); + +/* Sets player class */ +native dod_set_user_class(index,classId); + +/* Sets player team and random class. Don't work for spectators. */ +native dod_set_user_team(index,teamId,refresh=1); + +/* Returns next player class. Usefull is player is using random class */ +native dod_get_next_class(index); + +/* Returns 1 if player choose random class */ +native dod_is_randomclass(index); + +/* Returns player deaths */ +native dod_get_pl_deaths(index); + +/* Sets player deaths. + * Note if you opt to refresh the scoreboard, it + * will make the player appear as "DEAD" in the scoreboard. + */ +native dod_set_pl_deaths(index,value,refresh=1); + +/* Returns player deaths. */ +native dod_get_user_kills(index); + +/* Sets player kills. */ +native dod_set_user_kills(index,value,refresh=1); + +/* Sets player score. */ +native dod_set_user_score(index,value,refresh=1); + +/* Sets new team name for this player */ +native dod_set_pl_teamname(index,const szName[]); + +/* Gets player team name */ +native dod_get_pl_teamname(index,szName[],len); + +/* Returns 1 is player weapon is deployed (bar,mg..) */ +native dod_is_deployed(index); + +/*Sets the ammo of the specified weapon entity id */ +native dod_set_user_ammo(index,wid,value); + +/*Gets the ammo of the specified weapon entity id */ +native dod_get_user_ammo(index,wid); + +/* called after first InitObj */ +forward controlpoints_init(); + +enum CP_VALUE { + CP_edict = 1, // read only + CP_area, // read only + CP_index, // read only + CP_owner, + CP_default_owner, + CP_visible, // reinit after change + CP_icon_neutral, // reinit after change + CP_icon_allies, // reinit after change + CP_icon_axis, // reinit after change + CP_origin_x, // reinit after change + CP_origin_y, // reinit after change + + CP_can_touch, + CP_pointvalue, + + CP_points_for_cap, + CP_team_points, + + CP_model_body_neutral, + CP_model_body_allies, + CP_model_body_axis, + + // strings + CP_name, + CP_reset_capsound, + CP_allies_capsound, + CP_axis_capsound, + CP_targetname, + + CP_model_neutral, + CP_model_allies, + CP_model_axis, +}; + +/* returns number of objectives */ +native objectives_get_num(); + +/* use this function to update client(s) hud. You need to do this sometimes. Check CP_VALUE comments. + if player is 0 , all clients will get this message */ +native objectives_reinit( player=0 ); + +/* use this function to get info about specified control point */ +native objective_get_data( index, CP_VALUE:key, szValue[]="", len=0 ); + +/* use this function to change control point's data */ +native objective_set_data( index, CP_VALUE:key , iValue=-1, const szValue[]="" ); + +enum CA_VALUE { + CA_edict = 1, + CA_allies_numcap, + CA_axis_numcap, + CA_timetocap, + CA_can_cap, + + // strings + CA_target, + CA_sprite, +}; + +/* use this function to get info about specified control point's area */ +native area_get_data( index, CA_VALUE:key, szValue[]="", len=0 ); + +/* use this function to change control point's area data */ +native area_set_data( index, CA_VALUE:key , iValue=-1, const szValue[]="" ); diff --git a/bin/compiler/include/dodstats.inc b/bin/compiler/include/dodstats.inc new file mode 100644 index 0000000..381496a --- /dev/null +++ b/bin/compiler/include/dodstats.inc @@ -0,0 +1,69 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// DODX Stats Functions +// + +#if defined _dodstats_included + #endinput +#endif +#define _dodstats_included + +/* Gets stats from given weapon index. If wpnindex is 0 +* then the stats are from all weapons. If weapon has not been used function +* returns 0 in other case 1. Fields in stats are: +* 0 - kills +* 1 - deaths +* 2 - headshots +* 3 - teamkilling +* 4 - shots +* 5 - hits +* 6 - damage +* 7 - score +* For body hits fields see amxconst.inc. */ +native get_user_wstats(index,wpnindex,stats[DODX_MAX_STATS],bodyhits[MAX_BODYHITS]); + +/* Gets round stats from given weapon index.*/ +native get_user_wrstats(index,wpnindex,stats[DODX_MAX_STATS],bodyhits[MAX_BODYHITS]); + +/* Gets life (from spawn to spawn) stats from given weapon index.*/ +native get_user_wlstats(index,wpnindex,stats[DODX_MAX_STATS],bodyhits[MAX_BODYHITS]); + +/* Gets overall stats which are stored in file on server +* and updated on every respawn or user disconnect. +* Function returns the position in stats by diff. kills to deaths. */ +native get_user_stats(index,stats[DODX_MAX_STATS],bodyhits[MAX_BODYHITS]); + +/* Gets round stats of player. */ +native get_user_rstats(index,stats[DODX_MAX_STATS],bodyhits[MAX_BODYHITS]); + +/* Gets life (from spawn to spawn) stats of player. */ +native get_user_lstats(index,stats[DODX_MAX_STATS],bodyhits[MAX_BODYHITS]); + +/* Gets stats with which user have killed/hurt his victim. If victim is 0 +* then stats are from all victims. If victim has not been hurt, function +* returns 0 in other case 1. User stats are reset on his respawn. */ +native get_user_vstats(index,victim,stats[DODX_MAX_STATS],bodyhits[MAX_BODYHITS],wpnname[]="",len=0); + +/* Gets stats with which user have been killed/hurt. If killer is 0 +* then stats are from all attacks. If killer has not hurt user, function +* returns 0 in other case 1. User stats are reset on his respawn. */ +native get_user_astats(index,wpnindex,stats[DODX_MAX_STATS],bodyhits[MAX_BODYHITS],wpnname[]="",len=0); + +/* Resets life, weapon, victims and attackers user stats. */ +native reset_user_wstats(index); + +/* Gets overall stats which stored in stats.dat file in amx folder +* and updated on every mapchange or user disconnect. +* Function returns next index of stats entry or 0 if no more exists. */ +native get_stats(index,stats[DODX_MAX_STATS],bodyhits[MAX_BODYHITS],name[],len); + +/* Returns number of all entries in stats. */ +native get_statsnum(); diff --git a/bin/compiler/include/dodx.inc b/bin/compiler/include/dodx.inc new file mode 100644 index 0000000..42e21da --- /dev/null +++ b/bin/compiler/include/dodx.inc @@ -0,0 +1,161 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// DODX Functions +// + +#if defined _dodx_included + #endinput +#endif +#define _dodx_included + +#include +#include + +#pragma reqclass xstats +#if !defined AMXMODX_NOAUTOLOAD + #pragma defclasslib xstats dodx +#endif + +/************* Shared Natives Start ********************************/ + +/* Forward types */ +enum { + XMF_DAMAGE = 0, + XMF_DEATH, + XMF_SCORE, +}; + +/* Use this function to register forwards */ +native register_statsfwd(ftype); + +/* Function is called after player to player attacks , +* if players were damaged by teammate TA is set to 1 */ +forward client_damage(attacker, victim, damage, wpnindex, hitplace, TA); + +/* Function is called after player death , +* if player was killed by teammate TK is set to 1 */ +forward client_death(killer, victim, wpnindex, hitplace, TK); + +/* Function is called if player scored */ +forward client_score(id, score, total); + +/* This Forward is called when a player changes team */ +forward dod_client_changeteam(id, team, oldteam); + +/* This Forward is called if a player changes class, but just after spawn */ +forward dod_client_changeclass(id, class, oldclass); + +/* This Forward is called when a player spawns */ +forward dod_client_spawn(id); + +/* This will be called whenever a player scopes or unscopes +value = 1 scope up +value = 0 scope down */ +forward dod_client_scope(id, value); + +/* This will be called whenever a player drops a weapon +weapon is weapon dropped or picked up +value = 1 picked up +value = 0 dropped */ +forward dod_client_weaponpickup(id, weapon, value); + +/* Called whenever the the player goes to or comes from prone position +value = 1 going down +value = 0 getting up */ +forward dod_client_prone(id, value); + +/* This will be called whenever a player switches a weapon */ +forward dod_client_weaponswitch(id, wpnew, wpnold); + +/* Forward for when a grenade explodes and its location */ +forward dod_grenade_explosion(id, Float:pos[3], wpnid); + +/* Forward for when a rocket explodes and its location */ +forward dod_rocket_explosion(id, Float:pos[3], wpnid); + +/* Forward for when a player picks up a object */ +forward dod_client_objectpickup(id, objid, Float:pos[3], value); + +/* Forward for when a users stamina decreases */ +forward dod_client_stamina(id, stamina); + +/* We want to get just the weapon of whichever type that the player is on him +Use DODWT_* in dodconst.inc for type */ +native dod_weapon_type(id, type); + +/* This native will change the position of a weapon within the users slots and its ammo ammount */ +native dod_set_weaponlist(id, wpnID, slot, dropslot, totalrds); + +/* Sets the model for a player */ +native dod_set_model(id, const model[]); + +/* Sets the model for a player */ +native dod_set_body_number(id, bodynumber); + +/* Un-Sets the model for a player */ +native dod_clear_model(id); + +/* Custom Weapon Support */ +/* function will return index of new weapon */ +native custom_weapon_add( const wpnname[], melee = 0, const logname[]="" ); + +/* Function will pass damage done by this custom weapon to stats module and other plugins */ +native custom_weapon_dmg( weapon, att, vic, damage, hitplace=0 ); + +/* Function will pass info about custom weapon shot to stats module */ +native custom_weapon_shot( weapon, index ); // weapon id , player id + +/* function will return 1 if true */ +native xmod_is_melee_wpn(wpnindex); + +/* Returns weapon name. */ +native xmod_get_wpnname(wpnindex, name[], len); + +/* Returns weapon logname. */ +native xmod_get_wpnlogname(wpnindex, name[], len); + +/* Returns weapons array size */ +native xmod_get_maxweapons(); + +/* Returns stats array size ex. 8 in TS , 9 in DoD */ +native xmod_get_stats_size(); + +/* Returns 1 if true */ +native xmod_is_custom_wpn(wpnindex); + +/************* Shared Natives End ********************************/ + +/* weapon logname to weapon name convertion */ +native dod_wpnlog_to_name(const logname[],name[],len); + +/* weapon logname to weapon index convertion */ +native dod_wpnlog_to_id(const logname[]); + +native dod_get_map_info( info ); + +/* Returns id of currently carried weapon. Gets also +* ammount of ammo in clip and backpack. */ +native dod_get_user_weapon(index,&clip=0,&ammo=0); + +/* Returns team score */ +native dod_get_team_score(teamId); + +/* Returns player class id */ +native dod_get_user_class(index); + +/* Returns player score */ +native dod_get_user_score(index); + +/* values are: 0-no prone, 1-prone, 2-prone + w_deploy */ +native dod_get_pronestate(index); + +/* It is not as safe as original but player deaths will not be increased */ +native dod_user_kill(index); diff --git a/bin/compiler/include/engine.inc b/bin/compiler/include/engine.inc new file mode 100644 index 0000000..4c9483d --- /dev/null +++ b/bin/compiler/include/engine.inc @@ -0,0 +1,1343 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// Special thanks to Vexd and mahnsawce. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Engine Functions +// + +#if defined _engine_included + #endinput +#endif +#define _engine_included + +#include + +#pragma reqlib engine +#if !defined AMXMODX_NOAUTOLOAD + #pragma loadlib engine +#endif + +/** + * Retrieves a result from the global engine module trace handle. + * + * @note For a list of trace results available see the TR_* constants in + * engine_const.inc. + * @note Usage examples: + * value = traceresult(TR_AllSolid); + * traceresult(TR_Fraction, floatvalue); + * traceresult(TR_EndPos, vector); + * + * @param type Result to retrieve + * @param ... Depending on the result type a different number of + * additional parameters should be provided: + * int - Returns the result integer value directly, no + * additional parameters required + * float - Stores the result float value into the + * variable provided as the second parameter + * vector - Copies the result vector to the Float:array[3] + * provided in the second parameter + * + * @return Changes depending on the result type: + * int - Returns the result integer value + * float - Returns 1 + * vector - Returns 1 + */ +native traceresult(type, any:...); + +/** + * Registers a function to be called on a client impulse. + * + * @note The function will be called in the following manner: + * + * public impulse_handler(client, impulse) + * + * client - Client index + * impulse - Impulse triggered by the client + * + * @note The callback should return PLUGIN_CONTINUE to ignore the impulse, + * PLUGIN_HANDLED or higher to nullify it (CmdStart() is not blocked). + * @note When returning PLUGIN_HANDLED or higher from the callback, Engine will + * still fire other impulse functions. This includes the client_impulse() + * and client_cmdStart() forwards. + * + * @param impulse Impulse to hook + * @param function Name of callback function + * + * @return Impulse forward id + */ +native register_impulse(impulse, const function[]); + +/** + * Registers a function to be called on a touch action between entities of + * specified classes. + * + * @note The function will be called in the following manner: + * + * public touch_handler(touched, toucher) + * + * touched - Index of entity being touched + * toucher - Index of entity touching + * + * @note The callback should return PLUGIN_CONTINUE to ignore the touch, + * PLUGIN_HANDLED or higher to block it. + * @note When returning PLUGIN_HANDLED from the callback, Engine will still fire + * other touch functions like the pfn_touch() forward before actually + * blocking the touch. To immediately block return PLUGIN_HANDLED_MAIN + * instead. + * + * @param Touched Entity classname being touched, "*" or "" for any class + * @param Toucher Entity classname touching, "*" or "" for any class + * @param function Name of callback function + * + * @return Touch forward id + */ +native register_touch(const Touched[], const Toucher[], const function[]); + +/** + * Registers a function to be called on entity think on all entities of a + * specified class. + * + * @note The function will be called in the following manner: + * + * public think_handler(entity) + * + * entity - Index of entity thinking + * + * @note The callback should return PLUGIN_CONTINUE to ignore the think, + * PLUGIN_HANDLED or higher to block it. + * @note When returning PLUGIN_HANDLED from the callback, Engine will still fire + * other think functions like the pfn_think() forward before actually + * blocking the think. To immediately block return PLUGIN_HANDLED_MAIN + * instead. + * + * @param Classname Entity classname to hook + * @param function Name of callback function + * + * @return Think forward id + */ +native register_think(const Classname[], const function[]); + +/** + * Removes a previously registered impulse hook. + * + * @param registerid Impulse forward id + * + * @return 1 on success, 0 if nothing was removed + */ +native unregister_impulse(registerid); + +/** + * Removes a previously registered touch hook. + * + * @param registerid Touch forward id + * + * @return 1 on success, 0 if nothing was removed + */ +native unregister_touch(registerid); + +/** + * Removes a previously registered think hook. + * + * @param registerid Think forward id + * + * @return 1 on success, 0 if nothing was removed + */ +native unregister_think(registerid); + +/** + * Sets the engine module speak flags on a client. + * + * @note For a list of available flags see the SPEAK_* constants in + * engine_const.inc + * + * @param iIndex Client index + * @param iSpeakFlags New flags to set + * + * @noreturn + * @error If the client index is not within the range of 1 to + * MaxClients, or the client is not connected, an error + * will be thrown. + */ +native set_speak(iIndex, iSpeakFlags); + +/** + * Returns the engine module speak flags currently set on a client. + * + * @note For a list of available flags see the SPEAK_* constants in + * engine_const.inc + * + * @param iIndex Client index + * + * @return Client speak flags + * @error If the client index is not within the range of 1 to + * MaxClients, or the client is not connected, an error will be + * thrown. + */ +native get_speak(iIndex); + +/** + * Uses the DROP_TO_FLOOR() engine function on an entity, which attempts to put + * it down on the floor. + * + * @note This engine function traces 256 units straight downwards from the + * entity origin. If the trace hits the floor, the origin is updated to + * the end position of the trace, FL_ONGROUND is added to the flags and + * EV_ENT_groundentity is updated. When the trace does not hit anything or + * the entity would be stuck inside something, the function does nothing + * and returns 0. + * + * @param entity Entity index + * + * @return 1 if entity is on the floor, 0 otherwise + */ +native drop_to_floor(entity); + +/** + * Retrieves keyvalue buffer from a client or the server. + * + * @note There are three different types of keyvalue buffers, depending on the + * index passed: + * -1 - "local" buffer (various server information and config values) + * 0 - server buffer (usually contains "*gamedir" only) + * >0 - client buffer ("name", "rate" and other client info) + * @note The buffer is formatted as "\key1\value1\key2\value2\...\keyN\valueN" + * + * @param id Server/client index + * @param buffer Buffer to copy keybuffer to + * @param length Maximum size of buffer + * + * @return Number of cells written to buffer + * @error If an invalid entity index is provided or, if the index is a + * client index, the client is not connected, an error will be + * thrown. + */ +native get_info_keybuffer(id, buffer[], length); + +/** + * Forces an entity (such as a player) to use another entity (such as a button). + * + * @param entUsed Index of entity being used + * @param entUser Index of entity using + * + * @noreturn + * @error If an invalid entity index is provided or, if either index + * is a client index, that client is not connected, an error + * will be thrown. + */ +native force_use(entUsed, entUser); + +/** + * Returns a float type value from the server globals. + * + * @note For a list of valid float type entries, see the GL_* constants in + * engine_const.inc under the "Float" section. + * + * @param variable Entry to retrieve from + * + * @return Value of specified entry + * @error If an invalid entry is provided, an error will be thrown. + */ +native Float:get_global_float(variable); + +/** + * Returns a integer type value from the server globals. + * + * @note For a list of valid integer type entries, see the GL_* constants in + * engine_const.inc under the "Int" section. + * + * @param variable Entry to retrieve from + * + * @return Value of specified entry + * @error If an invalid entry is provided, an error will be thrown. + */ +native get_global_int(variable); + +/** + * Retrieves a global string type value from the server. + * + * @note For a list of valid string type entries, see the GL_* constants in + * engine_const.inc under the "String" section. + * + * @param variable Entry to retrieve from + * @param string Buffer to copy value to + * @param maxlen Maximum size of buffer + * + * @return Number of cells written to buffer + * @error If an invalid entry is provided, an error will be thrown. + */ +native get_global_string(variable, string[], maxlen); + +/** + * Returns a vector type value from the server globals. + * + * @note For a list of valid vector type entries, see the GL_* constants in + * engine_const.inc under the "Vector" section. + * + * @param variable Entry to retrieve from + * @param vector Array to store vector in + * + * @noreturn + * @error If an invalid entry is provided, an error will be thrown. + */ +native get_global_vector(variable, Float:vector[3]); + +/** + * Returns a edict type value from the server globals. + * + * @note For a list of valid edict type entries, see the GL_* constants in + * engine_const.inc under the "Edict" section. + * @note This native returns 0 as an error value if the edict retrieved is an + * invalid entity. As 0 is an entity index that is considered to be a + * valid value for some globals ("worldspawn"), this native can + * potentially return a misleading value. Use get_global_edict2() for a + * safe version. + * + * @param variable Entry to retrieve from + * + * @return Value of specified entry + * @error If an invalid entry is provided, an error will be thrown. + */ +native get_global_edict(variable); + +/** + * Returns a edict type value from the server globals. + * + * @note For a list of valid edict type entries, see the GL_* constants in + * engine_const.inc under the "Edict" section. + * @note This native returns -1 as a safe error value if the edict retrieved is + * an invalid entity. Otherwise it is identical to get_global_edict(). + * + * @param variable Entry to retrieve from + * + * @return Value of specified entry + * @error If an invalid entry is provided, an error will be thrown. + */ +native get_global_edict2(variable); + +/** + * Sets the size of the entity bounding box, as described by the minimum and + * maximum vectors relative to the origin. + * + * @param index Entity index + * @param mins Vector containing the minimum point relative to the origin + * @param maxs Vector containing the maximum point relative to the origin + * + * @noreturn + * @error If an invalid entity index is provided, an error will be + * thrown. + */ +native entity_set_size(index, const Float:mins[3], const Float:maxs[3]); + +/** + * Returns the index of a decal. + * + * @param szDecalName Decal name + * + * @return Decal index >= 0, or -1 if decal was not found + */ +native get_decal_index(const szDecalName[]); + +/** + * Returns the distance between two entities. + * + * @param ida Entity index 1 + * @param idb Entity index 2 + * + * @return Distance between the entities + * @error If an invalid entity index is provided or, if either index is a + * client index, that client is not connected, an error will be + * thrown. + */ +native Float:entity_range(ida, idb); + +/** + * Returns if two entities bounding boxes intersect by comparing their absolute + * minimum and maximum origins. + * + * @param entity Entity index 1 + * @param other Entity index 2 + * + * @return True if entities intersect, false otherwise + * @error If an invalid entity index is provided, an error will be + * thrown. + */ +native bool:entity_intersects(entity, other); + +/** + * Returns an integer type value from an entities entvar struct. + * + * @note For a list of valid integer type entries, see the EV_INT_* constants in + * engine_const.inc + * + * @param iIndex Entity index + * @param iKey Entry to retrieve from + * + * @return Value of specified entry + * @error If an invalid entity index is provided, an error will be + * thrown. + */ +native entity_get_int(iIndex, iKey); + +/** + * Sets an integer type value in an entities entvar struct. + * + * @note For a list of valid integer type entries, see the EV_INT_* constants in + * engine_const.inc + * + * @param iIndex Entity index + * @param iKey Entry to write to + * @param iVal Value to set + * + * @return 1 if value was sucessfully set, 0 if an invalid entry was + * specified + * @error If an invalid entity index is provided, an error will be + * thrown. + */ +native entity_set_int(iIndex, iKey, iVal); + +/** + * Returns a float type value from an entities entvar struct. + * + * @note For a list of valid float type entries, see the EV_FL_* constants in + * engine_const.inc + * + * @param iIndex Entity index + * @param iKey Entry to retrieve from + * + * @return Value of specified entry, or 0 if an invalid entry was + * specified + * @error If an invalid entity index is provided, an error will be + * thrown. + */ +native Float:entity_get_float(iIndex, iKey); + +/** + * Sets a float type value in an entities entvar struct. + * + * @note For a list of valid float type entries, see the EV_FL_* constants in + * engine_const.inc + * + * @param iIndex Entity index + * @param iKey Entry to write to + * @param iVal Value to set + * + * @return 1 if value was sucessfully set, 0 if an invalid entry was + * specified + * @error If an invalid entity index is provided, an error will be + * thrown. + */ +native entity_set_float(iIndex, iKey, Float:iVal); + +/** + * Retrieves a vector type value from an entities entvar struct. + * + * @note For a list of valid vector type entries, see the EV_VEC_* constants in + * engine_const.inc + * + * @param iIndex Entity index + * @param iKey Entry to retrieve from + * @param vRetVector Array to store vector in + * + * @return 1 if value was sucessfully retrieved, 0 if an invalid + * entry was specified + * @error If an invalid entity index is provided, an error will be + * thrown. + */ +native entity_get_vector(iIndex, iKey, Float:vRetVector[3]); + +/** + * Sets a vector type value in an entities entvar struct. + * + * @note For a list of valid vector type entries, see the EV_VEC_* constants in + * engine_const.inc + * + * @param iIndex Entity index + * @param iKey Entry to write to + * @param vNewVector Array to copy to the entity + * + * @return 1 if value was sucessfully set, 0 if an invalid entry + * was specified + * @error If an invalid entity index is provided, an error will be + * thrown. + */ +native entity_set_vector(iIndex, iKey, const Float:vNewVector[3]); + +/** + * Returns an edict type value from an entities entvar struct. + * + * @note For a list of valid edict type entries, see the EV_ENT_* constants in + * engine_const.inc + * @note This native returns 0 as an error value if the edict retrieved from the + * entvar is an invalid entity. As 0 is an entity index that is + * considered to be a valid value for some entvars ("worldspawn"), this + * native can potentially return a misleading value. Use + * entity_get_edict2() for a safe version. + * + * @param iIndex Entity index + * @param iKey Entry to retrieve from + * + * @return Entity index in specified entry, 0 if the edict in the + * entvar is not a valid entity or an invalid entry was + * specified + * @error If an invalid entity index is provided, an error will be + * thrown. + */ +native entity_get_edict(iIndex, iKey); + +/** + * Returns an edict type value from an entities entvar struct. + * + * @note For a list of valid edict type entries, see the EV_ENT_* constants in + * engine_const.inc + * @note This native returns -1 as a safe error value if the edict retrieved + * from the entvar is an invalid entity. Otherwise it is identical to + * entity_get_edict(). + * + * @param iIndex Entity index + * @param iKey Entry to retrieve from + * + * @return Entity index in specified entry, -1 if the edict in the + * entvar is not a valid entity or an invalid entry was + * specified + * @error If an invalid entity index is provided, an error will be + * thrown. + */ +native entity_get_edict2(iIndex, iKey); + +/** + * Sets an edict type value in an entities entvar struct. + * + * @note For a list of valid edict type entries, see the EV_ENT_* constants in + * engine_const.inc + * @note This native will crash the server if an invalid entity index is + * provided in iNewIndex. + * + * @param iIndex Entity index + * @param iKey Entry to write to + * @param iNewIndex Entity index to set + * + * @return 1 if value was sucessfully set, 0 if an invalid entry + * was specified + * @error If an invalid entity index is provided, an error will be + * thrown. + */ +native entity_set_edict(iIndex, iKey, iNewIndex); + +/** + * Retrieves a string type value from an entities entvar struct. + * + * @note For a list of valid string type entries, see the EV_SZ_* constants in + * engine_const.inc + * + * @param iIndex Entity index + * @param iKey Entry to retrieve from + * @param szReturn Buffer to copy value to + * @param iRetLen Maximum size of buffer + * + * @return Number of cells written to buffer, 0 if an invalid entry + * was specified + * @error If an invalid entity index is provided, an error will be + * thrown. + */ +native entity_get_string(iIndex, iKey, szReturn[], iRetLen); + +/** + * Sets a string type value in an entities entvar struct. + * + * @note For a list of valid string type entries, see the EV_SZ_* constants in + * engine_const.inc + * + * @param iIndex Entity index + * @param iKey Entry to retrieve from + * @param szNewVal String to copy to the entity + * + * @return 1 if value was sucessfully set, 0 if an invalid entry was + * specified + * @error If an invalid entity index is provided, an error will be + * thrown. + */ +native entity_set_string(iIndex, iKey, const szNewVal[]); + +/** + * Returns a bytearray type value from an entities entvar struct. + * + * @note For a list of valid bytearray type entries, see the EV_BYTE_* constants + * in engine_const.inc + * + * @param iIndex Entity index + * @param iKey Entry to retrieve from + * + * @return Value of specified entry, 0 if an invalid entry was + * specified + * @error If an invalid entity index is provided, an error will be + * thrown. + */ +native entity_get_byte(iIndex, iKey); + +/** + * Sets a bytearray type value in an entities entvar struct. + * + * @note For a list of valid bytearray type entries, see the EV_BYTE_* constants + * in engine_const.inc + * @note The value is automatically clamped to [0,255]. + * + * @param iIndex Entity index + * @param iKey Entry to write to + * @param iVal Value to set + * + * @return 1 if value was sucessfully set, 0 if an invalid entry was + * specified + * @error If an invalid entity index is provided, an error will be + * thrown. + */ +native entity_set_byte(iIndex, iKey, iVal); + +/** + * Creates an entity. + * + * @note When creating an entity the classname has to be valid in the mod, as + * the engine needs to link the entity to an existing class internally. + * The classname string that is stored in the entvar struct + * (EV_SZ_classname) is separate from this association and can later be + * freely changed to serve other purposes. + * + * @param szClassname Entity classname + * + * @return Entity index > 0 on success, 0 otherwise + */ +native create_entity(const szClassname[]); + +/** + * Removes an entity from the world. + * + * @param iIndex Entity index + * + * @return 1 if entity was sucessfully removed, 0 if an invalid entity + * was provided + * @error If an entity index in the range of 0 to MaxClients is + * provided, an error will be thrown. + */ +native remove_entity(iIndex); + +/** + * Returns the current number of entities in the world. + * + * @return Number of entities + */ +native entity_count(); + +/** + * Returns if an entity index is valid (as required by other engine natives). + * + * @note Engine considers an entity index valid if it is in the range between 1 + * and the maximum number of entities possible. The index also has to + * point to an existing entity or, if it is a client index, the client has + * to be connected. + * + * @param iIndex Entity index + * + * @return 1 if entity is valid, 0 otherwise + */ +native is_valid_ent(iIndex); + +/** + * Searches entities in the world, starting at a specified index and matching by + * classname. + * + * @param iIndex Entity index to start from + * @param szClass Classname to match + * + * @return Entity index if an entity was found, 0 otherwise + */ +native find_ent_by_class(iIndex, const szClass[]); + +/** + * Searches entities in the world, starting at a specified index, matching by + * owner and a configurable entity field. + * + * @param iIndex Entity index to start from + * @param szClass String to match + * @param iOwner Owner entity index to match + * @param iJghgType Entity field to match string against: + * 0 - Classname + * 1 - Target + * 2 - Targetname + * + * @return Entity index if an entity was found, 0 otherwise + */ +native find_ent_by_owner(iIndex, const szClass[], iOwner, iJghgType = 0); + +/** + * Searches entities in the world, starting at a specified index and matching by + * target. + * + * @param iIndex Entity index to start from + * @param szClass Target to match + * + * @return Entity index if an entity was found, 0 otherwise + */ +native find_ent_by_target(iIndex, const szClass[]); + +/** + * Searches entities in the world, starting at a specified index and matching by + * targetname. + * + * @param iIndex Entity index to start from + * @param szClass Targetname to match + * + * @return Entity index if an entity was found, 0 otherwise + */ +native find_ent_by_tname(iIndex, const szClass[]); + +/** + * Searches entities in the world, starting at a specified index and matching by + * classname and model. + * + * @param iIndex Entity index to start from + * @param szClass Classname to match + * @param szModel Model to match + * + * @return Entity index if an entity was found, 0 otherwise + */ +native find_ent_by_model(iIndex, const szClass[], const szModel[]); + +/** + * Searches for entities inside a sphere, starting at a specified index. + * + * @param start_from_ent Entity index to start from + * @param origin Center of sphere + * @param radius Sphere radius + * + * @return Entity index if an entity was found, 0 otherwise + */ +native find_ent_in_sphere(start_from_ent, const Float:origin[3], Float:radius); + +/** + * Searches for entities inside a sphere around a specified entity or origin, + * matching by classname. + * + * @note This native always starts searching from entity index 0, there is no + * way to specify the starting point. If the entlist array is not big + * enough to accomodate all entities, the results will be truncated. + * + * @param aroundent Entity index to center sphere around, < 1 to use + * origin + * @param _lookforclassname Classname to match + * @param radius Sphere radius + * @param entlist Array to store entities in + * @param maxents Maximum size of array + * @param origin Center of sphere, used if aroundent < 1 + * + * @return Number of entities stored in entlist + * @error If an invalid entity index is provided or, if + * the index is a client index, the client is not + * connected, an error will be thrown. + */ +native find_sphere_class(aroundent, const _lookforclassname[], Float:radius, entlist[], maxents, const Float:origin[3] = {0.0, 0.0, 0.0}); + +/** + * Sets the origin of an entity. + * + * @note This native uses engine functions to set the origin, keeping it + * properly updated with the game. Directly writing to EV_VEC_origin is an + * error and will cause problems. + * + * @param iIndex Entity index + * @param fNewOrigin New origin + * + * @noreturn + * @error If an invalid entity index is provided, an error will be + * thrown. + */ +native entity_set_origin(iIndex, const Float:fNewOrigin[3]); + +/** + * Sets the model of an entity. + * + * @note This native uses an engine function to set the model, keeping it + * properly updated with the game. Simply writing to EV_SZ_model is an + * error and will cause problems. + * + * @param iIndex Entity index + * @param szModel Model to set + * + * @noreturn + * @error If an invalid entity index is provided, an error will be + * thrown. + */ +native entity_set_model(iIndex, const szModel[]); + +/** + * Sets rendering options of an entity. + * + * @note For a list of valid rendering effects see the kRenderFx* constants in + * amxconst.inc + * @note For a list of valid rendering modes see the kRender* constants in + * amxconst.inc + * @note Rendering amount has different meanings depending on the rendering + * effect and mode used on the entity. + * + * @param index Entity index + * @param fx Rendering effect + * @param r Red component of rendering color + * @param g Green component of rendering color + * @param b Blue component of rendering color + * @param render Rendering mode + * @param amount Rendering amount + * + * @noreturn + * @error If an invalid entity index is provided, an error will be + * thrown. + */ +native set_ent_rendering(index, fx = kRenderFxNone, r = 0, g = 0, b = 0, render = kRenderNormal, amount = 0); + +/** + * Calls the DispatchThink() game DLL function on an entity, triggering it to + * think if applicable. + * + * @note DispatchThink() checks the entity for the FL_DORMANT flag - if it is + * set, the entity will not proceed to think. It will first call the + * class-specific think function and eventually CBaseEntity::Think(), thus + * triggering other think hooks and forwards. + * + * @param entity Entity index + * + * @noreturn + * @error If an invalid entity index is provided, an error will be + * thrown. + */ +native call_think(entity); + +/** + * Forces an entity to touch another entity. + * + * @note This calls the game touch function even when the entities do not + * intersect. It doesn't change their origins and/or bounding boxes. + * + * @param entTouched Index of entity being touched + * @param entToucher Index of entity touching + * + * @noreturn + * @error If an invalid entity index is provided or, if the index + * is a client index, the client is not connected, an error + * will be thrown. + */ +native fake_touch(entTouched, entToucher); + +/** + * Calls the spawn function on an entity. + * + * @param iIndex Entity index + * + * @noreturn + * @error If an invalid entity index is provided or, if the index is a + * client index, the client is not connected, an error will be + * thrown. + */ +native DispatchSpawn(iIndex); + +/** + * Fires/sets a keyvalue on an entity. + * + * @param ... (1) To fire a new keyvalue struct, three parameters should be + * provided in the following manner: + * DispatchKeyValue(entity, "KeyName", "Value"); + * The "szClassName" value will automatically use the classname + * of the specified entity, "fHandled" will be set to 0. + * (2) Inside the pfn_keyvalue() forward this native can be used to + * modify the keyvalue struct inline, two parameters should be + * provided in the following manner: + * DispatchKeyValue("KeyName", "Value"); + * The "szClassName" or "fHandled" values can not be changed. + * + * @noreturn + * @error For variant (1), if an invalid entity index is provided, an + * error will be thrown. For variant (2), if it is used outside of + * the pfn_keyvalue() forward, an error will be thrown. + */ +native DispatchKeyValue(...); + +/** + * Retrieves a value from an entities keyvalues. + * + * @param entity Entity index + * @param szKey Key to retrieve value of + * @param value Buffer to copy value to + * @param maxLength Maximum size of buffer + * + * @return Number of cells written to buffer + * @error If an invalid entity index is provided or, if the index + * is a client index, the client is not connected, an error + * will be thrown. + */ +native get_keyvalue(entity, const szKey[], value[], maxLength); + +/** + * Retrieves buffers from the keyvalue structure. + * + * @note Can only be used inside the pfn_keyvalue() forward. + * + * @param szClassName Buffer to copy classname to + * @param sizea Maximum size of classname buffer + * @param szKeyName Buffer to copy keyname to + * @param sizeb Maximum size of keyname buffer + * @param szVlaue Buffer to copy value to + * @param sizec Maximum size of value buffer + * + * @return 1 on success, 0 if used outside the pfn_keyvalue() + * forward + */ +native copy_keyvalue(szClassName[], sizea, szKeyName[], sizeb, szValue[], sizec); + +/** + * Hurts (and kills, if applicable) players in a sphere. + * + * @note Players that have the DAMAGE_NO flag set in EV_INT_flags will be + * ignored. + * @note The sphere has four different damage zones. Below is pseudo-code of the + * algorithm, indicating how damage will be dealt to players: + * if (distance <= 5 * radius) damage(10 + random(1 * dmg_multi)) + * if (distance <= 4 * radius) damage(25 + random(2 * dmg_multi)) + * if (distance <= 3 * radius) damage(50 + random(3 * dmg_multi)) + * if (distance <= 2 * radius) kill() + * + * @param fExplodeAt Center origin of sphere + * @param iDamageMultiplier Damage multiplier + * @param iRadiusMultiplier Sphere radius + * + * @noreturn + */ +native radius_damage(const Float:fExplodeAt[3], iDamageMultiplier, iRadiusMultiplier); + +/** + * Returns the contents value of an origin. + * + * @note For a list of valid contents values see the CONTENTS_* constants in + * hlsdk_const.inc + * + * @param fCheckAt Origin to retrieve contents of + * + * @return Contents value + */ +native point_contents(const Float:fCheckAt[3]); + +/** + * Returns if an origin is in an entities view cone. Derived from SDK. + * + * @note This uses the entities EV_FL_fov value in the calculations and applies + * it on all axes. It might be unreliable depending on the use-case. + * + * @param entity Entity index + * @param origin Origin + * @param use3d If zero the calculation will ignore the z axis (height), if + * nonzero it is done in 3D + * + * @return 1 if origin is in view code, 0 otherwise + */ +native is_in_viewcone(entity, const Float:origin[3], use3d = 0); + +/** + * Returns if an entity is visible to another entity. Derived from SDK. + * + * @note If the target entity has the FL_NOTARGET flag set, this native always + * returns 0. + * @note This native fires a traceline between the view-offset origins of the + * entities. If the traceline is unobstructed it returns true. This is not + * a full 3D visibility check. + * + * @param entity Entity index + * @param target Target entity index + * + * @return 1 if entity is visible, 0 otherwise + * @error If an invalid entity index is provided or, if the index is a + * client index, the client is not connected, an error will be + * thrown. + */ +native is_visible(entity, target); + +/** + * Fires a trace line between two origins, retrieving the end point and entity + * hit. + * + * @note This native writes to the global engine module trace handle. Additional + * trace results can be retrieved using traceresult(). + * @note This native returns 0 if the trace did not hit anything. As 0 is an + * entity index that is considered to be a valid value for a trace hit + * ("worldspawn"), this native can potentially return a misleading value. + * Check other components of the trace result to verify the entity index. + * + * @param iIgnoreEnt Entity index that trace will ignore, -1 if trace should + * not ignore any entities + * @param fStart Trace starting point + * @param fEnd Trace target point + * @param vReturn Vector to copy trace end point to + * + * @return Entity index if trace hit an entity, 0 otherwise + */ +native trace_line(iIgnoreEnt, const Float:fStart[3], const Float:fEnd[3], Float:vReturn[3]); + +/** + * Fires a trace line between two origins, retrieving the trace normal. + * + * @note This native writes to the global engine module trace handle. Additional + * trace results can be retrieved using traceresult(). + * + * @param iIgnoreEnt Entity index that trace will ignore, -1 if trace should + * not ignore any entities + * @param fStart Trace starting point + * @param fEnd Trace target point + * @param vReturn Vector to copy trace normal to + * + * @return 1 if a normal is available (trace hit something), 0 + * otherwise + */ +native trace_normal(iIgnoreEnt, const Float:fStart[3], const Float:fEnd[3], Float:vReturn[3]); + +/** + * Fires a trace hull on a specified origin or between two origins. + * + * @note This native writes to the global engine module trace handle. Additional + * trace results can be retrieved using traceresult(). + * @note For a list of valid hull types see the HULL_* constants in + * hlsdk_const.inc + * @note For a list of valid ignore types see the *IGNORE_* constants in + * hlsdk_const.inc + * + * @param origin Trace start point (and end point if not specified) + * @param hull Hull type + * @param ignoredent Entity index that trace will ignore + * @param ignoremonsters Entity ignore type + * @param end Trace end point, pass NULL_VECTOR to use start point + * + * @return Custom bitflag sum of relevant trace results + * StartSolid (1), AllSolid (2) and InOpen (4) + */ +native trace_hull(const Float:origin[3], hull, ignoredent = 0, ignoremonsters = 0, const Float:end[3] = NULL_VECTOR); + +/** + * Attempts to describe an obstacle by firing trace lines in a specified + * direction, offset on the z-axis around an origin. + * + * @note The functionality of this native can mostly be replaced by a single + * hull trace. This native does not write to the global engine module + * trace handle. + * @note This native is intended to examine an obstacle in front of a standing + * player. Start should usually be the origin of a client while angle + * should be its forward angle vector. 73 traces are fired, each offset by + * one unit on the z-axis from the last, starting at -36 and moving up to + * +36. This is because a standing player model is 72 units high, so 73 + * units of clearance are required to fit them. The values stored in the + * various parameters then attempt to describe the obstacle. + * @note To fully understand the nuances of the algorithm it is necessary to + * view its source code located in engine.cpp of the engine module. + * + * @param start Starting origin + * @param angle Trace line direction + * @param give Units that a trace line can be longer than the + * shortest trace line to still be considered hitting + * the same obstacle + * @param ignoreEnt Entity index that traces will ignore, -1 if traces + * should not ignore any entities + * @param hitX Variable to store X axis value of shortest trace + * line endpoint in + * @param hitY Variable to store Y axis value of shortest trace + * line endpoint in + * @param shortestDistance Variable to store length of shortest trace line in + * @param shortestDistLow Variable to store Z axis offset of shortest trace + * line in + * @param shortestDistHigh Variable to store Z axis offset of highest trace + * line that satisfies "give" condition in + * + * @noreturn + */ +native trace_forward(const Float:start[3], const Float:angle[3], Float:give, ignoreEnt, &Float:hitX, &Float:hitY, &Float:shortestDistance, &Float:shortestDistLow, &Float:shortestDistHigh); + +/** + * Finds a grenade entity, matching by owner. + * + * @param id Owner entity index to match + * @param model Buffer to copy grenade model to + * @param len Maximum length of buffer + * @param grenadeid Entity index to start searching from + * + * @return Grenade entity index > 0 if found, 0 otherwise + * @error If an invalid entity index is provided, an error will be + * thrown. + */ +native get_grenade_id(id, model[], len, grenadeid = 0); + +/** + * Returns the game time based on the game tick. + * + * @note This time is counted up from map start. If the engine is not processing + * this function will return the same value between calls, which makes it + * unusable for profiling purposes. + * + * @return Game time, in seconds + */ +native Float:halflife_time(); + +/** + * Sets the map lighting level. + * + * @note After setting the map lighting level, the engine module enforces it by + * continuously re-applying it until it is reset. + * + * @param Lighting Map lighting level (described by a character a-z), #OFF to + * reset + * + * @noreturn + */ +native set_lights(const Lighting[]); + +/** + * Attaches a clients viewport to an entity. + * + * @note To reset the clients viewport, call this function with the client index + * as the target entity. + * + * @param iIndex Client index + * @param iTargetIndex Index of entity to attach to + * + * + * @error If the client index is not within the range of 1 to + * MaxClients, or the client is not connected, an error + * will be thrown. + */ +native attach_view(iIndex, iTargetIndex); + +/** + * Sets the engine module view mode on a client. + * + * @note For a list of valid view modes see the CAMERA_* constants in + * engine_const.inc + * @note The engine module uses a custom entity to achieve the camera effects + * and requires "models/rpgrocket.mdl" to be precached by the plugin. + * + * @param iIndex Client index + * @param ViewType View mode + */ +native set_view(iIndex, ViewType); + +/** + * Plays back an event on the client. Most prominently used for gun firing + * animations. + * + * @note Event indexes can be acquired using precache_event() with the sc dummy + * files in the events folder. + * + * @param flags Event flags + * @param invoker Index of entity to invoke event on + * @param eventindex Index of event in the precache table + * @param delay Time until the event is played + * @param origin Origin to play event from + * @param angles Angles to play event with + * @param fparam1 Float parameter 1 to pass along into/with the event + * @param fparam2 Float parameter 2 to pass along into/with the event + * @param iparam1 Integer parameter 1 to pass along into/with the event + * @param iparam2 Integer parameter 2 to pass along into/with the event + * @param bparam1 Boolean parameter 1 to pass along into/with the event + * @param bparam2 Boolean parameter 2 to pass along into/with the event + * + * @noreturn + */ +native playback_event(flags, invoker, eventindex, Float:delay, const Float:origin[3], const Float:angles[3], Float:fparam1, Float:fparam2, iparam1, iparam2, bparam1, bparam2); + +/** + * Retrieves a value from a usercmd struct. + * + * @note This native can only be used inside the client_cmdStart() forward. If + * it is used outside this forward it will not retrieve any results and + * always return 0. + * @note For a list of valid usercmd entries see the usercmd_* constants in + * engine_const.inc + * + * @param type Entry to retrieve from + * @param ... Depending on the entry type a different number of + * additional parameters should be provided: + * int - Returns the entry integer value directly, no + * additional parameters required + * float - Stores the entry float value into the + * variable provided as the second parameter + * vector - Copies the entry vector to the Float:array[3] + * provided in the second parameter + * + * @return Changes depending on the entry type: + * int - Returns the entry integer value + * float - Returns 1 + * vector - Returns 1 + */ +native get_usercmd(type, any:...); + +/** + * Sets a value in a usercmd struct. + * + * @note This native can only be used inside the client_cmdStart() forward. + * @note For a list of valid usercmd entries see the usercmd_* constants in + * engine_const.inc + * @note Changes will be immediately reflected in get_usercmd() for all plugins. + * + * @param type Entry to write to + * @param ... Depending on the entry type a different additional parameter + * should be provided: + * int - Second parameter should be an integer variable + * float - Second parameter should be a float variable + * vector - Second parameter should be a Float:array[3] + * + * @noreturn + */ +native set_usercmd(type, any:...); + +/** + * Retrieves a string from the engine string table. + * + * @param _string String table index + * @param _returnString Buffer to copy string to + * @param _len Maximum size of buffer + * + * @return Number of cells written to buffer + */ +native eng_get_string(_string, _returnString[], _len); + +/** + * @section Forwards + */ + +/** + * Called when two entities touch. + * + * @param ptr Index of entity being touched + * @param ptd Index of entity touching + * + * @return PLUGIN_CONTINUE to ignore, PLUGIN_HANDLED or higher to block + */ +forward pfn_touch(ptr, ptd); + +/** + * Called at the start of every server frame. + * + * @note Using his forward can easily become performance-critical. More specific + * hooks and forwards should be used whenever possible. + * + * @noreturn + */ +forward server_frame(); + +/** + * Called when a client types kill in console. + * + * @param id Client index + * + * @return PLUGIN_CONTINUE to ignore, PLUGIN_HANDLED or higher to block + */ +forward client_kill(id); + +/** + * Called at the start of each client think. + * + * @note Using his forward can easily become performance-critical. More specific + * hooks and forwards should be used whenever possible. + * + * @param id Client index + * + * @noreturn + */ +forward client_PreThink(id); + +/** + * Called after each client think. + * + * @note Using his forward can easily become performance-critical. More specific + * hooks and forwards should be used whenever possible. + * + * @param id Client index + * + * @noreturn + */ +forward client_PostThink(id); + +/** + * Called when a client triggers an impulse. + * + * @param id Client index + * @param impulse Impulse triggered by client + * + * @param PLUGIN_CONTINUE to ignore, PLUGIN_HANDLED or higher to + * nullify impulse (CmdStart() is not blocked) + */ +forward client_impulse(id, impulse); + +/** + * Called for CmdStart() on a client. + * + * @note Use [get|set]_usercmd() to read and modify information in the usercmd + * struct. + * + * @param id Client index + * + * @return PLUGIN_CONTINUE to ignore, PLUGIN_HANDLED or higher to block + */ +forward client_cmdStart(id); + +/** + * Called when an entity thinks. + * + * @param entid Entity index + * + * @return PLUGIN_CONTINUE to ignore, PLUGIN_HANDLED or higher to block + */ +forward pfn_think(entid); + +/** + * Called when an event is played. + * + * @param flags Event flags + * @param entid Index of entity to invoke event on + * @param eventid Index of event in the precache table + * @param delay Time until the event is played + * @param Origin Origin to play event from + * @param Angles Angles to play event with + * @param fparam1 Float parameter 1 to pass along into/with the event + * @param fparam2 Float parameter 2 to pass along into/with the event + * @param iparam1 Integer parameter 1 to pass along into/with the event + * @param iparam2 Integer parameter 2 to pass along into/with the event + * @param bparam1 Boolean parameter 1 to pass along into/with the event + * @param bparam2 Boolean parameter 2 to pass along into/with the event + * + * @return PLUGIN_CONTINUE to ignore, PLUGIN_HANDLED or higher to block + */ +forward pfn_playbackevent(flags, entid, eventid, Float:delay, Float:Origin[3], Float:Angles[3], Float:fparam1, Float:fparam2, iparam1, iparam2, bparam1, bparam2); + +/** + * Called when a keyvalue pair is sent to an entity. + * + * @note Use copy_keyvalue() to retrieve the keyvalue information, and + * DispatchKeyVaue() to modify it. + * + * @param entid Entity index + * + * @return PLUGIN_CONTINUE to ignore, PLUGIN_HANDLED or higher to block + */ +forward pfn_keyvalue(entid); + +/** + * Called when an entity is spawned. + * + * @param entid Entity index + * + * @return PLUGIN_CONTINUE to ignore, PLUGIN_HANDLED or higher to block + */ +forward pfn_spawn(entid); + +/** + * @endsection + */ + +#include diff --git a/bin/compiler/include/engine_const.inc b/bin/compiler/include/engine_const.inc new file mode 100644 index 0000000..389a776 --- /dev/null +++ b/bin/compiler/include/engine_const.inc @@ -0,0 +1,310 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Engine Constants +// + +#if defined _engine_const_included + #endinput +#endif +#define _engine_const_included + +#include + +/** + * Flags for the [set|get]_speak() natives. + * + * @note These do not correspond to any HLSDK constants and are only relevant to + * the custom functionality provided by the engine module. + */ +#define SPEAK_NORMAL 0 // Normal behavior, client follows alltalk rules +#define SPEAK_MUTED 1 // Client can not talk +#define SPEAK_ALL 2 // Client can talk to every other client +#define SPEAK_LISTENALL 4 // Client can listen to every other client + +/** + * View types for the set_view() native. + * + * @note These do not correspond to any HLSDK constants and are only relevant to + * the custom functionality provided by the engine module. + */ +#define CAMERA_NONE 0 +#define CAMERA_3RDPERSON 1 +#define CAMERA_UPLEFT 2 +#define CAMERA_TOPDOWN 3 + +/** + * @section Entvar constants used with entity_[get|set]_* functions. + */ + +/** + * Integers, use with entity_[get|set]_int() + */ +enum { + EV_INT_gamestate = 0, + EV_INT_oldbuttons, + EV_INT_groupinfo, + EV_INT_iuser1, + EV_INT_iuser2, + EV_INT_iuser3, + EV_INT_iuser4, + EV_INT_weaponanim, + EV_INT_pushmsec, + EV_INT_bInDuck, + EV_INT_flTimeStepSound, + EV_INT_flSwimTime, + EV_INT_flDuckTime, + EV_INT_iStepLeft, + EV_INT_movetype, + EV_INT_solid, + EV_INT_skin, + EV_INT_body, + EV_INT_effects, + EV_INT_light_level, + EV_INT_sequence, + EV_INT_gaitsequence, + EV_INT_modelindex, + EV_INT_playerclass, + EV_INT_waterlevel, + EV_INT_watertype, + EV_INT_spawnflags, + EV_INT_flags, + EV_INT_colormap, + EV_INT_team, + EV_INT_fixangle, + EV_INT_weapons, + EV_INT_rendermode, + EV_INT_renderfx, + EV_INT_button, + EV_INT_impulse, + EV_INT_deadflag, +}; + +/** + * Floats, use with entity_[get|set]_float() + */ +enum { + EV_FL_impacttime = 0, + EV_FL_starttime, + EV_FL_idealpitch, + EV_FL_pitch_speed, + EV_FL_ideal_yaw, + EV_FL_yaw_speed, + EV_FL_ltime, + EV_FL_nextthink, + EV_FL_gravity, + EV_FL_friction, + EV_FL_frame, + EV_FL_animtime, + EV_FL_framerate, + EV_FL_health, + EV_FL_frags, + EV_FL_takedamage, + EV_FL_max_health, + EV_FL_teleport_time, + EV_FL_armortype, + EV_FL_armorvalue, + EV_FL_dmg_take, + EV_FL_dmg_save, + EV_FL_dmg, + EV_FL_dmgtime, + EV_FL_speed, + EV_FL_air_finished, + EV_FL_pain_finished, + EV_FL_radsuit_finished, + EV_FL_scale, + EV_FL_renderamt, + EV_FL_maxspeed, + EV_FL_fov, + EV_FL_flFallVelocity, + EV_FL_fuser1, + EV_FL_fuser2, + EV_FL_fuser3, + EV_FL_fuser4, +}; + +/** + * Vectors, use with entity_[get|set]_vector() + */ +enum { + EV_VEC_origin = 0, + EV_VEC_oldorigin, + EV_VEC_velocity, + EV_VEC_basevelocity, + EV_VEC_clbasevelocity, + EV_VEC_movedir, + EV_VEC_angles, + EV_VEC_avelocity, + EV_VEC_punchangle, + EV_VEC_v_angle, + EV_VEC_endpos, + EV_VEC_startpos, + EV_VEC_absmin, + EV_VEC_absmax, + EV_VEC_mins, + EV_VEC_maxs, + EV_VEC_size, + EV_VEC_rendercolor, + EV_VEC_view_ofs, + EV_VEC_vuser1, + EV_VEC_vuser2, + EV_VEC_vuser3, + EV_VEC_vuser4, +}; + +/** + * Edicts, use with entity_[get|set]_edict() + */ +enum { + EV_ENT_chain = 0, + EV_ENT_dmg_inflictor, + EV_ENT_enemy, + EV_ENT_aiment, + EV_ENT_owner, + EV_ENT_groundentity, + EV_ENT_pContainingEntity, + EV_ENT_euser1, + EV_ENT_euser2, + EV_ENT_euser3, + EV_ENT_euser4, +}; + +/** + * Strings, use with entity_[get|set]_string() + */ +enum { + EV_SZ_classname = 0, + EV_SZ_globalname, + EV_SZ_model, + EV_SZ_target, + EV_SZ_targetname, + EV_SZ_netname, + EV_SZ_message, + EV_SZ_noise, + EV_SZ_noise1, + EV_SZ_noise2, + EV_SZ_noise3, + EV_SZ_viewmodel, + EV_SZ_weaponmodel, +}; + +/** + * Bytearrays, use with entity_[get|set]_byte() + */ +enum { + EV_BYTE_controller1 = 0, + EV_BYTE_controller2, + EV_BYTE_controller3, + EV_BYTE_controller4, + EV_BYTE_blending1, + EV_BYTE_blending2, +}; + +/** + * @endsection + */ + +#if defined _jghg_enums + #endinput +#endif +#define _jghg_enums + +/** + * Used by get_global_[edict/float/int/string/vector]() + */ +enum { + + // Edict + GL_trace_ent = 0, + + // Float + GL_coop, + GL_deathmatch, + GL_force_retouch, + GL_found_secrets, + GL_frametime, + GL_serverflags, + GL_teamplay, + GL_time, + GL_trace_allsolid, + GL_trace_fraction, + GL_trace_inopen, + GL_trace_inwater, + GL_trace_plane_dist, + GL_trace_startsolid, + + // Int + GL_cdAudioTrack, + GL_maxClients, + GL_maxEntities, + GL_msg_entity, + GL_trace_flags, + GL_trace_hitgroup, + + // String + GL_pStringBase, + GL_mapname, + GL_startspot, + + // Vector + GL_trace_endpos, + GL_trace_plane_normal, + GL_v_forward, + GL_v_right, + GL_v_up, + GL_vecLandmarkOffset, + + // Void (not supported) + GL_pSaveData +}; + + +/** + * Used by [get/set]_usercmd() + */ +enum +{ + usercmd_float_start, + usercmd_forwardmove, // Float + usercmd_sidemove, // Float + usercmd_upmove, // Float + usercmd_float_end, + usercmd_int_start, + usercmd_lerp_msec, // short + usercmd_msec, // byte + usercmd_lightlevel, // byte + usercmd_buttons, // unsigned short + usercmd_impulse, // byte + usercmd_weaponselect, // byte + usercmd_impact_index, // int + usercmd_int_end, + usercmd_vec_start, + usercmd_viewangles, // Vector + usercmd_impact_position, // vec + usercmd_vec_end +}; + +/** + * Used by the traceresult() + */ +enum +{ + TR_AllSolid, // (int) if true, plane is not valid + TR_StartSolid, // (int) if true, the initial point was in a solid area + TR_InOpen, // (int) + TR_InWater, // (int) + TR_Fraction, // (float) time completed, 1.0 = didn't hit anything + TR_EndPos, // (vector) final position + TR_PlaneDist, // (float) + TR_PlaneNormal, // (vector) surface normal at impact + TR_Hit, // (entity) entity the surface is on + TR_Hitgroup // (int) 0 == generic, non zero is specific body part +}; + diff --git a/bin/compiler/include/engine_stocks.inc b/bin/compiler/include/engine_stocks.inc new file mode 100644 index 0000000..baa386f --- /dev/null +++ b/bin/compiler/include/engine_stocks.inc @@ -0,0 +1,248 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// Special thanks to AssKicR, Freecode, and T(+)rget. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Engine Stocks +// + +#if defined _engine_stocks_included + #endinput +#endif +#define _engine_stocks_included + +#if !defined _amxmodx_included + #include +#endif + +#if !defined _engine_included + #include +#endif + +stock fakedamage(idvictim,const szClassname[],Float:takedmgdamage,damagetype) +{ + new entity = create_entity("trigger_hurt"); + if (entity) + { + DispatchKeyValue(entity,"classname","trigger_hurt"); + new szDamage[16]; + // Takedamages only do half damage per attack (damage is damage per second, and it's triggered in 0.5 second intervals). + // Compensate for that. + format(szDamage,15,"%f",takedmgdamage * 2); + DispatchKeyValue(entity,"dmg",szDamage); + format(szDamage,15,"%i",damagetype); + DispatchKeyValue(entity,"damagetype",szDamage); + DispatchKeyValue(entity,"origin","8192 8192 8192"); + DispatchSpawn(entity); + entity_set_string(entity, EV_SZ_classname, szClassname); + fake_touch(entity,idvictim); + remove_entity(entity); + return 1; + } + return 0; +} + +//wrapper for find_ent_by_class +stock find_ent(iStart, const szClassname[]) +{ + return find_ent_by_class(iStart, szClassname); +} + +/* Get the Button(s) user is pressing */ +stock get_user_button(id) +{ + return entity_get_int(id, EV_INT_button); +} + +stock get_user_oldbutton(id) +{ + return entity_get_int(id, EV_INT_oldbuttons); +} + +/* Get flags an entity is flagged with */ +stock get_entity_flags(ent) +{ + return entity_get_int(ent, EV_INT_flags); +} + +/* Get the distance between two entities */ +stock get_entity_distance(ent1, ent2) +{ + return floatround(entity_range(ent1, ent2)); +} + +/* Get grenade thrown by this user */ +stock get_grenade(id) +{ + new iGrenade = find_ent_by_class(-1, "grenade"); + while(iGrenade > 0) + { + if(entity_get_edict(iGrenade, EV_ENT_owner) == id) + return iGrenade; + + iGrenade = find_ent_by_class(iGrenade, "grenade"); + } + + return 0; +} + +/* Get origin of a brush entity */ +stock get_brush_entity_origin(ent, Float:orig[3]) +{ + new Float:Min[3], Float:Max[3]; + + entity_get_vector(ent, EV_VEC_origin, orig); + entity_get_vector(ent, EV_VEC_mins, Min); + entity_get_vector(ent, EV_VEC_maxs, Max); + + orig[0] += (Min[0] + Max[0]) * 0.5; + orig[1] += (Min[1] + Max[1]) * 0.5; + orig[2] += (Min[2] + Max[2]) * 0.5; + + return 1; +} + +/* Remove entity by name */ +stock remove_entity_name(const eName[]) +{ + new iEntity = find_ent_by_class(-1, eName); + while (iEntity > 0) + { + remove_entity(iEntity); + iEntity = find_ent_by_class(-1, eName); + } + + return 1; +} + +/* Get the contents of the point a user is aiming at */ +stock ViewContents(id) +{ + new origin[3], Float:Orig[3]; + get_user_origin(id, origin, Origin_AimEndEyes); + Orig[0] = float(origin[0]); + Orig[1] = float(origin[1]); + Orig[2] = float(origin[2]); + + return point_contents(Orig); +} + +stock get_speed(ent) +{ + new Float:Vel[3]; + entity_get_vector(ent, EV_VEC_velocity, Vel); + + return floatround(vector_length(Vel)); +} + +/* Set rendering of an entity */ +stock set_rendering(index, fx=kRenderFxNone, r=255, g=255, b=255, render=kRenderNormal, amount=16) +{ + entity_set_int(index,EV_INT_renderfx,fx); + new Float:RenderColor[3]; + RenderColor[0] = float(r); + RenderColor[1] = float(g); + RenderColor[2] = float(b); + entity_set_vector(index,EV_VEC_rendercolor,RenderColor); + entity_set_int(index,EV_INT_rendermode,render); + entity_set_float(index,EV_FL_renderamt,float(amount)); + + return 1; +} + +/* Set flags on an entity */ +stock set_entity_flags(ent,flag,onoff) +{ + new iFlags = entity_get_int(ent, EV_INT_flags); + if(iFlags & flag) + { + if(onoff == 1) return 2; + iFlags &= ~flag; + } + else + { + if(onoff == 0) return 2; + iFlags |= flag; + } + entity_set_int(ent, EV_INT_flags, iFlags); + return 1; +} + +/* If visible = 1, entity will be set to be visible, else invisible. */ +stock set_entity_visibility(entity, visible = 1) +{ + entity_set_int(entity, EV_INT_effects, visible == 1 ? entity_get_int(entity, EV_INT_effects) & ~EF_NODRAW : entity_get_int(entity, EV_INT_effects) | EF_NODRAW); + + return 1; +} + +/* Returns 1 if entity is visible. */ +stock get_entity_visibility(entity) +{ + return !(entity_get_int(entity, EV_INT_effects) & EF_NODRAW); +} + +stock set_user_velocity(entity, const Float:vec[3]) +{ + return entity_set_vector(entity, EV_VEC_velocity, vec); +} + +stock get_user_velocity(entity, Float:vec[3]) +{ + return entity_get_vector(entity, EV_VEC_velocity, vec); +} + +/* Backwards compatible */ +/* Hurts/Kills players in a sphere, like an explosion, Multiplier determines damage. */ +stock RadiusDamage(const Float:fExplodeAt[3], iDamageMultiplier, iRadiusMultiplier) +{ + return radius_damage(fExplodeAt, iDamageMultiplier, iRadiusMultiplier); +} +/* Gives you a velocity in the direction a player is looking, iVelocity is the multiplier. */ +stock VelocityByAim(iIndex,iVelocity, Float:vRetValue[3]) +{ + return velocity_by_aim(iIndex,iVelocity,vRetValue); +} +/* Will return the contents of a point (inside map? in sky? outside map? etc.). */ +stock PointContents(const Float:fCheckAt[3]) +{ + return point_contents(fCheckAt); +} + +stock set_size(index, const Float:mins[3], const Float:maxs[3]) +{ + return entity_set_size(index,mins,maxs); +} + +//by Twilight Suzuka, request addition at29428 +//"Lifted from HLSDK" +stock IsInWorld( ent ) +{ + new Float:origin[3]; + entity_get_vector(ent,EV_VEC_origin,origin); + + if (origin[0] >= 4096.0) return 0; + if (origin[1] >= 4096.0) return 0; + if (origin[2] >= 4096.0) return 0; + if (origin[0] <= -4096.0) return 0; + if (origin[1] <= -4096.0) return 0; + if (origin[2] <= -4096.0) return 0; + + new Float:velocity[3]; + entity_get_vector(ent,EV_VEC_velocity,velocity); + + if (velocity[0] >= 2000) return 0; + if (velocity[1] >= 2000) return 0; + if (velocity[2] >= 2000) return 0; + if (velocity[0] <= -2000) return 0; + if (velocity[1] <= -2000) return 0; + if (velocity[2] <= -2000) return 0; + + return 1; +} diff --git a/bin/compiler/include/esf.inc b/bin/compiler/include/esf.inc new file mode 100644 index 0000000..cd67903 --- /dev/null +++ b/bin/compiler/include/esf.inc @@ -0,0 +1,70 @@ +/*********************************************** + +[ Corona-Bytes.NET ] EvolutionX Core Plugin + + (c) Corona - Bytes .NET coders :: coders@corona-bytes.net + + > 2005 Corona Bytes :: http://www.corona-bytes.net + +***********************************************/ + +#if defined __EVOLUTION_CORE__ + #endinput +#endif +#define __EVOLUTION_CORE__ + +#pragma library EvolutionXCore + +native setClientPL ( Client, PowerLevel ); +native getClientPL ( Client ); +native setClientACPL ( Client, ActualPowerLevel ); +native getClientACPL ( Client ); +native setClientADPL ( Client, AfterDeathPowerLevel ); +native getClientADPL ( Client ); +native setClientSPL ( Client, PowerLevel ); +native setClientPLtoADPL ( Client ); + +native setClientKI ( Client, Ki ); +native getClientKI ( Client ); + +native setClientHP ( Client, Health ); +native getClientHP ( Client ); +native setClientMHP ( Client, MaximumHealth ); +native getClientMHP ( Client ); + +native setClientSPEED ( Client, Speed ); +native getClientSPEED ( Client ); +native setClientSWOOPSPEED ( Client, SwoopSpeed ); +native getClientSWOOPSPEED ( Client ); + +native setClientPROTECT ( Client, bool:Enable = true ); +native getClientPROTECT ( Client ); + +native setClientFROZEN ( Client, bool:Enable = true ); +native getClientFROZEN ( Client ); + +native setClientGOD ( Client, bool:Enable = true ); +native getClientGOD ( Client ); + +native getClientFLY ( Client ); + +native setClientHiddenTURBO ( Client, bool:Enable = true ); +native getClientTURBO ( Client ); + +native getClientBLOCK ( Client ); + +native setClientHiddenPOWERUP ( Client, bool:Enable = true ); +native getClientPOWERUP ( Client ); + +native getClientSWOOPING ( Client ); +native getClientATKSHOOT ( Client ); +native getClientATKCHARGE ( Client ); +native getClientMELEE ( Client ); +native getClientTHROWAWAY ( Client ); +native getClientTHROW ( Client ); +native getClientWALLGND ( Client ); +native getClientINFREEFALL ( Client ); +native getClientBEAMJUMP ( Client ); + +// kills a player without score/death msg +native silentClientKILL ( Client ); \ No newline at end of file diff --git a/bin/compiler/include/esf_const.inc b/bin/compiler/include/esf_const.inc new file mode 100644 index 0000000..0b2615b --- /dev/null +++ b/bin/compiler/include/esf_const.inc @@ -0,0 +1,74 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// Based on stocks and information provided by LynX. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +#if defined _esfconst_included + #endinput +#endif +#define _esfconst_included + +enum +{ + Character_Buu = 1, + Character_Goku = 2, + Character_Gohan = 3, //my favorite :) + Character_Krillin = 4, + Character_Frieza = 5, + Character_Piccolo = 6, + Character_Trunks = 7, + Character_Vegeta = 8, + Character_Cell = 9, +}; + +enum +{ + Explosion_Blue = 0, + Explosion_Green, + Explosion_Orange, + Explosion_Purple, + Explosion_Yellow, + Explosion_Red, + Explosion_White, + Explosions_Total, +}; + +enum +{ + Attack_Kamehameha=1, + Attack_SpiritBomb, + Attack_GalletGun, + Attack_FinalFlash, + Attack_Renzoku, + Attack_Kametorpedo, + Attack_GenericBeam, + Attack_Throw, +}; + +enum +{ + Direction_Left=1, + Direction_Right, + Direction_Up, + Direction_Down, + Direction_Forward, + Direction_Backward, +}; + +enum +{ + Recovery_Kicked=1, + Recovery_Tumbled, + Recovery_Lying, + Recovery_Thrown, +}; + +#define ESF_CHARGING 1 +#define ESF_CONTROLLING 2 +#define ESF_SHOOTING 3 +#define ESF_SHOT 4 diff --git a/bin/compiler/include/fakemeta.inc b/bin/compiler/include/fakemeta.inc new file mode 100644 index 0000000..35171a8 --- /dev/null +++ b/bin/compiler/include/fakemeta.inc @@ -0,0 +1,1127 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Fakemeta Functions +// + +#if defined _fakemeta_included + #endinput +#endif +#define _fakemeta_included + +#include + +#pragma reqlib fakemeta +#if !defined AMXMODX_NOAUTOLOAD + #pragma loadlib fakemeta +#endif + +/** + * Returns entvar data from an entity. Use the pev_* enum (in fakemeta_const.inc) to specify which data you want retrieved. + * + * @note This function uses "read_data" style data syntax. It returns integer values, + * by-references float data, and sets a buffer for string data. + * + * @note If retrieving strings, you may optionally get a pointer into the global string table. Depending on + * your situation, there are two ways to do this. + * 1: This simply gets the pointer. + * new ptr = pev(entid, pev_classname) + * 2: The pointer will be stored in ptr AND the actual string is retrieved. + * new ptr, classname[32] + * pev(entid, pev_classname, ptr, classname, 31) + * + * @param _index The entity index to lookup. + * @param _value The pev field to lookup (look in fakemeta_const.inc) + */ +native pev(_index,_value,any:...); + +/** + * Sets entvar data for an entity. Use the pev_* enum from fakemeta_const.inc for reference. + * + * @note Setting string data will automatically allocate a new string (via AllocString) + * If you have a string already allocated with your own call to AllocString, use + * set_pev_string_ptr instead. + * + * @param _index The entity index to set the value on. + * @param _value The pev field to set, (look in fakemeta_const.inc) + */ +native set_pev(_index,_value,any:...); + +/** + * Use this native to set a pev field to a string that is already allocated (via a function such + * as EngFunc_AllocString). + * + * @note If you specify _value as anything other than string fields, an error will be thrown. + * @note Pass 0 as the _string field to set it to an empty string. + * + * @param _index The entity index to set the value on. + * @param _value The pev field to set - MUST be a string field. + * @param _string The string handle, retrieved from places like AllocString. + */ +native set_pev_string(_index, _value, _string); + + +/** + * Checks the validity of an entity. + * + * @param entindex The entity id to check. + * + * @return 0 on invalid entity + * 1 on entity is valid + * 2 on entity is valid and it has private data (safe to use pdata natives on). + */ +native pev_valid(entindex); + +/** + * Returns the serial number for each entity. The serial number is a unique identity + * generated when an entity is created. + * + * @param entindex The entity id. + * + * @return The serial number for the entity. + */ +native pev_serial(entindex); + +/* Returns any global variable inside globalvars_t structure. Use the glb_* enum. + * + * When returning data from glb_pStringBase (the global string table), you may give a pointer into that table + * in order to get different strings. + * Example: + * new model[128] + * new ptr = pev(id, pev_viewmodel) + * global_get(glb_pStringBase, ptr, model, 127) + */ +native global_get(_value, any:...); + +/** + * Returns a integer from an entity's private data. + * + * _linuxdiff value is what to add to the _Offset for linux servers. + * _macdiff value is what to add to the _Offset for os x servers. + * + * A log error is thrown on invalid _index and _Offset. + * + * @param _index Entity index. + * @param _Offset Offset to search. + * @param _linuxdiff Linux difference. + * @param _macdiff Mac OS X difference. + * @return An integer value is returned. + */ +native get_pdata_int(_index, _Offset, _linuxdiff = 5, _macdiff = 5); + +/** + * Sets an integer to an entity's private data. + * + * _linuxdiff value is what to add to the _Offset for linux servers. + * _macdiff value is what to add to the _Offset for os x servers. + * + * A log error is thrown on invalid _index and _Offset. + * + * @param _index Entity index. + * @param _Offset Offset to search. + * @param _Value Value to set. + * @param _linuxdiff Linux difference. + * @param _macdiff Mac OS X difference. + * @return 1 on success. + */ +native set_pdata_int(_index, _Offset, _Value, _linuxdiff = 5, _macdiff = 5); + +/** + * Returns a float from an entity's private data. + * + * _linuxdiff value is what to add to the _Offset for linux servers. + * _macdiff value is what to add to the _Offset for os x servers. + * + * A log error is thrown on invalid _index and _Offset. + * + * @param _index Entity index. + * @param _Offset Offset to search. + * @param _linuxdiff Linux difference. + * @param _macdiff Mac OS X difference. + * @return An float value is returned. + */ +native Float:get_pdata_float(_index, _Offset, _linuxdiff = 5, _macdiff = 5); + +/** + * Sets a float to an entity's private data. + * + * _linuxdiff value is what to add to the _Offset for linux servers. + * _macdiff value is what to add to the _Offset for os x servers. + * + * A log error is thrown on invalid _index and _Offset. + * + * @param _index Entity index. + * @param _Offset Offset to search. + * @param _Value Value to set. + * @param _linuxdiff Linux difference. + * @param _macdiff Mac OS X difference. + * @return 1 on success. + */ +native set_pdata_float(_index, _Offset, Float:_Value, _linuxdiff = 5, _macdiff = 5); + +/** + * Tries to retrieve an edict pointer from an entity's private data. + * + * This function is byte-addressable. Unlike get_pdata_int() which searches in byte increments of 4, + * get_pdata_ent searches in increments of 1. + * + * _linuxdiff value is what to add to the _offset for linux servers. + * _macdiff value is what to add to the _offset for os x servers. + * + * A log error is thrown on invalid _index and _Offset. + * + * @param _index Entity index. + * @param _offset Offset to search. + * @param _linuxdiff Linux difference. + * @param _macdiff Mac OS X difference. + * @return -2 if an invalid entity was found. + * -1 if an empty entity was found. + * Otherwise, an entity index is returned. + */ +native get_pdata_ent(_index, _offset, _linuxdiff = 20, _macdiff = 20); + +/** + * Sets an edict pointer to an entity's private data. + * + * This function is byte-addressable. Unlike set_pdata_int() which searches in byte increments of 4, + * set_pdata_ent searches in increments of 1. + * + * _linuxdiff value is what to add to the _offset for linux servers. + * _macdiff value is what to add to the _offset for os x servers. + * + * A log error is thrown on invalid _index and _offset. + * + * @param _index Entity index. + * @param _offset Offset to search. + * @param _value Value to set. + * @param _linuxdiff Linux difference. + * @param _macdiff Mac OS X difference. + * @return 1 on success. + */ +native set_pdata_ent(_index, _offset, _value, _linuxdiff = 20, _macdiff = 20); + +/** + * Returns a boolean from an entity's private data. + * + * This function is byte-addressable. Unlike get_pdata_int() which searches in byte increments of 4, + * get_pdata_bool searches in increments of 1. + * + * _linuxdiff value is what to add to the _offset for linux servers. + * _macdiff value is what to add to the _offset for os x servers. + * + * A log error is thrown on invalid _index and _offset. + * + * @param _index Entity index. + * @param _offset Offset to search. + * @param _linuxdiff Linux difference. + * @param _macdiff Mac OS X difference. + * @return An boolean value is returned. + */ +native bool:get_pdata_bool(_index, _offset, _linuxdiff = 20, _macdiff = 20); + +/** + * Sets a boolean to an entity's private data. + * + * This function is byte-addressable. Unlike set_pdata_int() which searches in byte increments of 4, + * set_pdata_bool searches in increments of 1. + * + * _linuxdiff value is what to add to the _offset for linux servers. + * _macdiff value is what to add to the _offset for os x servers. + * + * A log error is thrown on invalid _index and _offset. + * + * @param _index Entity index. + * @param _offset Offset to search. + * @param _value Value to set. + * @param _linuxdiff Linux difference. + * @param _macdiff Mac OS X difference. + * @return 1 on success. + */ +native set_pdata_bool(_index, _offset, bool:_value, _linuxdiff = 20, _macdiff = 20); + +/** + * Returns a byte value from an entity's private data. + * + * This function is byte-addressable. Unlike get_pdata_int() which searches in byte increments of 4, + * get_pdata_byte searches in increments of 1. + * + * _linuxdiff value is what to add to the _offset for linux servers. + * _macdiff value is what to add to the _offset for os x servers. + * + * A log error is thrown on invalid _index and _offset. + * + * @param _index Entity index. + * @param _offset Offset to search. + * @param _linuxdiff Linux difference. + * @param _macdiff Mac OS X difference. + * @return A byte value is returned. + */ +native get_pdata_byte(_index, _offset, _linuxdiff = 20, _macdiff = 20); + +/** + * Sets a byte value to an entity's private data. + * + * This function is byte-addressable. Unlike set_pdata_int() which searches in byte increments of 4, + * set_pdata_byte searches in increments of 1. + * + * _linuxdiff value is what to add to the _offset for linux servers. + * _macdiff value is what to add to the _offset for os x servers. + * + * A log error is thrown on invalid _index and _offset. + * + * @param _index Entity index. + * @param _offset Offset to search. + * @param _value Value to set. + * @param _linuxdiff Linux difference. + * @param _macdiff Mac OS X difference. + * @return 1 on success. + */ +native set_pdata_byte(_index, _offset, _value, _linuxdiff = 20, _macdiff = 20); + +/** + * Returns a short value from an entity's private data. + * + * This function is byte-addressable. Unlike get_pdata_int() which searches in byte increments of 4, + * get_pdata_short searches in increments of 1. + * + * _linuxdiff value is what to add to the _offset for linux servers. + * _macdiff value is what to add to the _offset for os x servers. + * + * A log error is thrown on invalid _index and _offset. + * + * @param _index Entity index. + * @param _offset Offset to search. + * @param _linuxdiff Linux difference. + * @param _macdiff Mac OS X difference. + * @return A short value is returned. + */ +native get_pdata_short(_index, _offset, _linuxdiff = 20, _macdiff = 20); + +/** + * Sets a short value to an entity's private data. + * + * This function is byte-addressable. Unlike set_pdata_int() which searches in byte increments of 4, + * set_pdata_short searches in increments of 1. + * + * _linuxdiff value is what to add to the _offset for linux servers. + * _macdiff value is what to add to the _offset for os x servers. + * + * A log error is thrown on invalid _index and _offset. + * + * @param _index Entity index. + * @param _offset Offset to search. + * @param _value Value to set. + * @param _linuxdiff Linux difference. + * @param _macdiff Mac OS X difference. + * @return 1 on success. + */ +native set_pdata_short(_index, _offset, _value, _linuxdiff = 20, _macdiff = 20); + +/** + * Returns a vector from an entity's private data. + * + * This function is byte-addressable. Unlike get_pdata_int() which searches in byte increments of 4, + * get_pdata_vector searches in increments of 1. + * + * _linuxdiff value is what to add to the _offset for linux servers. + * _macdiff value is what to add to the _offset for os x servers. + * + * A log error is thrown on invalid _index and _offset. + * + * @param _index Entity index. + * @param _offset Offset to search. + * @param _output Vector returned by reference. + * @param _linuxdiff Linux difference. + * @param _macdiff Mac OS X difference. + * @return 1 on success. + */ +native get_pdata_vector(_index, _offset, Float:_output[3], _linuxdiff = 20, _macdiff = 20); + +/** + * Sets a vector to an entity's private data. + * + * This function is byte-addressable. Unlike set_pdata_int() which searches in byte increments of 4, + * set_pdata_vector searches in increments of 1. + * + * _linuxdiff value is what to add to the _offset for linux servers. + * _macdiff value is what to add to the _offset for os x servers. + * + * A log error is thrown on invalid _index and _Offset. + * + * @param _index Entity index. + * @param _offset Offset to search. + * @param _origin Value to set. + * @param _linuxdiff Linux difference. + * @param _macdiff Mac OS X difference. + * @return 1 on success. + */ +native set_pdata_vector(_index, _offset, Float:_origin[3], _linuxdiff = 20, _macdiff = 20); + +/** + * Tries to retrieve an edict (entity encapsulation) pointer from an entity's private data. + * + * This function is byte-addressable. Unlike get_pdata_int() which searches in byte increments of 4, + * get_pdata_ehandle searches in increments of 1. + * + * _linuxdiff value is what to add to the _offset for linux servers. + * _macdiff value is what to add to the _offset for os x servers. + * + * A log error is thrown on invalid _index and _offset. + * + * @param _index Entity index. + * @param _offset Offset to search. + * @param _linuxdiff Linux difference. + * @param _macdiff Mac OS X difference. + * @return -2 if an invalid entity was found. + * -1 if an empty entity was found. + * 0 if serialnumber is not matching. + * Otherwise, an entity index is returned. + */ +native get_pdata_ehandle(_index, _offset, _linuxdiff = 20, _macdiff = 20); + +/** + * Sets an edict (entity encapsulation) pointer to an entity's private data. + * + * This function is byte-addressable. Unlike set_pdata_int() which searches in byte increments of 4, + * set_pdata_ehandle searches in increments of 1. + * + * _linuxdiff value is what to add to the _offset for linux servers. + * _macdiff value is what to add to the _offset for os x servers. + * + * A log error is thrown on invalid _index and _Offset. + * + * @param _index Entity index. + * @param _offset Offset to search. + * @param _value Value to set. + * @param _linuxdiff Linux difference. + * @param _macdiff Mac OS X difference. + * @return 1 on success. + */ +native set_pdata_ehandle(_index, _offset, _value, _linuxdiff = 20, _macdiff = 20); + +/* Registers a forward. + * Returns an id you can pass to unregister_forward + */ +native register_forward(_forwardType,const _function[],_post=0); + +/* Unregisters a forward. + * The registerId must be from register_forward, and + * post/forwardtype must match what you registered the forward as. + */ +native unregister_forward(_forwardType, registerId, post=0); + +/* Returns data for metamod */ +native forward_return(type,any:...); + +/* Returns the original return value of an engine function. + * This is only valid in forwards that were registered as post. + * + * get_orig_retval() - no params, retrieves integer return value + * get_orig_retval(&Float:value) - retrieves float return value by reference + * get_orig_retval(value[], len) - retrives string return value + */ +native get_orig_retval(any:...); + +native engfunc(type,any:...); +native dllfunc(type,any:...); + +//only use this with functions that pass a Trace +// get: zero extra params - return int, one extra param = byref float or vector +// set: use anything +native get_tr(TraceResult:tr_member, any:...); +native set_tr(TraceResult:tr_member, any:...); + +//Upgraded version takes in a TraceResult handle, optionally passed in as the last parameter to the +//TraceResult forward. Use 0 to specify the global traceresult handle set from calling +// some of the Engfucs. +native get_tr2(tr_handle, any:tr_member, any:...); +native set_tr2(tr_handle, any:tr_member, any:...); + +/** + * Creates a traceresult handle. This value should never be altered. + * The handle can be used in get/set_tr2 and various traceresult engine functions. + * + * NOTE: You must call free_tr2() on every handle made with create_tr2(). + * + * @return A new TraceResult handle. + */ +native create_tr2(); + +/** + * Frees a traceresult handle created with free_tr2(). Do not call + * this more than once per handle, or on handles not created through + * create_tr2(). + * + * @param tr_handle TraceResult handle created via create_tr2(). + * @noreturn + */ +native free_tr2(tr_handle); + +//Same as above, use either a kvd_handle or 0 for global reserved kvd data +//kvd_handle is passed by the kvd hook, last param +native get_kvd(kvd_handle, KeyValueData:member, any:...); + +//Using set_kvd with the handle from the hook for anything under KV_fHandled +// is considered an undefined operation (it could crash). You should fire a new +// keyvalues structure rather than changing the internal engine strings. +native set_kvd(kvd_handle, KeyValueData:member, any:...); + +/** + * Creates a KeyValueData handle. + * + * @note Handles should be freed using free_kvd(). + * + * @return New KeyValueData handle + */ +native create_kvd(); + +/** + * Frees a KeyValueData handle. + * + * @param kvd_handle KeyValueData handle + * + * @noreturn + */ +native free_kvd(kvd_handle); + +// These functions are used with the clientdata data structure (FM_UpdateClientData) +// Get: 0 extra params - Return integer; 1 extra param - by ref float or vector; 2 extra params - string and length +// Set: Use anything +// Use 0 for cd_handle to specify the global clientdata handle +native get_cd(cd_handle, ClientData:member, any:...); +native set_cd(cd_handle, ClientData:member, any:...); + +// These functions are used with the entity_state data structure (FM_AddToFullPack) +// Get: 0 extra params - Return integer; 1 extra param - by ref float or vector or array +// Set: Use anything +// Use 0 for es_handle to specify the global entity_state handle +native get_es(es_handle, EntityState:member, any:...); +native set_es(es_handle, EntityState:member, any:...); + +// These functions are used with the usercmd data structure (FM_CmdStart) +// Get: 0 extra params - Return integer; 1 extra param - by ref float or vector +// Set: Use anything +// Use 0 for uc_handle to specify the global usercmd handle +native get_uc(uc_handle, UserCmd:member, any:...); +native set_uc(uc_handle, UserCmd:member, any:...); + +//NOTE that for the string offsets below, on AMD64, a byref (char **) offset is NOT the same as an int offset +//In fact it's QWORD aligned rather than DWORD aligned, so the offset will be exactly half. +//Gets a string from a private offset. If byref is false, the string is treated as static rather than dynamic. +//linux value is what to add to the offset for linux servers. +//mac value is what to add to the offset for os x servers. Default (cellmin) means that linux value will be used. +//this cannot use a default value due to older version using an awkward default value. +native get_pdata_string(entity, offset, dest[], maxlength, byref=1, linux, mac=cellmin); + +//Sets a string in a private offset. +//realloc = -1 - nonbyref copy (static +//realloc = 0 - copy byref, no realloc *(char **) +//realloc = 1 - reallocate new string with free+malloc +//realloc = 2 - reallocate new string with delete[]+new[] +//linux value is what to add to the offset for linux servers. +//mac value iswhat to add to the offset for os x servers. +//this cannot use a default value due to older version using an awkward default value. +native set_pdata_string(entity, offset, const source[], realloc=2, linux, mac=cellmin); + +// Copies the given infoBuffer pointer into out[] +// An infoBuffer pointer is returned by EngFunc_GetInfoKeyBuffer +native copy_infokey_buffer(infoBuffer, out[], maxlen); + + +/** + * Looks up the sequence for the entity. + * + * @param entity The entity id to lookup. + * @param name The sequence name to lookup, case insensitive. ("JUMP" would match "jump") + * @param framerate The framerate of the sequence, if found. + * @param loops Whether or not the sequence loops. + * @param groundspeed The groundspeed setting of the sequence. + * @return -1 on failed lookup, the sequence number on successful lookup. + */ +native lookup_sequence(entity, const name[], &Float:framerate = 0.0, &bool:loops = false, &Float:groundspeed = 0.0); + +/** + * Sets a bone controller with the specified value. + * + * @param entity The entity id to set the value on. + * @param controller Which controller to set (0 through 3). + * @param value The value to set it to. + * @return The percentage that the controller is extended (0.0 through 1.0) + */ +native Float:set_controller(entity, controller, Float:value); + +/** + * Retrieves an integer value from an entity's private data based off a class + * and member name. + * + * @note Unlike the [get|set]_pdata_* natives that require compiling the class + * member offset into the plugin, this native instead retrieves the + * necessary offset from the AMXX gamedata files at runtime, based on the + * provided class and member name. + * @note This native is safer than [get|set]_pdata_* as it can perform stricter + * offset and typing checks. + * @note This native is used to access the following (C++/engine) data types: + * integer, boolean, short, character, pointer, structure, class, + * stringint and function. Unsigned variants (if applicable) are supported + * and will be converted automatically. + * + * @param entity Entity index + * @param class Class name + * @param member Member name + * @param element Element to retrieve (starting from 0) if member is an array + * + * @return Integer value + * @error If an invalid entity is provided, either class or member is + * empty, no offset is found or an invalid offset is retrieved, + * or the data type does not match, an error will be thrown. + */ +native any:get_ent_data(entity, const class[], const member[], element = 0); + +/** + * Sets an integer value to an entity's private data based off a class + * and member name. + * + * @note Unlike the [get|set]_pdata_* natives that require compiling the class + * member offset into the plugin, this native instead retrieves the + * necessary offset from the AMXX gamedata files at runtime, based on the + * provided class and member name. + * @note This native is safer than [get|set]_pdata_* as it can perform stricter + * offset and typing checks. + * @note This native is used to access the following (C++/engine) data types: + * integer, boolean, short, character, pointer, stringint and function. + * Unsigned variants (if applicable) are supported and will be converted + * automatically. + * + * @param entity Entity index + * @param class Class name + * @param member Member name + * @param value Value to set + * @param element Element to set (starting from 0) if member is an array + * + * @noreturn + * @error If an invalid entity is provided, either class or member is + * empty, no offset is found or an invalid offset is retrieved, + * or the data type does not match, an error will be thrown. + */ +native set_ent_data(entity, const class[], const member[], any:value, element = 0); + +/** + * Retrieves a float value from an entity's private data based off a class + * and member name. + * + * @note Unlike the [get|set]_pdata_* natives that require compiling the class + * member offset into the plugin, this native instead retrieves the + * necessary offset from the AMXX gamedata files at runtime, based on the + * provided class and member name. + * @note This native is safer than [get|set]_pdata_* as it can perform stricter + * offset and typing checks. + * + * @param entity Entity index + * @param class Class name + * @param member Member name + * @param element Element to retrieve (starting from 0) if member is an array + * + * @return Float value + * @error If an invalid entity is provided, either class or member is + * empty, no offset is found or an invalid offset is retrieved, + * or the data type does not match, an error will be thrown. + */ +native Float:get_ent_data_float(entity, const class[], const member[], element = 0); + +/** + * Sets a float value to an entity's private data based off a class + * and member name. + * + * @note Unlike the [get|set]_pdata_* natives that require compiling the class + * member offset into the plugin, this native instead retrieves the + * necessary offset from the AMXX gamedata files at runtime, based on the + * provided class and member name. + * @note This native is safer than [get|set]_pdata_* as it can perform stricter + * offset and typing checks. + * + * @param entity Entity index + * @param class Class name + * @param member Member name + * @param value Value to set + * @param element Element to set (starting from 0) if member is an array + * + * @noreturn + * @error If an invalid entity is provided, either class or member is + * empty, no offset is found or an invalid offset is retrieved, + * or the data type does not match, an error will be thrown. + */ +native set_ent_data_float(entity, const class[], const member[], Float:value, element = 0); + +/** + * Retrieves a vector from an entity's private data based off a class and member name. + * + * @note Unlike the [get|set]_pdata_* natives that require compiling the class + * member offset into the plugin, this native instead retrieves the + * necessary offset from the AMXX gamedata files at runtime, based on the + * provided class and member name. + * @note This native is safer than [get|set]_pdata_* as it can perform stricter + * offset and typing checks. + * + * @param entity Entity index + * @param class Class name + * @param member Member name + * @param value Vector buffer to store data in + * @param element Element to retrieve (starting from 0) if member is an array + * + * @noreturn + * @error If an invalid entity is provided, either class or member is + * empty, no offset is found or an invalid offset is retrieved, + * or the data type does not match, an error will be thrown. + */ +native get_ent_data_vector(entity, const class[], const member[], Float:value[3], element = 0); + +/** + * Sets a vector to an entity's private data based off a class and member name. + * + * @note Unlike the [get|set]_pdata_* natives that require compiling the class + * member offset into the plugin, this native instead retrieves the + * necessary offset from the AMXX gamedata files at runtime, based on the + * provided class and member name. + * @note This native is safer than [get|set]_pdata_* as it can perform stricter + * offset and typing checks. + * + * @param entity Entity index + * @param class Class name + * @param member Member name + * @param value Vector to set + * @param element Element to set (starting from 0) if member is an array + * + * @noreturn + * @error If an invalid entity is provided, either class or member is + * empty, no offset is found or an invalid offset is retrieved, + * or the data type does not match, an error will be thrown. + */ +native set_ent_data_vector(entity, const class[], const member[], Float:value[3], element = 0); + +/** + * Retrieves an entity index from an entity's private data based off a class + * and member name. + * + * @note Unlike the [get|set]_pdata_* natives that require compiling the class + * member offset into the plugin, this native instead retrieves the + * necessary offset from the AMXX gamedata files at runtime, based on the + * provided class and member name. + * @note This native is safer than [get|set]_pdata_* as it can perform stricter + * offset and typing checks. + * @note This native is used to access the following (C++/engine) data types: + * classptr, entvars, edict and ehandle. + * + * @param entity Entity index + * @param class Class name + * @param member Member name + * @param element Element to retrieve (starting from 0) if member is an array + * + * @return Entity index if found, -1 otherwise + * @error If an invalid entity is provided, either class or member is + * empty, no offset is found or an invalid offset is retrieved, + * or the data type does not match, an error will be thrown. + */ +native get_ent_data_entity(entity, const class[], const member[], element = 0); + +/** + * Sets an entity index to an entity's private data based off a class + * and member name. + * + * @note Unlike the [get|set]_pdata_* natives that require compiling the class + * member offset into the plugin, this native instead retrieves the + * necessary offset from the AMXX gamedata files at runtime, based on the + * provided class and member name. + * @note This native is safer than [get|set]_pdata_* as it can perform stricter + * offset and typing checks. + * @note This native is used to access the following (C++/engine) data types: + * classptr, entvars, edict and ehandle. + * @note Pass -1 as value to act as C++ NULL. + * + * @param entity Entity index + * @param class Class name + * @param member Member name + * @param value Entity index to set + * @param element Element to set (starting from 0) if member is an array + * + * @noreturn + * @error If an invalid entity or value is provided, either class or member + * is empty, no offset is found or an invalid offset is retrieved, + * or the data type does not match, an error will be thrown. + */ +native set_ent_data_entity(entity, const class[], const member[], value, element = 0); + +/** + * Retrieves a string from an entity's private data based off a class and member name. + * + * @note Unlike the [get|set]_pdata_* natives that require compiling the class + * member offset into the plugin, this native instead retrieves the + * necessary offset from the AMXX gamedata files at runtime, based on the + * provided class and member name. + * @note This native is safer than [get|set]_pdata_* as it can perform stricter + * offset and typing checks. + * @note This native is used to access the following (C++/engine) data types: + * string, stringptr. + * + * @param entity Entity index + * @param class Class name + * @param member Member name + * @param value Buffer to store data in + * @param maxlen Maximum size of the buffer + * @param element Element to retrieve (starting from 0) if member is an array + * + * @return Number of cells written to buffer + * @error If an invalid entity is provided, either class or member is + * empty, no offset is found or an invalid offset is retrieved, + * or the data type does not match, an error will be thrown. + */ +native get_ent_data_string(entity, const class[], const member[], value[], maxlen, element = 0); + +/** + * Sets a string to an entity's private data based off a class and member name. + * + * @note Unlike the [get|set]_pdata_* natives that require compiling the class + * member offset into the plugin, this native instead retrieves the + * necessary offset from the AMXX gamedata files at runtime, based on the + * provided class and member name. + * @note This native is safer than [get|set]_pdata_* as it can perform stricter + * offset and typing checks. + * @note This native is used to access the following (C++/engine) data types: + * string, stringptr. + * + * @param entity Entity index + * @param class Class name + * @param member Member name + * @param value String to set + * @param element Element to set (starting from 0) if member is an array + * + * @return Number of cells written to buffer + * @error If an invalid entity is provided, either class or member is + * empty, no offset is found or an invalid offset is retrieved, + * or the data type does not match, an error will be thrown. + */ +native set_ent_data_string(entity, const class[], const member[], const value[], element = 0); + +/** + * Retrieves the size of array of n entity class member. + * + * @param class Class name + * @param member Member name + * + * @return Size of array (in elements), otherwise 1 if member is not an array + * @error If either class or member is empty, no offset is found or an invalid + * offset is retrieved, an error will be thrown. + */ +native get_ent_data_size(const class[], const member[]); + +/** + * Finds a offset based off an entity class and member name. + * + * @param class Class name + * @param member Member name + * @param type Optional variable to store member type in (FIELD_* constants) + * @param arraysize Optional variable to store array size in, if member is an array + * @param unsigned Optional variable to store whether member is unsigned (short and char types only) + * + * @return Class member offset + * @error If either class or member is empty, no offset is found or an invalid + * offset is retrieved, an error will be thrown. + */ +native find_ent_data_info(const class[], const member[], &FieldType:type = FIELD_NONE, &arraysize = 0, &bool:unsigned = false); + + +/** + * Retrieves an integer value from the gamerules object based off a class + * and member name. + * + * @note This native is used to access the following (C++/engine) data types: + * integer, boolean, short, character, pointer, structure, class, + * stringint and function. Unsigned variants (if applicable) are supported + * and will be converted automatically. + * + * @param class Class name + * @param member Member name + * @param element Element to retrieve (starting from 0) if member is an array + * + * @return Integer value + * @error If member is empty, no offset is found or an invalid offset + * is retrieved, or the data type does not match, an error will + * be thrown. + */ +native any:get_gamerules_int(const class[], const member[], element = 0); + +/** + * Sets an integer value to the gamerules objecta based off a class + * and member name. + * + * @note This native is used to access the following (C++/engine) data types: + * integer, boolean, short, character, pointer, stringint and function. + * Unsigned variants (if applicable) are supported and will be converted + * automatically. + * + * @param class Class name + * @param member Member name + * @param value Value to set + * @param element Element to set (starting from 0) if member is an array + * + * @noreturn + * @error If member is empty, no offset is found or an invalid offset + * is retrieved, or the data type does not match, an error will + * be thrown. + */ +native set_gamerules_int(const class[], const member[], any:value, element = 0); + +/** + * Retrieves a float value from the gamerules object based off a class + * and member name. + * + * @param class Class name + * @param member Member name + * @param element Element to retrieve (starting from 0) if member is an array + * + * @return Float value + * @error If member is empty, no offset is found or an invalid offset + * is retrieved, or the data type does not match, an error will + * be thrown. + */ +native Float:get_gamerules_float(const class[], const member[], element = 0); + +/** + * Sets a float value to the gamerules object based off a class + * and member name. + * + * @param class Class name + * @param member Member name + * @param value Value to set + * @param element Element to set (starting from 0) if member is an array + * + * @noreturn + * @error If member is empty, no offset is found or an invalid offset + * is retrieved, or the data type does not match, an error will + * be thrown. + */ +native set_gamerules_float(const class[], const member[], Float:value, element = 0); + +/** + * Retrieves a vector from the gamerules object based off a class and member name. + * + * @param class Class name + * @param member Member name + * @param value Vector buffer to store data in + * @param element Element to retrieve (starting from 0) if member is an array + * + * @noreturn + * @error If member is empty, no offset is found or an invalid offset + * is retrieved, or the data type does not match, an error will + * be thrown. + */ +native get_gamerules_vector(const class[], const member[], Float:value[3], element = 0); + +/** + * Sets a vector to the gamerules object based off a class and member name. + * + * @param class Class name + * @param member Member name + * @param value Vector to set + * @param element Element to set (starting from 0) if member is an array + * + * @noreturn + * @error If member is empty, no offset is found or an invalid offset + * is retrieved, or the data type does not match, an error will + * be thrown. + */ +native set_gamerules_vector(const class[], const member[], Float:value[3], element = 0); + +/** + * Retrieves an entity index from the gamerules object based off a class + * and member name. + * + * @note This native is used to access the following (C++/engine) data types: + * classptr, entvars, edict and ehandle. + * + * @param class Class name + * @param member Member name + * @param element Element to retrieve (starting from 0) if member is an array + * + * @return Entity index if found, -1 otherwise + * @error If member is empty, no offset is found or an invalid offset + * is retrieved, or the data type does not match, an error will + * be thrown. + */ +native get_gamerules_entity(const class[], const member[], element = 0); + +/** + * Sets an entity index to the gamerules object based off a class + * and member name. + * + * @note This native is used to access the following (C++/engine) data types: + * classptr, entvars, edict and ehandle. + * @note Pass -1 as value to act as C++ NULL. + * + * @param class Class name + * @param member Member name + * @param value Entity index to set + * @param element Element to set (starting from 0) if member is an array + * + * @noreturn + * @error If member is empty, no offset is found or an invalid offset + * is retrieved, or the data type does not match, an error will + * be thrown. + */ +native set_gamerules_entity(const class[], const member[], value, element = 0); + +/** + * Retrieves a string from the gamerules object based off a class and member name. + * + * @note This native is used to access the following (C++/engine) data types: + * string, stringptr. + * + * @param class Class name + * @param member Member name + * @param value Buffer to store data in + * @param maxlen Maximum size of the buffer + * @param element Element to retrieve (starting from 0) if member is an array + * + * @return Number of cells written to buffer + * @error If member is empty, no offset is found or an invalid offset + * is retrieved, or the data type does not match, an error will + * be thrown. + */ +native get_gamerules_string(const class[], const member[], value[], maxlen, element = 0); + +/** + * Sets a string to the gamerules object based off a class and member name. + * + * @note This native is used to access the following (C++/engine) data types: + * string, stringptr. + * + * @param class Class name + * @param member Member name + * @param value String to set + * @param element Element to set (starting from 0) if member is an array + * + * @return Number of cells written to buffer + * @error If member is empty, no offset is found or an invalid offset + * is retrieved, or the data type does not match, an error will + * be thrown. + */ +native set_gamerules_string(const class[], const member[], const value[], element = 0); + +/** + * Retrieves the size of array of a gamerules class member. + * + * @param class Class name + * @param member Member name + * + * @return Size of array (in elements), otherwise 1 if member is not an array + * @error If either class or member is empty, no offset is found or an invalid + * offset is retrieved, an error will be thrown. + */ +native get_gamerules_size(const class[], const member[]); + +/** + * Finds a gamerules offset based off a class and member name. + * + * @param class Class name + * @param member Member name + * @param type Optional variable to store member type in (FIELD_* constants) + * @param arraysize Optional variable to store array size in, if member is an array + * @param unsigned Optional variable to store whether member is unsigned (short and char types only) + * + * @return Class member offset + * @error If either class or member is empty, no offset is found or an invalid + * offset is retrieved, an error will be thrown. + */ +native find_gamerules_info(const class[], const member[], &FieldType:type = FIELD_NONE, &arraysize = 0, &bool:unsigned = false); + +/** + * Returns the data field base type based off a specific field type. + * + * @note From an AMXX plugin perspective, the (C++/engine) data types can be grouped + * in five base types: integer, float, vector, entity and string. This stock is + * essentially for convenience and debug purpose. + * + * @param type Class member type (FIELD_* constants) + * @param type_name Optional buffer to store base type name in + * @param maxlen Maximum size of the buffer + * + * @return Base field type (BASEFIELD_* constants) + */ +stock BaseFieldType:get_field_basetype(FieldType:type, type_name[] = "", maxlen = 0) +{ + static const baseFieldTypeNames[BaseFieldType][] = + { + "none", + "integer", + "float", + "vector", + "entity", + "string", + }; + + new BaseFieldType:baseType = BASEFIELD_NONE; + + switch (type) + { + case FIELD_INTEGER, FIELD_STRINGINT, FIELD_SHORT , FIELD_CHARACTER, + FIELD_CLASS , FIELD_STRUCTURE, FIELD_POINTER, FIELD_FUNCTION, + FIELD_BOOLEAN: + { + baseType = BASEFIELD_INTEGER; + } + case FIELD_FLOAT: + { + baseType = BASEFIELD_FLOAT; + } + case FIELD_VECTOR: + { + baseType = BASEFIELD_VECTOR; + } + case FIELD_CLASSPTR, FIELD_ENTVARS, FIELD_EDICT, FIELD_EHANDLE: + { + baseType = BASEFIELD_ENTITY; + } + case FIELD_STRINGPTR, FIELD_STRING: + { + baseType = BASEFIELD_STRING; + } + } + + if (maxlen > 0) + { + copy(type_name, maxlen, baseFieldTypeNames[baseType]); + } + + return baseType; +} + + +enum +{ + Model_DefaultSize = -2, + Model_CurrentSequence = -1, +}; + +/** + * Gets size of a model bounding box. + * + * @param entity The entity index to use. + * @param mins The local negative bounding box distance. + * @param maxs The local positive bounding box distance. + * @param sequence The animation sequence to retrieve. + * Model_DefaultSize retrieves ideal moevement hull size. + * Model_CurrentSequence retrieves hull size of the current sequence. + * Values >= 0 will specify which sequence to retrieve size from. + * + * @return 1 on success, 0 on faillure. + * + * @error Invalid entity. + * Invalid model pointer. + */ +native GetModelBoundingBox(entity, Float:mins[3], Float:maxs[3], sequence = Model_DefaultSize); diff --git a/bin/compiler/include/fakemeta_const.inc b/bin/compiler/include/fakemeta_const.inc new file mode 100644 index 0000000..eba34b6 --- /dev/null +++ b/bin/compiler/include/fakemeta_const.inc @@ -0,0 +1,793 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Fakemeta Constants +// + +#if defined _fakemeta_const_included + #endinput +#endif +#define _fakemeta_const_included + +// For forward_return +#define FMV_STRING 1 +#define FMV_FLOAT 2 +#define FMV_CELL 3 + +#include + +/* The actual return value of the function, use these instead of PLUGIN_HANDLED etc when + * returning from registered forwards. + */ +#define FMRES_IGNORED 1 // Calls target function, returns normal value +#define FMRES_HANDLED 2 // Tells metamod you did something, still calls target function and returns normal value +#define FMRES_OVERRIDE 3 // Supposed to still call the target function but return your value instead + // however this does not work properly with metamod; use supercede instead. +#define FMRES_SUPERCEDE 4 // Block the target call, and use your return value (if applicable) + +// Use this with GetInfoKeyBuffer if you want the server's localinfo buffer +#define FM_NULLENT -1 + + +/* Used with engfunc() + */ +enum { + EngFunc_PrecacheModel, // int ) (char *s); + EngFunc_PrecacheSound, // int ) (char *s); + EngFunc_SetModel, // void ) (edict_t *e, const char *m); + EngFunc_ModelIndex, // int ) (const char *m); + EngFunc_ModelFrames, // int ) (int modelIndex); + EngFunc_SetSize, // void ) (edict_t *e, const float *rgflMin, const float *rgflMax); + EngFunc_ChangeLevel, // void ) (char* s1, char* s2); + EngFunc_VecToYaw, // float) (const float *rgflVector); + EngFunc_VecToAngles, // void ) (const float *rgflVectorIn, float *rgflVectorOut); + EngFunc_MoveToOrigin, // void ) (edict_t *ent, const float *pflGoal, float dist, int iMoveType); + EngFunc_ChangeYaw, // void ) (edict_t* ent); + EngFunc_ChangePitch, // void ) (edict_t* ent); + EngFunc_FindEntityByString, // edict) (edict_t *pEdictStartSearchAfter, const char *pszField, const char *pszValue); + EngFunc_GetEntityIllum, // int ) (edict_t* pEnt); + EngFunc_FindEntityInSphere, // edict) (edict_t *pEdictStartSearchAfter, const float *org, float rad); + EngFunc_FindClientInPVS, // edict) (edict_t *pEdict); + EngFunc_EntitiesInPVS, // edict) (edict_t *pplayer); + EngFunc_MakeVectors, // void ) (const float *rgflVector); + EngFunc_AngleVectors, // void ) (const float *rgflVector, float *forward, float *right, float *up); + EngFunc_CreateEntity, // edict) (void); + EngFunc_RemoveEntity, // void ) (edict_t *e); + EngFunc_CreateNamedEntity, // edict) (int className); + EngFunc_MakeStatic, // void ) (edict_t *ent); + EngFunc_EntIsOnFloor, // int ) (edict_t *e); + EngFunc_DropToFloor, // int ) (edict_t *e); + EngFunc_WalkMove, // int ) (edict_t *ent, float yaw, float dist, int iMode); + EngFunc_SetOrigin, // void ) (edict_t *e, const float *rgflOrigin); + EngFunc_EmitSound, // void ) (edict_t *entity, int channel, const char *sample, float volume, float attenuation, int fFlags, int pitch); + EngFunc_EmitAmbientSound, // void ) (edict_t *entity, float *pos, const char *samp, float vol, float attenuation, int fFlags, int pitch); + + //With 1.71 you can pass an optional TraceLine ptr for trace natives + // it can be 0, for meaning "global tr handle" (for get/set_tr2), or + // it can be any other TR handle (such as one from a TR hook) + EngFunc_TraceLine, // void ) (const float *v1, const float *v2, int fNoMonsters, edict_t *pentToSkip, TraceResult *ptr); + EngFunc_TraceToss, // void ) (edict_t *pent, edict_t *pentToIgnore, TraceResult *ptr); + EngFunc_TraceMonsterHull, // int ) (edict_t *pEdict, const float *v1, const float *v2, int fNoMonsters, edict_t *pentToSkip, TraceResult *ptr); + EngFunc_TraceHull, // void ) (const float *v1, const float *v2, int fNoMonsters, int hullNumber, edict_t *pentToSkip, TraceResult *ptr); + EngFunc_TraceModel, // void ) (const float *v1, const float *v2, int hullNumber, edict_t *pent, TraceResult *ptr); + EngFunc_TraceTexture, // const char *) (edict_t *pTextureEntity, const float *v1, const float *v2 ); + EngFunc_TraceSphere, // void ) (const float *v1, const float *v2, int fNoMonsters, float radius, edict_t *pentToSkip, TraceResult *ptr); + + EngFunc_GetAimVector, // void ) (edict_t *ent, float speed, float *rgflReturn); + EngFunc_ParticleEffect, // void ) (const float *org, const float *dir, float color, float count); + EngFunc_LightStyle, // void ) (int style, char *val); + EngFunc_DecalIndex, // int ) (const char *name); + EngFunc_PointContents, // int ) (const float *rgflVector); + EngFunc_FreeEntPrivateData, // void ) (edict_t *pEdict); + EngFunc_SzFromIndex, // const char *) (int iString); + EngFunc_AllocString, // int ) (const char *szValue); + EngFunc_RegUserMsg, // int ) (const char *pszName, int iSize); + EngFunc_AnimationAutomove, // void ) (const edict_t *pEdict, float flTime); + EngFunc_GetBonePosition, // void ) (const edict_t *pEdict, int iBone, float *rgflOrigin, float *rgflAngles); + EngFunc_GetAttachment, // void ) (const edict_t *pEdict, int iAttachment, float *rgflOrigin, float *rgflAngles); + EngFunc_SetView, // void ) (const edict_t *pClient, const edict_t *pViewent); + EngFunc_Time, // float) ( void ); + EngFunc_CrosshairAngle, // void ) (const edict_t *pClient, float pitch, float yaw); + EngFunc_FadeClientVolume, // void ) (const edict_t *pEdict, int fadePercent, int fadeOutSeconds, int holdTime, int fadeInSeconds); + EngFunc_SetClientMaxspeed, // void ) (const edict_t *pEdict, float fNewMaxspeed); + EngFunc_CreateFakeClient, // edict) (const char *netname); // returns NULL if fake client can't be created + EngFunc_RunPlayerMove, // void ) (edict_t *fakeclient, const float *viewangles, float forwardmove, float sidemove, float upmove, unsigned short buttons, byte impulse, byte msec); + EngFunc_NumberOfEntities, // int ) ( void ); + EngFunc_StaticDecal, // void ) (const float *origin, int decalIndex, int entityIndex, int modelIndex); + EngFunc_PrecacheGeneric, // int ) (char* s); + EngFunc_BuildSoundMsg, // void ) (edict_t *entity, int channel, const char *sample, /*int*/float volume, float attenuation, int fFlags, int pitch, int msg_dest, int msg_type, const float *pOrigin, edict_t *ed); + EngFunc_GetPhysicsKeyValue, // const char *) (const edict_t *pClient, const char *key); + EngFunc_SetPhysicsKeyValue, // void ) (const edict_t *pClient, const char *key, const char *value); + EngFunc_GetPhysicsInfoString, // const char *) (const edict_t *pClient); + EngFunc_PrecacheEvent, // unsigned short) (int type, const char*psz); + EngFunc_PlaybackEvent, // void ) (int flags, const edict_t *pInvoker, unsigned short eventindex, float delay, float *origin, float *angles, float fparam1, float fparam2, int iparam1, int iparam2, int bparam1, int bparam2); + EngFunc_CheckVisibility, // int ) (const edict_t *entity, unsigned char *pset); + EngFunc_GetCurrentPlayer, // int ) ( void ); + EngFunc_CanSkipPlayer, // int ) (const edict_t *player); + EngFunc_SetGroupMask, // void ) (int mask, int op); + EngFunc_GetClientListening, // bool ) (int iReceiver, int iSender) + EngFunc_SetClientListening, // bool ) (int iReceiver, int iSender, bool Listen) + EngFunc_MessageBegin, // void ) (int msg_dest, int msg_type, const float *pOrigin, edict_t *ed) + EngFunc_WriteCoord, // void ) (float flValue) + EngFunc_WriteAngle, // void ) (float flValue) + EngFunc_InfoKeyValue, // char*) (char *infobuffer, char *key); + EngFunc_SetKeyValue, // void ) (char *infobuffer, char *key, char *value); + EngFunc_SetClientKeyValue, // void ) (int clientIndex, char *infobuffer, char *key, char *value); + EngFunc_CreateInstBaseline, // int ) (int classname, struct entity_state_s *baseline); + + // Returns pointer to info buffer that can be used with the infobuffer param of InfoKeyValue, SetKeyValue, and SetClientKeyValue + EngFunc_GetInfoKeyBuffer, // char*) (edict_t *e); + EngFunc_AlertMessage, // void ) (ALERT_TYPE atype, char *szFmt, ...); + EngFunc_ClientPrintf, // void ) (edict_t* pEdict, PRINT_TYPE ptype, const char *szMsg); + EngFunc_ServerPrint // void ) (const char *szMsg); +}; + +/* Used with dllfunc() + */ +enum +{ + DLLFunc_GameInit, // void ) ( void ); + DLLFunc_Spawn, // int ) (edict_t *pent); + DLLFunc_Think, // void ) (edict_t *pent); + DLLFunc_Use, // void ) (edict_t *pentUsed, edict_t *pentOther); + DLLFunc_Touch, // void ) (edict_t *pentTouched, edict_t *pentOther); + DLLFunc_Blocked, // void ) (edict_t *pentBlocked, edict_t *pentOther); + + //You can pass in 0 for glb kvd handle or a kvd handle here + DLLFunc_KeyValue, // void ) (edict_t *pentKeyvalue, KeyValueData *pkvd); + DLLFunc_SetAbsBox, // void ) (edict_t *pent); + DLLFunc_ClientConnect, // bool ) (edict_t *pEntity, const char *pszName, const char *pszAddress, char szRejectReason[128]); + + DLLFunc_ClientDisconnect, // void ) (edict_t *pEntity); + DLLFunc_ClientKill, // void ) (edict_t *pEntity); + DLLFunc_ClientPutInServer, // void ) (edict_t *pEntity); + DLLFunc_ClientCommand, // void ) (edict_t *pEntity); + + DLLFunc_ServerDeactivate, // void ) ( void ); + + DLLFunc_PlayerPreThink, // void ) (edict_t *pEntity); + DLLFunc_PlayerPostThink, // void ) (edict_t *pEntity); + + DLLFunc_StartFrame, // void ) ( void ); + DLLFunc_ParmsNewLevel, // void ) ( void ); + DLLFunc_ParmsChangeLevel, // void ) ( void ); + + // Returns string describing current .dll. E.g., TeamFotrress 2, Half-Life + // This also gets called when the server is queried for information (for example, by a server browser tool) + DLLFunc_GetGameDescription, // const char *) ( void ); + + // Spectator funcs + DLLFunc_SpectatorConnect, // void ) (edict_t *pEntity); + DLLFunc_SpectatorDisconnect, // void ) (edict_t *pEntity); + DLLFunc_SpectatorThink, // void ) (edict_t *pEntity); + + // Notify game .dll that engine is going to shut down. Allows mod authors to set a breakpoint. + DLLFunc_Sys_Error, // void ) (const char *error_string); + + DLLFunc_PM_FindTextureType, // char ) (char *name); + DLLFunc_RegisterEncoders, // void ) ( void ); + + // Enumerates player hulls. Returns 0 if the hull number doesn't exist, 1 otherwise + DLLFunc_GetHullBounds, // int ) (int hullnumber, float *mins, float *maxs); + + // Create baselines for certain "unplaced" items. + DLLFunc_CreateInstBaselines, // void ) ( void ); + DLLFunc_pfnAllowLagCompensation, // int ) ( void ); + // I know this does not fit with DLLFUNC(), but I don't want another native just for it. + MetaFunc_CallGameEntity, // bool ) (plid_t plid, const char *entStr,entvars_t *pev); + DLLFunc_ClientUserInfoChanged, // void ) (edict *pEntity, char *infobuffer); + // You can pass in 0 for global cd handle or another cd handle here + DLLFunc_UpdateClientData, // void ) (const struct edict_s *ent, int sendweapons, struct clientdata_s *cd); + // You can pass in 0 for global entity state handle or another entity state handle here + DLLFunc_AddToFullPack, // int ) (struct entity_state_s *state, int e, edict_t *ent, edict_t *host, int hostflags, int player, unsigned char *pSet); + // You can pass in 0 for global usercmd handle or another usercmd handle here + DLLFunc_CmdStart, // void ) (const edict_t *player, const struct usercmd_s *cmd, unsigned int random_seed); + DLLFunc_CmdEnd, // void ) (const edict_t *player); + DLLFunc_CreateBaseline // void ) (int player, int eindex, struct entity_state_s *baseline, struct edict_s *entity, int playermodelindex, vec3_t player_mins, vec3_t player_maxs); +}; + +enum { + pev_string_start = 0, + pev_classname, + pev_globalname, + pev_model, + pev_target, + pev_targetname, + pev_netname, + pev_message, + pev_noise, + pev_noise1, + pev_noise2, + pev_noise3, + pev_string_end, + pev_edict_start, + pev_chain, + pev_dmg_inflictor, + pev_enemy, + pev_aiment, + pev_owner, + pev_groundentity, + pev_euser1, + pev_euser2, + pev_euser3, + pev_euser4, + pev_edict_end, + pev_float_start, + pev_impacttime, + pev_starttime, + pev_idealpitch, + pev_ideal_yaw, + pev_pitch_speed, + pev_yaw_speed, + pev_ltime, + pev_nextthink, + pev_gravity, + pev_friction, + pev_frame, + pev_animtime, + pev_framerate, + pev_scale, + pev_renderamt, + pev_health, + pev_frags, + pev_takedamage, + pev_max_health, + pev_teleport_time, + pev_armortype, + pev_armorvalue, + pev_dmg_take, + pev_dmg_save, + pev_dmg, + pev_dmgtime, + pev_speed, + pev_air_finished, + pev_pain_finished, + pev_radsuit_finished, + pev_maxspeed, + pev_fov, + pev_flFallVelocity, + pev_fuser1, + pev_fuser2, + pev_fuser3, + pev_fuser4, + pev_float_end, + pev_int_start, + pev_fixangle, + pev_modelindex, + pev_viewmodel, + pev_weaponmodel, + pev_movetype, + pev_solid, + pev_skin, + pev_body, + pev_effects, + pev_light_level, + pev_sequence, + pev_gaitsequence, + pev_rendermode, + pev_renderfx, + pev_weapons, + pev_deadflag, + pev_button, + pev_impulse, + pev_spawnflags, + pev_flags, + pev_colormap, + pev_team, + pev_waterlevel, + pev_watertype, + pev_playerclass, + pev_weaponanim, + pev_pushmsec, + pev_bInDuck, + pev_flTimeStepSound, + pev_flSwimTime, + pev_flDuckTime, + pev_iStepLeft, + pev_gamestate, + pev_oldbuttons, + pev_groupinfo, + pev_iuser1, + pev_iuser2, + pev_iuser3, + pev_iuser4, + pev_int_end, + pev_byte_start, + pev_controller_0, + pev_controller_1, + pev_controller_2, + pev_controller_3, + pev_blending_0, + pev_blending_1, + pev_byte_end, + pev_bytearray_start, + pev_controller, + pev_blending, + pev_bytearray_end, + pev_vecarray_start, + pev_origin, + pev_oldorigin, + pev_velocity, + pev_basevelocity, + pev_clbasevelocity, + pev_movedir, + pev_angles, + pev_avelocity, + pev_v_angle, + pev_endpos, + pev_startpos, + pev_absmin, + pev_absmax, + pev_mins, + pev_maxs, + pev_size, + pev_rendercolor, + pev_view_ofs, + pev_vuser1, + pev_vuser2, + pev_vuser3, + pev_vuser4, + pev_punchangle, + pev_vecarray_end, + pev_string2_begin, /* anything after here are string corrections */ + pev_weaponmodel2, + pev_viewmodel2, + pev_string2_end, + pev_edict2_start, /* edict corrections */ + pev_pContainingEntity, + pev_absolute_end +}; + +/* Used with global_get() + */ +enum +{ + glb_start_int = 0, + glb_trace_hitgroup, + glb_trace_flags, + glb_msg_entity, + glb_cdAudioTrack, + glb_maxClients, + glb_maxEntities, + glb_end_int, + glb_start_float, + glb_time, + glb_frametime, + glb_force_retouch, + glb_deathmatch, + glb_coop, + glb_teamplay, + glb_serverflags, + glb_found_secrets, + glb_trace_allsolid, + glb_trace_startsolid, + glb_trace_fraction, + glb_trace_plane_dist, + glb_trace_inopen, + glb_trace_inwater, + glb_end_float, + glb_start_edict, + glb_trace_ent, + glb_end_edict, + glb_start_vector, + glb_v_forward, + glb_v_up, + glb_v_right, + glb_trace_endpos, + glb_trace_plane_normal, + glb_vecLandmarkOffset, + glb_end_vector, + glb_start_string, + glb_mapname, + glb_startspot, + glb_end_string, + glb_start_pchar, + glb_pStringBase, + glb_end_pchar +}; + +/* Used with register_forward() + */ +enum { + FM_PrecacheModel = 1, + FM_PrecacheSound, + FM_SetModel, + FM_ModelIndex, + FM_ModelFrames, + FM_SetSize, + FM_ChangeLevel, + FM_VecToYaw, + FM_VecToAngles, + FM_MoveToOrigin, + FM_ChangeYaw, + FM_ChangePitch, + FM_FindEntityByString, + FM_GetEntityIllum, + FM_FindEntityInSphere, + FM_FindClientInPVS, + FM_EntitiesInPVS, + FM_MakeVectors, + FM_AngleVectors, + FM_CreateEntity, + FM_RemoveEntity, + FM_CreateNamedEntity, + FM_MakeStatic, + FM_EntIsOnFloor, + FM_DropToFloor, + FM_WalkMove, + FM_SetOrigin, + FM_EmitSound, + FM_EmitAmbientSound, + FM_TraceLine, + FM_TraceToss, + FM_TraceMonsterHull, + FM_TraceHull, + FM_TraceModel, + FM_TraceTexture, + FM_TraceSphere, + FM_GetAimVector, + FM_ParticleEffect, + FM_LightStyle, + FM_DecalIndex, + FM_PointContents, + FM_MessageBegin, + FM_MessageEnd, + FM_WriteByte, + FM_WriteChar, + FM_WriteShort, + FM_WriteLong, + FM_WriteAngle, + FM_WriteCoord, + FM_WriteString, + FM_WriteEntity, + FM_CVarGetFloat, + FM_CVarGetString, + FM_CVarSetFloat, + FM_CVarSetString, + FM_FreeEntPrivateData, + FM_SzFromIndex, + FM_AllocString, + FM_RegUserMsg, + FM_AnimationAutomove, + FM_GetBonePosition, + FM_GetAttachment, + FM_SetView, + FM_Time, + FM_CrosshairAngle, + FM_FadeClientVolume, + FM_SetClientMaxspeed, + FM_CreateFakeClient, + FM_RunPlayerMove, + FM_NumberOfEntities, + FM_StaticDecal, + FM_PrecacheGeneric, + FM_BuildSoundMsg, + FM_GetPhysicsKeyValue, + FM_SetPhysicsKeyValue, + FM_GetPhysicsInfoString, + FM_PrecacheEvent, + FM_PlaybackEvent, + FM_CheckVisibility, + FM_GetCurrentPlayer, + FM_CanSkipPlayer, + FM_SetGroupMask, + FM_Voice_GetClientListening, + FM_Voice_SetClientListening, + FM_InfoKeyValue, + FM_SetKeyValue, + FM_SetClientKeyValue, + FM_GetPlayerAuthId, + FM_GetPlayerWONId, + FM_IsMapValid, + + FM_Spawn, + FM_Think, + FM_Use, + FM_Touch, + FM_Blocked, + FM_KeyValue, + FM_SetAbsBox, + FM_ClientConnect, + + FM_ClientDisconnect, + FM_ClientKill, + FM_ClientPutInServer, + FM_ClientCommand, + + FM_ServerDeactivate, + + FM_PlayerPreThink, + FM_PlayerPostThink, + + FM_StartFrame, + FM_ParmsNewLevel, + FM_ParmsChangeLevel, + + // Returns string describing current .dll. E.g., TeamFotrress 2, Half-Life + // This also gets called when the server is queried for information (for example, by a server browser tool) + FM_GetGameDescription, + + // Spectator funcs + FM_SpectatorConnect, + FM_SpectatorDisconnect, + FM_SpectatorThink, + + // Notify game .dll that engine is going to shut down. Allows mod authors to set a breakpoint. + FM_Sys_Error, + + FM_PM_FindTextureType, + FM_RegisterEncoders, + + // Create baselines for certain "unplaced" items. + FM_CreateInstBaselines, + + FM_AllowLagCompensation, + FM_AlertMessage, + + // NEW_DLL_FUNCTIONS: + FM_OnFreeEntPrivateData, + FM_GameShutdown, + FM_ShouldCollide, + + // LATE ADDITIONS (v1.71) + FM_ClientUserInfoChanged, + + // LATE ADDITIONS (v1.75) + FM_UpdateClientData, + FM_AddToFullPack, + FM_CmdStart, + FM_CmdEnd, + FM_CreateInstBaseline, + FM_CreateBaseline, + FM_GetInfoKeyBuffer, + FM_ClientPrintf, + + // LATE ADDITIONS (v1.80) + FM_ServerPrint +}; + +enum TraceResult +{ + TR_AllSolid, // int + TR_StartSolid, // int + TR_InOpen, // int + TR_InWater, // int + TR_flFraction, // float + TR_vecEndPos, // float array[3] + TR_flPlaneDist, // float + TR_vecPlaneNormal, // float array[3] + TR_pHit, // int (edict_t*) + TR_iHitgroup, // int +}; + +enum KeyValueData +{ + KV_ClassName, // string + KV_KeyName, // string + KV_Value, // string + KV_fHandled // int +}; + +enum ClientData +{ + CD_Origin, // float array[3] + CD_Velocity, // float array[3] + CD_ViewModel, // int + CD_PunchAngle, // float array[3] + CD_Flags, // int + CD_WaterLevel, // int + CD_WaterType, // int + CD_ViewOfs, // float array[3] + CD_Health, // float + CD_bInDuck, // int + CD_Weapons, // int + CD_flTimeStepSound, // int + CD_flDuckTime, // int + CD_flSwimTime, // int + CD_WaterJumpTime, // int + CD_MaxSpeed, // float + CD_FOV, // float + CD_WeaponAnim, // int + CD_ID, // int + CD_AmmoShells, // int + CD_AmmoNails, // int + CD_AmmoCells, // int + CD_AmmoRockets, // int + CD_flNextAttack, // float + CD_tfState, // int + CD_PushMsec, // int + CD_DeadFlag, // int + CD_PhysInfo, // string[256] + CD_iUser1, // int + CD_iUser2, // int + CD_iUser3, // int + CD_iUser4, // int + CD_fUser1, // float + CD_fUser2, // float + CD_fUser3, // float + CD_fUser4, // float + CD_vUser1, // float array[3] + CD_vUser2, // float array[3] + CD_vUser3, // float array[3] + CD_vUser4 // float array[3] +}; + +enum EntityState +{ + // Fields which are filled in by routines outside of delta compression + ES_EntityType, // int + // Index into cl_entities array for this entity + ES_Number, // int + ES_MsgTime, // float + + // Message number last time the player/entity state was updated + ES_MessageNum, // int + + // Fields which can be transitted and reconstructed over the network stream + ES_Origin, // float array[3] + ES_Angles, // float array[3] + + ES_ModelIndex, // int + ES_Sequence, // int + ES_Frame, // float + ES_ColorMap, // int + ES_Skin, // short + ES_Solid, // short + ES_Effects, // int + ES_Scale, // float + ES_eFlags, // byte + + // Render information + ES_RenderMode, // int + ES_RenderAmt, // int + ES_RenderColor, // byte array[3], RGB value + ES_RenderFx, // int + + ES_MoveType, // int + ES_AnimTime, // float + ES_FrameRate, // float + ES_Body, // int + ES_Controller, // byte array[4] + ES_Blending, // byte array[4] + ES_Velocity, // float array[3] + + // Send bbox down to client for use during prediction + ES_Mins, // float array[3] + ES_Maxs, // float array[3] + + ES_AimEnt, // int + // If owned by a player, the index of that player (for projectiles) + ES_Owner, // int + + // Friction, for prediction + ES_Friction, // float + // Gravity multiplier + ES_Gravity, // float + + // PLAYER SPECIFIC + ES_Team, // int + ES_PlayerClass, // int + ES_Health, // int + ES_Spectator, // bool + ES_WeaponModel, // int + ES_GaitSequence, // int + // If standing on conveyor, e.g. + ES_BaseVelocity, // float array[3] + // Use the crouched hull, or the regular player hull + ES_UseHull, // int + // Latched buttons last time state updated + ES_OldButtons, // int + // -1 = in air, else pmove entity number + ES_OnGround, // int + ES_iStepLeft, // int + // How fast we are falling + ES_flFallVelocity, // float + + ES_FOV, // float + ES_WeaponAnim, // int + + // Parametric movement overrides + ES_StartPos, // float array[3] + ES_EndPos, // float array[3] + ES_ImpactTime, // float + ES_StartTime, // float + + // For mods + ES_iUser1, // int + ES_iUser2, // int + ES_iUser3, // int + ES_iUser4, // int + ES_fUser1, // float + ES_fUser2, // float + ES_fUser3, // float + ES_fUser4, // float + ES_vUser1, // float array[3] + ES_vUser2, // float array[3] + ES_vUser3, // float array[3] + ES_vUser4 // float array[3] +}; + +enum UserCmd +{ + // Interpolation time on client + UC_LerpMsec, // short + // Duration in ms of command + UC_Msec, // byte + // Command view angles + UC_ViewAngles, // float array[3] + + // Intended velocities + // Forward velocity + UC_ForwardMove, // float + // Sideways velocity + UC_SideMove, // float + // Upward velocity + UC_UpMove, // float + // Light level at spot where we are standing + UC_LightLevel, // byte + // Attack buttons + UC_Buttons, // unsigned short + // Impulse command issued + UC_Impulse, // byte + // Current weapon id + UC_WeaponSelect, // byte + + // Experimental player impact stuff + UC_ImpactIndex, // int + UC_ImpactPosition // float array[3] +}; + +enum AlertType +{ + at_notice = 0, + at_console, // same as at_notice, but forces a ConPrintf, not a message box + at_aiconsole, // same as at_console, but only shown if developer level is 2! + at_warning, + at_error, + at_logged // Server print to console (only in multiplayer games) +}; + +/** + * Data field types for use with find_ent_data_info(). + */ +enum FieldType +{ + FIELD_NONE, + FIELD_FLOAT, // Floating point value + FIELD_STRINGINT, // String ID (return from ALLOC_STRING) + FIELD_STRINGPTR, // String, pointer-to-char + FIELD_STRING, // String, fixed size + FIELD_CLASSPTR, // Classes pointer derived of CBaseEntity + FIELD_CLASS, // Arbitrary classes, direct + FIELD_STRUCTURE, // Arbitrary structures, direct + FIELD_EHANDLE, // Entity handle + FIELD_ENTVARS, // entvars_t* + FIELD_EDICT, // edict_t* + FIELD_VECTOR, // Vector + FIELD_POINTER, // Arbitrary data pointer + FIELD_INTEGER, // Integer or enum + FIELD_FUNCTION, // Class function pointer (Think, Use, etc) + FIELD_BOOLEAN, // Boolean + FIELD_SHORT, // 2 bytes integer + FIELD_CHARACTER, // 1 byte +}; + +/** + * Base data field types for use with get_ent_data_basetype(). + */ +enum BaseFieldType +{ + BASEFIELD_NONE, + BASEFIELD_INTEGER, + BASEFIELD_FLOAT, + BASEFIELD_VECTOR, + BASEFIELD_ENTITY, + BASEFIELD_STRING, +}; diff --git a/bin/compiler/include/fakemeta_stocks.inc b/bin/compiler/include/fakemeta_stocks.inc new file mode 100644 index 0000000..088f951 --- /dev/null +++ b/bin/compiler/include/fakemeta_stocks.inc @@ -0,0 +1,395 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Fakemeta Stocks +// + +#if !defined _fakemeta_included + #include +#endif + +#if defined _fakemeta_stocks_included + #endinput +#endif +#define _fakemeta_stocks_included + +// EngFuncs +stock EF_PrecacheModel(const string[]) { + return engfunc(EngFunc_PrecacheModel, string); +} + +stock EF_PrecacheSound(const string[]) { + return engfunc(EngFunc_PrecacheSound, string); +} +stock EF_SetModel(const ID, const STRING[]) { + return engfunc(EngFunc_SetModel, ID, STRING); +} +stock EF_ModelIndex(const STRING[]) { + return engfunc(EngFunc_ModelIndex, STRING); +} +stock EF_ModelFrames(modelIndex) { + return engfunc(EngFunc_ModelFrames, modelIndex); +} + +stock EF_SetSize(const ENTITY, const Float:MIN[3], const Float:MAX[3]) { + return engfunc(EngFunc_SetSize, ENTITY, MIN, MAX); +} +stock EF_ChangeLevel(const S1[], const S2[]) { + return engfunc(EngFunc_ChangeLevel, S1, S2); +} +stock EF_VecToYaw(const Float:VECTOR[3], &Float:returnValue) { + return engfunc(EngFunc_VecToYaw, VECTOR, returnValue); +} +stock EF_VecToAngles(const Float:VECTORIN[3], const Float:VECTOROUT[3]) { + return engfunc(EngFunc_VecToAngles, VECTORIN, VECTOROUT); +} +stock EF_MoveToOrigin(const ENTITY, const Float:GOAL[3], const Float:DISTANCE, const MOVETYPE) { + return engfunc(EngFunc_MoveToOrigin, ENTITY, GOAL, DISTANCE, MOVETYPE); +} + +stock EF_ChangeYaw(const ENTITY) { + return engfunc(EngFunc_ChangeYaw, ENTITY); +} +stock EF_ChangePitch(const ENTITY) { + return engfunc(EngFunc_ChangePitch, ENTITY); +} +stock EF_FindEntityByString(const STARTSEARCHAFTER, const FIELD[], const VALUE[]) { + return engfunc(EngFunc_FindEntityByString, STARTSEARCHAFTER, FIELD, VALUE); +} +stock EF_GetEntityIllum(const ENTITY) { + return engfunc(EngFunc_GetEntityIllum, ENTITY); +} +stock EF_FindEntityInSphere(const STARTSEARCHAFTER, const Float:ORIGIN[3], Float:radius) { + return engfunc(EngFunc_FindEntityInSphere, STARTSEARCHAFTER, ORIGIN, radius); +} + +stock EF_FindClientInPVS(const CLIENT) { + return engfunc(EngFunc_FindClientInPVS, CLIENT); +} +stock EF_EntitiesInPVS(const CLIENT) { + return engfunc(EngFunc_EntitiesInPVS, CLIENT); +} +stock EF_MakeVectors(const Float:VECTOR[3]) { + return engfunc(EngFunc_MakeVectors, VECTOR); +} +stock EF_AngleVectors(const Float:VECTOR[3], Float:forward_[3], Float:right[3], Float:up[3]) { + return engfunc(EngFunc_AngleVectors, VECTOR, forward_, right, up); +} +stock EF_CreateEntity() { + return engfunc(EngFunc_CreateEntity); +} + +stock EF_RemoveEntity(const ENTITY) { + return engfunc(EngFunc_RemoveEntity, ENTITY); +} +stock EF_CreateNamedEntity(const CLASSNAME) { + return engfunc(EngFunc_CreateNamedEntity, CLASSNAME); +} +stock EF_MakeStatic(const ENTITY) { + return engfunc(EngFunc_MakeStatic, ENTITY); +} +stock EF_EntIsOnFloor(const ENTITY) { + return engfunc(EngFunc_EntIsOnFloor, ENTITY); +} +stock EF_DropToFloor(const ENTITY) { + return engfunc(EngFunc_DropToFloor, ENTITY); +} + +stock EF_WalkMove(const ENTITY, Float:yaw, Float:distance, iMode) { + return engfunc(EngFunc_WalkMove, ENTITY, yaw, distance, iMode); +} +stock EF_SetOrigin(const ENTITY, const Float:ORIGIN[3]) { + return engfunc(EngFunc_SetOrigin, ENTITY, ORIGIN); +} +stock EF_EmitSound(const ENTITY, channel, const SAMPLE[], Float:volume, Float:attenuation, fFlags, pitch) { + return engfunc(EngFunc_EmitSound, ENTITY, channel, SAMPLE, volume, attenuation, fFlags, pitch); +} +stock EF_EmitAmbientSound(const ENTITY, Float:pos[3], const SAMPLE[], Float:volume, Float:attenuation, fFlags, pitch) { + return engfunc(EngFunc_EmitAmbientSound, ENTITY, pos, SAMPLE, volume, attenuation, fFlags, pitch); +} +stock EF_TraceLine(const Float:V1[3], const Float:V2[3], fNoMonsters, const ENT_TO_SKIP) { + return engfunc(EngFunc_TraceLine, V1, V2, fNoMonsters, ENT_TO_SKIP); +} + +stock EF_TraceToss(const ENTITY, const ENTITY_TO_IGNORE) { + return engfunc(EngFunc_TraceToss, ENTITY, ENTITY_TO_IGNORE); +} +stock EF_TraceMonsterHull(const ENTITY, const Float:V1[3], const Float:V2[3], fNoMonsters, const ENTITY_TO_SKIP) { + return engfunc(EngFunc_TraceMonsterHull, ENTITY, V1, V2, fNoMonsters, ENTITY_TO_SKIP); +} +stock EF_TraceHull(const Float:V1[3], const Float:V2[3], fNoMonsters, hullNumber, const ENTITY_TO_SKIP) { + return engfunc(EngFunc_TraceHull, V1, V2, fNoMonsters, hullNumber, ENTITY_TO_SKIP); +} +stock EF_TraceModel(const Float:V1[3], const Float:V2[3], hullNumber, const ENTITY) { + return engfunc(EngFunc_TraceModel, V1, V2, hullNumber, ENTITY); +} +stock EF_TraceTexture(const TEXTURE_ENTITY, const Float:V1[3], const Float:V2[3]) { + return engfunc(EngFunc_TraceTexture, TEXTURE_ENTITY, V1, V2); +} + +stock EF_TraceSphere(const Float:V1[3], const Float:V2[3], fNoMonsters, Float:radius, const ENTITY_TO_SKIP) { + return engfunc(EngFunc_TraceSphere, V1, V2, fNoMonsters, radius, ENTITY_TO_SKIP); +} +stock EF_GetAimVector(const ENTITY, Float:speed, Float:returnVector[3]) { + return engfunc(EngFunc_GetAimVector, ENTITY, speed, returnVector); +} +stock EF_ParticleEffect(const Float:ORIGIN[3], const Float:DIRECTION[3], Float:color, Float:count) { + return engfunc(EngFunc_ParticleEffect, ORIGIN, DIRECTION, color, count); +} +stock EF_LightStyle(style, val[]) { + return engfunc(EngFunc_LightStyle, style, val); +} +stock EF_DecalIndex(const NAME[]) { + return engfunc(EngFunc_DecalIndex, NAME); +} + +stock EF_PointContents(const Float:VECTOR[3]) { + return engfunc(EngFunc_PointContents, VECTOR); +} +stock EF_FreeEntPrivateData(const ENTITY) { + return engfunc(EngFunc_FreeEntPrivateData, ENTITY); +} +stock EF_SzFromIndex(iString) { + return engfunc(EngFunc_SzFromIndex, iString); +} +stock EF_AllocString(const STRING[]) { + return engfunc(EngFunc_AllocString, STRING); +} +stock EF_RegUserMsg(const NAME[], iSize) { + return engfunc(EngFunc_RegUserMsg, NAME, iSize); +} + +stock EF_AnimationAutomove(const ENTITY, Float:flTime) { + return engfunc(EngFunc_AnimationAutomove, ENTITY, flTime); +} +stock EF_GetBonePosition(const ENTITY, iBone, Float:origin[3], Float:angles[3]) { + return engfunc(EngFunc_GetBonePosition, ENTITY, iBone, origin, angles); +} +stock EF_GetAttachment(const ENTITY, iAttachment, Float:origin[3], Float:angles[3]) { + return engfunc(EngFunc_GetAttachment, ENTITY, iAttachment, origin, angles); +} +stock EF_SetView(const CLIENT, const VIEW_ENTITY) { + return engfunc(EngFunc_SetView, CLIENT, VIEW_ENTITY); +} +stock EF_Time(&Float:returnValue) { + return engfunc(EngFunc_Time, returnValue); +} + +stock EF_CrosshairAngle(const CLIENT, Float:pitch, Float:yaw) { + return engfunc(EngFunc_CrosshairAngle, CLIENT, pitch, yaw); +} +stock EF_FadeClientVolume(const ENTITY, fadePercent, fadeOutSeconds, holdTime, fadeInSeconds) { + return engfunc(EngFunc_FadeClientVolume, ENTITY, fadePercent, fadeOutSeconds, holdTime, fadeInSeconds); +} +stock EF_SetClientMaxspeed(const ENTITY, Float:newMaxspeed) { + return engfunc(EngFunc_SetClientMaxspeed, ENTITY, newMaxspeed); +} +stock EF_CreateFakeClient(const NETNAME[]) { + return engfunc(EngFunc_CreateFakeClient, NETNAME); +} +stock EF_RunPlayerMove(const FAKECLIENT, const Float:VIEWANGLES[3], Float:forwardmove, Float:sidemove, Float:upmove, buttons, impulse, msec) { + return engfunc(EngFunc_RunPlayerMove, FAKECLIENT, VIEWANGLES, forwardmove, sidemove, upmove, buttons, impulse, msec); +} + +stock EF_NumberOfEntities() { + return engfunc(EngFunc_NumberOfEntities); +} +stock EF_StaticDecal(const Float:ORIGIN[3], decalIndex, entityIndex, modelIndex) + return engfunc(EngFunc_StaticDecal, ORIGIN, decalIndex, entityIndex, modelIndex); +stock EF_PrecacheGeneric(const STRING[]) { + return engfunc(EngFunc_PrecacheGeneric, STRING); +} +stock EF_BuildSoundMSG(const ENTITY, channel, const SAMPLE[], Float:volume, Float:attenuation, fFlags, pitch, msg_dest, msg_type, const Float:ORIGIN[3], const ED) { + return engfunc(EngFunc_BuildSoundMsg, ENTITY, channel, SAMPLE, volume, attenuation, fFlags, pitch, msg_dest, msg_type, ORIGIN, ED); +} +stock EF_GetPhysicsKeyValue(const CLIENT, const KEY[]) { + return engfunc(EngFunc_GetPhysicsKeyValue, CLIENT, KEY); +} + +stock EF_SetPhysicsKeyValue(const CLIENT, const KEY[], const VALUE[]) { + return engfunc(EngFunc_SetPhysicsKeyValue, CLIENT, KEY, VALUE); +} +stock EF_GetPhysicsInfoString(const CLIENT, returnString[], maxLength) { + return engfunc(EngFunc_GetPhysicsInfoString, CLIENT, returnString, maxLength); +} +stock EF_PrecacheEvent(type, const STRING[]) { + return engfunc(EngFunc_PrecacheEvent, type, STRING); +} +stock EF_PlaybackEvent(flags, const INVOKER, eventindex, Float:delay, Float:origin[3], Float:angles[3], Float:fparam1, Float:fparam2, iparam1, iparam2, bparam1, bparam2) { + return engfunc(EngFunc_PlaybackEvent, flags, INVOKER, eventindex, delay, origin, angles, fparam1, fparam2, iparam1, iparam2, bparam1, bparam2); +} +stock EF_CheckVisibility(const ENTITY, set) { + return engfunc(EngFunc_CheckVisibility, ENTITY, set); +} + +stock EF_GetCurrentPlayer() { + return engfunc(EngFunc_GetCurrentPlayer); +} +stock EF_CanSkipPlayer(const PLAYER) { + return engfunc(EngFunc_CanSkipPlayer, PLAYER); +} +stock EF_SetGroupMask(mask, op) { + return engfunc(EngFunc_SetGroupMask, mask, op); +} +stock EF_GetClientListening(receiver, sender) { + return engfunc(EngFunc_GetClientListening, receiver, sender); +} +stock EF_SetClientListening(receiver, sender, bool:listen) { + return engfunc(EngFunc_SetClientListening, receiver, sender, listen); +} + +stock EF_MessageBegin(msg_dest, msg_type, const Float:ORIGIN[3], const ED) { + return engfunc(EngFunc_MessageBegin, msg_dest, msg_type, ORIGIN, ED); +} +stock EF_WriteCoord(Float:value) { + return engfunc(EngFunc_WriteCoord, value); +} +stock EF_WriteAngle(Float:value) { + return engfunc(EngFunc_WriteAngle, value); +} +stock EF_InfoKeyValue(const INFOBUFFER, const KEY[], returnValue[], maxLength) { + return engfunc(EngFunc_InfoKeyValue, INFOBUFFER, KEY, returnValue, maxLength); +} +stock EF_SetKeyValue(const INFOBUFFER, const KEY[], const VALUE[]) { + return engfunc(EngFunc_SetKeyValue, INFOBUFFER, KEY, VALUE); +} + +stock EF_SetClientKeyValue(const ID, const INFOBUFFER, const KEY[], const VALUE[]) { + return engfunc(EngFunc_SetClientKeyValue, ID, INFOBUFFER, KEY, VALUE); +} + +stock EF_CreateInstBaseline(CLASSNAME, baseline) { + return engfunc(EngFunc_CreateInstBaseline, CLASSNAME, baseline); +} + +// Returns pointer to info buffer that can be used with the INFOBUFFER param +// of EF_InfoKeyValue, EF_SetKeyValue, and EF_SetClientKeyValue +stock EF_GetInfoKeyBuffer(const ENTITY) { + return engfunc(EngFunc_GetInfoKeyBuffer, ENTITY); +} +stock EF_ClientPrintf(const ENTITY, const printType, const MESSAGE[]) { + return engfunc(EngFunc_ClientPrintf, ENTITY, printType, MESSAGE); +} +stock EF_ServerPrint(const MESSAGE[]) { + return engfunc(EngFunc_ServerPrint, MESSAGE); +} + +// DLLFuncs +stock DF_GameInit() { + return dllfunc(DLLFunc_GameInit); +} +stock DF_Spawn(const ENTITY) { + return dllfunc(DLLFunc_Spawn, ENTITY); +} +stock DF_Think(const ENTITY) { + return dllfunc(DLLFunc_Think, ENTITY); +} +stock DF_Use(const ENT_Used, const ENT_User) { + return dllfunc(DLLFunc_Use, ENT_Used, ENT_User); +} +stock DF_Touch(const ENT_Touched, const ENT_Toucher) { + return dllfunc(DLLFunc_Touch, ENT_Touched, ENT_Toucher); +} + +stock DF_Blocked(const ENT_Blocked, const ENT_Other) { + return dllfunc(DLLFunc_Blocked, ENT_Blocked, ENT_Other); +} +stock DF_SetAbsBox(const ENTITY) { + return dllfunc(DLLFunc_SetAbsBox, ENTITY); +} +stock DF_ClientConnect(const ENTITY, const NAME[], const ADDRESS[], RejectReason[128]) { + return dllfunc(DLLFunc_ClientConnect, ENTITY, NAME, ADDRESS, RejectReason); +} +stock DF_ClientDisconnect(const ENTITY) { + return dllfunc(DLLFunc_ClientDisconnect, ENTITY); +} +stock DF_ClientKill(const ENTITY) { + return dllfunc(DLLFunc_ClientKill, ENTITY); +} + +stock DF_ClientPutInServer(const ENTITY) { + return dllfunc(DLLFunc_ClientPutInServer, ENTITY); +} +stock DF_ClientCommand(const ENTITY) { + return dllfunc(DLLFunc_ClientCommand, ENTITY); +} +stock DF_ServerDeactivate() { + return dllfunc(DLLFunc_ServerDeactivate); +} +stock DF_PlayerPreThink(const ENTITY) { + return dllfunc(DLLFunc_PlayerPreThink, ENTITY); +} +stock DF_PlayerPostThink(const ENTITY) { + return dllfunc(DLLFunc_PlayerPostThink, ENTITY); +} + +stock DF_StartFrame() { + return dllfunc(DLLFunc_StartFrame); +} +stock DF_ParmsNewLevel() { + return dllfunc(DLLFunc_ParmsNewLevel); +} +stock DF_ParmsChangeLevel() { + return dllfunc(DLLFunc_ParmsChangeLevel); +} +stock DF_GetGameDescription() { + return dllfunc(DLLFunc_GetGameDescription); +} +stock DF_SpectatorConnect(const ENTITY) { + return dllfunc(DLLFunc_SpectatorConnect, ENTITY); +} + +stock DF_SpectatorDisconnect(const ENTITY) { + return dllfunc(DLLFunc_SpectatorDisconnect, ENTITY); +} +stock DF_SpectatorThink(const ENTITY) { + return dllfunc(DLLFunc_SpectatorThink, ENTITY); +} +stock DF_Sys_Error(const ERROR_STRING[]) { + return dllfunc(DLLFunc_Sys_Error, ERROR_STRING); +} +stock DF_PM_FindTextureType(name[]) { + return dllfunc(DLLFunc_PM_FindTextureType, name); +} +stock DF_RegisterEncoders() { + return dllfunc(DLLFunc_RegisterEncoders); +} + +stock DF_GetHullBounds(hullnumber, Float:mins[3], Float:maxs[3]) { + return dllfunc(DLLFunc_GetHullBounds, hullnumber, mins, maxs); +} +stock DF_CreateInstBaselines() { + return dllfunc(DLLFunc_CreateInstBaselines); +} +stock DF_pfnAllowLagCompensation() { + return dllfunc(DLLFunc_pfnAllowLagCompensation); +} +stock DF_MetaFunc_CallGameEntity(const STRING[], const ENTITY) { + return dllfunc(MetaFunc_CallGameEntity, STRING, ENTITY); +} +stock DF_ClientUserInfoChanged(const IDPLAYER) { + return dllfunc(DLLFunc_ClientUserInfoChanged, IDPLAYER); +} + +stock DF_UpdateClientData(const ENTITY, sendweapons, const cd/* = 0*/) { + return dllfunc(DLLFunc_UpdateClientData, ENTITY, sendweapons, cd); +} +stock DF_AddToFullPack(const STATE/* = 0*/, e, ENT, HOST, hostflags, player, set) { + return dllfunc(DLLFunc_AddToFullPack, STATE, e, ENT, HOST, hostflags, player, set); +} +stock DF_CmdStart(const PLAYER, const CMD/* = 0*/, randomSeed) { + return dllfunc(DLLFunc_CmdStart, PLAYER, CMD, randomSeed); +} +stock DF_CmdEnd(const PLAYER) { + return dllfunc(DLLFunc_CmdEnd, PLAYER); +} +stock DF_CreateBaseline(PLAYER, eIndex, baseline, playerModelIndex, Float:playerMins[3], Float:playerMaxs[3]) { + return dllfunc(DLLFunc_CreateBaseline, PLAYER, eIndex, baseline, playerModelIndex, playerMins, playerMaxs); +} diff --git a/bin/compiler/include/fakemeta_util.inc b/bin/compiler/include/fakemeta_util.inc new file mode 100644 index 0000000..4c66231 --- /dev/null +++ b/bin/compiler/include/fakemeta_util.inc @@ -0,0 +1,882 @@ +/** + * This file provides various utility functions that use the Fakemeta module. + * This file is created and maintained by VEN. + * For support and issues, see: + * http://forums.alliedmods.net/showthread.php?t=28284 + */ + + +/* Fakemeta Utilities +* +* by VEN +* +* This file is provided as is (no warranties). +*/ + +#if !defined _fakemeta_included + #include +#endif + +#if defined _fakemeta_util_included + #endinput +#endif +#define _fakemeta_util_included + +#include + + +/* Engine functions */ + +#define fm_precache_generic(%1) engfunc(EngFunc_PrecacheGeneric, %1) +/* stock fm_precache_generic(const file[]) + return engfunc(EngFunc_PrecacheGeneric, file) */ + +#define fm_precache_event(%1,%2) engfunc(EngFunc_PrecacheEvent, %1, %2) +/* stock fm_precache_event(type, const name[]) + return engfunc(EngFunc_PrecacheEvent, type, name) */ + +// ported by v3x +#define fm_drop_to_floor(%1) engfunc(EngFunc_DropToFloor, %1) +/* stock fm_drop_to_floor(entity) + return engfunc(EngFunc_DropToFloor, entity) */ + +#define fm_force_use(%1,%2) dllfunc(DLLFunc_Use, %2, %1) +/* stock fm_force_use(user, used) + return dllfunc(DLLFunc_Use, used, user) */ + +#define fm_entity_set_size(%1,%2,%3) engfunc(EngFunc_SetSize, %1, %2, %3) +/* stock fm_entity_set_size(index, const Float:mins[3], const Float:maxs[3]) + return engfunc(EngFunc_SetSize, index, mins, maxs) */ + +#define fm_get_decal_index(%1) engfunc(EngFunc_DecalIndex, %1) +/* stock fm_get_decal_index(const decalname[]) + return engfunc(EngFunc_DecalIndex, decalname) */ + +stock Float:fm_entity_range(ent1, ent2) { + new Float:origin1[3], Float:origin2[3]; + pev(ent1, pev_origin, origin1); + pev(ent2, pev_origin, origin2); + + return get_distance_f(origin1, origin2); +} + +// based on KoST's port, upgraded version fits into the macros +#define fm_create_entity(%1) engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, %1)) +/* stock fm_create_entity(const classname[]) + return engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, classname)) */ + +#define fm_find_ent_by_class(%1,%2) engfunc(EngFunc_FindEntityByString, %1, "classname", %2) +/* stock fm_find_ent_by_class(index, const classname[]) + return engfunc(EngFunc_FindEntityByString, index, "classname", classname) */ + +stock fm_find_ent_by_owner(index, const classname[], owner, jghgtype = 0) { + new strtype[11] = "classname", ent = index; + switch (jghgtype) { + case 1: strtype = "target"; + case 2: strtype = "targetname"; + } + + while ((ent = engfunc(EngFunc_FindEntityByString, ent, strtype, classname)) && pev(ent, pev_owner) != owner) {} + + return ent; +} + +#define fm_find_ent_by_target(%1,%2) engfunc(EngFunc_FindEntityByString, %1, "target", %2) +/* stock fm_find_ent_by_target(index, const target[]) + return engfunc(EngFunc_FindEntityByString, index, "target", target) */ + +#define fm_find_ent_by_tname(%1,%2) engfunc(EngFunc_FindEntityByString, %1, "targetname", %2) +/* stock fm_find_ent_by_tname(index, const targetname[]) + return engfunc(EngFunc_FindEntityByString, index, "targetname", targetname) */ + +stock fm_find_ent_by_model(index, const classname[], const model[]) { + new ent = index, mdl[72]; + while ((ent = fm_find_ent_by_class(ent, classname))) { + pev(ent, pev_model, mdl, sizeof mdl - 1); + if (equal(mdl, model)) + return ent; + } + + return 0; +} + +#define fm_find_ent_in_sphere(%1,%2,%3) engfunc(EngFunc_FindEntityInSphere, %1, %2, %3) +/* stock fm_find_ent_in_sphere(index, const Float:origin[3], Float:radius) + return engfunc(EngFunc_FindEntityInSphere, index, origin, radius) */ + +#define fm_call_think(%1) dllfunc(DLLFunc_Think, %1) +/* stock fm_call_think(entity) + return dllfunc(DLLFunc_Think, entity) */ + +#define fm_is_valid_ent(%1) pev_valid(%1) +/* stock fm_is_valid_ent(index) + return pev_valid(index) */ + +stock fm_entity_set_origin(index, const Float:origin[3]) { + new Float:mins[3], Float:maxs[3]; + pev(index, pev_mins, mins); + pev(index, pev_maxs, maxs); + engfunc(EngFunc_SetSize, index, mins, maxs); + + return engfunc(EngFunc_SetOrigin, index, origin); +} + +#define fm_entity_set_model(%1,%2) engfunc(EngFunc_SetModel, %1, %2) +/* stock fm_entity_set_model(index, const model[]) + return engfunc(EngFunc_SetModel, index, model) */ + +// ported by v3x +#define fm_remove_entity(%1) engfunc(EngFunc_RemoveEntity, %1) +/* stock fm_remove_entity(index) + return engfunc(EngFunc_RemoveEntity, index) */ + +#define fm_entity_count() engfunc(EngFunc_NumberOfEntities) +/* stock fm_entity_count() + return engfunc(EngFunc_NumberOfEntities) */ + +#define fm_fake_touch(%1,%2) dllfunc(DLLFunc_Touch, %1, %2) +/* stock fm_fake_touch(toucher, touched) + return dllfunc(DLLFunc_Touch, toucher, touched) */ + +#define fm_DispatchSpawn(%1) dllfunc(DLLFunc_Spawn, %1) +/* stock fm_DispatchSpawn(entity) + return dllfunc(DLLFunc_Spawn, entity) */ + +// ported by v3x +#define fm_point_contents(%1) engfunc(EngFunc_PointContents, %1) +/* stock fm_point_contents(const Float:point[3]) + return engfunc(EngFunc_PointContents, point) */ + +stock fm_trace_line(ignoreent, const Float:start[3], const Float:end[3], Float:ret[3]) { + engfunc(EngFunc_TraceLine, start, end, ignoreent == -1 ? 1 : 0, ignoreent, 0); + + new ent = get_tr2(0, TR_pHit); + get_tr2(0, TR_vecEndPos, ret); + + return pev_valid(ent) ? ent : 0; +} + +stock fm_trace_hull(const Float:origin[3], hull, ignoredent = 0, ignoremonsters = 0) { + new result = 0; + engfunc(EngFunc_TraceHull, origin, origin, ignoremonsters, hull, ignoredent > 0 ? ignoredent : 0, 0); + + if (get_tr2(0, TR_StartSolid)) + result += 1; + if (get_tr2(0, TR_AllSolid)) + result += 2; + if (!get_tr2(0, TR_InOpen)) + result += 4; + + return result; +} + +stock fm_trace_normal(ignoreent, const Float:start[3], const Float:end[3], Float:ret[3]) { + engfunc(EngFunc_TraceLine, start, end, 0, ignoreent, 0); + get_tr2(0, TR_vecPlaneNormal, ret); + + new Float:fraction; + get_tr2(0, TR_flFraction, fraction); + if (fraction >= 1.0) + return 0; + + return 1; +} + +// note that for CS planted C4 has a "grenade" classname as well +stock fm_get_grenade_id(id, model[], len, grenadeid = 0) { + new ent = fm_find_ent_by_owner(grenadeid, "grenade", id); + if (ent && len > 0) + pev(ent, pev_model, model, len); + + return ent; +} + +#define fm_halflife_time() get_gametime() +/* stock Float:fm_halflife_time() + return get_gametime() */ + +#define fm_attach_view(%1,%2) engfunc(EngFunc_SetView, %1, %2) +/* stock fm_attach_view(index, entity) + return engfunc(EngFunc_SetView, index, entity) */ + +stock fm_playback_event(flags, invoker, eventindex, Float:delay, const Float:origin[3], const Float:angles[3], Float:fparam1, Float:fparam2, iparam1, iparam2, bparam1, bparam2) { + return engfunc(EngFunc_PlaybackEvent, flags, invoker, eventindex, delay, origin, angles, fparam1, fparam2, iparam1, iparam2, bparam1, bparam2); +} + +#define fm_eng_get_string(%1,%2,%3) engfunc(EngFunc_SzFromIndex, %1, %2, %3) +/* stock fm_eng_get_string(istring, string[], len) + return engfunc(EngFunc_SzFromIndex, istring, string, len) */ + + +/* HLSDK functions */ + +// the dot product is performed in 2d, making the view cone infinitely tall +stock bool:fm_is_in_viewcone(index, const Float:point[3]) { + new Float:angles[3]; + pev(index, pev_angles, angles); + engfunc(EngFunc_MakeVectors, angles); + global_get(glb_v_forward, angles); + angles[2] = 0.0; + + new Float:origin[3], Float:diff[3], Float:norm[3]; + pev(index, pev_origin, origin); + xs_vec_sub(point, origin, diff); + diff[2] = 0.0; + xs_vec_normalize(diff, norm); + + new Float:dot, Float:fov; + dot = xs_vec_dot(norm, angles); + pev(index, pev_fov, fov); + if (dot >= floatcos(fov * M_PI / 360)) + return true; + + return false; +} + +stock bool:fm_is_visible(index, const Float:point[3], ignoremonsters = 0) { + new Float:start[3], Float:view_ofs[3]; + pev(index, pev_origin, start); + pev(index, pev_view_ofs, view_ofs); + xs_vec_add(start, view_ofs, start); + + engfunc(EngFunc_TraceLine, start, point, ignoremonsters, index, 0); + + new Float:fraction; + get_tr2(0, TR_flFraction, fraction); + if (fraction == 1.0) + return true; + + return false; +} + + +/* Engine_stocks functions */ + +stock fm_fakedamage(victim, const classname[], Float:takedmgdamage, damagetype) { + new class[] = "trigger_hurt"; + new entity = fm_create_entity(class); + if (!entity) + return 0; + + new value[16]; + float_to_str(takedmgdamage * 2, value, sizeof value - 1); + fm_set_kvd(entity, "dmg", value, class); + + num_to_str(damagetype, value, sizeof value - 1); + fm_set_kvd(entity, "damagetype", value, class); + + fm_set_kvd(entity, "origin", "8192 8192 8192", class); + fm_DispatchSpawn(entity); + + set_pev(entity, pev_classname, classname); + fm_fake_touch(entity, victim); + fm_remove_entity(entity); + + return 1; +} + +#define fm_find_ent(%1,%2) engfunc(EngFunc_FindEntityByString, %1, "classname", %2) +/* stock fm_find_ent(index, const classname[]) + return engfunc(EngFunc_FindEntityByString, index, "classname", classname) */ + +#define fm_get_user_button(%1) pev(%1, pev_button) +/* stock fm_get_user_button(index) + return pev(index, pev_button) */ + +#define fm_get_user_oldbutton(%1) pev(%1, pev_oldbuttons) +/* stock fm_get_user_oldbutton(index) + return pev(index, pev_oldbuttons) */ + +#define fm_get_entity_flags(%1) pev(%1, pev_flags) +/* stock fm_get_entity_flags(index) + return pev(index, pev_flags) */ + +#define fm_get_entity_distance(%1,%2) floatround(fm_entity_range(%1, %2)) +/* stock fm_get_entity_distance(ent1, ent2) + return floatround(fm_entity_range(ent1, ent2)) */ + +#define fm_get_grenade(%1) fm_get_grenade_id(%1, "", 0) +/* stock fm_get_grenade(id) + return fm_get_grenade_id(id, "", 0) */ + +// optimization idea by Orangutanz +stock fm_get_brush_entity_origin(index, Float:origin[3]) { + new Float:mins[3], Float:maxs[3]; + + pev(index, pev_origin, origin); + pev(index, pev_mins, mins); + pev(index, pev_maxs, maxs); + + origin[0] += (mins[0] + maxs[0]) * 0.5; + origin[1] += (mins[1] + maxs[1]) * 0.5; + origin[2] += (mins[2] + maxs[2]) * 0.5; + + return 1; +} + +// based on v3x's port, upgraded version returns number of removed entities +stock fm_remove_entity_name(const classname[]) { + new ent = -1, num = 0; + while ((ent = fm_find_ent_by_class(ent, classname))) + num += fm_remove_entity(ent); + + return num; +} + +stock fm_ViewContents(id) { + new origin[3], Float:Orig[3]; + get_user_origin(id, origin, Origin_AimEndEyes); + IVecFVec(origin, Orig); + + return fm_point_contents(Orig); +} + +stock fm_get_speed(entity) { + new Float:Vel[3]; + pev(entity, pev_velocity, Vel); + + return floatround(vector_length(Vel)); +} + +stock fm_set_rendering(entity, fx = kRenderFxNone, r = 255, g = 255, b = 255, render = kRenderNormal, amount = 16) { + new Float:RenderColor[3]; + RenderColor[0] = float(r); + RenderColor[1] = float(g); + RenderColor[2] = float(b); + + set_pev(entity, pev_renderfx, fx); + set_pev(entity, pev_rendercolor, RenderColor); + set_pev(entity, pev_rendermode, render); + set_pev(entity, pev_renderamt, float(amount)); + + return 1; +} + +stock fm_set_entity_flags(index, flag, onoff) { + new flags = pev(index, pev_flags); + if ((flags & flag) > 0) + return onoff == 1 ? 2 : 1 + 0 * set_pev(index, pev_flags, flags - flag); + else + return onoff == 0 ? 2 : 1 + 0 * set_pev(index, pev_flags, flags + flag); + + return 0; +} + +stock fm_set_entity_visibility(index, visible = 1) { + set_pev(index, pev_effects, visible == 1 ? pev(index, pev_effects) & ~EF_NODRAW : pev(index, pev_effects) | EF_NODRAW); + + return 1; +} + +#define fm_get_entity_visibility(%1) (!(pev(%1, pev_effects) & EF_NODRAW)) +/* stock fm_get_entity_visibility(index) + return !(pev(index, pev_effects) & EF_NODRAW) */ + +stock fm_set_user_velocity(entity, const Float:vector[3]) { + set_pev(entity, pev_velocity, vector); + + return 1; +} + +#define fm_get_user_velocity(%1,%2) pev(%1, pev_velocity, %2) +/* stock fm_get_user_velocity(entity, Float:vector[3]) + return pev(entity, pev_velocity, vector) */ + + +/* Fun functions */ + +#define fm_get_client_listen(%1,%2) engfunc(EngFunc_GetClientListening, %1, %2) +/* stock fm_get_client_listen(receiver, sender) + return engfunc(EngFunc_GetClientListening, receiver, sender) */ + +#define fm_set_client_listen(%1,%2,%3) engfunc(EngFunc_SetClientListening, %1, %2, %3) +/* stock fm_set_client_listen(receiver, sender, listen) + return engfunc(EngFunc_SetClientListening, receiver, sender, listen) */ + +stock fm_get_user_godmode(index) { + new Float:val; + pev(index, pev_takedamage, val); + + return (val == DAMAGE_NO); +} + +stock fm_set_user_godmode(index, godmode = 0) { + set_pev(index, pev_takedamage, godmode == 1 ? DAMAGE_NO : DAMAGE_AIM); + + return 1; +} + +stock fm_set_user_armor(index, armor) { + set_pev(index, pev_armorvalue, float(armor)); + + return 1; +} + +stock fm_set_user_health(index, health) { + health > 0 ? set_pev(index, pev_health, float(health)) : dllfunc(DLLFunc_ClientKill, index); + + return 1; +} + +stock fm_set_user_origin(index, /* const */ origin[3]) { + new Float:orig[3]; + IVecFVec(origin, orig); + + return fm_entity_set_origin(index, orig); +} + +stock fm_set_user_rendering(index, fx = kRenderFxNone, r = 255, g = 255, b = 255, render = kRenderNormal, amount = 16) { + return fm_set_rendering(index, fx, r, g, b, render, amount); +} + +stock fm_give_item(index, const item[]) { + if (!equal(item, "weapon_", 7) && !equal(item, "ammo_", 5) && !equal(item, "item_", 5) && !equal(item, "tf_weapon_", 10)) + return 0; + + new ent = fm_create_entity(item); + if (!pev_valid(ent)) + return 0; + + new Float:origin[3]; + pev(index, pev_origin, origin); + set_pev(ent, pev_origin, origin); + set_pev(ent, pev_spawnflags, pev(ent, pev_spawnflags) | SF_NORESPAWN); + dllfunc(DLLFunc_Spawn, ent); + + new save = pev(ent, pev_solid); + dllfunc(DLLFunc_Touch, ent, index); + if (pev(ent, pev_solid) != save) + return ent; + + engfunc(EngFunc_RemoveEntity, ent); + + return -1; +} + +stock fm_set_user_maxspeed(index, Float:speed = -1.0) { + engfunc(EngFunc_SetClientMaxspeed, index, speed); + set_pev(index, pev_maxspeed, speed); + + return 1; +} + +stock Float:fm_get_user_maxspeed(index) { + new Float:speed; + pev(index, pev_maxspeed, speed); + + return speed; +} + +stock fm_set_user_gravity(index, Float:gravity = 1.0) { + set_pev(index, pev_gravity, gravity); + + return 1; +} + +stock Float:fm_get_user_gravity(index) { + new Float:gravity; + pev(index, pev_gravity, gravity); + + return gravity; +} + +/* interferes with FM_Spawn enum, just use fm_DispatchSpawn +stock fm_spawn(entity) { + return dllfunc(DLLFunc_Spawn, entity) +} +*/ + +stock fm_set_user_noclip(index, noclip = 0) { + set_pev(index, pev_movetype, noclip == 1 ? MOVETYPE_NOCLIP : MOVETYPE_WALK); + + return 1; +} + +#define fm_get_user_noclip(%1) (pev(%1, pev_movetype) == MOVETYPE_NOCLIP) +/* stock fm_get_user_noclip(index) + return (pev(index, pev_movetype) == MOVETYPE_NOCLIP) */ + +// note: get_user_weapon will still return former weapon index +stock fm_strip_user_weapons(index) { + new ent = fm_create_entity("player_weaponstrip"); + if (!pev_valid(ent)) + return 0; + + dllfunc(DLLFunc_Spawn, ent); + dllfunc(DLLFunc_Use, ent, index); + engfunc(EngFunc_RemoveEntity, ent); + + return 1; +} + +stock fm_set_user_frags(index, frags) { + set_pev(index, pev_frags, float(frags)); + + return 1; +} + + +/* Cstrike functions */ + +stock fm_cs_user_spawn(index) { + set_pev(index, pev_deadflag, DEAD_RESPAWNABLE); + dllfunc(DLLFunc_Spawn, index); + set_pev(index, pev_iuser1, 0); + + return 1; +} + + +/* Custom functions */ + +// based on Basic-Master's set_keyvalue, upgraded version accepts an optional classname (a bit more efficient if it is passed) +stock fm_set_kvd(entity, const key[], const value[], const classname[] = "") { + if (classname[0]) + set_kvd(0, KV_ClassName, classname); + else { + new class[32]; + pev(entity, pev_classname, class, sizeof class - 1); + set_kvd(0, KV_ClassName, class); + } + + set_kvd(0, KV_KeyName, key); + set_kvd(0, KV_Value, value); + set_kvd(0, KV_fHandled, 0); + + return dllfunc(DLLFunc_KeyValue, entity, 0); +} + +stock fm_find_ent_by_integer(index, pev_field, value) { + static maxents; + if (!maxents) + maxents = global_get(glb_maxEntities); + + for (new i = index + 1; i < maxents; ++i) { + if (pev_valid(i) && pev(i, pev_field) == value) + return i; + } + + return 0; +} + +stock fm_find_ent_by_flags(index, pev_field, flags) { + static maxents; + if (!maxents) + maxents = global_get(glb_maxEntities); + + for (new i = index + 1; i < maxents; ++i) { + if (pev_valid(i) && (pev(i, pev_field) & flags) == flags) + return i; + } + + return 0; +} + +stock Float:fm_distance_to_box(const Float:point[3], const Float:mins[3], const Float:maxs[3]) { + new Float:dist[3]; + for (new i = 0; i < 3; ++i) { + if (point[i] > maxs[i]) + dist[i] = point[i] - maxs[i]; + else if (mins[i] > point[i]) + dist[i] = mins[i] - point[i]; + } + + return vector_length(dist); +} + +stock Float:fm_boxes_distance(const Float:mins1[3], const Float:maxs1[3], const Float:mins2[3], const Float:maxs2[3]) { + new Float:dist[3]; + for (new i = 0; i < 3; ++i) { + if (mins1[i] > maxs2[i]) + dist[i] = mins1[i] - maxs2[i]; + else if (mins2[i] > maxs1[i]) + dist[i] = mins2[i] - maxs1[i]; + } + + return vector_length(dist); +} + +stock Float:fm_distance_to_boxent(entity, boxent) { + new Float:point[3]; + pev(entity, pev_origin, point); + + new Float:mins[3], Float:maxs[3]; + pev(boxent, pev_absmin, mins); + pev(boxent, pev_absmax, maxs); + + return fm_distance_to_box(point, mins, maxs); +} + +stock Float:fm_boxents_distance(boxent1, boxent2) { + new Float:mins1[3], Float:maxs1[3]; + pev(boxent1, pev_absmin, mins1); + pev(boxent1, pev_absmax, maxs1); + + new Float:mins2[3], Float:maxs2[3]; + pev(boxent2, pev_absmin, mins2); + pev(boxent2, pev_absmax, maxs2); + + return fm_boxes_distance(mins1, maxs1, mins2, maxs2); +} + +// projects a center of a player's feet base (originally by P34nut, improved) +stock Float:fm_distance_to_floor(index, ignoremonsters = 1) { + new Float:start[3], Float:dest[3], Float:end[3]; + pev(index, pev_origin, start); + dest[0] = start[0]; + dest[1] = start[1]; + dest[2] = -8191.0; + + engfunc(EngFunc_TraceLine, start, dest, ignoremonsters, index, 0); + get_tr2(0, TR_vecEndPos, end); + + pev(index, pev_absmin, start); + new Float:ret = start[2] - end[2]; + + return ret > 0 ? ret : 0.0; +} + +// potential to crash (?) if used on weaponbox+weapon_* entity pair (use fm_remove_weaponbox instead) +stock fm_kill_entity(index) { + set_pev(index, pev_flags, pev(index, pev_flags) | FL_KILLME); + + return 1; +} + +// if weapon index isn't passed then assuming that it's the current weapon +stock fm_get_user_weapon_entity(id, wid = 0) { + new weap = wid, clip, ammo; + if (!weap && !(weap = get_user_weapon(id, clip, ammo))) + return 0; + + new class[32]; + get_weaponname(weap, class, sizeof class - 1); + + return fm_find_ent_by_owner(-1, class, id); +} + +// only weapon index or its name can be passed, if neither is passed then the current gun will be stripped +stock bool:fm_strip_user_gun(index, wid = 0, const wname[] = "") { + new ent_class[32]; + if (!wid && wname[0]) + copy(ent_class, sizeof ent_class - 1, wname); + else { + new weapon = wid, clip, ammo; + if (!weapon && !(weapon = get_user_weapon(index, clip, ammo))) + return false; + + get_weaponname(weapon, ent_class, sizeof ent_class - 1); + } + + new ent_weap = fm_find_ent_by_owner(-1, ent_class, index); + if (!ent_weap) + return false; + + engclient_cmd(index, "drop", ent_class); + + new ent_box = pev(ent_weap, pev_owner); + if (!ent_box || ent_box == index) + return false; + + dllfunc(DLLFunc_Think, ent_box); + + return true; +} + +// only weapon index or its name can be passed, if neither is passed then the current gun will be transferred +stock bool:fm_transfer_user_gun(index1, index2, wid = 0, const wname[] = "") { + new ent_class[32]; + if (!wid && wname[0]) + copy(ent_class, sizeof ent_class - 1, wname); + else { + new weapon = wid, clip, ammo; + if (!weapon && !(weapon = get_user_weapon(index1, clip, ammo))) + return false; + + get_weaponname(weapon, ent_class, sizeof ent_class - 1); + } + + new ent_weap = fm_find_ent_by_owner(-1, ent_class, index1); + if (!ent_weap) + return false; + + engclient_cmd(index1, "drop", ent_class); + + new ent_box = pev(ent_weap, pev_owner); + if (!ent_box || ent_box == index1) + return false; + + set_pev(ent_box, pev_flags, pev(ent_box, pev_flags) | FL_ONGROUND); + dllfunc(DLLFunc_Touch, ent_box, index2); + if (pev(ent_weap, pev_owner) != index2) + return false; + + return true; +} + +stock bool:fm_is_ent_visible(index, entity, ignoremonsters = 0) { + new Float:start[3], Float:dest[3]; + pev(index, pev_origin, start); + pev(index, pev_view_ofs, dest); + xs_vec_add(start, dest, start); + + pev(entity, pev_origin, dest); + engfunc(EngFunc_TraceLine, start, dest, ignoremonsters, index, 0); + + new Float:fraction; + get_tr2(0, TR_flFraction, fraction); + if (fraction == 1.0 || get_tr2(0, TR_pHit) == entity) + return true; + + return false; +} + +// ported from AMXX's core get_user_origin(..., 3) (suggested by Greenberet) +stock fm_get_aim_origin(index, Float:origin[3]) { + new Float:start[3], Float:view_ofs[3]; + pev(index, pev_origin, start); + pev(index, pev_view_ofs, view_ofs); + xs_vec_add(start, view_ofs, start); + + new Float:dest[3]; + pev(index, pev_v_angle, dest); + engfunc(EngFunc_MakeVectors, dest); + global_get(glb_v_forward, dest); + xs_vec_mul_scalar(dest, 9999.0, dest); + xs_vec_add(start, dest, dest); + + engfunc(EngFunc_TraceLine, start, dest, 0, index, 0); + get_tr2(0, TR_vecEndPos, origin); + + return 1; +} + +stock bool:fm_get_user_longjump(index) { + new value[2]; + engfunc(EngFunc_GetPhysicsKeyValue, index, "slj", value, 1); + switch (value[0]) { + case '1': return true; + } + + return false; +} + +stock fm_set_user_longjump(index, bool:longjump = true, bool:tempicon = true) { + if (longjump == fm_get_user_longjump(index)) + return; + + if (longjump) { + engfunc(EngFunc_SetPhysicsKeyValue, index, "slj", "1"); + if (tempicon) { + static msgid_itempickup; + if (!msgid_itempickup) + msgid_itempickup = get_user_msgid("ItemPickup"); + + message_begin(MSG_ONE, msgid_itempickup, _, index); + write_string("item_longjump"); + message_end(); + } + } + else + engfunc(EngFunc_SetPhysicsKeyValue, index, "slj", "0"); +} + +#define WEAPON_SUIT 31 + +stock bool:fm_get_user_suit(index) { + return bool:(!(!(pev(index, pev_weapons) & (1<_lv/_addon/_/_hd + * and itself + * GAMECONFIG The default writable directory () + * GAMEDOWNLOAD The download directory (_download) + * GAME_FALLBACK All paths related to fallback game, same as GAME + * DEFAULTGAME All paths related to the default game which is "valve", same as GAME + * BASE The base path where server is installed + * + * Note that some paths are non-writable. It includes all _* (expect _download) + * and DEFAULTGAME. Any file inside a non-writable path will be ignored if you try to open + * it in writing mode. + * + * @param filename File to open + * @param mode Open mode + * @param use_valve_fs If true, the Valve file system will be used instead + * This can be used to finred files existing in valve + * search paths, rather than solely files existing directly + * in the gamedir. + * @param valve_path_id If use_valve_fs, a search path from gameinfo or NULL_STRING for all search paths + * + * @return A file handle, or null if the file could not be opened. + */ +native fopen(const filename[], const mode[], bool:use_valve_fs = false, const valve_path_id[] = "GAME"); + +/** + * Closes a file handle. + * + * @param file File handle + */ +native fclose(file); + +/** + * Reads a single binary data from a file. + * + * @param file Handle to the file + * @param data Variable to store item read + * @param mode Size of each element, in bytes, to be read + * See BLOCK_* constants + * + * @return Number of elements read + */ +native fread(file, &any:data, mode); + +/** + * Reads binary data from a file. + * + * @param file Handle to the file + * @param data Array to store each item read + * @param blocks Number of items to read into the array + * @param mode Size of each element, in bytes, to be read + * Valid sizes are 1, 2, or 4. See BLOCK_* constants. + * + * @return Number of elements read + */ +native fread_blocks(file, any:data[], blocks, mode); + +/** + * Reads raw binary data from a file. + * + * @param file Handle to the file + * @param stream Array to store each item read + * @param blocksize Number of items to read into the array + * @param blocks Size of each element, in bytes. The data is read directly. + * That is, in 1 or 2-byte mode, the lower byte(s) in + * each cell are used directly, rather than performing + * any casts from a 4-byte number to a smaller number. + * + * @return Number of elements read + */ +native fread_raw(file, any:stream[], blocksize, blocks); + +/** + * Writes a single binary data to a file. + * + * @param file Handle to the file + * @param data Item to write + * @param mode Size of each item in the array in bytes + * Valid sizes are 1, 2, or 4. See BLOCK_* constants + * + * @return Number of elements written + */ +native fwrite(file, any:data, mode); + +/** + * Writes binary data to a file. + * + * @param file Handle to the file + * @param data Array of items to write + * @param blocks Number of items in the array + * @param mode Size of each item in the array in bytes + * Valid sizes are 1, 2, or 4. See BLOCK_* constants + * + * @return Number of elements written + */ +native fwrite_blocks(file, const any:data[], blocks, mode); + +/** + * Writes raw binary data to a file. + * + * @param file Handle to the file. + * @param stream Array of items to write. The data is written directly. + * That is, in 1 or 2-byte mode, the lower byte(s) in + * each cell are used directly, rather than performing + * any casts from a 4-byte number to a smaller number. + * @param blocks Size of each item in the array in bytes. + * @param mode Number of items in the array. + * + * @return Number of elements written + */ +native fwrite_raw(file, const any:stream[], blocks, mode); + +/** + * Tests if the end of file has been reached. + * + * @param file Handle to the file + * + * @return 1 if end of file has been reached, 0 otherwise. + */ +native feof(file); + +/** + * Reads a line from a text file. + * + * @param file Handle to the file. + * @param buffer String buffer to hold the line + * @param maxlength Maximum size of string buffer + * + * @return Total number of characters written on success, 0 otherwise + */ +native fgets(file, buffer[], maxlength); + +/** + * Writes a line of text to a text file. + * + * @param file Handle to the file + * @param text String to write + * @param null_term True to append NULL terminator, false otherwise + * + * @return 0 on success, -1 otherwise + */ +native fputs(file, const text[], bool:null_term = false); + +/** + * Writes a line of formatted text to a text file. + * + * @param file Handle to the file + * @param format Formatting rules + * @param ... Variable number of format parameters + * + * @return Total number of characters written on success, 0 otherwise + */ +native fprintf(file, const fmt[], any:...); + +/** + * Sets the file position indicator. + * + * @param file Handle to the file + * @param position Position relative to what is specified in whence + * @param start SEEK_ constant value of where to see from + * + * @return 0 on success, a non-zero value otherwise + */ +native fseek(file, position, start); + +/** + * Gets current position in the file. + * + * @param file Handle to the file + * + * @return Value for the file position indicator + */ +native ftell(file); + +/** + * Gets character from file. + * + * @param file Handle to the file + * + * @return Character read on success, -1 otherwise + */ +native fgetc(file); + +/** + * Writes character to file + * + * @param file Handle to the file + * @param data Character to put + * + * @return Character written on success, -1 otherwise + */ +native fputc(file, data); + +/** + * Ungets character from file. + * + * @param file Handle to the file + * @param data Character to unget + * + * @return On success, the character put back is returned, -1 otherwise + */ +native fungetc(file, data); + +/** + * Flushes a buffered output stream. + * + * @param file File handle, or 0 for all open streams + * + * @return 0 on success, -1 on failure + */ +native fflush(file); + +/** + * Gets the formatted file size in bytes. + * + * @param filename Path to the file + * @param ... Variable number of format parameters + * + * @return File size in bytes, otherwise -1 if file not found + */ +native filesize(const filename[], any:...); + +/** + * Removes a directory. + * + * @note On most Operating Systems you cannot remove a directory which has files inside it. + * + * @param path Path to the directory + * + * @return 1 on success, 0 otherwise + */ +native rmdir(const path[]); + +/** + * Creates a directory. + * + * @param path Path to create + * @param mode Permissions (default is o=rx,g=rx,u=rwx). Note that folders must have + * the execute bit set on Linux. On Windows, the mode is ignored. + * @param use_valve_fs If true, the Valve file system will be used instead + * This can be used to create folders in the game's + * Valve search paths, rather than directly in the gamedir. + * @param valve_path_id If use_valve_fs, a search path from gameinfo or NULL_STRING for default + * In this case, mode is ignored + * + * @return 0 on success, -1 otherwise + */ +native mkdir(const dirname[], mode = FPERM_DIR_DEFAULT, bool:use_valve_fs = false, const valve_path_id[] = "GAMECONFIG"); + +/** + * Deletes a file (delete_file macro) + * + * @param filename Path of the file to delete + * @param use_valve_fs If true, the Valve file system will be used instead. + * This can be used to delete files existing in the Valve + * search path, rather than solely files existing directly + * in the gamedir. + * @param valve_path_id If use_valve_fs, a search path from gameinfo or NULL_STRING for all search paths + * + * @return 1 on success, 0 on failure or if file not immediately removed + */ +native unlink(const filename[], bool:use_valve_fs = false, const valve_path_id[] = "GAMECONFIG"); + +/** + * Opens a directory/folder for contents enumeration. + * + * @note Directories are closed with close_dir(). + * + * @param dir Path to open. + * @param firstfile String buffer to hold first file name + * @param length Maximum size of the string buffer + * @param type Optional variable to store the file type + * @param use_valve_fs If true, the Valve file system will be used instead. + * This can be used to find files existing in any of + * the Valve search paths, rather than solely files + * existing directly in the gamedir. + * @param valve_path_id If use_valve_fs, a search path from gameinfo or NULL_STRING for all search paths. + * + * @return Handle to the directory, 0 otherwise + */ +native open_dir(dir[], firstfile[], length, &FileType:type = FileType_Unknown, bool:use_valve_fs = false, const valve_path_id[] = "GAME"); + +/** + * Reads the next directory entry as a local filename. + * + * @note Contents of buffers are undefined when returning false. + * @note Both the '.' and '..' automatic directory entries will be retrieved for Windows and Linux. + * + * @param dirh Handle to a directory + * @param buffer String buffer to hold directory name + * @param length Maximum size of string buffer + * @param type Optional variable to store the file type. FileType_* constants + * + * @return 1 on success, 0 if there are no more files to read. + */ +native next_file(dirh, buffer[], length, &FileType:type = FileType_Unknown); + +/** + * Closes the directory. + * + * @param dirh Handle to a directory + */ +native close_dir(dirh); + +/** + * Loads a file using the LoadFileForMe engine function. + * + * The data is truncated if there is not enough space. No null-terminator + * is applied; the data is the raw contents of the file. + * + * @param file File to load (may be a file from the GCF) + * @param buffer Buffer to store file contents + * @param maxlength Maximum size of the file buffer + * @param length Variable to store the file length. This may return + * a number larger than the buffer size + * @return -1 if the file could not be loaded. Otherwise, + * the number of cells actually written to the buffer + * are returned. + */ +native LoadFileForMe(const file[], buffer[], maxlength, &length = 0); + +/** + * Returns a file timestamp as a unix timestamp. + * + * @param file File name + * @param tmode Time mode, see FileTime_* constants + * + * @return Returns a file timestamp as a unix timestamp + */ +native GetFileTime(const file[], FileTimeType:tmode); + +/** + * Changes a file or directories permissions. + * + * @param path Path to the file + * @param mode Permissions to set, see FPERM_* constants + * + * @return True on success, false otherwise + */ +native bool:SetFilePermissions(const path[], mode); + +/** + * Reads a single int8 (byte) from a file. The returned value is sign- + * extended to an int32. + * + * @param file Handle to the file + * @param data Variable to store the data read + * + * @return True on success, false on failure + */ +native bool:FileReadInt8(file, &any:data); + +/** + * Reads a single uint8 (unsigned byte) from a file. The returned value is + * zero-extended to an int32. + * + * @param file Handle to the file + * @param data Variable to store the data read + * + * @return True on success, false on failure + */ +native bool:FileReadUint8(file, &any:data); + +/** + * Reads a single int16 (short) from a file. The value is sign-extended to + * an int32. + * + * @param file Handle to the file + * @param data Variable to store the data read + * + * @return True on success, false on failure + */ +native bool:FileReadInt16(file, &any:data); + +/** + * Reads a single unt16 (unsigned short) from a file. The value is zero- + * extended to an int32. + * + * @param file Handle to the file + * @param data Variable to store the data read + * + * @return True on success, false on failure + */ +native bool:FileReadUint16(file, &any:data); + +/** + * Reads a single int32 (int/cell) from a file. + * + * @param file Handle to the file + * @param data Variable to store the data read + * + * @return True on success, false on failure + */ +native bool:FileReadInt32(file, &any:data); + +/** + * Writes a single int8 (byte) to a file. + * + * @param file Handle to the file + * @param data Data to write (truncated to an int8) + * + * @return True on success, false on failure + */ +native bool:FileWriteInt8(file, any:data); + +/** + * Writes a single int16 (short) to a file. + * + * @param file Handle to the file + * @param data Data to write (truncated to an int16) + * + * @return True on success, false on failure + */ +native bool:FileWriteInt16(file, any:data); + +/** + * Writes a single int32 (int/cell) to a file. + * + * @param file Handle to the file + * @param data Data to write + * + * @return True on success, false on failure + */ +native bool:FileWriteInt32(file, any:data); + diff --git a/bin/compiler/include/float.inc b/bin/compiler/include/float.inc new file mode 100644 index 0000000..a731ffb --- /dev/null +++ b/bin/compiler/include/float.inc @@ -0,0 +1,422 @@ +/* Float arithmetic +* +* (c) Copyright 1999, Artran, Inc. +* Written by Greg Garner (gmg@artran.com) +* Modified in March 2001 to include user defined +* operators for the floating point functions. +* +* This file is provided as is (no warranties). +*/ + +#if defined _float_included + #endinput +#endif +#define _float_included + +#pragma rational Float + +/** + * Different methods of rounding + */ +enum floatround_method { + floatround_round = 0, + floatround_floor, + floatround_ceil, + floatround_tozero +}; + +/** + * Different units of measurement for angles + */ +enum anglemode { + radian = 0, + degrees, + grades +}; + +/** + * Converts an integer into a floating point value. + * + * @param value Value to be converted + * + * @return Converted value + */ +native Float:float(value); + +/** + * Converts a string into a floating point value. + * + * @param string Input string to be converted + * + * @return Converted value + */ +native Float:floatstr(const string[]); + +/** + * Returns the fractional part of a floating point value + * + * @param string Floating point value to get the fractional part from + * + * @return The fractional part + */ +native Float:floatfract(Float:value); + +/** + * Rounds a floating point value to an integer value + * + * @note For the list of available rounding methods look at + * floatround_method enumeration. + * + * @param value Floating point value to be rounded + * @param method Rounding method + * + * @return Converted value + */ +native floatround(Float:value, floatround_method:method=floatround_round); + +/** + * Compares two floating point values. + * + * @param fOne First value to be compared + * @param fTwo Second value to be compared + * + * @return If arguments are equal, returns 0. + * If the first one is greater, returns 1. + * If the second one is greater, returns -1. + */ +native floatcmp(Float:fOne, Float:fTwo); + +/** + * Returns the square root of a floating point value + * + * @note Same as floatpower(value, 0.5) + * + * @param value Floating point value to get square root from + * + * @return Square root of the input value + */ +native Float:floatsqroot(Float:value); + +/** + * Returns the value raised to the power of the exponent + * + * @param value Floating point value to be raised + * @param exponent The exponent + * + * @return Value raised to the power of the exponent + */ +native Float:floatpower(Float:value, Float:exponent); + +/** + * Returns the logarithm of value + * + * @param value Floating point value to calculate the logarithm for + * @param base The optional logarithmic base to use. + * Defaults to 10, or the natural logarithm + * + * @return Square root of the input value + */ +native Float:floatlog(Float:value, Float:base=10.0); + +/** + * Returns the sine of a given angle + * + * @note For available units of measurements(modes) look at the anglemode enum + * + * @param value The angle to calculate the sine from + * @param mode What unit of measurement is the angle specified in + * Defaults to radians + * + * @return The sine of a given angle + */ +native Float:floatsin(Float:value, anglemode:mode=radian); + +/** + * Returns the cosine of a given angle + * + * @note For available units of measurements(modes) look at the anglemode enum + * + * @param value The angle to calculate the cosine from + * @param mode What unit of measurement is the angle specified in + * Defaults to radians + * + * @return The cosine of a given angle + */ +native Float:floatcos(Float:value, anglemode:mode=radian); + +/** + * Returns the tangent of a given angle + * + * @note For available units of measurements(modes) look at the anglemode enum + * + * @param value The angle to calculate the tangent from + * @param mode What unit of measurement is the angle specified in + * Defaults to radians + * + * @return The tangent of a given angle + */ +native Float:floattan(Float:value, anglemode:mode=radian); + +/** + * Returns the hyperbolic sine of a given angle + * + * @note For available units of measurements(modes) look at the anglemode enum + * + * @param value The angle to calculate the hyperbolic sine from + * @param mode What unit of measurement is the angle specified in + * Defaults to radians + * + * @return The hyperbolic sine of a given angle + */ +native Float:floatsinh(Float:angle, anglemode:mode=radian); + +/** + * Returns the hyperbolic cosine of a given angle + * + * @note For available units of measurements(modes) look at the anglemode enum + * + * @param value The angle to calculate the hyperbolic cosine from + * @param mode What unit of measurement is the angle specified in + * Defaults to radians + * + * @return The hyperbolic cosine of a given angle + */ +native Float:floatcosh(Float:angle, anglemode:mode=radian); + +/** + * Returns the hyperbolic tangent of a given angle + * + * @note For available units of measurements(modes) look at the anglemode enum + * + * @param value The angle to calculate the hyperbolic tangent from + * @param mode What unit of measurement is the angle specified in + * Defaults to radians + * + * @return The hyperbolic tangent of a given angle + */ +native Float:floattanh(Float:angle, anglemode:mode=radian); + +/** + * Returns the absolute value of a floating point value + * + * @param value The floating point value to get the absolute value from + * + * @return The absolute value + */ +native Float:floatabs(Float:value); + +/* Return the angle of a sine, cosine or tangent. + * The output angle may be in radians, degrees, or grades. */ + +/** + * Returns the angle of the given tangent + * + * @note For available units of measurements(modes) look at the anglemode enum + * + * @param value The tangent to calculate the angle from + * @param mode What unit of measurement should the output angle be in + * + * @return The angle of a tangent + */ +native Float:floatatan(Float:angle, {anglemode,_}:radix); + +/** + * Returns the angle of the given cosine + * + * @note For available units of measurements(modes) look at the anglemode enum + * + * @param value The cosine to calculate the angle from + * @param mode What unit of measurement should the output angle be in + * + * @return The angle of a cosine + */ +native Float:floatacos(Float:angle, {anglemode,_}:radix); + +/** + * Returns the angle of the given sine + * + * @note For available units of measurements(modes) look at the anglemode enum + * + * @param value The sine to calculate the angle from + * @param mode What unit of measurement should the output angle be in + * + * @return The angle of a sine + */ +native Float:floatasin(Float:angle, {anglemode,_}:radix); + +/** + * Computes the principal value of arctangent of y/x + * + * @note Someone should verify this native, not sure what it actually does. + * @note For available units of measurements(modes) look at the anglemode enum + * + * @param x Value representing the proportion of the x-coordinate. + * @param y Value representing the proportion of the x-coordinate. + * @param mode What unit of measurement should the output angle be in + * + * @return Arctangent of y/x + */ +native Float:floatatan2(Float:x, Float:y, {anglemode,_}:radix); + + + +/* Multiply two floats together */ +native Float:floatmul(Float:oper1, Float:oper2); + +/* Divide the dividend float by the divisor float */ +native Float:floatdiv(Float:dividend, Float:divisor); + +/* Add two floats together */ +native Float:floatadd(Float:dividend, Float:divisor); + +/* Subtract oper2 float from oper1 float */ +native Float:floatsub(Float:oper1, Float:oper2); + +/* user defined operators */ +native Float:operator*(Float:oper1, Float:oper2) = floatmul; +native Float:operator/(Float:oper1, Float:oper2) = floatdiv; +native Float:operator+(Float:oper1, Float:oper2) = floatadd; +native Float:operator-(Float:oper1, Float:oper2) = floatsub; + +stock Float:operator++(Float:oper) + return oper+1.0; + +stock Float:operator--(Float:oper) + return oper-1.0; + +stock Float:operator-(Float:oper) + return oper^Float:cellmin; /* IEEE values are sign/magnitude */ + +stock Float:operator*(Float:oper1, oper2) + return floatmul(oper1, float(oper2)); /* "*" is commutative */ + +stock Float:operator/(Float:oper1, oper2) + return floatdiv(oper1, float(oper2)); + +stock Float:operator/(oper1, Float:oper2) + return floatdiv(float(oper1), oper2); + +stock Float:operator+(Float:oper1, oper2) + return floatadd(oper1, float(oper2)); /* "+" is commutative */ + +stock Float:operator-(Float:oper1, oper2) + return floatsub(oper1, float(oper2)); + +stock Float:operator-(oper1, Float:oper2) + return floatsub(float(oper1), oper2); + +stock bool:operator==(Float:oper1, Float:oper2) + return floatcmp(oper1, oper2) == 0; + +stock bool:operator==(Float:oper1, oper2) + return floatcmp(oper1, float(oper2)) == 0; /* "==" is commutative */ + +stock bool:operator!=(Float:oper1, Float:oper2) + return floatcmp(oper1, oper2) != 0; + +stock bool:operator!=(Float:oper1, oper2) + return floatcmp(oper1, float(oper2)) != 0; /* "==" is commutative */ + +stock bool:operator>(Float:oper1, Float:oper2) + return floatcmp(oper1, oper2) > 0; + +stock bool:operator>(Float:oper1, oper2) + return floatcmp(oper1, float(oper2)) > 0; + +stock bool:operator>(oper1, Float:oper2) + return floatcmp(float(oper1), oper2) > 0; + +stock bool:operator>=(Float:oper1, Float:oper2) + return floatcmp(oper1, oper2) >= 0; + +stock bool:operator>=(Float:oper1, oper2) + return floatcmp(oper1, float(oper2)) >= 0; + +stock bool:operator>=(oper1, Float:oper2) + return floatcmp(float(oper1), oper2) >= 0; + +stock bool:operator<(Float:oper1, Float:oper2) + return floatcmp(oper1, oper2) < 0; + +stock bool:operator<(Float:oper1, oper2) + return floatcmp(oper1, float(oper2)) < 0; + +stock bool:operator<(oper1, Float:oper2) + return floatcmp(float(oper1), oper2) < 0; + +stock bool:operator<=(Float:oper1, Float:oper2) + return floatcmp(oper1, oper2) <= 0; + +stock bool:operator<=(Float:oper1, oper2) + return floatcmp(oper1, float(oper2)) <= 0; + +stock bool:operator<=(oper1, Float:oper2) + return floatcmp(float(oper1), oper2) <= 0; + +stock bool:operator!(Float:oper) + return (_:oper & ((-1)/2)) == 0; /* -1 = all bits to 1; /2 = remove most significant bit (sign) + works on both 32bit and 64bit systems; no constant required */ +/* forbidden operations */ +forward operator%(Float:oper1, Float:oper2); +forward operator%(Float:oper1, oper2); +forward operator%(oper1, Float:oper2); + + +/** + * Returns whichever value is the smaller one + * + * @param ValueA The first value + * @param ValueB The second value + * + * @return ValueA if it is smaller than ValueB, and vice versa + */ +stock Float:floatmin(Float:ValueA, Float:ValueB) +{ + if (ValueA<=ValueB) + { + return ValueA; + } + + return ValueB; +} + +/** + * Returns whichever value is the greater one + * + * @param ValueA The first value + * @param ValueB The second value + * + * @return ValueA if it is greater than ValueB, and vice versa + */ +stock Float:floatmax(Float:ValueA, Float:ValueB) +{ + if (ValueA>=ValueB) + { + return ValueA; + } + + return ValueB; +} + +/** + * Clamps a value between a minimum and a maximum floating point value + * + * @param Value The value to be clamped + * @param MinValue Minimum value + * @param MaxValue Maximum value + * + * @return The Value clamped between MinValue and MaxValue + */ +stock Float:floatclamp(Float:Value, Float:MinValue, Float:MaxValue) +{ + if (Value<=MinValue) + { + return MinValue; + } + if (Value>=MaxValue) + { + return MaxValue; + } + + return Value; +} \ No newline at end of file diff --git a/bin/compiler/include/fun.inc b/bin/compiler/include/fun.inc new file mode 100644 index 0000000..0dd35eb --- /dev/null +++ b/bin/compiler/include/fun.inc @@ -0,0 +1,333 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Fun Functions +// + +#if defined _fun_included + #endinput +#endif +#define _fun_included + +#pragma reqlib fun +#if !defined AMXMODX_NOAUTOLOAD + #pragma loadlib fun +#endif + + +/** + * Parts of body for hits, for use with set_user_hitzones(). + */ +const HITZONE_GENERIC = (1 << HIT_GENERIC); // 1 +const HITZONE_HEAD = (1 << HIT_HEAD); // 2 +const HITZONE_CHEST = (1 << HIT_CHEST); // 4 +const HITZONE_STOMACH = (1 << HIT_STOMACH); // 8 +const HITZONE_LEFTARM = (1 << HIT_LEFTARM); // 16 +const HITZONE_RIGHTARM = (1 << HIT_RIGHTARM); // 32 +const HITZONE_LEFTLEG = (1 << HIT_LEFTLEG); // 64 +const HITZONE_RIGHTLEG = (1 << HIT_RIGHTLEG); // 128 +const HITZONES_DEFAULT = HITZONE_GENERIC | HITZONE_HEAD | HITZONE_CHEST | HITZONE_STOMACH | + HITZONE_LEFTARM | HITZONE_RIGHTARM | HITZONE_LEFTLEG | HITZONE_RIGHTLEG; // 255 + +/** + * Tells whether receiver hears sender via voice communication. + * + * @param receiver Receiver + * @param sender Sender + * + * @return 1 if receiver hears the sender, 0 otherwise. + * @error If receiver or sender are not connected or not + * within the range of 1 to MaxClients + */ +native get_client_listen(receiver, sender); + +/** + * Sets who can listen who. + * + * @param receiver Receiver + * @param sender Sender + * @param listen 1 if receiver should be able to hear sender, 0 if not + * + * @return 0 if the setting can't be done for some reason + * @error If receiver or sender are not connected or not + * within the range of 1 to MaxClients. + */ +native set_client_listen(receiver, sender, listen); + +/** + * Sets player's godmode. + * + * @param index Client index + * @param godmode 1 to enable godmode, 0 to disable + * + * @noreturn + * @error If player is not connected or not within the range + * of 1 to MaxClients. + */ +native set_user_godmode(index, godmode = 0); + +/** + * Tells whether a player has godmode on. + * + * @param index Client index + * + * @return 1 if player has godmode on, 0 if not + * @error If player is not connected or not within the range + * of 1 to MaxClients. + */ +native get_user_godmode(index); + +/** + * Sets player's armor amount. + * + * @param index Client index + * @param armor The armor amount to set + * + * @noreturn + * @error If player is not connected or not within the range + * of 1 to MaxClients. + */ +native set_user_armor(index, armor); + +/** + * Sets player's health amount. + * + * @param index Client index + * @param health The health amount to set + * + * @noreturn + * @error If player is not connected or not within the range + * of 1 to MaxClients. + */ +native set_user_health(index, health); + +/** + * Moves a player to the given origin. + * + * @param index Client index + * @param origin Origin to move a player to + * + * @noreturn + * @error If player is not connected or not within the range + * of 1 to MaxClients. + */ +native set_user_origin(index, const origin[3]); + +/** + * Sets player's rendering mode. + * + * @note A really useful render modes reference: + * https://sites.google.com/site/svenmanor/rendermodes + * + * @param index Client index + * @param fx Rendering effects. One of kRenderFx* constants + * @param r The amount of red color (0 to 255) + * @param g The amount of green color (0 to 255) + * @param b The amount of blue color (0 to 255) + * @param render Render mode. One of kRender* constants + * @param amount Render amount (0 to 255) + * + * @noreturn + * @error If player is not connected or not within the range + * of 1 to MaxClients. + */ +native set_user_rendering(index, fx = kRenderFxNone, r = 0, g = 0, b = 0, render = kRenderNormal, amount = 0); + +/** + * Gets player's rendering mode. + * + * @note A really useful render modes reference: + * https://sites.google.com/site/svenmanor/rendermodes + * + * @param index Client index + * @param fx Variable to store the rendering effect + * @param r Variable to store the amount of red color + * @param g Variable to store the amount of green color + * @param b Variable to store the amount of blue color + * @param render Variable to store the render mode + * @param amount Variable to store the render amount + * + * @noreturn + * @error If player is not connected or not within the range + * of 1 to MaxClients. + */ +native get_user_rendering(index, &fx = kRenderFxNone, &r = 0, &g = 0, &b = 0, &render = kRenderNormal, &amount = 0); + +/** + * Gives an item to a player. + * + * @param index Client index + * @param item Classname of the item to give. Should start with either + * "weapon_", "ammo_", "item_" or "tf_weapon_" + * + * @return Item entity index. If an invalid item name is + * given or the item failed to create, it will return 0. + * If the item was removed, it will return -1 + * @error If player is not connected or not within the range + * of 1 to MaxClients or item creation fails. + */ +native give_item(index, const item[]); + +/** + * Sets (adds, removes) hit zones for a player. + * + * @note This actually sets rules of how any player can hit any other. + * Example: set_user_hitzones(id, target, 2) - makes @id able to + * hit @target only in the head. + * + * @param index Client index + * @param target The target player + * @param body A bitsum of the body parts that can/can't be shot. See HITZONE* constants. + * + * @noreturn + * @error If player is not connected or not within the range + * of 1 to MaxClients. + */ +native set_user_hitzones(index = 0, target = 0, body = HITZONES_DEFAULT); + +/** + * Gets the set of hit zone "rules" between @index and @target players. + * + * @note For the body part bitsum, see HITZONE* constants. + * + * @param index Client index + * @param target The target player + * + * @return The bitsum of @target's body parts @index is able to hit + * @error If player is not connected or not within the range + * of 1 to MaxClients. + */ +native get_user_hitzones(index, target); + +/** + * Sets player's maximum movement speed. + * + * @param index Client index + * @param speed The maximum speed player will be able to run at + * + * @noreturn + * @error If player is not connected or not within the range + * of 1 to MaxClients. + */ +native set_user_maxspeed(index, Float:speed = -1.0); + +/** + * Gets player's maximum movement speed. + * + * @param index Client index + * + * @return Player's maximum movement speed + * @error If player is not connected or not within the range + * of 1 to MaxClients. + */ +native Float:get_user_maxspeed(index); + +/** + * Sets player's gravity. + * + * @param index Client index + * @param gravity Gravity value to set, 1.0 being normal gravity (800) + * + * @noreturn + * @error If player is not connected or not within the range + * of 1 to MaxClients. + */ +native set_user_gravity(index, Float:gravity = 1.0); + +/** + * Gets player's gravity. + * + * @param index Client index + * + * @return Player's gravity value, 1.0 being normal gravity (800) + * @error If player is not connected or not within the range + * of 1 to MaxClients. + */ +native Float:get_user_gravity(index); + +/** + * Spawns an entity. + * + * @param index Entity index + * + * @noreturn + * @error If player is not connected or not within the range + * of 1 to MaxClients. + */ +native spawn(index); + +/** + * Enables or disables player's noclip. + * + * @param index Client index + * @param noclip 1 to enable noclip, 0 to disable + * + * @noreturn + * @error If player is not connected or not within the range + * of 1 to MaxClients. + */ +native set_user_noclip(index, noclip = 0); + +/** + * Gets whether a player has noclip enabled or not. + * + * @param index Client index + * + * @return 1 if noclip is enabled, 0 if disabled + * @error If player is not connected or not within the range + * of 1 to MaxClients. + */ +native get_user_noclip(index); + +/** + * Tells whether a player has silent footsteps enabled. + * + * @param index Client index + * + * @return 1 if silent footsteps are enabled, 0 if not + * @error If player is not connected or not within the range + * of 1 to MaxClients. + */ +native get_user_footsteps(index); + +/** + * Enables or disables player's silent footsteps. + * + * @param index Client index + * @param set 1 if player should have silent footsteps, 0 otherwise + * + * @noreturn + * @error If player is not connected or not within the range + * of 1 to MaxClients. + */ +native set_user_footsteps(id, set = 1); + +/** + * Strips all weapons from a player, including their knife. + * + * @param index Client index + * + * @noreturn + * @error If player is not connected or not within the range + * of 1 to MaxClients. + */ +native strip_user_weapons(index); + +/** + * Sets player's frags amount. + * + * @param index Client index + * @param frags The amount of frags to set + * + * @noreturn + * @error If player is not connected or not within the range + * of 1 to MaxClients. + */ +native set_user_frags(index, frags); diff --git a/bin/compiler/include/gameconfig.inc b/bin/compiler/include/gameconfig.inc new file mode 100644 index 0000000..d3724e4 --- /dev/null +++ b/bin/compiler/include/gameconfig.inc @@ -0,0 +1,93 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Game Config Functions +// + +#if defined _gameconfigs_included + #endinput +#endif +#define _gameconfigs_included + +enum GameConfig +{ + Invalid_GameConfig = 0 +}; + +/** + * Loads a game config file. + * + * @note The file path must be relative to the 'gamedata' folder under the data folder + * and the extension should be omitted. + * + * @param file File to load + * + * @return A handle to the game config file + */ +native GameConfig:LoadGameConfigFile(const file[]); + +/** + * Returns an offset value. + * + * @param handle Game config handle + * @param key Key to retrieve from the offset section + * + * @return An offset, or -1 on failure + * @error Invalid game config handle + */ +native GameConfGetOffset(GameConfig:handle, const key[]); + +/** + * Returns an offset value given a classname. + * + * @param handle Game config handle + * @param classname Class name to match from the offset section + * @param key Key to retrieve from the offset section + * + * @return An offset, or -1 on failure + * @error Invalid game config handle + */ +native GameConfGetClassOffset(GameConfig:handle, const classname[], const key[]); + +/** + * Gets the value of a key from the "Keys" section. + * + * @param handle Game config handle + * @param key Key to retrieve from the Keys section + * @param buffer Destination string buffer + * @param maxlen Maximum length of output string buffer + * + * @return True if key existed, false otherwise + * @error Invalid game config handle + */ +native bool:GameConfGetKeyValue(GameConfig:handle, const key[], buffer[], maxlen); + +/** + * Finds an address calculation in a GameConfig file. + * + * @param handle Game config handle + * @param name Name of the property to find + * + * @return An address calculated on success, otherwise 0 on failure. + * @error Invalid game config handle + */ +native GameConfGetAddress(GameConfig:handle, const name[]); + +/** + * Destroys a game config and frees its memory. + * + * @note The function automatically sets the variable passed to it to 0 to aid + * in preventing accidental usage after destroy. + * + * @param handle Game config handle + * + * @return 1 on success, 0 if an invalid handle was passed in + */ +native CloseGameConfigFile(&GameConfig:handle); \ No newline at end of file diff --git a/bin/compiler/include/geoip.inc b/bin/compiler/include/geoip.inc new file mode 100644 index 0000000..9bc211f --- /dev/null +++ b/bin/compiler/include/geoip.inc @@ -0,0 +1,264 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// GeoIP Module Functions +// + +#if defined geoip_included + #endinput +#endif +#define _geoip_included + +#pragma reqlib geoip +#if !defined AMXMODX_NOAUTOLOAD + #pragma loadlib geoip +#endif + +/** + * @global IP addresses passed to these natives can contain ports, the ports will be ignored. + */ + +/** + * Look up the two character country code for a given IP address. + * e.g: "US", "CA", etc. + * + * @param ip The IP address to lookup. + * @param result The result buffer. If the lookup does not succeed, the buffer is not modified. + * + * @return true on a successful lookup, false on a failed lookup. + */ +native bool:geoip_code2_ex(const ip[], result[3]); + +/** + * Look up the three character country code for a given IP address. + * e.g: "USA", "cAN", etc. + * + * @param ip The IP address to lookup. + * @param result The result buffer. If the lookup does not succeed, the buffer is not modified. + * + * @return true on a successful lookup, false on a failed lookup. + */ +native bool:geoip_code3_ex(const ip[], result[4]); + +/** + * Lookup the two character country code for a given IP address. Sets the buffer to "error" on + * an unsuccessful lookup. + * + * @deprecated This native will overflow the buffer by one cell on an unknown ip lookup! + * Use geoip_code2_ex instead. + * + * @param ip The IP address to lookup. + * @param result The result buffer. + * + * @return The result length. + */ +#pragma deprecated Use geoip_code2_ex() instead. +native geoip_code2(const ip[], ccode[3]); + +/** + * Lookup the three character country code for a given IP address. Sets the buffer to "error" on + * an unsuccessful lookup. + * + * @deprecated This native will overflow the buffer by one cell on an unknown ip lookup! + * Use geoip_code3_ex instead. + * + * @param ip The IP address to lookup. + * @param result The result buffer. + * + * @return The result length. + */ +#pragma deprecated Use geoip_code3_ex() instead. +native geoip_code3(const ip[], result[4]); + +/** + * Lookup the full country name for the given IP address. Sets the buffer to "error" on + * an unsuccessful lookup. + * + * @param ip The IP address to lookup. + * @param result The result of the geoip lookup. + * @param len The maximum length of the result buffer. + * + * @return The result length. + */ +#pragma deprecated Use geoip_country_ex() instead. +native geoip_country(const ip[], result[], len = 45); + +/** + * Lookup the full country name for the given IP address. + * + * @param ip The IP address to lookup. + * @param result The result of the geoip lookup. + * @param len The maximum length of the result buffer. + * @param id An optional player's index in order to return the result + * in the player's language, if supported. + * -1: the default language, which is english. + * 0: the server language. You can use LANG_SERVER define. + * >=1: the player's language. + * + * @return The result length on successful lookup, 0 otherwise. + */ +native geoip_country_ex(const ip[], result[], len, id = -1); + +/** + * Look up the full city name for the given IP address. + * + * @note This native requires GeoIP City database, which can be retrieved from: + * http://dev.maxmind.com/geoip/geoip2/geolite2/ (MaxMind DB binary) + * + * @param ip The IP address to look up. + * @param result The result of the geoip look up. + * @param len The maximum length of the result buffer. + * @param id An optional player's index in order to return the result + * in the player's language, if supported. + * -1: the default language, which is english. + * 0: the server language. You can use LANG_SERVER define. + * >=1: the player's language. + * + * @return The result length on successful lookup, 0 otherwise. + */ +native geoip_city(const ip[], result[], len, id = -1); + +/** + * Look up the region/state code for the given IP address. + * e.g. "US-OH", "DE-HH", IT-82, "FR-U", etc. + * + * @note This native requires GeoIP City database, which can be retrieved from: + * http://dev.maxmind.com/geoip/geoip2/geolite2/ (MaxMind DB binary) + * + * @param ip The IP address to look up. + * @param result The result of the geoip look up. + * @param len The maximum length of the result buffer. + * + * @return The result length on successful lookup, 0 otherwise. + */ +native geoip_region_code(const ip[], result[], len); + +/** + * Look up the full region/state name for the given IP address. + * + * @note This native requires GeoIP City database, which can be retrieved from: + * http://dev.maxmind.com/geoip/geoip2/geolite2/ (MaxMind DB binary) + * + * @param ip The IP address to look up. + * @param result The result of the geoip look up. + * @param len The maximum length of the result buffer. + * @param id An optional player's index in order to return the result + * in the player's language, if supported. + * -1: the default language, which is english. + * 0: the server language. You can use LANG_SERVER define. + * >=1: the player's language. + * + * @return The result length on successful lookup, 0 otherwise. + */ +native geoip_region_name(const ip[], result[], len, id = -1); + +/** + * Look up the full time zone for the given IP address. + * e.g. America/Los_Angeles, Europe/Paris. + * + * @note This native requires GeoIP City database, which can be retrieved from: + * http://dev.maxmind.com/geoip/geoip2/geolite2/ (MaxMind DB binary) + * + * @param ip The IP address to look up. + * @param result The result of the geoip look up. + * @param len The maximum length of the result buffer. + * + * @return The result length on successful lookup, 0 otherwise. + */ +native geoip_timezone(const ip[], result[], len); + +/** + * Look up the city's latitude for the given IP address. + * + * @note This native requires GeoIP City database, which can be retrieved from: + * http://dev.maxmind.com/geoip/geoip2/geolite2/ (MaxMind DB binary) + * + * @param ip The IP address to look up. + * + * @return The result of the geoip look up, 0 if latitude is not found. + */ +native Float:geoip_latitude(const ip[]); + +/** + * Look up the city's longitude for the given IP address. + * + * @note This native requires GeoIP City database, which can be retrieved from: + * http://dev.maxmind.com/geoip/geoip2/geolite2/ (MaxMind DB binary) + * + * @param ip The IP address to look up. + * + * @return The result of the geoip look up, 0 if longitude is not found. + */ +native Float:geoip_longitude(const ip[]); + +/** + * Calculate the distance between geographical coordinates, latitude and longitude. + * + * @note This native requires GeoIP City database, which can be retrieved from: + * http://dev.maxmind.com/geoip/geoip2/geolite2/ (MaxMind DB binary) + * + * @param lat1 The first IP latitude. + * @param lon1 The first IP longitude. + * @param lat2 The second IP latitude. + * @param lon2 The second IP longitude. + * @param system The system of measurement, 0 = Metric(kilometers) or 1 = English(miles). + * + * @return The distance as result in specified system of measurement. + */ +#define SYSTEM_METRIC 0 // kilometers +#define SYSTEM_IMPERIAL 1 // statute miles + +native Float:geoip_distance(Float:lat1, Float:lon1, Float:lat2, Float:lon2, system = SYSTEM_METRIC); + +/** + * Look up the continent code for a given IP address. + * + * @note This native requires GeoIP City database, which can be retrieved from: + * http://dev.maxmind.com/geoip/geoip2/geolite2/ (MaxMind DB binary) + * @note The code can be retrieved as integer (See CONTINENT_* constants.) or string (2 characters). + * @note Possible continent codes are AF, AN, AS, EU, NA, OC, SA for + * Africa(1), Antarctica(2), Asia(3), Europe(4), North America(5), Oceania(6), South America(7). + * + * @param ip The IP address to look up. + * @param result The result of the geoip look up. + * + * @return The continent id on successful lookup, 0 otherwise. + */ +enum Continent +{ + CONTINENT_UNKNOWN = 0, + CONTINENT_AFRICA, + CONTINENT_ANTARCTICA, + CONTINENT_ASIA, + CONTINENT_EUROPE, + CONTINENT_NORTH_AMERICA, + CONTINENT_OCEANIA, + CONTINENT_SOUTH_AMERICA, +}; +native Continent:geoip_continent_code(const ip[], result[3]); + +/** + * Look up the full continent name for the given IP address. + * + * @note This native requires GeoIP City database, which can be retrieved from: + * http://dev.maxmind.com/geoip/geoip2/geolite2/ (MaxMind DB binary) + * + * @param ip The IP address to look up. + * @param result The result of the geoip look up. + * @param len The maximum length of the result buffer. + * @param id An optional player's index in order to return the result + * in the player's language, if supported. + * -1: the default language, which is english. + * 0: the server language. You can use LANG_SERVER define. + * >=1: the player's language. + * + * @return The result length on successful lookup, 0 otherwise. + */ +native geoip_continent_name(const ip[], result[], len, id = -1); diff --git a/bin/compiler/include/ham_const.inc b/bin/compiler/include/ham_const.inc new file mode 100644 index 0000000..3d656c2 --- /dev/null +++ b/bin/compiler/include/ham_const.inc @@ -0,0 +1,4354 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Ham Sandwich Constants +// + +#if defined _ham_const_included + #endinput +#endif +#define _ham_const_included + +/** + * Ham return types. + * + * @note Return these from hooks to disable calling the target function. + * Numbers match up with fakemeta's FMRES_* for clarity. They are + * interchangable. 0 (or no return) is also interpretted as HAM_IGNORED. + */ +#define HAM_IGNORED 1 /**< Calls target function, returns normal value */ +#define HAM_HANDLED 2 /**< Tells the module you did something, still calls target function and returns normal value */ +#define HAM_OVERRIDE 3 /**< Still calls the target function, but returns whatever is set with SetHamReturn*() */ +#define HAM_SUPERCEDE 4 /**< Block the target call, and use your return value (if applicable) (Set with SetHamReturn*()) */ + +/** + * List of virtual functions made available through the hamsandwich module. + * + * @note Not all functions will do as you expect on all mods. If a function does + * not do what you would believe it should DO NOT file a bug report, you + * will be ignored. + * @note Passing invalid parameters has potential to crash the server, so be + * careful, and test carefully and adequately! + * @note All functions take (and pass) a "this" index as the first param. + * This is the entity from which the function is being executed on. + * @note All functions and forwards (eg: {Register,Execute}Ham[B]) require + * the mod to have the pev and base keys in addition to the function + * keys for the corresponding mod/operating system in hamdata.ini + * @note Some functions that return booleans may need to be logically ANDed + * to get the desired results because the mod will return the full integer + * value. E.g.: (ExecuteHam(Ham_TS_IsObjective, this) & 0x0000FFFF) != 0 + */ + +enum Ham +{ + /** + * Description: This is typically called whenever an entity is created. + * It is the virtual equivilent of spawn from the engine. + * Some mods call this on player spawns too. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_Spawn, this); + */ + Ham_Spawn = 0, + + /** + * Description: This is typically called on map change. + * This will typically precache all assets required by the entity. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_Precache, this); + */ + Ham_Precache, + + /** + * Description: Typically this is similar to an engine keyvalue call. + * Use the kvd natives from fakemeta to handle the kvd_handle passed. + * NOTE: Do not pass handle 0 to this! Use create_kvd() from fakemeta instead! + * Forward params: function(this, kvd_handle); + * Return type: None. + * Execute params: ExecuteHam(Ham_Keyvalue, this, kvd_handle); + */ + Ham_Keyvalue, + + /** + * Description: Returns flags for how an entity can be used. + * Forward params: function(this) + * Return type: Integer (FCAP_* constants, see hlsdk_const.inc). + * Execute params: ExecuteHam(Ham_ObjectCaps, this); + */ + Ham_ObjectCaps, + + /** + * Description: Usually called to activate some objects. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_Activate, this); + */ + Ham_Activate, + + /** + * Description: Usually called after the engine call with the same name. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_SetObjectCollisionBox, this); + */ + Ham_SetObjectCollisionBox, + + /** + * Description: Returns an integer number that corresponds with what type of entity this is. + * Forward params: function(this) + * Return type: Integer. + * Execute params: ExecuteHam(Ham_Classify, this); + */ + Ham_Classify, + + /** + * Description: Typically called when an entity dies to notify any children entities about the death. + * Forward params: function(this, idchild) + * Return type: None. + * Execute params: ExecuteHam(Ham_DeathNotice, this, idchild) + */ + Ham_DeathNotice, + + /** + * Description: Usually called whenever an entity gets attacked by a hitscan (such as a gun) weapon. + * Use the get/set tr2 natives in fakemeta to handle the traceresult data. + * Do not use a handle of 0 as a traceresult in execution, use create_tr2() from Fakemeta + * to pass a custom handle instead. (Don't forget to free the handle when you're done.) + * Forward params: function(this, idattacker, Float:damage, Float:direction[3], traceresult, damagebits) + * Return type: None. + * Execute params: ExecuteHam(Ham_TraceAttack, this, idattacker, Float:damage, Float:direction[3], tracehandle, damagebits); + */ + Ham_TraceAttack, + + /** + * Description: Usually called whenever an entity takes any kind of damage. + * Inflictor is the entity that caused the damage (such as a gun). + * Attacker is the entity that tirggered the damage (such as the gun's owner). + * Forward params: function(this, idinflictor, idattacker, Float:damage, damagebits); + * Return type: Integer. + * Execute params: ExecuteHam(Ham_TakeDamage, this, idinflictor, idattacker, Float:damage, damagebits); + */ + Ham_TakeDamage, + + /** + * Description: Usually called whenever an entity gets a form of a heal. + * Forward params: function(this, Float:health, damagebits); + * Return type: Integer. + * Execute params: ExecuteHam(Ham_TakeHealth, this, Float:health, damagebits); + */ + Ham_TakeHealth, + + /** + * Description: Normally called whenever an entity dies. + * For Team Fortress Classic mod, see Ham_TFC_Killed. + * Forward params: function(this, idattacker, shouldgib) + * Return type: None. + * Execute params: ExecuteHam(Ham_Killed, this, idattacker, shouldgib); + */ + Ham_Killed, + + /** + * Description: Normally returns the blood color of the entity. + * Forward params: function(this) + * Return type: Integer. + * Execute params: ExecuteHam(Ham_BloodColor, this) + */ + Ham_BloodColor, + + /** + * Description: Traces where blood should appear. + * Forward params: function(this, Float:Damage, Float:Direction[3], trace_handle, damagebits); + * Return type: None. + * Execute params: ExecuteHam(Ham_TraceBleed, this, Float:damage, Float:direction[3], trace_handle, damagebits); + */ + Ham_TraceBleed, + + /** + * Description: Returns whether an entity is activated. + * This function is not supported by Day Of Defeat. + * This function has different version for the following mods: + * Team Fortress Classic, see Ham_TFC_IsTriggered instead. + * Sven-Coop 5.0+, see Ham_SC_IsTriggered instead. + * Forward params: function(this, idActivator); + * Return type: Integer. + * Execute params: ExecuteHam(Ham_IsTriggered, this, idActivator); + */ + Ham_IsTriggered, + + /** + * Description: Returns the id of the entity if its class is derived off of CBaseMonster, -1 otherwise. + * Forward params: function(this) + * Return type: Entity. + * Execute params: ExecuteHam(Ham_MyMonsterPointer, this); + */ + Ham_MyMonsterPointer, + + /** + * Description: Returns the id of the entity if its class is derived off of CBaseSquadMonster, -1 otherwise. + * Forward params: function(this) + * Return type: Entity. + * Execute params: ExecuteHam(Ham_MySquadMonsterPointer, this); + */ + Ham_MySquadMonsterPointer, + + /** + * Description: Returns the toggle state of the entity. + * Forward params: function(this) + * Return type: Integer. + * Execute params: ExecuteHam(Ham_GetToggleState, this); + */ + Ham_GetToggleState, + + /** + * Description: Typically adds points to the entity. + * This function is not supported for the following mods: + * Team Fortress Classic. + * Sven-Coop 5.0-, see Ham_SC_AddPoints instead. + * Forward params: function(this, points, bool:cangonegative); + * Return type: None. + * Execute params: ExecuteHam(Ham_AddPoints, this, points, bool:cangonegative); + */ + Ham_AddPoints, + + /** + * Description: Typically adds points to everybody on the entity's team. + * This function is not supported for the following mods: + * Team Fortress Classic. + * Sven-Coop 5.0-, see Ham_SC_AddPointsToTeam instead. + * Forward params: function(this, points, bool:cangonegative); + * Return type: None. + * Execute params: ExecuteHam(Ham_AddPointsToTeam, this, points, bool:cangonegative); + */ + Ham_AddPointsToTeam, + + /** + * Description: Adds an item to the player's inventory. + * Forward params: function(this, idother); + * Return type: Integer. + * Execute params: ExecuteHam(Ham_AddPlayerItem, this, idother); + */ + Ham_AddPlayerItem, + + /** + * Description: Removes an item to the player's inventory. + * This function has different version for the following mods: + * Sven-Coop 5.0+, see Ham_SC_RemovePlayerItem instead. + * Return type: Integer. + * Execute params: ExecuteHam(Ham_RemovePlayerItem, this, idother); + */ + Ham_RemovePlayerItem, + + /** + * Description: Gives ammo to the entity. + * This function is not supported for the following mods: + * Earth's Special Forces. + * Sven-Coop 4.8+, see Ham_SC_GiveAmmo instead. + * Team Fortress Classic, see Ham_TFC_GiveAmmo instead. + * Forward params: function(this, Amount, const Name[], Max) + * Return type: Integer. + * Execute params: ExecuteHam(Ham_GiveAmmo, this, amount, "type", max); + */ + Ham_GiveAmmo, + + /** + * Description: Unsure, I believe this is the delay between activation for an entity. + * Forward params: function(this) + * Return type: Float. + * Execute params: ExecuteHam(Ham_GetDelay, this, Float:output) + */ + Ham_GetDelay, + + /** + * Description: Whether or not the entity is moving. + * This function has different version for the following mods: + * Sven-Coop 5.0+, see Ham_SC_IsMoving instead. + * Forward params: function(this); + * Return type: Integer. + * Execute params: ExecuteHam(Ham_IsMoving, this); + */ + Ham_IsMoving, + + /** + * Description: Unsure. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_OverrideReset, this) + */ + Ham_OverrideReset, + + /** + * Description: Returns the damage decal of the entity for the damage type. + * Forward params: function(this, damagebits) + * Return type: Integer. + * Execute params: ExecuteHam(Ham_DamageDecal, this); + */ + Ham_DamageDecal, + + /** + * Description: Sets the toggle state of the entity. + * Forward params: function(this, state) + * Return type: None. + * Execute params: ExecuteHam(Ham_SetToggleState, this, state); + */ + Ham_SetToggleState, + + /** + * Description: Not entirely sure what this does. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_StartSneaking, this); + */ + Ham_StartSneaking, + + /** + * Description: Not entirely sure what this does. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_StopSneaking, this); + */ + Ham_StopSneaking, + + /** + * Description: Not entirely sure. + * This function is not supported for the following mods: + * Sven-Coop 5.0+, see Ham_SC_OnControls instead. + * Forward params: function(this, idOn) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_OnControls, this, idOn); + */ + Ham_OnControls, + + /** + * Description: Whether or not the entity is sneaking. + * This function is not supported for the following mods: + * Sven-Coop 5.0+, see Ham_SC_IsSneaking instead. + * Forward params: function(this); + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_IsSneaking, this); + */ + Ham_IsSneaking, + + /** + * Description: Whether or not the entity is alive. + * This function is not supported for the following mods: + * Sven-Coop 5.0+, see Ham_SC_IsAlive instead. + * Forward params: function(this); + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_IsAlive, this); + */ + Ham_IsAlive, + + /** + * Description: Whether or not the entity uses a BSP model. + * This function is not supported for the following mods: + * Sven-Coop 5.0+, see Ham_SC_IsBSPModel instead. + * Forward params: function(this); + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_IsBSPModel, this); + */ + Ham_IsBSPModel, + + /** + * Description: Whether or not the entity can reflect gauss shots.. + * This function is not supported for the following mods: + * Sven-Coop 5.0+, see Ham_SC_ReflectGauss instead. + * Forward params: function(this); + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_ReflectGauss, this); + */ + Ham_ReflectGauss, + + /** + * Description: Whether or not the target is the same as the one passed. + * Note the strindex parameter is a string passed that has been allocated by the engine. + * Use fakemeta's EngFunc_SzFromIndex to convert to a normal string, or fakemeta's + * EngFunc_AllocString to create a new string. + * This function is not supported for the following mods: + * Sven-Coop 5.0+, see Ham_SC_HasTarget instead. + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_HasTarget, this, strindex); + */ + Ham_HasTarget, + + /** + * Description: Whether or not the entity is in the world. + * This function is not supported for the following mods: + * Sven-Coop 5.0+, see Ham_SC_IsInWorld instead. + * Forward params: function(this); + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_IsInWorld, this); + */ + Ham_IsInWorld, + + /** + * Description: Whether or not the entity is a player. + * This function is not supported for the following mods: + * Sven-Coop 5.0+, see Ham_SC_IsPlayer instead. + * Forward params: function(this); + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_IsPlayer, this); + */ + Ham_IsPlayer, + + /** + * Description: Whether or not the entity is a net client. + * This function is not supported for the following mods: + * Sven-Coop 5.0+, see Ham_SC_IsNetClient instead. + * Forward params: function(this); + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_IsNetClient, this); + */ + Ham_IsNetClient, + + /** + * Description: Get the entity's team id. + * This function is not supported by Team Fortress Classic mod. + * Forward params: function(this); + * Return type: String (string length returned and string byref'd in ExecuteHam). + * Execute params: ExecuteHam(Ham_TeamId, this, buffer[], size); + */ + Ham_TeamId, + + /** + * Description: Returns the next target of this. + * Forward params: function(this); + * Return type: Entity. + * Execute params: ExecuteHam(Ham_GetNextTarget, this); + */ + Ham_GetNextTarget, + + /** + * Description: Called whenever an entity thinks. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_Think, this); + */ + Ham_Think, + + /** + * Description: Called whenever two entities touch. + * Forward params: function(this, idother); + * Return type: None. + * Execute params: ExecuteHam(Ham_Touch, this, idother); + */ + Ham_Touch, + + /** + * Description: Called whenver one entity uses another. + * Forward params: function(this, idcaller, idactivator, use_type, Float:value) + * Return type: None. + * Execute params: ExecuteHam(Ham_Use, this, idcaller, idactivator, use_type, Float:value); + */ + Ham_Use, + + /** + * Description: Normally called whenever one entity blocks another from moving. + * Forward params: function(this, idother); + * Return type: None. + * Execute params: ExecuteHam(Ham_Blocked, this, idother); + */ + Ham_Blocked, + + /** + * Description: Normally called when a map-based item respawns, such as a health kit or something. + * Forward params: function(this); + * Return type: Entity. + * Execute params: ExecuteHam(Ham_Respawn, this); + */ + Ham_Respawn, + + /** + * Description: Used in Half-Life to update a monster's owner. + * Forward params: function(this); + * Return type: None. + * Execute params: ExecuteHam(Ham_UpdateOwner, this); + */ + Ham_UpdateOwner, + + /** + * Description: Normally called whenever a barnacle grabs the entity. + * This function has different version for the following mods: + * Sven-Coop 5.0+, see Ham_SC_FBecomeProne instead. + * Forward params: function(this); + * Return type: Integer. + * Execute params: ExecuteHam(Ham_FBecomeProne, this); + */ + Ham_FBecomeProne, + + /** + * Description: Returns the center of the entity. + * Forward params: function(this); + * Return type: Vector (byref'd in ExecuteHam). + * Execute params: ExecuteHam(Ham_Center, this, Float:output[3]); + */ + Ham_Center, + + /** + * Description: Returns the eye position of the entity. + * Forward params: function(this); + * Return type: Vector (byref'd in ExecuteHam). + * Execute params: ExecuteHam(Ham_EyePosition, this, Float:output[3]); + */ + Ham_EyePosition, + + /** + * Description: Returns the ear position of the entity. + * Forward params: function(this); + * Return type: Vector (byref'd in ExecuteHam). + * Execute params: ExecuteHam(Ham_EarPosition, this, Float:output[3]); + */ + Ham_EarPosition, + + /** + * Description: Position to shoot at. + * Forward params: function(this, Float:srcvector[3]); + * Return type: Vector (byref'd in ExecuteHam). + * Execute params: ExecuteHam(Ham_BodyTarget, Float:srcvector[3], Float:returnvector[3]) + */ + Ham_BodyTarget, + + /** + * Description: Returns the illumination of the entity. + * Forward params: function(this) + * Return type: Integer. + * Execute params: ExecuteHam(Ham_Illumination, this); + */ + Ham_Illumination, + + /** + * Description: Returns true if a line can be traced from the caller's eyes to the target. + * This function has different version for the following mods: + * Sven-Coop 5.0+, see Ham_SC_FVisible instead. + * Forward params: function(this, idOther); + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_FVisible, this, idOther); + */ + Ham_FVisible, + + /** + * Description: Returns true if a line can be traced from the caller's eyes to given vector. + * This function has different version for the following mods: + * Sven-Coop 5.0+, see Ham_SC_FVecVisible instead. + * Forward params: function(this, const Float:origin[3]); + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_FVecVisible, this, const Float:origin[3]); + */ + Ham_FVecVisible, + + + /** + * Players have all the attributes of normal entities, in addition to these. + */ + + /** + * Description: Typically called every frame when a player has jump held. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_Player_Jump, this); + */ + Ham_Player_Jump, + + /** + * Description: Typically called every frame when a player has duck held. + * This function is not supported in Earth's Special Forces mod. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_Player_Duck, this); + */ + Ham_Player_Duck, + + /** + * Description: Typically called every frame during PlayerPreThink engine call. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_Player_PreThink, this); + */ + Ham_Player_PreThink, + + /** + * Description: Typically called every frame during PlayerPostThink engine call. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_Player_PostThink, this); + */ + Ham_Player_PostThink, + + /** + * Description: Returns a vector that tells the gun position. + * This function is not supported by Team Fortress Classic. + * Forward params: function(this) + * Return type: Vector (byreffed in ExecuteHam);. + * Execute params: ExecuteHam(Ham_Player_GetGunPosition, this, Float:output[3]); + */ + Ham_Player_GetGunPosition, + + /** + * Description: Whether or not the player should fade on death. + * Forward param: function(this) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_Player_ShouldFadeOnDeath, this); + */ + Ham_Player_ShouldFadeOnDeath, + + /** + * Description: Called whenever an impulse command is executed. + * Forward param: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_Player_ImpulseComands, this); + */ + Ham_Player_ImpulseCommands, + + /** + * Description: Updates the client's data for hud changes (such as ammo). Usually called every frame. + * This function is not supported by Team Fortress Classic mod. + * Forward param: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_Player_UpdateClientData, this); + */ + Ham_Player_UpdateClientData, + + + /** + * Items have all the attributes of normal entities in addition to these. + */ + + /** + * Description: Adds the item to the player. + * This function has different version for the following mods: + * Sven-Coop 5.0+, see Ham_SC_Item_AddToPlayer instead. + * Forward params: function(this, idPlayer); + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_Item_AddToPlayer, this, idPlayer); + */ + Ham_Item_AddToPlayer, + + /** + * Description: Unsure. + * This function has different version for the following mods: + * Sven-Coop 5.0+, see Ham_SC_Item_AddDuplicate instead. + * Forward params: function(this, idOriginal); + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_Item_AddDuplicate, this, idOriginal); + */ + Ham_Item_AddDuplicate, + + /** + * Description: Whether or not this entity can be deployed. + * This function has different version for the following mods: + * Sven-Coop 5.0+, see Ham_SC_Item_CanDeploy instead. + * Forward params: function(this); + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_Item_CanDeploy, this); + */ + Ham_Item_CanDeploy, + + /** + * Description: Deploys the entity (usually a weapon). + * This function has different version for the following mods: + * Sven-Coop 5.0+, see Ham_SC_Item_Deploy instead. + * Forward params: function(this); + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_Item_Deploy, this); + */ + Ham_Item_Deploy, + + /** + * Description: Whether or not the entity can be holstered. + * This function has different version for the following mods: + * Sven-Coop 5.0+, see Ham_SC_Item_CanHolster instead. + * Forward params: function(this); + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_Item_CanHolster, this); + */ + Ham_Item_CanHolster, + + /** + * Description: Whether or not the entity (usually weapon) can be holstered. + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_Item_Holster, this); + */ + Ham_Item_Holster, + + /** + * Description: Updates the HUD info about this item. + * Forward params: function(this); + * Return type: None. + * Execute params: ExecuteHam(Ham_UpdateItemInfo, this); + */ + Ham_Item_UpdateItemInfo, + + /** + * Description: Called each frame for an item, normally only on active items. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_Item_PreFrame, this); + */ + Ham_Item_PreFrame, + + /** + * Description: Called each frame for an item, normally only on active items. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_Item_PostFrame, this); + */ + Ham_Item_PostFrame, + + /** + * Description: Called when an item gets dropped, normally on death only. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_Item_Drop, this); + */ + Ham_Item_Drop, + + /** + * Description: Normally called when an item gets deleted. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_Item_Kill, this); + */ + Ham_Item_Kill, + + /** + * Description: Called when an entity starts being attached to (normally invisible and "following") a player. + * Forward params: function(this, idPlayer) + * Return type: None. + * Execute params: ExecuteHam(Ham_Item_AttachToPlayer, this, idPlayer) + */ + Ham_Item_AttachToPlayer, + + /** + * Description: Returns the ammo index of the item. + * Forward params: function(this) + * Return type: Integer. + * Execute params: ExecuteHam(Ham_Item_PrimaryAmmoIndex, this); + */ + Ham_Item_PrimaryAmmoIndex, + + /** + * Description: Returns the secondary ammo index of the item. + * Forward params: function(this) + * Return type: Integer. + * Execute params: ExecuteHam(Ham_Item_SecondaryAmmoIndex, this); + */ + Ham_Item_SecondaryAmmoIndex, + + /** + * Description: Updates item data for the client. + * This function has different version for the following mods: + * Sven-Coop 5.0+, see Ham_SC_Item_UpdateClientData instead. + * Forward params: function(this, idPlayer) + * Return type: Integer. + * Execute params: ExecuteHam(Ham_Item_UpdateClientData, this, idPlayer); + */ + Ham_Item_UpdateClientData, + + /** + * Description: Returns the entity index if the item is a weapon, -1 otherwise. + * Forward params: function(this) + * Return type: Entity. + * Execute Params: ExecuteHam(Ham_Item_GetWeaponPtr, this) + */ + Ham_Item_GetWeaponPtr, + + /** + * Description: Returns the item slot for the item. + * Forward params: function(this) + * Return type: Integer. + * Execute Params: ExecuteHam(Ham_Item_ItemSlot, this) + */ + Ham_Item_ItemSlot, + + + /** + * Weapons have all the attributes to Ham_Item_*, in addition to these. + */ + + /** + * Description: Gets ammo from the target weapon. + * This function is not supported in Earth's Special Forces mod. + * Forward params: function(this, idTarget) + * Return type: Integer. + * Execute Params: ExecuteHam(Ham_Weapon_ExtractAmmo, this, idTarget) + */ + Ham_Weapon_ExtractAmmo, + + /** + * Description: Gets clip ammo from the target weapon. + * This function is not supported in Earth's Special Forces mod. + * Forward params: function(this, idTarget) + * Return type: Integer. + * Execute Params: ExecuteHam(Ham_Weapon_ExtractAmmo, this, idTarget) + */ + Ham_Weapon_ExtractClipAmmo, + + /** + * Description: Unsure. + * This function is not supported in Earth's Special Forces mod. + * This function has different version for the following mods: + * Sven-Coop 5.0+, see Ham_SC_Weapon_AddWeapon instead. + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_Weapon_AddWeapon, this); + */ + Ham_Weapon_AddWeapon, + + /** + * Description: Plays the weapon's empty sound. + * This function has different version for the following mods: + * Sven-Coop 5.0+, see Ham_SC_Weapon_PlayEmptySound instead. + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_Weapon_PlayEmptySound, this); + */ + Ham_Weapon_PlayEmptySound, + + /** + * Description: Sets the weapon so that it can play empty sound again. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_Weapon_ResetEmptySound, this); + */ + Ham_Weapon_ResetEmptySound, + + /** + * Description: Sends an animation event for the weapon. + * This function has different versions for the following mods: + * Counter-Strike: see Ham_CS_Weapon_SendWeaponAnim. + * Team Fortress Classic: see Ham_TFC_Weapon_SendWeaponAnim. + * Day Of Defeat: see Ham_DOD_Weapon_SendWeaponAnim. + * Forward params: function(this, iAnim, skiplocal, body); + * Return type: None. + * Execute params: ExecuteHam(Ham_Weapon_SendWeaponAnim, this, iAnim, skiplocal, body); + */ + Ham_Weapon_SendWeaponAnim, + + /** + * Description: Whether or not the weapon is usable (has ammo, etc.) + * This function is not supported in Earth's Special Forces mod. + * This function has different version for the following mods: + * Sven-Coop 5.0+, see Ham_SC_Weapon_IsUsable instead. + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_Weapon_IsUsable, this) + */ + Ham_Weapon_IsUsable, + + /** + * Description: Called when the main attack of a weapon is triggered. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_Weapon_PrimaryAttack, this); + */ + Ham_Weapon_PrimaryAttack, + + /** + * Description: Called when the secondary attack of a weapon is triggered. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_Weapon_SecondaryAttack, this); + */ + Ham_Weapon_SecondaryAttack, + + /** + * Description: Called when the weapon is reloaded. + * This function is not supported in Earth's Special Forces mod. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_Weapon_Reload, this); + */ + Ham_Weapon_Reload, + + /** + * Description: Displays the idle animation for the weapon. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_Weapon_WeaponIdle, this); + */ + Ham_Weapon_WeaponIdle, + + /** + * Description: There is no more ammo for this gun, so switch to the next best one. + * Forward params: function(this) + * Return type: None. + * ExecuteParams: ExecuteHam(Ham_Weapon_RetireWeapon, this) + */ + Ham_Weapon_RetireWeapon, + + /** + * Description: Whether or not the weapon should idle. + * This function has different version for the following mods: + * Sven-Coop 5.0+, see Ham_SC_Weapon_ShouldWeaponIdle instead. + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute Params: ExecuteHam(Ham_Weapon_ShouldWeaponIdle, this) + */ + Ham_Weapon_ShouldWeaponIdle, + + /** + * Description: Unsure. + * This function is not supported by Team Fortress Classic. + * This function has different version for the following mods: + * Sven-Coop 5.0+, see Ham_SC_Weapon_UseDecrement instead. + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_Weapon_UseDecrement, this); + */ + Ham_Weapon_UseDecrement, + + + /** + * The following functions are specific to The Specialists. + */ + + /** + * Description: - + * Forward params: function(this, someboolvalue) + * Return type: None. + * Execute params: ExecuteHam(Ham_TS_BreakableRespawn, this, someboolvalue); + */ + Ham_TS_BreakableRespawn, + + /** + * Description: - + * Forward params: function(this) + * Return type: Integer (boolean) + * Execute params: ExecuteHam(Ham_TS_CanUsedThroughWalls, this); + */ + Ham_TS_CanUsedThroughWalls, + + /** + * Description: Unsure - this was removed in TS 3.0 (and thus is deprecated). + * Forward params: function(this) + * Return type: Integer (I think...) + * Execute params: ExecuteHam(Ham_TS_RespawnWait, this); + */ + Ham_TS_RespawnWait, + + + /** + * The following functions are specific to Counter-Strike. + */ + + /** + * Description: This is called on a map reset for most map based entities. + * Forward params: function(this); + * Return type: None. + * Execute params: ExecuteHam(Ham_CS_Restart, this); + */ + Ham_CS_Restart, + + /** + * Description: Respawn function for players/bots only! Do not use this on non player/bot entities! + * Forward params: function(this); + * Return type: None. + * Execute params: ExecuteHam(Ham_CS_RoundRespawn, this); + */ + Ham_CS_RoundRespawn, + + /** + * Description: Whether or not the player can drop the specified item. + * Forward params: function(this) + * Return type: Integer. + * Execute params: ExecuteHam(Ham_CS_Item_CanDrop, this); + */ + Ham_CS_Item_CanDrop, + + /** + * Description: Gets the maximum speed for whenever a player has the item deployed. + * Forward params: function(this); + * Return type: Float (byref'd in ExecuteHam). + * Execute params: ExecuteHam(Ham_CS_Item_GetMaxSpeed, this, Float:output); + */ + Ham_CS_Item_GetMaxSpeed, + + + /** + * The following functions are specific to Day Of Defeat. + */ + + /** + * Description: I assume this spawns players at the start of a new round. + * Forward params: function(this) + * Return type: None. + * Execute Params: ExecuteHam(Ham_DOD_RoundRespawn, this); + */ + Ham_DOD_RoundRespawn, + + /** + * Description: I assume this spawns entities (like func_breakables) at the start of a new round. + * Forward params: function(this) + * Return type: None. + * Execute Params: ExecuteHam(Ham_DOD_RoundRespawnEnt, this); + */ + Ham_DOD_RoundRespawnEnt, + + /** + * Description: Unsure. + * Forward params: function(this) + * Return type: None, I think... + * Execute params: ExecuteHam(Ham_DOD_RoundStore, this); + */ + Ham_DOD_RoundStore, + + /** + * Description: Unsure. + * Forward params: function(this, someintegervalue) + * Return type: None. + * Execute params: ExecuteHam(Ham_DOD_AreaSetIndex, this, someintegervalue) + */ + Ham_DOD_AreaSetIndex, + + /** + * Description: Unsure. + * Forward params: function(this, idPlayer) + * Return type: None. + * Execute Params: ExecuteHam(Ham_DOD_AreaSendStatus, this, idPlayer); + */ + Ham_DOD_AreaSendStatus, + + /** + * Description: Unsure. + * Forward params: function(this) + * Return type: Integer. + * Execute Params: ExecuteHam(Ham_DOD_GetState, this); + */ + Ham_DOD_GetState, + + /** + * Description: Unsure. + * Forward params: function(this, idtarget) + * Return type: Integer. + * Execute Params: ExecuteHam(Ham_DOD_GetStateEnt, this, idtarget); + */ + Ham_DOD_GetStateEnt, + + /** + * Description: Whether or not a player can drop this item. + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute Params: ExecuteHam(Ham_DOD_Item_CanDrop, this); + */ + Ham_DOD_Item_CanDrop, + + + /** + * The following functions are specific to The Team Fortress Classic. + */ + + /** + * Description: Unsure. + * Forward params: function(this, playerId) + * Return type: Integer. + * Execute params: ExecuteHam(Ham_TFC_EngineerUse, this, playerId) + */ + Ham_TFC_EngineerUse, + + /** + * Description: Unsure. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_TFC_Finished, this); + */ + Ham_TFC_Finished, + + /** + * Description: Unsure. + * Forward params: function(this, grenId, Float:damage, Float:radius) + * Return type: None. + * Execute params: ExecuteHam(Ham_TFC_EmpExplode, this, grenId, Float:damage, Float:radius) + */ + Ham_TFC_EmpExplode, + + /** + * Description: Unsure. + * 'damage' and 'radius' are byref'd in ExecuteHam. + * Forward params: function(this, Float:damage, Float:radius) + * Return type: None. + * Execute params: ExecuteHam(Ham_TFC_CalcEmpDmgRad, this, Float:damage, Float:radius) + */ + Ham_TFC_CalcEmpDmgRad, + + /** + * Description: Unsure. + * Forward params: function(this, grenId) + * Return type: None. + * Execute params: ExecuteHam(Ham_TFC_TakeEmpBlast, this, grenId); + */ + Ham_TFC_TakeEmpBlast, + + /** + * Description: Unsure. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_TFC_EmpRemove, this); + */ + Ham_TFC_EmpRemove, + + /** + * Description: Unsure. + * Forward params: function(this, grenId, Float:bounceMax) + * Return type: None. + * Execute params: ExecuteHam(Ham_TFC_TakeConcussionBlast, this, grenId, Float:bounceMax); + */ + Ham_TFC_TakeConcussionBlast, + + /** + * Description: Unsure. + * Forward params: function(this, grenId) + * Return type: None. + * Execute params: ExecuteHam(Ham_TFC_Concuss, this, grenId); + */ + Ham_TFC_Concuss, + + + /** + * The following functions are specific to Earth's Special Forces. + */ + + /** + * Description: Unsure. + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_ESF_IsEnvModel, this); + */ + Ham_ESF_IsEnvModel, + + /** + * Description: Unsure. + * This is available only in ESF Open Beta. + * Forward params: function(this, entityida, entityidb, Float:floata, Float:floatb, dmgbits) + * Return type: Integer. + * Execute params: ExecuteHam(Ham_ESF_TakeDamage2, this, entityida, entityidb, Float:floata, Float:floatb, dmgbits); + */ + Ham_ESF_TakeDamage2, + + + /** + * The following functions are specific to Natural Selection. + */ + + /** + * Description: Returns how many points each entity is worth. + * Forward params: function(this) + * Return type: Integer. + * Execute params: ExecuteHam(Ham_NS_GetPointValue, this); + */ + Ham_NS_GetPointValue, + + /** + * Description: Unsure. Probably awards this with the killing of idvictim. + * Forward params: function(this, idvictim) + * Return type: None. + * Execute params: ExecuteHam(Ham_NS_AwardKill, this, idvictim); + */ + Ham_NS_AwardKill, + + /** + * Description: Unsure, probably whenever an entity resets after a new round. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_NS_ResetEntity, this); + */ + Ham_NS_ResetEntity, + + /** + * Description: Unsure. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_NS_UpdateOnRemove, this) + */ + Ham_NS_UpdateOnRemove, + + + /** + * The following functions are specific to The Specialists. + */ + + /** + * Description: Unsure. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_TS_GiveSlowMul, this) + */ + Ham_TS_GiveSlowMul, + + /** + * Description: Unsure. The second paramater is actually a char. + * Forward params: function(this, Float:someval, someotherval) + * Return type: None. + * Execute params: ExecuteHam(Ham_TS_GoSlow, this, Float:someval, someotherval) + */ + Ham_TS_GoSlow, + + /** + * Description: Probably returns true if the user is in slow mo. + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_TS_InSlow, this) + */ + Ham_TS_InSlow, + + /** + * Description: Returns true if the entity is an objective. + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_TS_IsObjective, this) + */ + Ham_TS_IsObjective, + + /** + * Description: Unsure. + * Forward params: function(this, bool:someval) + * Return type: None. + * Execute params: ExecuteHam(Ham_TS_EnableObjective, this, bool:someval) + */ + Ham_TS_EnableObjective, + + /** + * Description: Probably called when the engine call to OnEntFreePrivateData is called (the entity destructor.) + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_TS_OnEntFreePrivateData, this) + */ + Ham_TS_OnFreeEntPrivateData, + + /** + * Description: Probably called when the engine call to ShouldCollide is called. + * Forward params: function(this, otherEntity) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_TS_ShouldCollide, this, otherEntity) + */ + Ham_TS_ShouldCollide, + + + /** + * LATE ADDITIONS (2011) + */ + + /** + * Description: Turns a monster towards its ideal_yaw. + * Forward params: function(this, speed); + * Return type: Integer. + * Execute params: ExecuteHam(Ham_ChangeYaw, this, speed); + */ + Ham_ChangeYaw, + + /** + * Description: Returns if monster has human gibs. + * Forward params: function(this); + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_HasHumanGibs, this); + */ + Ham_HasHumanGibs, + + /** + * Description: Returns if monster has alien gibs. + * Forward params: function(this); + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_HasAlienGibs, this); + */ + Ham_HasAlienGibs, + + /** + * Description: Slowly fades a entity out, then removes it. + * Using this on player will crash your server. + * Forward params: function(this); + * Return type: None. + * Execute params: ExecuteHam(Ham_FadeMonster, this); + */ + Ham_FadeMonster, + + /** + * Description: Create some gore and get rid of a monster's model. + * Forward params: function(this); + * Return type: None. + * Execute params: ExecuteHam(Ham_GibMonster, this); + */ + Ham_GibMonster, + + /** + * Description: Called when monster dies and prepares its entity to become a corpse. + * Forward params: function(this); + * Return type: None. + * Execute params: ExecuteHam(Ham_BecomeDead, this); + */ + Ham_BecomeDead, + + /** + * Description: Checks relation ship between two monsters. + * Forward params: function(this, idother); + * Return type: Integer (R_* constants, see HLDSK). + * Execute params: ExecuteHam(Ham_IRelationship, this, idother); + */ + Ham_IRelationship, + + /** + * Description: Called when monster is about to emit pain sound. + * Not guaranteed to actually emit sound. (random, time, etc..) + * Forward params: function(this); + * Return type: None. + * Execute params: ExecuteHam(Ham_PainSound, this); + */ + Ham_PainSound, + + /** + * Description: Prints debug information about monster to console. (state, activity, and other) + * This function is called by impulse 103. + * Forward params: function(this); + * Return type: None. + * Execute params: ExecuteHam(Ham_ReportAIState, this); + */ + Ham_ReportAIState, + + /** + * Description: Called when monster has died. + * Forward params: function(this); + * Return type: None. + * Execute params: ExecuteHam(Ham_MonsterInitDead, this); + */ + Ham_MonsterInitDead, + + /** + * Description: Function to find enemies or food by sight. + * distance is maximum distance (in units) monster can see. + * Forward params: function(this, distance); + * Return type: None. + * Execute params: ExecuteHam(Ham_Look, this, distance); + */ + Ham_Look, + + /** + * Description: This functions searches the link list whose head is the caller's m_pLink field. + * Forward params: function(this); + * Return type: Integer (entity). + * Execute params: ExecuteHam(Ham_BestVisibleEnemy, this); + */ + Ham_BestVisibleEnemy, + + /** + * Description: Returns true if the passed ent is in the caller's forward view cone. + * The dot product is performed in 2d, making the view cone infinitely tall. + * Forward params: function(this, idOther); + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_FInViewCone, this, idOther); + */ + Ham_FInViewCone, + + /** + * Description: Returns true if the passed ent is in the caller's forward view cone. + * The dot product is performed in 2d, making the view cone infinitely tall. + * Forward params: function(this, const Float:origin[3]); + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_FVecInViewCone, this, const Float:origin[3]); + */ + Ham_FVecInViewCone, + + /** + * Description: Determines the best type of death animation to play. + * Forward params: function(this); + * Return type: Integer (ACT_* constants, see HLDSK. It might different depending the mod). + * Execute params: ExecuteHam(Ham_GetDeathActivity, this); + */ + Ham_GetDeathActivity, + + + /** + * The following functions are not supported by Counter-Strike, The Specialists and Natural Selection mods + */ + + /** + * Description: Runs core AI functions. + * This function is not supported by Counter-Strike, The Specialists and Natural Selection mods. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_RunAI, this); + */ + Ham_RunAI, + + /** + * Description: Calls out to core AI functions and handles this monster's specific animation events. + * This function is not supported by Counter-Strike, The Specialists and Natural Selection mods. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_MonsterThink, this); + */ + Ham_MonsterThink, + + /** + * Description: After a monster is spawned, it needs to be dropped into the world, checked for mobility problems + * and put on the proper path, if any. This function does all of those things after the monster spawns. + * Any initialization that should take place for all monsters goes here. + * This function is not supported by Counter-Strike, The Specialists and Natural Selection mods. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_MonsterInit, this); + */ + Ham_MonsterInit, + + /** + * Description: Check validity of a straight move through space. + * This function is not supported by Counter-Strike, The Specialists and Natural Selection mods. + * Forward params: function(this, const Float:start[3], const Float:end[3], target, Float:dist) + * Return type: Integer (See LOCALMOVE_* constants). + * Execute params: ExecuteHam(Ham_CheckLocalMove, this, const Float:start[3], const Float:end[3], target, Float:dist); + */ + Ham_CheckLocalMove, + + /** + * Description: Takes a single step towards the next ROUTE location. + * This function is not supported by Counter-Strike, The Specialists and Natural Selection mods. + * Forward params: function(this, Float:interval) + * Return type: None. + * Execute params: ExecuteHam(Ham_Move, this, Float:interval); + */ + Ham_Move, + + /** + * Description: - + * This function is not supported by Counter-Strike, The Specialists and Natural Selection mods. + * Forward params: function(this, targetEnt, const Float:dir[3], Float:interval) + * Return type: None. + * Execute params: ExecuteHam(Ham_MoveExecute, this, targetEnt, const Float:dir[3], Float:interval); + */ + Ham_MoveExecute, + + /** + * Description: - + * This function is not supported by Counter-Strike, The Specialists and Natural Selection mods. + * Forward params: function(this, Float:waypointDist) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_ShouldAdvanceRoute, this, Float:waypointDist); + */ + Ham_ShouldAdvanceRoute, + + /** + * Description: - + * This function is not supported by Counter-Strike, The Specialists and Natural Selection mods. + * Forward params: function(this) + * Return type: Integer (ACT_* constants, see HLDSK. It might different depending the mod). + * Execute params: ExecuteHam(Ham_GetStoppedActivity, this); + */ + Ham_GetStoppedActivity, + + /** + * Description: - + * This function is not supported by Counter-Strike, The Specialists and Natural Selection mods. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_Stop, this); + */ + Ham_Stop, + + /** + * Description: Surveys conditions and set appropriate conditions bits for attack types. + * This function is not supported by Counter-Strike, The Specialists and Natural Selection mods. + * Forward params: function(this, Float:dot, Float:dist) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_CheckRangeAttack1, this, Float:dot, Float:dist); + */ + Ham_CheckRangeAttack1, + + /** + * Description: Surveys conditions and set appropriate conditions bits for attack types. + * This function is not supported by Counter-Strike, The Specialists and Natural Selection mods. + * Forward params: function(this, Float:dot, Float:dist) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_CheckRangeAttack2, this, Float:dot, Float:dist); + */ + Ham_CheckRangeAttack2, + + /** + * Description: Surveys conditions and set appropriate conditions bits for attack types. + * This function is not supported by Counter-Strike, The Specialists and Natural Selection mods. + * Forward params: function(this, Float:dot, Float:dist) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_CheckMeleeAttack1, this, Float:dot, Float:dist); + */ + Ham_CheckMeleeAttack1, + + /** + * Description: Surveys conditions and set appropriate conditions bits for attack types. + * This function is not supported by Counter-Strike, The Specialists and Natural Selection mods. + * Forward params: function(this, Float:dot, Float:dist) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_CheckMeleeAttack2, this, Float:dot, Float:dist); + */ + Ham_CheckMeleeAttack2, + + /** + * Description: - + * This function is not supported by Counter-Strike, The Specialists and Natural Selection mods. + * Forward params: function(this, Float:dot, Float:dist) + * Return type: None. + * Execute params: ExecuteHam(Ham_ScheduleChange, this, Float:dot, Float:dist); + */ + Ham_ScheduleChange, + + /** + * Description: Determines whether or not the monster can play the scripted sequence or AI sequence that is + * trying to possess it. If DisregardState is set, the monster will be sucked into the script + * no matter what state it is in. ONLY Scripted AI ents should allow this. + * This function is not supported by Counter-Strike, The Specialists and Natural Selection mods. + * This function has different versions for the following mod: + * Sven Coop: see Ham_SC_CanPlaySequence + * Forward params: function(this, bool:disregardState, interruptLevel); + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_CanPlaySequence, this, bool:disregardState, interruptLevel); + */ + Ham_CanPlaySequence, + + /** + * Description: - + * This function is not supported by Counter-Strike, The Specialists and Natural Selection mods. + * This function has different versions for the following mod: + * Sven Coop: see Ham_SC_CanPlaySentence2 + * Forward params: function(this, bool:disregardState); + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_CanPlaySentence2, this, bool:disregardState); + */ + Ham_CanPlaySentence2, + + /** + * Description: - + * This function is not supported by Counter-Strike, The Specialists and Natural Selection mods. + * Forward params: function(this, const sentence[], Float:duration, Float:volume, Float:attenuation); + * Return type: None. + * Execute params: ExecuteHam(Ham_PlaySentence, this, const sentence[], Float:duration, Float:volume, Float:attenuation); + */ + Ham_PlaySentence, + + /** + * Description: - + * This function is not supported by Counter-Strike, The Specialists and Natural Selection mods. + * This function has different version for Sven Coop, see Ham_SC_PlayScriptedSentence instead. + * Forward params: function(this, const sentence[], Float:duration, Float:volume, Float:attenuation, bool:concurrent, idListener); + * Return type: None. + * Execute params: ExecuteHam(Ham_PlayScriptedSentence, this, const sentence[], Float:duration, Float:volume, Float:attenuation, bool:concurrent, idListener); + */ + Ham_PlayScriptedSentence, + + /** + * Description: - + * This function is not supported by Counter-Strike, The Specialists and Natural Selection mods. + * Forward params: function(this); + * Return type: None. + * Execute params: ExecuteHam(Ham_SentenceStop, this); + */ + Ham_SentenceStop, + + /** + * Description: Surveys the Conditions information available and finds the best new state for a monster. + * This function is not supported by Counter-Strike, The Specialists and Natural Selection mods. + * Forward params: function(this); + * Return type: Integer (MONSTERSTATE_* constants, see HLDSK). + * Execute params: ExecuteHam(Ham_GetIdealState, this); + */ + Ham_GetIdealState, + + /** + * Description: - + * This function is not supported by Counter-Strike, The Specialists and Natural Selection mods. + * Forward params: function(this, newActivity); + * Return type: None. + * Execute params: ExecuteHam(Ham_SetActivity, this, newActivity); + */ + Ham_SetActivity, + + /** + * Description: Part of the condition collection process gets and stores data and conditions + * pertaining to a monster's enemy. Returns TRUE if Enemy LKP was updated. + * This function is not supported by Counter-Strike, The Specialists and Natural Selection mods. + * Forward params: function(this, idEnemy); + * Return type: None. + * Execute params: ExecuteHam(Ham_CheckEnemy, this, idEnemy); + */ + Ham_CheckEnemy, + + /** + * Description: Tries to overcome local obstacles by triangulating a path around them. + * 'dist' is how far the obstruction that we are trying to triangulate around is from the monster. + * This function is not supported by Counter-Strike, The Specialists and Natural Selection mods. + * Forward params: function(this, const Float:start[3], const Float:end[3], Float:dist, targetEnt, Float:apex[3]); + * Return type: None. + * Execute params: ExecuteHam(Ham_FTriangulate, this, const Float:start[3], const Float:end[3], Float:dist, targetEnt, Float:apex[3]); + */ + Ham_FTriangulate, + + /** + * Description: Allows each sequence to have a different turn rate associated with it. + * This function is not supported by Counter-Strike, The Specialists and Natural Selection mods. + * Forward params: function(this); + * Return type: None. + * Execute params: ExecuteHam(Ham_SetYawSpeed, this); + */ + Ham_SetYawSpeed, + + /** + * Description: Tries to build a route as close to the target as possible, even if there isn't a path to the final point. + * If supplied, search will return a node at least as far away as MinDist from vecThreat, but no farther than minDist. + * If maxDist isn't supplied, it defaults to a reasonable value. + * This function is not supported by Counter-Strike, The Specialists and Natural Selection mods. + * Forward params: function(this, Float:threat[3], const Float:viewOffset[3], Float:minDist, Float:maxDist); + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_BuildNearestRoute, this, const Float:threat[3], const Float:viewOffset[3], Float:minDist, Float:maxDist); + */ + Ham_BuildNearestRoute, + + /** + * Description: Tries to find a nearby node that will hide the caller from its enemy. + * If supplied, search will return a node at least as far away as MinDist from vecThreat, but no farther than minDist. + * If maxDist isn't supplied, it defaults to a reasonable value. + * This function is not supported by Counter-Strike, The Specialists and Natural Selection mods. + * Forward params: function(this, Float:threat[3], const Float:viewOffset[3], Float:minDist, Float:maxDist); + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_FindCover, this, const Float:threat[3], const Float:viewOffset[3], Float:minDist, Float:maxDist); + */ + Ham_FindCover, + + /** + * Description: Default cover radius. + * This function is not supported by Counter-Strike, The Specialists and Natural Selection mods. + * Forward params: function(this); + * Return type: Float. + * Execute params: ExecuteHam(Ham_CoverRadius, this); + */ + Ham_CoverRadius, + + /** + * Description: Prequalifies a monster to do more fine checking of potential attacks. + * This function is not supported by Counter-Strike, The Specialists and Natural Selection mods. + * Forward params: function(this); + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_FCanCheckAttacks, this); + */ + Ham_FCanCheckAttacks, + + /** + * Description: - + * This function is not supported by Counter-Strike, The Specialists and Natural Selection mods. + * Forward params: function(this); + * Return type: None. + * Execute params: ExecuteHam(Ham_CheckAmmo, this); + */ + Ham_CheckAmmo, + + /** + * Description: Before a set of conditions is allowed to interrupt a monster's schedule, this function removes + * conditions that we have flagged to interrupt the current schedule, but may not want to interrupt + * the schedule every time. (Pain, for instance) + * This function is not supported by Counter-Strike, The Specialists and Natural Selection mods. + * Forward params: function(this); + * Return type: Integer. + * Execute params: ExecuteHam(Ham_IgnoreConditions, this); + */ + Ham_IgnoreConditions, + + /** + * Description: Tells use whether or not the monster cares about the type of Hint Node given. + * This function is not supported by Counter-Strike, The Specialists and Natural Selection mods. + * Forward params: function(this, hint); + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_FValidateHintType, this, hint); + */ + Ham_FValidateHintType, + + /** + * Description: - + * This function is not supported by Counter-Strike, The Specialists and Natural Selection mods. + * Forward params: function(this); + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_FValidateHintType, this); + */ + Ham_FCanActiveIdle, + + /** + * Description: Returns a bit mask indicating which types of sounds this monster regards. + * In the base class implementation, monsters care about all sounds, but no scents. + * This function is not supported by Counter-Strike, The Specialists and Natural Selection mods. + * Forward params: function(this); + * Return type: Integer. + * Execute params: ExecuteHam(Ham_ISoundMask, this); + */ + Ham_ISoundMask, + + /** + * Description: - + * This function is not supported by Counter-Strike, The Specialists and Natural Selection mods. + * Forward params: function(this); + * Return type: Float. + * Execute params: ExecuteHam(Ham_HearingSensitivity, this); + */ + Ham_HearingSensitivity, + + /** + * Description: Called by Barnacle victims when the barnacle pulls their head into its mouth. + * This function is not supported by Counter-Strike, The Specialists and Natural Selection mods. + * Forward params: function(this, idBarnacle); + * Return type: Float. + * Execute params: ExecuteHam(Ham_BarnacleVictimBitten, this, idBarnacle); + */ + Ham_BarnacleVictimBitten, + + /** + * Description: Called by barnacle victims when the host barnacle is killed. + * This function is not supported by Counter-Strike, The Specialists and Natural Selection mods. + * Forward params: function(this); + * Return type: Float. + * Execute params: ExecuteHam(Ham_BarnacleVictimReleased, this); + */ + Ham_BarnacleVictimReleased, + + /** + * Description: Runs after conditions are collected and before scheduling code is run. + * This function is not supported by Counter-Strike, The Specialists and Natural Selection mods. + * Forward params: function(this); + * Return type: None. + * Execute params: ExecuteHam(Ham_PrescheduleThink, this); + */ + Ham_PrescheduleThink, + + /** + * Description: Plays death sounds. + * This function is not supported by Counter-Strike, The Specialists and Natural Selection mods. + * Forward params: function(this); + * Return type: None. + * Execute params: ExecuteHam(Ham_DeathSound, this); + */ + Ham_DeathSound, + + /** + * Description: Plays alert sounds. + * This function is not supported by Counter-Strike, The Specialists and Natural Selection mods. + * Forward params: function(this); + * Return type: None. + * Execute params: ExecuteHam(Ham_AlertSound, this); + */ + Ham_AlertSound, + + /** + * Description: Plays idle sounds. + * This function is not supported by Counter-Strike, The Specialists and Natural Selection mods. + * Forward params: function(this); + * Return type: None. + * Execute params: ExecuteHam(Ham_IdleSound, this); + */ + Ham_IdleSound, + + /** + * Description: This should stop a monster following a target. + * Forward params: function(this, bool:clearSchedule) + * Return type: None. + * Execute Params: ExecuteHam(Ham_StopFollowing, this, bool:clearSchedule); + */ + Ham_StopFollowing, + + + /** + * The following functions are specific to Counter-Strike. + */ + + /** + * Description: Sends an animation event for the weapon. skiplocal is 1 if client is predicting weapon animations. + * Forward params: function(this, anim, skiplocal); + * Return type: None. + * Execute params: ExecuteHam(Ham_CS_Weapon_SendWeaponAnim, this, anim, skiplocal); + */ + Ham_CS_Weapon_SendWeaponAnim, + + /** + * Description: Resets the player's max speed. + * Forward params: function(this); + * Return type: None. + * Execute params: ExecuteHam(Ham_CS_Player_ResetMaxSpeed, this); + */ + Ham_CS_Player_ResetMaxSpeed, + + /** + * Description: Whether or not the player is a bot. + * Forward params: function(this); + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_CS_Player_IsBot, this); + */ + Ham_CS_Player_IsBot, + + /** + * Description: Returns a vector that tells the autoaim direction. + * Set crosshair position to point to enemey if sv_aim is 1. + * Forward params: function(this, Float:delta) + * Return type: Vector, byreffed in execute. + * Execute params: ExecuteHam(Ham_CS_Player_GetAutoaimVector, this, Float:delta, Float:output[3]); + */ + Ham_CS_Player_GetAutoaimVector, + + /** + * Description: Whether or not the player is being flashing. (flashbang grenade explosion) + * blindTime is the time you are considered as being blind. (holdTime * 0.33). + * Forward params: function(this, Float:blindTime, Float:duration, Float:holdTime, alpha); + * Return type: None. + * Execute params: ExecuteHam(Ham_CS_Player_Blind, this, Float:blindTime, Float:duration, Float:holdTime, alpha); + */ + Ham_CS_Player_Blind, + + /** + * Description: Whether or not the player is touching a weapon on the ground. + * Forward params: function(this, entityid); + * Return type: None. + * Execute params: ExecuteHam(Ham_CS_Player_OnTouchingWeapon, this, entityid); + */ + Ham_CS_Player_OnTouchingWeapon, + + + /** + * The following functions are specific to Day Of Defeat. + */ + + /** + * Description: - + * Forward params: function(this) + * Return type: Integer. + * Execute Params: ExecuteHam(Ham_DOD_SetScriptReset, this); + */ + Ham_DOD_SetScriptReset, + + /** + * Description: - + * Forward params: function(this) + * Return type: Integer. + * Execute Params: ExecuteHam(Ham_DOD_Item_SpawnDeploy, this); + */ + Ham_DOD_Item_SpawnDeploy, + + /** + * Description: - + * Forward params: function(this, Float:someValue) + * Return type: None. + * Execute Params: ExecuteHam(Ham_DOD_Item_SetDmgTime, this, Float:someValue); + */ + Ham_DOD_Item_SetDmgTime, + + /** + * Description: - + * Forward params: function(this) + * Return type: None. + * Execute Params: ExecuteHam(Ham_DOD_Item_DropGren, this); + */ + Ham_DOD_Item_DropGren, + + /** + * Description: - + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute Params: ExecuteHam(Ham_DOD_Weapon_IsUseable, this); + */ + Ham_DOD_Weapon_IsUseable, + + /** + * Description: - + * Forward params: function(this, Float:accuracyFactor, idother, shared_rand) + * Return type: Vector, byreffed in execute. + * Execute Params: ExecuteHam(Ham_DOD_Weapon_Aim, this, Float:accuracyFactor, idother, shared_rand, Float:output[3]); + */ + Ham_DOD_Weapon_Aim, + + /** + * Description: - + * Forward params: function(this, Float:accuracyFactor, idother) + * Return type: Float. + * Execute Params: ExecuteHam(Ham_DOD_Weapon_flAim, this, Float:accuracyFactor, idother); + */ + Ham_DOD_Weapon_flAim, + + /** + * Description: - + * Forward params: function(this, Float:amount, targetEnt) + * Return type: None. + * Execute Params: ExecuteHam(Ham_DOD_Weapon_RemoveStamina, this, Float:amount, targetEnt); + */ + Ham_DOD_Weapon_RemoveStamina, + + /** + * Description: - + * Forward params: function(this, fov) + * Return type: Integer. + * Execute Params: ExecuteHam(Ham_DOD_Weapon_ChangeFOV, this, fov); + */ + Ham_DOD_Weapon_ChangeFOV, + + /** + * Description: - + * Forward params: function(this) + * Return type: Integer. + * Execute Params: ExecuteHam(Ham_DOD_Weapon_ZoomOut, this); + */ + Ham_DOD_Weapon_ZoomOut, + + /** + * Description: - + * Forward params: function(this) + * Return type: Integer. + * Execute Params: ExecuteHam(Ham_DOD_Weapon_ZoomIn, this); + */ + Ham_DOD_Weapon_ZoomIn, + + /** + * Description: - + * Forward params: function(this) + * Return type: Integer. + * Execute Params: ExecuteHam(Ham_DOD_Weapon_GetFOV, this); + */ + Ham_DOD_Weapon_GetFOV, + + /** + * Description: - + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute Params: ExecuteHam(Ham_DOD_Weapon_IsWaterSniping, this); + */ + Ham_DOD_Weapon_PlayerIsWaterSniping, + + /** + * Description: - + * Forward params: function(this) + * Return type: None. + * Execute Params: ExecuteHam(Ham_DOD_Weapon_UpdateZoomSpeed, this); + */ + Ham_DOD_Weapon_UpdateZoomSpeed, + + /** + * Description: - + * Forward params: function(this) + * Return type: None. + * Execute Params: ExecuteHam(Ham_DOD_Weapon_Special, this); + */ + Ham_DOD_Weapon_Special, + + + /** + * The following functions are specific to Team Fortress Classic. + */ + + /** + * Description: Get the item name. + * Forward params: function(this, const buffer[]); + * Return type: String (string length returned and string byref'd in ExecuteHam). + * Execute params: ExecuteHam(Ham_TFC_DB_GetItemName, this, buffer[], size); + */ + Ham_TFC_DB_GetItemName, + + /** + * Description: This entity is exploding, or otherwise needs to inflict damage upon entities within a certain range. + * Forward params: function(this, inflictorId, attackerId, Float:damage, classIgnore, bitsDamageType) + * Return type: None. + * Execute params: ExecuteHam(Ham_TFC_RadiusDamage, this, inflictorId, attackerId, Float:damage, classIgnore, bitsDamageType); + */ + Ham_TFC_RadiusDamage, + + /** + * Description: This entity is exploding, or otherwise needs to inflict damage upon entities within a certain range. + * Forward params: function(this, const Float:source[3], inflictorId, attackerId, Float:damage, classIgnore, bitsDamageType) + * Return type: None. + * Execute params: ExecuteHam(Ham_TFC_RadiusDamage2, this, const Float:source[3], inflictorId, attackerId, Float:damage, classIgnore, bitsDamageType); + */ + Ham_TFC_RadiusDamage2, + + + /** + * The following functions are specific to Earth's Special Forces. + */ + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_ESF_IsFighter, this); + */ + Ham_ESF_IsFighter, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_ESF_IsBuddy, this); + */ + Ham_ESF_IsBuddy, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this, const char sample[], somevalue) + * Return type: None. + * Execute params: ExecuteHam(Ham_ESF_EmitSound, this, const sample[], somevalue); + */ + Ham_ESF_EmitSound, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this somevalue) + * Return type: None. + * Execute params: ExecuteHam(Ham_ESF_EmitNullSound, this, somevalue); + */ + Ham_ESF_EmitNullSound, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this, someentid, somevalue) + * Return type: None. + * Execute params: ExecuteHam(Ham_ESF_IncreaseStrength, this, someentid, somevalue); + */ + Ham_ESF_IncreaseStrength, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this somevalue) + * Return type: None. + * Execute params: ExecuteHam(Ham_ESF_IncreasePL, this, somevalue); + */ + Ham_ESF_IncreasePL, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this somevalue) + * Return type: None. + * Execute params: ExecuteHam(Ham_ESF_SetPowerLevel, this, somevalue); + */ + Ham_ESF_SetPowerLevel, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this, somevalue) + * Return type: None. + * Execute params: ExecuteHam(Ham_ESF_SetMaxPowerLevel, this, somevalue); + */ + Ham_ESF_SetMaxPowerLevel, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this, anim) + * Return type: None. + * Execute params: ExecuteHam(Ham_ESF_StopAniTrigger, this, anim); + */ + Ham_ESF_StopAniTrigger, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_ESF_StopFly, this); + */ + Ham_ESF_StopFly, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_ESF_HideWeapon, this); + */ + Ham_ESF_HideWeapon, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this, somevalue) + * Return type: None. + * Execute params: ExecuteHam(Ham_ESF_HideWeapon, this, somevalue); + */ + Ham_ESF_ClientRemoveWeapon, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this, const model[]) + * Return type: None. + * Execute params: ExecuteHam(Ham_ESF_SendClientsCustomModel, this, const model[]); + */ + Ham_ESF_SendClientsCustomModel, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_ESF_CanTurbo, this); + */ + Ham_ESF_CanTurbo, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_ESF_CanPrimaryFire, this); + */ + Ham_ESF_CanPrimaryFire, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_ESF_CanSecondaryFire, this); + */ + Ham_ESF_CanSecondaryFire, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_ESF_CanStopFly, this); + */ + Ham_ESF_CanStopFly, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_ESF_CanBlock, this); + */ + Ham_ESF_CanBlock, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_ESF_CanRaiseKi, this); + */ + Ham_ESF_CanRaiseKi, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_ESF_CanRaiseStamina, this); + */ + Ham_ESF_CanRaiseStamina, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_ESF_CanTeleport, this); + */ + Ham_ESF_CanTeleport, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_ESF_CanStartFly, this); + */ + Ham_ESF_CanStartFly, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_ESF_CanStartPowerup, this); + */ + Ham_ESF_CanStartPowerup, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_ESF_CanJump, this); + */ + Ham_ESF_CanJump, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_ESF_CanWallJump, this); + */ + Ham_ESF_CanWallJump, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_ESF_IsSuperJump, this); + */ + Ham_ESF_IsSuperJump, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_ESF_IsMoveBack, this); + */ + Ham_ESF_IsMoveBack, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: Integer. + * Execute params: ExecuteHam(Ham_ESF_CheckWallJump, this); + */ + Ham_ESF_CheckWallJump, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this, const Float:somevalue[3]) + * Return type: None. + * Execute params: ExecuteHam(Ham_ESF_EnableWallJump, this, const Float:somevalue[3]); + */ + Ham_ESF_EnableWallJump, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_ESF_DisableWallJump, this); + */ + Ham_ESF_DisableWallJump, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_ESF_ResetWallJumpVars, this); + */ + Ham_ESF_ResetWallJumpVars, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this, const value[], const Float:somevalue[3], const someothervalue[]) + * Return type: None. + * Execute params: ExecuteHam(Ham_ESF_GetWallJumpAnim, const value[], const Float:somevalue[3], const someothervalue[]); + */ + Ham_ESF_GetWallJumpAnim, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this, const somevalue[], const someothervalue[]) + * Return type: None. + * Execute params: ExecuteHam(Ham_ESF_GetWallJumpAnim2, this, const somevalue[], const someothervalue[]); + */ + Ham_ESF_GetWallJumpAnim2, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_ESF_SetFlyMoveType, this); + */ + Ham_ESF_SetWallJumpAnimation, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_ESF_SetFlyMoveType, this); + */ + Ham_ESF_SetFlyMoveType, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_ESF_IsFlyMoveType, this); + */ + Ham_ESF_IsFlyMoveType, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_ESF_IsWalkMoveType, this); + */ + Ham_ESF_IsWalkMoveType, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_ESF_SetWalkMoveType, this); + */ + Ham_ESF_SetWalkMoveType, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this, somevalue) + * Return type: None. + * Execute params: ExecuteHam(Ham_ESF_DrawChargeBar, this, somevalue); + */ + Ham_ESF_DrawChargeBar, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_ESF_StartBlock, this); + */ + Ham_ESF_StartBlock, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_ESF_StopBlock, this); + */ + Ham_ESF_StopBlock, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_ESF_StartFly, this); + */ + Ham_ESF_StartFly, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this, Float:value) + * Return type: Float. + * Execute params: ExecuteHam(Ham_ESF_GetMaxSpeed, this, Float:value); + */ + Ham_ESF_GetMaxSpeed, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this, anim) + * Return type: None. + * Execute params: ExecuteHam(Ham_ESF_SetAnimation, this, anim); + */ + Ham_ESF_SetAnimation, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_ESF_PlayAnimation, this); + */ + Ham_ESF_PlayAnimation, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: Integer. + * Execute params: ExecuteHam(Ham_ESF_GetMoveForward, this); + */ + Ham_ESF_GetMoveForward, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: Integer. + * Execute params: ExecuteHam(Ham_ESF_GetMoveRight, this); + */ + Ham_ESF_GetMoveRight, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: Integer. + * Execute params: ExecuteHam(Ham_ESF_GetMoveUp, this); + */ + Ham_ESF_GetMoveUp, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_ESF_AddBlindFX, this); + */ + Ham_ESF_AddBlindFX, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_ESF_RemoveBlindFX, this); + */ + Ham_ESF_RemoveBlindFX, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_ESF_DisablePSBar, this); + */ + Ham_ESF_DisablePSBar, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this, somevalue) + * Return type: None. + * Execute params: ExecuteHam(Ham_ESF_AddBeamBoxCrosshair, this, somevalue); + */ + Ham_ESF_AddBeamBoxCrosshair, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_ESF_RemoveBeamBoxCrosshair, this); + */ + Ham_ESF_RemoveBeamBoxCrosshair, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_ESF_DrawPSWinBonus, this); + */ + Ham_ESF_DrawPSWinBonus, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this, Float:value, Float:othervalue) + * Return type: None. + * Execute params: ExecuteHam(Ham_ESF_DrawPSBar, this, Float:value, Float:othervalue); + */ + Ham_ESF_DrawPSBar, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_ESF_LockCrosshair, this); + */ + Ham_ESF_LockCrosshair, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_ESF_UnLockCrosshair, this); + */ + Ham_ESF_UnLockCrosshair, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_ESF_RotateCrosshair, this); + */ + Ham_ESF_RotateCrosshair, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_ESF_UnRotateCrosshair, this); + */ + Ham_ESF_UnRotateCrosshair, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_ESF_WaterMove, this); + */ + Ham_ESF_WaterMove, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_ESF_CheckTimeBasedDamage, this); + */ + Ham_ESF_CheckTimeBasedDamage, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_ESF_DoesSecondaryAttack, this); + */ + Ham_ESF_DoesSecondaryAttack, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_ESF_DoesPrimaryAttack, this); + */ + Ham_ESF_DoesPrimaryAttack, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_ESF_RemoveSpecialModes, this); + */ + Ham_ESF_RemoveSpecialModes, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_ESF_StopTurbo, this); + */ + Ham_ESF_StopTurbo, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_ESF_TakeBean, this); + */ + Ham_ESF_TakeBean, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_ESF_GetPowerLevel, this); + */ + Ham_ESF_GetPowerLevel, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_ESF_RemoveAllOtherWeapons, this); + */ + Ham_ESF_RemoveAllOtherWeapons, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_ESF_StopSwoop, this); + */ + Ham_ESF_StopSwoop, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_ESF_SetDeathAnimation, this); + */ + Ham_ESF_SetDeathAnimation, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_ESF_SetModel, this); + */ + Ham_ESF_SetModel, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_ESF_AddAttacks, this); + */ + Ham_ESF_AddAttacks, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this, const value[], const othervalue[], somevalue) + * Return type: None. + * Execute params: ExecuteHam(Ham_ESF_EmitClassSound, this, const value[], const othervalue[], somevalue); + */ + Ham_ESF_EmitClassSound, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_ESF_CheckLightning, this); + */ + Ham_ESF_CheckLightning, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_ESF_FreezeControls, this); + */ + Ham_ESF_FreezeControls, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_ESF_UnFreezeControls, this); + */ + Ham_ESF_UnFreezeControls, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_ESF_UpdateKi, this); + */ + Ham_ESF_UpdateKi, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_ESF_UpdateHealth, this); + */ + Ham_ESF_UpdateHealth, + + /** + * Description: - + * This is available only in ESF Open Beta. + * Forward params: function(this) + * Return type: Vector. + * Execute params: ExecuteHam(Ham_ESF_GetTeleportDir, this, output[3]); + */ + Ham_ESF_GetTeleportDir, + + /** + * Description: Unsure. + * Forward params: function(this) + * Return type: Integer. + * Execute params: ExecuteHam(Ham_ESF_Weapon_HolsterMeleed, this); + */ + Ham_ESF_Weapon_HolsterWhenMeleed, + + + /** + * The following functions are specific to Natural Selection. + */ + + /** + * Description: - + * Forward params: function(this, controller, Float:value) + * Return type: Float. + * Execute params: ExecuteHam(Ham_SetBoneController, this, controller, Float:value) + */ + Ham_NS_SetBoneController, + + /** + * Description: - + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_NS_SaveDataForReset, this) + */ + Ham_NS_SaveDataForReset, + + /** + * Description: - + * Forward params: function(this) + * Return type: Integer. + * Execute params: ExecuteHam(Ham_NS_GetHull, this) + */ + Ham_NS_GetHull, + + /** + * Description: - + * Forward params: function(this) + * Return type: Float. + * Execute params: ExecuteHam(Ham_NS_GetMaxWalkSpeed, this) + */ + Ham_NS_GetMaxWalkSpeed, + + /** + * Description: - + * Forward params: function(this, const teamID[]) + * Return type: String (string length returned and string byref'd in ExecuteHam). + * Execute params: ExecuteHam(Ham_NS_SetTeamID, this, const teamID[]) + */ + Ham_NS_SetTeamID, + + /** + * Description: - + * Forward params: function(this) + * Return type: Integer. + * Execute params: ExecuteHam(Ham_NS_GetPlayerClass, this) + */ + Ham_NS_GetEffectivePlayerClass, + + /** + * Description: - + * Forward params: function(this) + * Return type: Integer. + * Execute params: ExecuteHam(Ham_NS_GetAuthenticationMask, this) + */ + Ham_NS_GetAuthenticationMask, + + /** + * Description: - + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_NS_EffectivePlayerClassChanged, this) + */ + Ham_NS_EffectivePlayerClassChanged, + + /** + * Description: - + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_NS_NeedsTeamUpdate, this) + */ + Ham_NS_NeedsTeamUpdate, + + /** + * Description: - + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_NS_SendTeamUpdate, this) + */ + Ham_NS_SendTeamUpdate, + + /** + * Description: - + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_NS_SendWeaponUpdate, this) + */ + Ham_NS_SendWeaponUpdate, + + /** + * Description: - + * Forward params: function(this, idOther) + * Return type: None. + * Execute params: ExecuteHam(Ham_NS_InitPlayerFromSpawn, this, idOther) + */ + Ham_NS_InitPlayerFromSpawn, + + /** + * Description: - + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_NS_PackDeadPlayerItems, this) + */ + Ham_NS_PackDeadPlayerItems, + + /** + * Description: Gets sequence name based on index. + * animationName are passed by reference in ExecuteHam. outputLength is the max output length. + * Forward params: function(this, activity, const animationName[], bool:somevalue) + * Return type: None. + * Execute params: ExecuteHam(Ham_NS_GetAnimationForActivity, this, activity, output[], bool:somevalue, outputLength) + */ + Ham_NS_GetAnimationForActivity, + + /** + * Description: - + * Forward params: function(this, const Float:position[3], const Float:viewAngles[3]) + * Return type: None. + * Execute params: ExecuteHam(Ham_NS_StartObserver, this, const Float:position[3], const Float:viewAngles[3]) + */ + Ham_NS_StartObserver, + + /** + * Description: - + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_NS_StopObserver, this) + */ + Ham_NS_StopObserver, + + /** + * Description: - + * Forward params: function(this) + * Return type: Float. + * Execute params: ExecuteHam(Ham_NS_GetAdrenalineFactor, this) + */ + Ham_NS_GetAdrenalineFactor, + + /** + * Description: - + * Forward params: function(this, const name[], bool:showpickup)) + * Return type: None. + * Execute params: ExecuteHam(Ham_NS_GiveNamedItem, this, const name[], bool:showpickup) + */ + Ham_NS_GiveNamedItem, + + /** + * Description: - + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_NS_Suicide, this) + */ + Ham_NS_Suicide, + + /** + * Description: - + * Forward params: function(this) + * Return type: Integer. + * Execute params: ExecuteHam(Ham_NS_GetCanUseWeapon, this) + */ + Ham_NS_GetCanUseWeapon, + + /** + * Description: - + * Forward params: function(this) + * Return type: Float. + * Execute params: ExecuteHam(Ham_NS_Weapon_GetWeapPrimeTime, this) + */ + Ham_NS_Weapon_GetWeaponPrimeTime, + + /** + * Description: - + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_NS_Weapon_PrimeWeapon, this) + */ + Ham_NS_Weapon_PrimeWeapon, + + /** + * Description: - + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_NS_Weapon_GetIsWeaponPrimed, this) + */ + Ham_NS_Weapon_GetIsWeaponPrimed, + + /** + * Description: - + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_NS_Weapon_GetIsWeapPriming, this) + */ + Ham_NS_Weapon_GetIsWeaponPriming, + + /** + * Description: - + * Forward params: function(this, const viewModel[], const weaponModel[], anim, const animExt[], skiplocal, body) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_NS_Weapon_DefaultDeploy, this, const viewModel[], const weaponModel[], anim, const animExt[], skiplocal, body) + */ + Ham_NS_Weapon_DefaultDeploy, + + /** + * Description: - + * Forward params: function(this, clipsize, anim, Float:delay, body) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_NS_Weapon_DefaultReload, this, clipsize, anim, Float:delay, body) + */ + Ham_NS_Weapon_DefaultReload, + + /** + * Description: - + * Forward params: function(this) + * Return type: Float. + * Execute params: ExecuteHam(Ham_NS_Weapon_GetDeployTime, this) + */ + Ham_NS_Weapon_GetDeployTime, + + + /** + * The following functions are specific to Sven Co-op. + */ + + /** + * Description: Returns the type of group (i.e, "houndeye", or "human military" + * so that monsters with different classnames still realize that they are teammates. + * (overridden for monsters that form groups) + * Classes list: + * CLASS_NONE 0 + * CLASS_MACHINE 1 + * CLASS_PLAYER 2 + * CLASS_HUMAN_PASSIVE 3 + * CLASS_HUMAN_MILITARY 4 + * CLASS_ALIEN_MILITARY 5 + * CLASS_ALIEN_PASSIVE 6 + * CLASS_ALIEN_MONSTER 7 + * CLASS_ALIEN_PREY 8 + * CLASS_ALIEN_PREDATOR 9 + * CLASS_INSECT 10 + * CLASS_PLAYER_ALLY 11 + * CLASS_PLAYER_BIOWEAPON 12 + * CLASS_ALIEN_BIOWEAPON 13 + * CLASS_XRACE_PITDRONE 14 + * CLASS_XRACE_SHOCK 15 + * CLASS_BARNACLE 99 + * Forward params: function(this, class) + * Return type: Integer. + * Execute params: ExecuteHam(Ham_SC_GetClassification, this, class) + */ + Ham_SC_GetClassification, + + /** + * Description: Whether entity is a monter. + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_IsMonster, this) + */ + Ham_SC_IsMonster, + + /** + * Description: (!) This function is no more available in the mod. + * Whether entity uses PhysX feature. + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_IsPhysX, this) + */ + Ham_SC_IsPhysX, + + /** + * Description: Whether this is a point entity. + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_IsPointEntity, this) + */ + Ham_SC_IsPointEntity, + + /** + * Description: Whether entity is a machine. + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_IsMachine, this) + */ + Ham_SC_IsMachine, + + /** + * Description: Removes the entity and all its content in critical situation. + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_CriticalRemove, this) + */ + Ham_SC_CriticalRemove, + + /** + * Description: Updates global tables that need to know about entities being removed. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(UpdateOnRemove, this) + */ + Ham_SC_UpdateOnRemove, + + /** + * Description: Returns true if a line can be traced from the caller's eyes to the target vector. + * Forward params: function(this, entity, bool:ignoreGlass) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_FVisible, this, entity, bool:ignoreGlass) + */ + Ham_SC_FVisible, + + /** + * Description: Returns true if a line can be traced from the given point to the target point. + * Forward params: function(this, const Float:target[3], const Float:start[3]) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_FVisibleFromPos, this, const Float:target[3], const Float:start[3]) + */ + Ham_SC_FVisibleFromPos, + + /** + * Description: Returns true if passed in entity is facing current entity. + * Some examples of dotProduct value : + * VIEW_FIELD_FULL -1.0 + * VIEW_FIELD_WIDE -0.7 + * VIEW_FIELD_NARROW 0.7 + * VIEW_FIELD_ULTRA_NARROW 0.9 + * Forward params: function(this, entTest, Float:dotProduct) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_IsFacing, this, entTest, Float:dotProduct) + */ + Ham_SC_IsFacing, + + /** + * Description: Gets points without killing an entity. + * Forward params: function(this, Float:damage) + * Return type: Float. + * Execute params: ExecuteHam(Ham_SC_GetPointsForDamage, this, Float:damage) + */ + Ham_SC_GetPointsForDamage, + + /** + * Description: Gets points for making some damage. + * Forward params: function(this, attacker, inflictor, Float:damage) + * Return type: None. + * Execute params: ExecuteHam(Ham_SC_GetDamagePoints, this, attacker, inflictor, Float:damage) + */ + Ham_SC_GetDamagePoints, + + /** + * Description: Constructor. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_SC_OnCreate, this) + */ + Ham_SC_OnCreate, + + /** + * Description: Desctructor. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_SC_OnDestroy, this) + */ + Ham_SC_OnDestroy, + + /** + * Description: (!) This function is no more available in the mod. + * Returns false if the entity is somehow invalid. + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_IsValidEntity, this) + */ + Ham_SC_IsValidEntity, + + /** + * Description: Checks if this monster should fade out. + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_ShouldFadeOnDeath, this) + */ + Ham_SC_ShouldFadeOnDeath, + + /** + * Description: Sets up a friendly monster. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_SC_SetupFriendly, this) + */ + Ham_SC_SetupFriendly, + + /** + * Description: (!) This function is no more available in the mod. + * Tries to revive a monster. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_SC_ReviveThink, this) + */ + Ham_SC_ReviveThink, + + /** + * Description: Revives a monster. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_SC_Revive, this) + */ + Ham_SC_Revive, + + /** + * Description: Final bit of initization before a monster is turned over to the AI. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_SC_StartMonster, this) + */ + Ham_SC_StartMonster, + + /** + * Description: Surveys conditions and set appropriate conditions bits for attack types. + * Forward params: function(this, Float:dot, Float:dist) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_CheckRangeAttack1_Move, this, Float:dot, Float:dist) + */ + Ham_SC_CheckRangeAttack1_Move, + + /** + * Description: Surveys conditions and set appropriate conditions bits for attack types. + * Forward params: function(this, Float:dot, Float:dist) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_CheckRangeAttack2_Move, this, Float:dot, Float:dist) + */ + Ham_SC_CheckRangeAttack2_Move, + + /** + * Description: Surveys conditions and set appropriate conditions bits for attack types. + * Forward params: function(this, Float:dot, Float:dist) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_CheckMeleeAttack1_Move, this, Float:dot, Float:dist) + */ + Ham_SC_CheckMeleeAttack1_Move, + + /** + * Description: Surveys conditions and set appropriate conditions bits for attack types. + * Forward params: function(this, Float:dot, Float:dist) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_CheckMeleeAttack2_Move, this, Float:dot, Float:dist) + */ + Ham_SC_CheckMeleeAttack2_Move, + + /** + * Description: Checks tank usage. + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_CheckTankUsage, this) + */ + Ham_SC_CheckTankUsage, + + /** + * Description: Sets a monster's gait activity. + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_SetGaitActivity, this) + */ + Ham_SC_SetGaitActivity, + + /** + * Description: Tries to overcome local obstacles by triangulating a path around them. + * Forward params: function(this, const Float:start[3], const Float:end[3], Float:dist, targetEnt, Float:apex[3], Float:apex2[3], bool:coverPath) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_FTriangulate, this, const Float:start[3], const Float:end[3], Float:dist, targetEnt, Float:apex[3], Float:apex2[3], bool:coverPath ) + */ + Ham_SC_FTriangulate, + + /** + * Description: Tries to overcome local obstacles by triangulating a path around them. + * Forward params: function(this, const Float:start[3], const Float:end[3], Float:dist, targetEnt, Float:apex[3]) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_FTriangulateExtension, this, const Float:start[3], const Float:end[3], Float:dist, targetEnt, Float:apex[3]) + */ + Ham_SC_FTriangulateExtension, + + /** + * Description: Tries to find a nearby node that will hide the caller from its enemy. + * If supplied, search will return a node at least as far away as minDist, but no farther than maxDist. + * If maxDist isn't supplied, it defaults to a reasonable value. + * Forward params: function(this, const Float:threat[3], const Float:viewOffset[3], Float:minDist, Float:maxDist) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_FindCoverGrenade, this, const Float:threat[3], const Float:viewOffset[3], Float:minDist, Float:maxDist) + */ + Ham_SC_FindCoverGrenade, + + /** + * Description: Tries to find a nearby node that will hide the caller from its enemy. + * If supplied, search will return a node at least as far away as minDist, but no farther than maxDist. + * If maxDist isn't supplied, it defaults to a reasonable value. + * Forward params: function(this, const Float:threat[3], const Float:viewOffset[3], Float:minDist, Float:maxDist) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_FindCoverDistance, this, const Float:threat[3], const Float:viewOffset[3], Float:minDist, Float:maxDist) + */ + Ham_SC_FindCoverDistance, + + /** + * Description: Tries to find a nearby node that will hide the caller from its enemy. + * If supplied, search will return a node at least as far away as minDist, but no farther than maxDist. + * If maxDist isn't supplied, it defaults to a reasonable value. + * Forward params: function(this, const Float:threat[3], const Float:viewOffset[3], Float:minDist, Float:maxDist) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_FindAttackPoint, this, const Float:threat[3], const Float:viewOffset[3], Float:minDist, Float:maxDist) + */ + Ham_SC_FindAttackPoint, + + /** + * Description: Determines whether or not the chosen cover location is a good one to move to. + * Currently based on proximity to others in the squad. + * Forward params: function(this, const Float:coverLocation[3]) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_FValidateCover, this, const Float:coverLocation[3]) + */ + Ham_SC_FValidateCover, + + /** + * Description: Checks for possibility of friendly fire. + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_NoFriendlyFire, this) + */ + Ham_SC_NoFriendlyFire1, + + /** + * Description: Checks for possibility of friendly fire. + * Forward params: function(this, const Float:pos[3]) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_NoFriendlyFire2, this, const Float:pos[3]) + */ + Ham_SC_NoFriendlyFire2, + + /** + * Description: Checks for possibility of friendly fire. + * Forward params: function(this, const Float:pos[3], targetEnt) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_NoFriendlyFire3, this, const Float:pos[3], targetEnt) + */ + Ham_SC_NoFriendlyFire3, + + /** + * Description: Checks for possibility of friendly fire from the calling monster's origin to toPos. + * Forward params: function(this, const Float:toPos[3]) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_NoFriendlyFireToPos, this, const Float:toPos[3]) + */ + Ham_SC_NoFriendlyFireToPos, + + /** + * Description: Same as FVisible but from gun position. + * Forward params: function(this, entity, Float:pos[3]) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_FVisibleGunPos, this, entity, Float:pos[3]) + */ + Ham_SC_FVisibleGunPos, + + /** + * Description: Checks for monsters in this generic cone. + * Forward params: function(this, entity, const Float:pos[3]) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_FInBulletCone, this, entity, const Float:pos[3]) + */ + Ham_SC_FInBulletCone, + + /** + * Description: - + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_SC_CallGibMonster, this) + */ + Ham_SC_CallGibMonster, + + /** + * Description: - + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_SC_CheckTimeBasedDamage, this) + */ + Ham_SC_CheckTimeBasedDamage, + + /** + * Description: - + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_IsMoving, this) + */ + Ham_SC_IsMoving, + + /** + * Description: - + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_IsPlayerFollowing, this) + */ + Ham_SC_IsPlayerFollowing, + + /** + * Description: - + * Forward params: function(this, idleader, bool:noSound) + * Return type: None. + * Execute params: ExecuteHam(Ham_SC_StartPlayerFollowing, this, idleader, bool:noSound) + */ + Ham_SC_StartPlayerFollowing, + + /** + * Description: - + * Forward params: function(this, bool:clearSchedule, bool:noSound) + * Return type: None. + * Execute params: ExecuteHam(Ham_SC_StopPlayerFollowing, this, bool:clearSchedule, bool:noSound) + */ + Ham_SC_StopPlayerFollowing, + + /** + * Description: - + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_SC_UseSound, this) + */ + Ham_SC_UseSound, + + /** + * Description: - + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_SC_UnUseSound, this) + */ + Ham_SC_UnUseSound, + + /** + * Description: - + * Forward params: function(this, idOther) + * Return type: None. + * Execute params: ExecuteHam(Ham_SC_RideMonster, this, idOther) + */ + Ham_SC_RideMonster, + + /** + * Description: - + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_SC_CheckAndApplyGenericAttacks, this) + */ + Ham_SC_CheckAndApplyGenericAttacks, + + /** + * Description: - + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_CheckScared, this) + */ + Ham_SC_CheckScared, + + /** + * Description: - + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_SC_CheckCreatureDanger, this) + */ + Ham_SC_CheckCreatureDanger, + + /** + * Description: - + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_SC_CheckFallDamage, this) + */ + Ham_SC_CheckFallDamage, + + /** + * Description: - + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_SC_CheckRevival, this) + */ + Ham_SC_CheckRevival, + + /** + * Description: (!) This function is no more available in the mod. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_SC_MedicCallSound, this) + */ + Ham_SC_MedicCallSound, + + + /** + * Description: (!) This function is no more available in the mod. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_SC_Player_MenuInputPerformed, this) + */ + Ham_SC_Player_MenuInputPerformed, + + /** + * Description: - + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_SC_Player_IsMenuInputDone, this) + */ + Ham_SC_Player_IsMenuInputDone, + + /** + * Description: - + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_SC_Player_SpecialSpawn, this) + */ + Ham_SC_Player_SpecialSpawn, + + /** + * Description: - + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_Player_IsValidInfoEntity, this) + */ + Ham_SC_Player_IsValidInfoEntity, + + /** + * Description: - + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_SC_Player_LevelEnd, this) + */ + Ham_SC_Player_LevelEnd, + + /** + * Description: - + * Forward params: function(this, voteType) + * Return type: None. + * Execute params: ExecuteHam(Ham_SC_Player_VoteStarted, this, voteType) + */ + Ham_SC_Player_VoteStarted, + + /** + * Description: - + * Forward params: function(this, voteType) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_Player_CanStartNextVote, this, voteType) + */ + Ham_SC_Player_CanStartNextVote, + + /** + * Description: - + * Forward params: function(this, voteInput) + * Return type: None. + * Execute params: ExecuteHam(Ham_SC_Player_Vote, this, voteInput) + */ + Ham_SC_Player_Vote, + + /** + * Description: - + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_Player_HasVoted, this) + */ + Ham_SC_Player_HasVoted, + + /** + * Description: - + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_SC_Player_ResetVote, this) + */ + Ham_SC_Player_ResetVote, + + /** + * Description: - + * Forward params: function(this) + * Return type: Integer. + * Execute params: ExecuteHam(Ham_SC_Player_LastVoteInput, this) + */ + Ham_SC_Player_LastVoteInput, + + /** + * Description: - + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_SC_Player_InitVote, this) + */ + Ham_SC_Player_InitVote, + + /** + * Description: - + * Forward params: function(this) + * Return type: Float. + * Execute params: ExecuteHam(Ham_SC_Player_StartNextVote, this) + */ + Ham_SC_Player_TimeToStartNextVote, + + /** + * Description: - + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_SC_Player_ResetView, this) + */ + Ham_SC_Player_ResetView, + + /** + * Description: - + * Forward params: function(this) + * Return type: Float. + * Execute params: ExecuteHam(Ham_SC_Player_GetLogFrequency, this) + */ + Ham_SC_Player_GetLogFrequency, + + /** + * Description: - + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_Player_LogPlayerStats, this) + */ + Ham_SC_Player_LogPlayerStats, + + /** + * Description: (!) This function is no more available in the mod. + * Forward params: function(this, idPlayer, Float:time) + * Return type: None. + * Execute params: ExecuteHam(Ham_SC_Player_DisableCollision, this, idPlayer, Float:time) + */ + Ham_SC_Player_DisableCollisionWithPlayer, + + /** + * Description: (!) This function is no more available in the mod. + * Forward params: function(this, idPlayer, bool:testIntersection) + * Return type: None. + * Execute params: ExecuteHam(Ham_SC_Player_EnableCollision, this, idPlayer, bool:testIntersection) + */ + Ham_SC_Player_EnableCollisionWithPlayer, + + /** + * Description: (!) This function is no more available in the mod. + * Forward params: function(this, idPlayer) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_Player_CanTouchPlayer, this, idPlayer) + */ + Ham_SC_Player_CanTouchPlayer, + + + /** + * Description: - + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_SC_Item_Materialize, this) + */ + Ham_SC_Item_Materialize, + + + /** + * Description: - + * Forward params: function(this, const Float:moving[3], const Float:standing[3], const Float:crouched[3]) + * Return type: Vector, byreffed in execute. + * Execute params: ExecuteHam(Ham_SC_Weapon_BulletAccuracy, this, const Float:moving[3], const Float:standing[3], const Float:crouched[3], Float:output[3]) + */ + Ham_SC_Weapon_BulletAccuracy, + + /** + * Description: - + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_SC_Weapon_TertiaryAttack, this) + */ + Ham_SC_Weapon_TertiaryAttack, + + /** + * Description: - + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_SC_Weapon_BurstSupplement, this) + */ + Ham_SC_Weapon_BurstSupplement, + + /** + * Description: - + * Forward params: function(this, const alternative[] = "") + * Return type: String (string length returned and string byref'd in ExecuteHam). + * Execute params: ExecuteHam(Ham_SC_Weapon_GetP_Model, this, const alternative[] = "", buffer[], size) + */ + Ham_SC_Weapon_GetP_Model, + + /** + * Description: - + * Forward params: function(this, const alternative[] = "") + * Return type: String (string length returned and string byref'd in ExecuteHam). + * Execute params: ExecuteHam(Ham_SC_Weapon_GetW_Model, this, const alternative[] = "", buffer[], size) + */ + Ham_SC_Weapon_GetW_Model, + + /** + * Description: - + * Forward params: function(this, const alternative[] = "") + * Return type: String (string length returned and string byref'd in ExecuteHam). + * Execute params: ExecuteHam(Ham_SC_Weapon_GetV_Model, this, const alternative[] = "", buffer[], size) + */ + Ham_SC_Weapon_GetV_Model, + + /** + * Description: - + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_SC_Weapon_PrecacheCustomMdl, this) + */ + Ham_SC_Weapon_PrecacheCustomModels, + + /** + * Description: - + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_Weapon_IsMultiplayer, this) + */ + Ham_SC_Weapon_IsMultiplayer, + + /** + * Description: - + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_Weapon_FRunfuncs, this) + */ + Ham_SC_Weapon_FRunfuncs, + + /** + * Description: - + * Forward params: function(this, fov) + * Return type: None. + * Execute params: ExecuteHam(Ham_SC_Weapon_SetFOV, this, fov) + */ + Ham_SC_Weapon_SetFOV, + + /** + * Description: - + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_Weapon_FCanRun, this) + */ + Ham_SC_Weapon_FCanRun, + + /** + * Description: - + * Forward params: function(this, Float:frametime) + * Return type: None. + * Execute params: ExecuteHam(Ham_SC_Weapon_CustomDecrement, this, Float:frametime) + */ + Ham_SC_Weapon_CustomDecrement, + + /** + * Description: - + * Forward params: function(this, const model[]) + * Return type: None. + * Execute params: ExecuteHam(Ham_SC_Weapon_SetV_Model, this, const model[]) + */ + Ham_SC_Weapon_SetV_Model, + + /** + * Description: - + * Forward params: function(this, const model[]) + * Return type: None. + * Execute params: ExecuteHam(Ham_SC_Weapon_SetP_Model, this, const model[]) + */ + Ham_SC_Weapon_SetP_Model, + + /** + * Description: - + * Forward params: function(this, skin) + * Return type: None. + * Execute params: ExecuteHam(Ham_SC_Weapon_ChangeWeaponSkin, this, skin) + */ + Ham_SC_Weapon_ChangeWeaponSkin, + + + /** + * LATE ADDITIONS (2013) + */ + + /** + * Description: Normally called whenever an entity dies. + * Forward params: function(this, idinflictor, idattacker, shouldgib) + * Return type: None. + * Execute params: ExecuteHam(Ham_TFC_Killed, this, idinflictor, idattacker, shouldgib); + */ + Ham_TFC_Killed, + + /** + * Description: Returns whether an entity is activated. + * Forward params: function(this, idActivator); + * Return type: Integer. + * Execute params: ExecuteHam(Ham_IsTriggered, this, idActivator); + */ + Ham_TFC_IsTriggered, + + /** + * Description: Sends an animation event for the weapon. skiplocal is 1 if client is predicting weapon animations. + * Forward params: function(this, anim, skiplocal); + * Return type: None. + * Execute params: ExecuteHam(Ham_TFC_Weapon_SendWeaponAnim, this, anim, skiplocal); + */ + Ham_TFC_Weapon_SendWeaponAnim, + + /** + * Description: Gets next attack delay. + * Forward params: function(this, Float:delay) + * Return type: Float (byref'd in ExecuteHam). + * Execute params: ExecuteHam(Ham_TFC_Weapon_GetNextAttackDelay, this, Float:delay, Float:output); + */ + Ham_TFC_Weapon_GetNextAttackDelay, + + + /** + * Description: Usually called whenever an entity gets a form of a heal. + * Forward params: function(this, Float:health, damagebits, health_cap); + * Return type: Integer. + * Execute params: ExecuteHam(Ham_SC_TakeHealth, this, Float:health, damagebits, health_cap); + */ + Ham_SC_TakeHealth, + + /** + * Description: Usually called whenever an entity gets a form of armor. + * Forward params: function(this, Float:armor, damagebits, armor_cap); + * Return type: Integer. + * Execute params: ExecuteHam(Ham_SC_TakeArmor, this, Float:armor, damagebits, armor_cap); + */ + Ham_SC_TakeArmor, + + /** + * Description: Gives ammo to the entity. + * Forward params: function(this, amount, const name[], max, const bool:fromPlayer) + * Return type: Integer. + * Execute params: ExecuteHam(Ham_SC_GiveAmmo, this, amount, "type", max, fromPlayer); + */ + Ham_SC_GiveAmmo, + + /** + * Description: Determines if we should ignore damage. + * Forward params: function(this, idattacker); + * Return type: Integer. + * Execute params: ExecuteHam(Ham_SC_CheckAttacker, this, idattacker); + */ + Ham_SC_CheckAttacker, + + /** + * Description: Determines if a player is connected. + * Forward params: function(this); + * Return type: Integer. + * Execute params: ExecuteHam(Ham_SC_Player_IsConnected, this); + */ + Ham_SC_Player_IsConnected, + + + /** + * Description: Sends an animation event for the weapon. skiplocal is 1 if client is predicting weapon animations. + * Forward params: function(this, anim, skiplocal); + * Return type: None. + * Execute params: ExecuteHam(Ham_DOD_Weapon_SendWeaponAnim, this, anim, skiplocal); + */ + Ham_DOD_Weapon_SendWeaponAnim, + + + /** + * Description: - + * Forward params: function(this); + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_CS_Item_IsWeapon, this); + */ + Ham_CS_Item_IsWeapon, + + + /** + * Description: Returns the id of the entity if its class is derived off of CBaseSquadTalkMonster, -1 otherwise. + * Forward params: function(this) + * Return type: Entity. + * Execute params: ExecuteHam(Ham_OPF_MySquadTalkMonsterPointer, this); + */ + Ham_OPF_MySquadTalkMonsterPointer, + + /** + * Description: - + * Forward params: function(this) + * Return type: Float (byref'd in ExecuteHam). + * Execute params: ExecuteHam(Ham_OPF_WeaponTimeBase, this); + */ + Ham_OPF_WeaponTimeBase, + + + /** + * Description: Called when the alternate attack of a weapon is triggered. + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_TS_Weapon_AlternateAttack, this); + */ + Ham_TS_Weapon_AlternateAttack, + + + /** + * Description: Gets item infos. + * Forward params: function(this, iteminfo_handle); + * Return type: Integer. + * Execute params: ExecuteHam(Ham_Item_GetItemInfo, this, iteminfo_handle); + * Use CreateHamItemInfo() to pass a new ItemInfo handle. + */ + Ham_Item_GetItemInfo, + + + /** + * LATE ADDITIONS (2017) + */ + + /** + * Description: Performs checks that must occur before Spawn itself is called. Always call baseclass version first. + * Forward params: function(this); + * Return type: None. + * Execute params: ExecuteHam(Ham_SC_PreSpawn, this); + */ + Ham_SC_PreSpawn, + + /** + * Description: Performs checks that must occur after Spawn itself is called. Always call baseclass version first. + * Forward params: function(this); + * Return type: None. + * Execute params: ExecuteHam(Ham_SC_PostSpawn, this); + */ + Ham_SC_PostSpawn, + + /** + * Description: - + * Forward params: function(this, key); + * Return type: None. + * Execute params: ExecuteHam(Ham_SC_PostSpawn, this, const key[]); + */ + Ham_SC_OnKeyValueUpdate, + + /** + * Description: - + * Forward params: function(this, classification); + * Return type: None. + * Execute params: ExecuteHam(Ham_SC_SetClassification, this, classification); + */ + Ham_SC_SetClassification, + + /** + * Description: Returns whether an entity is activated. + * This function is not supported by Day Of Defeat. + * This function has different version for Team Fortress Classic, see Ham_TFC_IsTriggered instead. + * Forward params: function(this, idActivator); + * Return type: Integer. + * Execute params: ExecuteHam(Ham_SC_IsTriggered, this, idActivator); + */ + Ham_SC_IsTriggered, + + /** + * Description: Returns the id of the entity if its class is derived off of ICustomEntity, -1 otherwise. + * Forward params: function(this) + * Return type: Entity. + * Execute params: ExecuteHam(Ham_SC_MyCustomPointer, this); + */ + Ham_SC_MyCustomPointer, + + /** + * Description: Returns the id of the entity if its class is derived off of CBasePlayerItem, -1 otherwise. + * Forward params: function(this) + * Return type: Entity. + * Execute params: ExecuteHam(Ham_SC_MyItemPointer, this); + */ + Ham_SC_MyItemPointer, + + /** + * Description: Typically adds points to the entity. + * Forward params: function(this, points, bool:cangonegative); + * Return type: None. + * Execute params: ExecuteHam(Ham_AddPoints, this, points, bool:cangonegative); + */ + Ham_SC_AddPoints, + + /** + * Description: Typically adds points to everybody on the entity's team. + * Forward params: function(this, points, bool:cangonegative); + * Return type: None. + * Execute params: ExecuteHam(Ham_AddPointsToTeam, this, points, bool:cangonegative); + */ + Ham_SC_AddPointsToTeam, + + /** + * Description: Removes an item to the player's inventory. + * Forward params: function(this, idother); + * Return type: Integer. + * Execute params: ExecuteHam(Ham_SC_RemovePlayerItem, this, idother); + */ + Ham_SC_RemovePlayerItem, + + /** + * Description: Not entirely sure. + * Forward params: function(this, idOn) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_OnControls, this, idOn); + */ + Ham_SC_OnControls, + + /** + * Description: Whether or not the entity is sneaking. + * Forward params: function(this); + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_IsSneaking, this); + */ + Ham_SC_IsSneaking, + + /** + * Description: Whether or not the entity is alive. + * Forward params: function(this); + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_IsAlive, this); + */ + Ham_SC_IsAlive, + + /** + * Description: Whether or not the entity uses a BSP model. + * Forward params: function(this); + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_IsBSPModel, this); + */ + Ham_SC_IsBSPModel, + + /** + * Description: Whether or not the entity can reflect gauss shots. + * Forward params: function(this); + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_ReflectGauss, this); + */ + Ham_SC_ReflectGauss, + + /** + * Description: Whether or not the target is the same as the one passed. + * Note the strindex parameter is a string passed that has been allocated by the engine. + * Use fakemeta's EngFunc_SzFromIndex to convert to a normal string, or fakemeta's + * EngFunc_AllocString to create a new string. + * Forward params: function(this, strindex). + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_HasTarget, this, strindex); + */ + Ham_SC_HasTarget, + + /** + * Description: Whether or not the entity is in the world. + * Forward params: function(this); + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_IsInWorld, this); + */ + Ham_SC_IsInWorld, + + /** + * Description: Whether or not the entity is a player. + * Forward params: function(this); + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_Sc_IsPlayer, this); + */ + Ham_Sc_IsPlayer, + + /** + * Description: Whether or not the entity is a net client. + * Forward params: function(this); + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_IsNetClient, this); + */ + Ham_SC_IsNetClient, + + /** + * Description: Whether or not the entity is a brush entity breakable. + * Forward params: function(this); + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_IsBreakable, this); + */ + Ham_SC_IsBreakable, + + /** + * Description: - + * Forward params: function(this, idActivator, useType, value); + * Return type: None. + * Execute params: ExecuteHam(Ham_SC_SUB_UseTargets, this, idActivator, useType, value); + */ + Ham_SC_SUB_UseTargets, + + /** + * Description: - + * Forward params: function(this); + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_IsLockedByMaster, this); + */ + Ham_SC_IsLockedByMaster, + + /** + * Description: Normally called whenever a barnacle grabs the entity. + * Forward params: function(this, idOther); + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_FBecomeProne, this, idOther); + */ + Ham_SC_FBecomeProne, + + /** + * Description: Returns true if a line can be traced from the caller's eyes to given vector. + * Forward params: function(this, const Float:origin[3]); + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_FVecVisible, this, const Float:origin[3]); + */ + Ham_SC_FVecVisible, + + /** + * Description: Sets the player ally state + * Forward params: function(this, bool:state); + * Return type: None. + * Execute params: ExecuteHam(Ham_SC_SetPlayerAlly, this, bool:state); + */ + Ham_SC_SetPlayerAlly, + + /** + * Description: Callback after trigger_setorigin has moved the entity. + * Forward params: function(this); + * Return type: None. + * Execute params: ExecuteHam(Ham_SC_OnSetOriginByMap, this); + */ + Ham_SC_OnSetOriginByMap, + + /** + * Description: Return true if you want to be revivable. + * Forward params: function(this); + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_IsRevivable, this); + */ + Ham_SC_IsRevivable, + + /** + * Description: - + * timeUntilRevive is the time until the actual revive event occurs. + * Forward params: function(this, Float:timeUntilRevive); + * Return type: None. + * Execute params: ExecuteHam(Ham_SC_BeginRevive, Float:timeUntilRevive); + */ + Ham_SC_BeginRevive, + + /** + * Description: - + * timeUntilRevive is the time before the monster is supposed to be revived + * Forward params: function(this, Float:timeUntilRevive); + * Return type: None. + * Execute params: ExecuteHam(Ham_SC_EndRevive, Float:timeUntilRevive); + */ + Ham_SC_EndRevive, + + /** + * Description: Determines whether or not the monster can play the scripted sequence or AI sequence that is + * trying to possess it. If DisregardState is set, the monster will be sucked into the script + * no matter what state it is in. ONLY Scripted AI ents should allow this. + * Forward params: function(this, bool:disregardState, interruptLevel); + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_CanPlaySequence, this, bool:disregardState, interruptLevel); + */ + Ham_SC_CanPlaySequence, + + /** + * Description: - + * Forward params: function(this, bool:disregardState); + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_CanPlaySentence2, this, bool:disregardState); + */ + Ham_SC_CanPlaySentence2, + + /** + * Description: - + * Forward params: function(this, const sentence[], Float:duration, Float:volume, Float:attenuation, bool:concurrent, idListener); + * Return type: None. + * Execute params: ExecuteHam(Ham_PlayScriptedSentence, this, const sentence[], Float:duration, Float:volume, Float:attenuation, bool:concurrent, idListener); + */ + Ham_SC_PlayScriptedSentence, + + + /** + * Items have all the attributes of normal entities in addition to these. + */ + + /** + * Description: Adds the item to the player. + * Forward params: function(this, idPlayer); + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_Item_AddToPlayer, this, idPlayer); + */ + Ham_SC_Item_AddToPlayer, + + /** + * Description: Returns true if you want your duplicate removed from world. + * Forward params: function(this, idOriginal); + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_Item_AddDuplicate, this, idOriginal); + */ + Ham_SC_Item_AddDuplicate, + + /** + * Description: - + * Forward params: function(this, idOther); + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_Item_AddAmmoFromItem, this, idOther); + */ + Ham_SC_Item_AddAmmoFromItem, + + /** + * Description: - + * Forward params: function(this) + * Return type: String (string length returned and string byref'd in ExecuteHam). + * Execute params: ExecuteHam(Ham_SC_Item_GetPickupSound, this) + */ + Ham_SC_Item_GetPickupSound, + + /** + * Description: - + * Collect Types: + * COLLECT_TOUCH 0 + * COLLECT_USE_DIRECT 1 + * COLLECT_USE_INDIRECT 2 + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_Item_CanCollect, this, idOther, collectType); + */ + Ham_SC_Item_CanCollect, + + /** + * Description: - + * Forward params: function(this, idOther, collectType); + * Collect Types: + * COLLECT_TOUCH 0 + * COLLECT_USE_DIRECT 1 + * COLLECT_USE_INDIRECT 2 + * Return type: None. + * Execute params: ExecuteHam(Ham_SC_Item_Collect, this, idOther, collectType); + */ + Ham_SC_Item_Collect, + + /** + * Description: Gets item infos. + * Forward params: function(this, iteminfo_handle); + * Return type: Integer. + * Execute params: ExecuteHam(Ham_SC_Item_GetItemInfo, this, iteminfo_handle); + * Use CreateHamItemInfo() to pass a new ItemInfo handle. + */ + Ham_SC_Item_GetItemInfo, + + /** + * Description: Whether or not this entity can be deployed. + * Forward params: function(this); + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_Item_CanDeploy, this); + */ + Ham_SC_Item_CanDeploy, + + /** + * Description: Deploys the entity (usually a weapon). + * Forward params: function(this); + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_Item_Deploy, this); + */ + Ham_SC_Item_Deploy, + + /** + * Description: Whether or not the entity can be holstered. + * Forward params: function(this); + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_Item_CanHolster, this); + */ + Ham_SC_Item_CanHolster, + + /** + * Description: Called each frame by the player PreThink if inactive. + * Forward params: function(this); + * Return type: None. + * Execute params: ExecuteHam(Ham_SC_Item_InactiveItemPreFrame, this); + */ + Ham_SC_Item_InactiveItemPreFrame, + + /** + * Description: Called each frame by the player PostThink if inactive. + * Forward params: function(this); + * Return type: None. + * Execute params: ExecuteHam(Ham_SC_Item_InactiveItemPostFrame, this); + */ + Ham_SC_Item_InactiveItemPostFrame, + + /** + * Description: - + * Forward params: function(this); + * Return type: None. + * Execute params: ExecuteHam(Ham_SC_Item_DetachFromPlayer, this); + */ + Ham_SC_Item_DetachFromPlayer, + + /** + * Description: Updates item data for the client. + * Forward params: function(this, idPlayer) + * Return type: Integer. + * Execute params: ExecuteHam(Ham_SC_Item_UpdateClientData, this, idPlayer); + */ + Ham_SC_Item_UpdateClientData, + + /** + * Description: - + * Forward params: function(this) + * Return type: Float. + * Execute params: ExecuteHam(Ham_SC_Item_GetRespawnTime, this); + */ + Ham_SC_Item_GetRespawnTime, + + /** + * Description: - + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_Item_CanHaveDuplicates, this); + */ + Ham_SC_Item_CanHaveDuplicates, + + + /** + * Weapons have all the attributes to Ham_Item_*, in addition to these. + */ + + /** + * Description: - + * Forward params: function(this, idOriginal) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_Weapon_ExtractAmmoFromItem, idOriginal); + */ + Ham_SC_Weapon_ExtractAmmoFromItem, + + /** + * Description: Unsure. + * This function is not supported in Earth's Special Forces mod. + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_Weapon_AddWeapon, this); + */ + Ham_SC_Weapon_AddWeapon, + + /** + * Description: - + * Forward params: function(this) + * Return type: Integer. + * Execute params: ExecuteHam(Ham_SC_Weapon_GetAmmo1Drop); + */ + Ham_SC_Weapon_GetAmmo1Drop, + + /** + * Description: - + * Forward params: function(this) + * Return type: Integer. + * Execute params: ExecuteHam(Ham_SC_Weapon_GetAmmo2Drop, idOriginal); + */ + Ham_SC_Weapon_GetAmmo2Drop, + + /** + * Description: Plays the weapon's empty sound. + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_Weapon_PlayEmptySound, this); + */ + Ham_SC_Weapon_PlayEmptySound, + + /** + * Description: Whether or not the weapon is usable (has ammo, etc.) + * This function is not supported in Earth's Special Forces mod. + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_Weapon_IsUsable, this) + */ + Ham_SC_Weapon_IsUsable, + + /** + * Description: - + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_SC_Weapon_FinishReload, idOriginal); + */ + Ham_SC_Weapon_FinishReload, + + /** + * Description: - + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_Weapon_ShouldReload, idOriginal); + */ + Ham_SC_Weapon_ShouldReload, + + /** + * Description: Whether or not the weapon should idle. + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute Params: ExecuteHam(Ham_SC_Weapon_ShouldWeaponIdle, this) + */ + Ham_SC_Weapon_ShouldWeaponIdle, + + /** + * Description: Unsure. + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_Weapon_UseDecrement, this); + */ + Ham_SC_Weapon_UseDecrement, + + + /** + * Players have all the attributes of normal entities, in addition to these. + */ + + /** + * Description: - + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_SC_Player_EnteredObserver, this); + */ + Ham_SC_Player_EnteredObserver, + + /** + * Description: - + * Forward params: function(this) + * Return type: None. + * Execute params: ExecuteHam(Ham_SC_Player_LeftObserver, this); + */ + Ham_SC_Player_LeftObserver, + + /** + * Description: - + * Forward params: function(this) + * Return type: Integer (boolean). + * Execute params: ExecuteHam(Ham_SC_Player_IsObserver, this); + */ + Ham_SC_Player_IsObserver, + + + /** + * DONT USE ME LOL + */ + HAM_LAST_ENTRY_DONT_USE_ME_LOL +}; + +/** + * Ham error types. + */ +enum HamError +{ + HAM_OK = 0, + + HAM_INVALID_FUNC, // The function is not valid + HAM_FUNC_NOT_CONFIGURED, // This function is not configured in hamdata.ini + HAM_FUNC_NOT_AVAILABLE, // This function is not more available in the mod + + HAM_ERR_END +}; + +/** + * Constants for usage with [Get|Set]HamItemInfo + */ +enum HamItemInfo +{ + Ham_ItemInfo_iSlot, + Ham_ItemInfo_iPosition, + Ham_ItemInfo_pszAmmo1, + Ham_ItemInfo_iMaxAmmo1, + Ham_ItemInfo_pszAmmo2, + Ham_ItemInfo_iMaxAmmo2, + Ham_ItemInfo_pszName, + Ham_ItemInfo_iMaxClip, + Ham_ItemInfo_iId, + Ham_ItemInfo_iFlags, + Ham_ItemInfo_iWeight +}; + diff --git a/bin/compiler/include/hamsandwich.inc b/bin/compiler/include/hamsandwich.inc new file mode 100644 index 0000000..162475d --- /dev/null +++ b/bin/compiler/include/hamsandwich.inc @@ -0,0 +1,439 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Ham Sandwich Functions +// + +/** + * Ham Sandwich is a module that is used to hook and call virtual functions of + * entities. + * Virtual functions are mod-specific functions. This means that in order + * for this to work on a mod, it needs to be configured with the hamdata.ini + * file. + * Be very careful with parameter passing to these functions. + */ + +#if defined _hamsandwich_included + #endinput +#endif +#define _hamsandwich_included + +#include + +#pragma reqlib hamsandwich +#if !defined AMXMODX_NOAUTOLOAD + #pragma loadlib hamsandwich +#endif + +/** + * Hooks the virtual table for the specified entity class. + * An example would be: RegisterHam(Ham_TakeDamage, "player", "player_hurt"); + * Look at the Ham enum for parameter lists. + * + * @param function The function to hook. + * @param EntityClass The entity classname to hook. + * @param callback The forward to call. + * @param post Whether or not to forward this in post. + * @param specialbot Whether or not to enable support for bot without "player" classname. + * @return Returns a handle to the forward. Use EnableHamForward/DisableHamForward to toggle the forward on or off. + */ +native HamHook:RegisterHam(Ham:function, const EntityClass[], const Callback[], Post=0, bool:specialbot = false); + +/** + * Hooks the virtual table for the player class. + * An example would be: RegisterHam(Ham_TakeDamage, "player_hurt"); + * Look at the Ham enum for parameter lists. + * + * @param function The function to hook. + * @param callback The forward to call. + * @param post Whether or not to forward this in post. + * @return Returns a handle to the forward. Use EnableHamForward/DisableHamForward to toggle the forward on or off. + */ +stock HamHook:RegisterHamPlayer(Ham:function, const Callback[], Post=0) +{ + return RegisterHam(function, "player", Callback, Post, true); +} + +/** + * Hooks the virtual table for the specified entity's class. + * An example would be: RegisterHam(Ham_TakeDamage, id, "player_hurt"); + * Look at the Ham enum for parameter lists. + * Note: This will cause hooks for the entire internal class that the entity is + * not exclusively for the provided entity. + * + * @param function The function to hook. + * @param EntityId The entity classname to hook. + * @param callback The forward to call. + * @param post Whether or not to forward this in post. + * @return Returns a handle to the forward. Use EnableHamForward/DisableHamForward to toggle the forward on or off. + */ +native HamHook:RegisterHamFromEntity(Ham:function, EntityId, const Callback[], Post=0); + + +/** + * Stops a ham forward from triggering. + * Use the return value from RegisterHam as the parameter here! + * + * @param fwd The forward to stop. + */ +native DisableHamForward(HamHook:fwd); + +/** + * Starts a ham forward back up. + * Use the return value from RegisterHam as the parameter here! + * + * @param fwd The forward to re-enable. + */ +native EnableHamForward(HamHook:fwd); + +/** + * Executes the virtual function on the entity. + * Look at the Ham enum for parameter lists. + * + * @param function The function to call. + * @param id The id of the entity to execute it on. + */ +native ExecuteHam(Ham:function, this, any:...); + +/** + * Executes the virtual function on the entity, this will trigger all hooks on that function. + * Be very careful about recursion! + * Look at the Ham enum for parameter lists. + * + * @param function The function to call. + * @param id The id of the entity to execute it on. + */ +native ExecuteHamB(Ham:function, this, any:...); + +/** + * Gets the return status of the current hook. + * This is useful to determine what return natives to use. + * + * @return The current status of the hook (such as HAM_SUPERCEDE). + */ +native GetHamReturnStatus(); + +/** + * Gets the return value of a hook for hooks that return integers or booleans. + * + * @param output The variable to store the value in. + */ +native GetHamReturnInteger(&output); + +/** + * Gets the return value of a hook for hooks that return float. + * + * @param output The variable to store the value in. + */ +native GetHamReturnFloat(&Float:output); + +/** + * Gets the return value of a hook for hooks that return Vectors. + * + * @param output The variable to store the value in. + */ +native GetHamReturnVector(Float:output[3]); + +/** + * Gets the return value of a hook for hooks that return entities. + * + * @param output The variable to store the value in. Will be -1 on null. + */ +native GetHamReturnEntity(&output); + +/** + * Gets the return value of a hook for hooks that return strings. + * + * @param output The buffer to store the string in. + * @param size The string size of the buffer. + */ +native GetHamReturnString(output[], size); + +/** + * Gets the original return value of a hook for hooks that return integers or booleans. + * + * @param output The variable to store the value in. + */ +native GetOrigHamReturnInteger(&output); + +/** + * Gets the original return value of a hook for hooks that return floats. + * + * @param output The variable to store the value in. + */ +native GetOrigHamReturnFloat(&Float:output); + +/** + * Gets the original return value of a hook for hooks that return Vectors. + * + * @param output The variable to store the value in. + */ +native GetOrigHamReturnVector(Float:output[3]); + +/** + * Gets the original return value of a hook for hooks that return entities. + * + * @param output The variable to store the value in. -1 on null. + */ +native GetOrigHamReturnEntity(&output); + +/** + * Gets the original return value of a hook for hooks that return strings. + * + * @param output The buffer to store the string in. + * @param size The size of the buffer. + */ +native GetOrigHamReturnString(output[], size); + + +/** + * Sets the return value of a hook that returns an integer or boolean. + * This needs to be used in conjunction with HAM_OVERRIDE or HAM_SUPERCEDE. + * + * @param value The value to set the return to. + */ +native SetHamReturnInteger(value); + +/** + * Sets the return value of a hook that returns a float. + * This needs to be used in conjunction with HAM_OVERRIDE or HAM_SUPERCEDE. + * + * @param value The value to set the return to. + */ +native SetHamReturnFloat(Float:value); + +/** + * Sets the return value of a hook that returns a Vector. + * This needs to be used in conjunction with HAM_OVERRIDE or HAM_SUPERCEDE. + * + * @param value The value to set the return to. + */ +native SetHamReturnVector(const Float:value[3]); + +/** + * Sets the return value of a hook that returns an entity. Set to -1 for null. + * This needs to be used in conjunction with HAM_OVERRIDE or HAM_SUPERCEDE. + * + * @param value The value to set the return to. + */ +native SetHamReturnEntity(value); + +/** + * Sets the return value of a hook that returns a string. + * This needs to be used in conjunction with HAM_OVERRIDE or HAM_SUPERCEDE. + * + * @param value The value to set the return to. + */ +native SetHamReturnString(const value[]); + + +/** + * Sets a parameter on the fly of the current hook. This has no effect in post hooks. + * Use this on parameters that are integers. + * + * @param which Which parameter to change. Starts at 1, and works up from the left to right. 1 is always "this". + * @param value The value to change it to. + */ +native SetHamParamInteger(which, value); + +/** + * Sets a parameter on the fly of the current hook. This has no effect in post hooks. + * Use this on parameters that are floats. + * + * @param which Which parameter to change. Starts at 1, and works up from the left to right. 1 is always "this". + * @param value The value to change it to. + */ +native SetHamParamFloat(which, Float:value); + +/** + * Sets a parameter on the fly of the current hook. This has no effect in post hooks. + * Use this on parameters that are Vectors. + * + * @param which Which parameter to change. Starts at 1, and works up from the left to right. 1 is always "this". + * @param value The value to change it to. + */ +native SetHamParamVector(which, const Float:value[3]); + +/** + * Sets a parameter on the fly of the current hook. This has no effect in post hooks. + * Use this on parameters that are entities. + * + * @note Due to a historical bug, the changes made by this native are not reflected in the corresponding post forward + * for backward compatibility reasons. Use SetHamParamEntity2 if this is required. + * + * @param which Which parameter to change. Starts at 1, and works up from the left to right. 1 is always "this". + * @param value The value to change it to. + */ +native SetHamParamEntity(which, value); + +/** + * Sets a parameter on the fly of the current hook. This has no effect in post hooks. + * Use this on parameters that are entities. + * + * @note Same as SetHamParamEntity except the changes made by this native are reflected in the corresponding post forward. + * + * @param which Which parameter to change. Starts at 1, and works up from the left to right. 1 is always "this". + * @param value The value to change it to. + */ +native SetHamParamEntity2(which, value); + +/** + * Sets a parameter on the fly of the current hook. This has no effect in post hooks. + * Use this on parameters that are strings. + * + * @param which Which parameter to change. Starts at 1, and works up from the left to right. 1 is always "this". + * @param ouput The value to change it to. + */ +native SetHamParamString(which, const output[]); + +/** + * Sets a parameter on the fly of the current hook. This has no effect in post hooks. + * Use this on parameters that are trace result handles. + * + * @param which Which parameter to change. Starts at 1, and works up from the left to right. 1 is always "this". + * @param tr_handle The value to change it to. + */ +native SetHamParamTraceResult(which, tr_handle); + +/** + * Sets a parameter on the fly of the current hook. This has no effect in post hooks. + * Use this on parameters that are trace result handles. + * + * @param which Which parameter to change. Starts at 1, and works up from the left to right. 1 is always "this". + * @param iteminfo_handle The value to change it to. + */ +native SetHamParamItemInfo(which, iteminfo_handle); + + +/** + * Gets a parameter on the fly of the current hook. + * Use this on parameters that are iteminfo result handles. + * + * @param iteminfo_handle Item info handle. + * @param type Item info type. See HamItemInfo constants. + */ +native GetHamItemInfo(iteminfo_handle, HamItemInfo:type, any:...); + +/** + * Sets a parameter on the fly of the current hook. + * Use this on parameters that are iteminfo result handles. + * + * @param iteminfo_handle Item info handle. + * @param type Item info type. See HamItemInfo_ constants. + */ +native SetHamItemInfo(iteminfo_handle, HamItemInfo:type, any:...); + +/** + * Creates an ItemInfo handle. This value should never be altered. + * The handle can be used in Get/SetHamItemInfo. + * + * NOTE: You must call FreeHamItemInfo() on every handle made with CreateHamItemInfo(). + * + * @return A new ItemInfo handle. + */ +native CreateHamItemInfo(); + +/** + * Frees an ItemIndo handle created with CreateHamItemInfo(). Do not call + * this more than once per handle, or on handles not created through + * CreateHamItemInfo(). + * + * @param itemInfo_handle ItemInfo handle created via CreateHamItemInfo(). + * @noreturn + */ +native FreeHamItemInfo(itemInfo_handle); + + +/** + * Returns whether or not the function for the specified Ham is valid. + * Things that would make it invalid would be bounds (an older module version + * may not have all of the functions), and the function not being found in + * the mod's hamdata.ini file. + * + * @param function The function to look up. + * @return true if the function is valid, false otherwise. + */ +native bool:IsHamValid(Ham:function); + +/** + * This is used to compliment fakemeta's {get,set}_pdata_{int,float,string}. + * This requires the mod to have the pev and base fields set in hamdata.ini. + * Note this dereferences memory! Improper use of this will crash the server. + * This will return an index of the corresponding cbase field in private data. + * Returns -1 on a null entry. + * + * @param id The entity to examine the private data. + * @param offset The windows offset of the data. + * @param linuxdiff The linux difference of the data. + * @param macdiff The mac os x difference of the data. + * @return The index of the corresponding pdata field. -1 for none set. + */ +native get_pdata_cbase(id, offset, linuxdiff=5, macdiff=5); + +/** + * This is used to compliment fakemeta's {get,set}_pdata_{int,float,string}. + * This requires the mod to have the pev and base fields set in hamdata.ini. + * This will set the corresponding cbase field in private data with the index. + * Pass -1 to null the entry. + * + * @param id The entity to examine the private data. + * @param offset The windows offset of the data. + * @param value The index to store, -1 for invalid + * @param linuxdiff The linux difference of the data. + * @param macdiff The mac os x difference of the data. + */ +native set_pdata_cbase(id, offset, value, linuxdiff=5, macdiff=5); + +/** + * This is similar to the get_pdata_cbase, however it does not dereference memory. + * This is many times slower than get_pdata_cbase, and this should only be used + * for testing and finding of offsets, not actual release quality plugins. + * This will return an index of the corresponding cbase field in private data. + * Returns -1 on a null entry. -2 on an invalid entry. + * + * @param id Entry to examine the private data. + * @param offset The windows offset of the data. + * @param linuxdiff The linux difference of the data. + * @param macdiff The mac os x difference of the data. + * @return The index of the corresponding pdata field, -1 for null, -2 for invalid. + */ +native get_pdata_cbase_safe(id, offset, linuxdiff=5, macdiff=5); + + + + +// This is the callback from the module, this handles any fatal errors. +// This will in turn call the "HamFilter(Ham:id, HamError:err, const reason[])" public, if it exists. +// Return PLUGIN_HANDLED from within the HamFilter to stop the plugin from failing. +// Any other return value will fail the plugin. +// You do not need to have a HamFilter, if there is none, all fatal errors will fail the plugin. +// Do not modify this! +public __fatal_ham_error(Ham:id, HamError:err, const reason[]) +{ + + new func=get_func_id("HamFilter", -1); + new bool:fail=true; + + if (func != -1 && callfunc_begin_i(func, -1)==1) + { + callfunc_push_int(_:id); + callfunc_push_int(_:err); + callfunc_push_str(reason, false); + if (callfunc_end()==PLUGIN_HANDLED) + { + fail=false; + } + } + if (fail) + { + set_fail_state(reason); + } + +} diff --git a/bin/compiler/include/hlsdk_const.inc b/bin/compiler/include/hlsdk_const.inc new file mode 100644 index 0000000..f9b8cfa --- /dev/null +++ b/bin/compiler/include/hlsdk_const.inc @@ -0,0 +1,808 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Half-Life SDK Constants +// + +#if defined _hlsdk_const_included + #endinput +#endif +#define _hlsdk_const_included + +/** + * pev(entity, pev_button) or pev(entity, pev_oldbuttons) values + */ +#define IN_ATTACK (1<<0) +#define IN_JUMP (1<<1) +#define IN_DUCK (1<<2) +#define IN_FORWARD (1<<3) +#define IN_BACK (1<<4) +#define IN_USE (1<<5) +#define IN_CANCEL (1<<6) +#define IN_LEFT (1<<7) +#define IN_RIGHT (1<<8) +#define IN_MOVELEFT (1<<9) +#define IN_MOVERIGHT (1<<10) +#define IN_ATTACK2 (1<<11) +#define IN_RUN (1<<12) +#define IN_RELOAD (1<<13) +#define IN_ALT1 (1<<14) +#define IN_SCORE (1<<15) // Used by client.dll for when scoreboard is held down + +/** + * pev(entity, pev_flags) values + */ +#define FL_FLY (1<<0) // Changes the SV_Movestep() behavior to not need to be on ground +#define FL_SWIM (1<<1) // Changes the SV_Movestep() behavior to not need to be on ground (but stay in water) +#define FL_CONVEYOR (1<<2) +#define FL_CLIENT (1<<3) +#define FL_INWATER (1<<4) +#define FL_MONSTER (1<<5) +#define FL_GODMODE (1<<6) +#define FL_NOTARGET (1<<7) +#define FL_SKIPLOCALHOST (1<<8) // Don't send entity to local host, it's predicting this entity itself +#define FL_ONGROUND (1<<9) // At rest / on the ground +#define FL_PARTIALGROUND (1<<10) // Not all corners are valid +#define FL_WATERJUMP (1<<11) // Player jumping out of water +#define FL_FROZEN (1<<12) // Player is frozen for 3rd person camera +#define FL_FAKECLIENT (1<<13) // JAC: fake client, simulated server side; don't send network messages to them +#define FL_DUCKING (1<<14) // Player flag -- Player is fully crouched +#define FL_FLOAT (1<<15) // Apply floating force to this entity when in water +#define FL_GRAPHED (1<<16) // Worldgraph has this ent listed as something that blocks a connection +#define FL_IMMUNE_WATER (1<<17) +#define FL_IMMUNE_SLIME (1<<18) +#define FL_IMMUNE_LAVA (1<<19) +#define FL_PROXY (1<<20) // This is a spectator proxy +#define FL_ALWAYSTHINK (1<<21) // Brush model flag -- call think every frame regardless of nextthink - ltime (for constantly changing velocity/path) +#define FL_BASEVELOCITY (1<<22) // Base velocity has been applied this frame (used to convert base velocity into momentum) +#define FL_MONSTERCLIP (1<<23) // Only collide in with monsters who have FL_MONSTERCLIP set +#define FL_ONTRAIN (1<<24) // Player is _controlling_ a train, so movement commands should be ignored on client during prediction. +#define FL_WORLDBRUSH (1<<25) // Not moveable/removeable brush entity (really part of the world, but represented as an entity for transparency or something) +#define FL_SPECTATOR (1<<26) // This client is a spectator, don't run touch functions, etc. +#define FL_CUSTOMENTITY (1<<29) // This is a custom entity +#define FL_KILLME (1<<30) // This entity is marked for death -- This allows the engine to kill ents at the appropriate time +#define FL_DORMANT (1<<31) // Entity is dormant, no updates to client + +/** + * engfunc(EngFunc_WalkMove, entity, Float:yaw, Float:dist, iMode) iMode values + */ +#define WALKMOVE_NORMAL 0 // Normal walkmove +#define WALKMOVE_WORLDONLY 1 // Doesn't hit ANY entities, no matter what the solid type +#define WALKMOVE_CHECKONLY 2 // Move, but don't touch triggers + +/** + * engfunc(EngFunc_MoveToOrigin, entity, Float:goal[3], Float:distance, moveType) moveType values + */ +#define MOVE_NORMAL 0 // normal move in the direction monster is facing +#define MOVE_STRAFE 1 // moves in direction specified, no matter which way monster is facing + +/** + * pev(entity, pev_movetype) values + */ +#define MOVETYPE_NONE 0 // Never moves +#define MOVETYPE_WALK 3 // Player only - moving on the ground +#define MOVETYPE_STEP 4 // Gravity, special edge handling -- monsters use this +#define MOVETYPE_FLY 5 // No gravity, but still collides with stuff +#define MOVETYPE_TOSS 6 // Gravity/Collisions +#define MOVETYPE_PUSH 7 // No clip to world, push and crush +#define MOVETYPE_NOCLIP 8 // No gravity, no collisions, still do velocity/avelocity +#define MOVETYPE_FLYMISSILE 9 // Extra size to monsters +#define MOVETYPE_BOUNCE 10 // Just like Toss, but reflect velocity when contacting surfaces +#define MOVETYPE_BOUNCEMISSILE 11 // Bounce w/o gravity +#define MOVETYPE_FOLLOW 12 // Track movement of aiment +#define MOVETYPE_PUSHSTEP 13 // BSP model that needs physics/world collisions (uses nearest hull for world collision) + +/** + * pev(entity, pev_solid) values + * + * @note Some movetypes will cause collisions independent of SOLID_NOT and + * SOLID_TRIGGER when the entity moves. SOLID only effects OTHER entities + * colliding with this one when they move - UGH! + */ +#define SOLID_NOT 0 // No interaction with other objects +#define SOLID_TRIGGER 1 // Touch on edge, but not blocking +#define SOLID_BBOX 2 // Touch on edge, block +#define SOLID_SLIDEBOX 3 // Touch on edge, but not an onground +#define SOLID_BSP 4 // BSP clip, touch on edge, block + +/** + * pev(entity, pev_deadflag) values + */ +#define DEAD_NO 0 // Alive +#define DEAD_DYING 1 // Playing death animation or still falling off of a ledge waiting to hit ground +#define DEAD_DEAD 2 // Dead, lying still +#define DEAD_RESPAWNABLE 3 +#define DEAD_DISCARDBODY 4 + +/** + * new Float:takedamage, pev(entity, pev_takedamage, takedamage) values + */ +#define DAMAGE_NO 0.0 +#define DAMAGE_YES 1.0 +#define DAMAGE_AIM 2.0 + +/** + * pev(entity, pev_effects) values + */ +#define EF_BRIGHTFIELD 1 // Swirling cloud of particles +#define EF_MUZZLEFLASH 2 // Single frame ELIGHT on entity attachment 0 +#define EF_BRIGHTLIGHT 4 // DLIGHT centered at entity origin +#define EF_DIMLIGHT 8 // Player flashlight +#define EF_INVLIGHT 16 // Get lighting from ceiling +#define EF_NOINTERP 32 // Don't interpolate the next frame +#define EF_LIGHT 64 // Rocket flare glow sprite +#define EF_NODRAW 128 // Don't draw entity + +/** + * Spectating camera mode constants + * + * @note These constants are linked to different camera modes available when you + * are spectating (either dead or when in spectator team). Usually this is + * stored in the pev_iuser1 field in Counter-Strike and Half-Life games. + */ +#define OBS_NONE 0 +#define OBS_CHASE_LOCKED 1 // Locked Chase Cam +#define OBS_CHASE_FREE 2 // Free Chase Cam +#define OBS_ROAMING 3 // Free Look +#define OBS_IN_EYE 4 // First Person +#define OBS_MAP_FREE 5 // Free Overview +#define OBS_MAP_CHASE 6 // Chase Overview + +/** + * engfunc(EngFunc_PointContents, Float:origin) return values + */ +#define CONTENTS_EMPTY -1 +#define CONTENTS_SOLID -2 +#define CONTENTS_WATER -3 +#define CONTENTS_SLIME -4 +#define CONTENTS_LAVA -5 +#define CONTENTS_SKY -6 +#define CONTENTS_ORIGIN -7 // Removed at csg time +#define CONTENTS_CLIP -8 // Changed to contents_solid +#define CONTENTS_CURRENT_0 -9 +#define CONTENTS_CURRENT_90 -10 +#define CONTENTS_CURRENT_180 -11 +#define CONTENTS_CURRENT_270 -12 +#define CONTENTS_CURRENT_UP -13 +#define CONTENTS_CURRENT_DOWN -14 +#define CONTENTS_TRANSLUCENT -15 +#define CONTENTS_LADDER -16 +#define CONTENT_FLYFIELD -17 +#define CONTENT_GRAVITY_FLYFIELD -18 +#define CONTENT_FOG -19 + +/** + * Instant damage values for use with the 3rd parameter of the "Damage" client + * message. + */ +#define DMG_GENERIC 0 // Generic damage was done +#define DMG_CRUSH (1<<0) // Crushed by falling or moving object +#define DMG_BULLET (1<<1) // Shot +#define DMG_SLASH (1<<2) // Cut, clawed, stabbed +#define DMG_BURN (1<<3) // Heat burned +#define DMG_FREEZE (1<<4) // Frozen +#define DMG_FALL (1<<5) // Fell too far +#define DMG_BLAST (1<<6) // Explosive blast damage +#define DMG_CLUB (1<<7) // Crowbar, punch, headbutt +#define DMG_SHOCK (1<<8) // Electric shock +#define DMG_SONIC (1<<9) // Sound pulse shockwave +#define DMG_ENERGYBEAM (1<<10) // Laser or other high energy beam +#define DMG_NEVERGIB (1<<12) // With this bit OR'd in, no damage type will be able to gib victims upon death +#define DMG_ALWAYSGIB (1<<13) // With this bit OR'd in, any damage type can be made to gib victims upon death. +#define DMG_DROWN (1<<14) // Drowning +#define DMG_PARALYZE (1<<15) // Slows affected creature down +#define DMG_NERVEGAS (1<<16) // Nerve toxins, very bad +#define DMG_POISON (1<<17) // Blood poisioning +#define DMG_RADIATION (1<<18) // Radiation exposure +#define DMG_DROWNRECOVER (1<<19) // Drowning recovery +#define DMG_ACID (1<<20) // Toxic chemicals or acid burns +#define DMG_SLOWBURN (1<<21) // In an oven +#define DMG_SLOWFREEZE (1<<22) // In a subzero freezer +#define DMG_MORTAR (1<<23) // Hit by air raid (done to distinguish grenade from mortar) +#define DMG_GRENADE (1<<24) // Counter-Strike only - Hit by HE grenade +#define DMG_TIMEBASED (~(0x3fff)) // Mask for time-based damage + +/** +* Gib values used on client kill based on instant damage values +*/ +#define GIB_NORMAL 0 // Gib if entity was overkilled +#define GIB_NEVER 1 // Never gib, no matter how much death damage is done ( freezing, etc ) +#define GIB_ALWAYS 2 // Always gib ( Houndeye Shock, Barnacle Bite ) +#define GIB_TRY_HEALTH -9000 // Gib players if their health is under this value. (GIB_NEVER overrides this value) + +/** + * Valid constants for fNoMonsters parameter of EngFunc_TraceLine, + * EngFunc_TraceMonsterHull, EngFunc_TraceHull and EngFunc_TraceSphere. + */ +#define DONT_IGNORE_MONSTERS 0 +#define IGNORE_MONSTERS 1 +#define IGNORE_MISSILE 2 +#define IGNORE_GLASS 0x100 + +/** + * The hullnumber paramater of EngFunc_TraceHull, EngFunc_TraceModel and + * DLLFunc_GetHullBounds + */ +#define HULL_POINT 0 +#define HULL_HUMAN 1 +#define HULL_LARGE 2 +#define HULL_HEAD 3 + +/** + * global_get(glb_trace_flags) + */ +#define FTRACE_SIMPLEBOX (1<<0) // Traceline with a simple box + +/** + * Used with get/set_es(es_handle, ES_eFlags, ...) (entity_state data structure) + */ +#define EFLAG_SLERP 1 // Do studio interpolation of this entity + +/** + * @section pev(entity, pev_spawnflags) values + */ + +/** + * func_train + */ +#define SF_TRAIN_WAIT_RETRIGGER 1 +#define SF_TRAIN_START_ON 4 // Train is initially moving +#define SF_TRAIN_PASSABLE 8 // Train is not solid -- used to make water trains + +/** + * func_wall_toggle + */ +#define SF_WALL_START_OFF 0x0001 +#define SF_WALL_NOTSOLID 0x0008 + +/** + * func_converyor + */ +#define SF_CONVEYOR_VISUAL 0x0001 +#define SF_CONVEYOR_NOTSOLID 0x0002 + +/** + * func_button + */ +#define SF_BUTTON_DONTMOVE 1 +#define SF_BUTTON_TOGGLE 32 // Button stays pushed until reactivated +#define SF_BUTTON_SPARK_IF_OFF 64 // Button sparks in OFF state +#define SF_BUTTON_TOUCH_ONLY 256 // Button only fires as a result of USE key. + +/** + * func_rot_button + */ +#define SF_ROTBUTTON_NOTSOLID 1 +#define SF_ROTBUTTON_BACKWARDS 2 + +/** + * env_global + */ +#define SF_GLOBAL_SET 1 // Set global state to initial state on spawn + +/** + * multisource + */ +#define SF_MULTI_INIT 1 + +/** + * momentary_rot_button + */ +#define SF_MOMENTARY_DOOR 0x0001 + +/** + * button_target + */ +#define SF_BTARGET_USE 0x0001 +#define SF_BTARGET_ON 0x0002 + +/** + * func_door, func_water, func_door_rotating, momementary_door + */ +#define SF_DOOR_ROTATE_Y 0 +#define SF_DOOR_START_OPEN 1 +#define SF_DOOR_ROTATE_BACKWARDS 2 +#define SF_DOOR_PASSABLE 8 +#define SF_DOOR_ONEWAY 16 +#define SF_DOOR_NO_AUTO_RETURN 32 +#define SF_DOOR_ROTATE_Z 64 +#define SF_DOOR_ROTATE_X 128 +#define SF_DOOR_USE_ONLY 256 // Door must be opened by player's use button +#define SF_DOOR_NOMONSTERS 512 // Monster can't open +#define SF_DOOR_TOUCH_ONLY_CLIENTS 1024 // Only clients can touch +#define SF_DOOR_SILENT 0x80000000 // This bit marks that func_door are actually func_water + +/** + * gibshooter + */ +#define SF_GIBSHOOTER_REPEATABLE 1 // Allows a gibshooter to be refired + +/** + * env_funnel + */ +#define SF_FUNNEL_REVERSE 1 // Funnel effect repels particles instead of attracting them + +/** + * env_bubbles + */ +#define SF_BUBBLES_STARTOFF 0x0001 + +/** + * env_blood + */ +#define SF_BLOOD_RANDOM 0x0001 +#define SF_BLOOD_STREAM 0x0002 +#define SF_BLOOD_PLAYER 0x0004 +#define SF_BLOOD_DECAL 0x0008 + +/** + * env_shake + */ +#define SF_SHAKE_EVERYONE 0x0001 // Don't check radius +#define SF_SHAKE_DISRUPT 0x0002 // Disrupt controls +#define SF_SHAKE_INAIR 0x0004 // Shake players in air + +/** + * env_fade + */ +#define SF_FADE_IN 0x0001 // Fade in, not out +#define SF_FADE_MODULATE 0x0002 // Modulate, don't blend +#define SF_FADE_ONLYONE 0x0004 + +/** + * env_beam, env_lightning + */ +#define SF_BEAM_STARTON 0x0001 +#define SF_BEAM_TOGGLE 0x0002 +#define SF_BEAM_RANDOM 0x0004 +#define SF_BEAM_RING 0x0008 +#define SF_BEAM_SPARKSTART 0x0010 +#define SF_BEAM_SPARKEND 0x0020 +#define SF_BEAM_DECALS 0x0040 +#define SF_BEAM_SHADEIN 0x0080 +#define SF_BEAM_SHADEOUT 0x0100 +#define SF_BEAM_TEMPORARY 0x8000 + +/** + * env_sprite + */ +#define SF_SPRITE_STARTON 0x0001 +#define SF_SPRITE_ONCE 0x0002 +#define SF_SPRITE_TEMPORARY 0x8000 + +/** + * env_message + */ +#define SF_MESSAGE_ONCE 0x0001 // Fade in, not out +#define SF_MESSAGE_ALL 0x0002 // Send to all clients + +/** + * env_explosion + */ +#define SF_ENVEXPLOSION_NODAMAGE (1<<0) // When set, ENV_EXPLOSION will not actually inflict damage +#define SF_ENVEXPLOSION_REPEATABLE (1<<1) // Can this entity be refired? +#define SF_ENVEXPLOSION_NOFIREBALL (1<<2) // Don't draw the fireball +#define SF_ENVEXPLOSION_NOSMOKE (1<<3) // Don't draw the smoke +#define SF_ENVEXPLOSION_NODECAL (1<<4) // Don't make a scorch mark +#define SF_ENVEXPLOSION_NOSPARKS (1<<5) // Don't make a scorch mark + +/** + * func_tank + */ +#define SF_TANK_ACTIVE 0x0001 +#define SF_TANK_PLAYER 0x0002 +#define SF_TANK_HUMANS 0x0004 +#define SF_TANK_ALIENS 0x0008 +#define SF_TANK_LINEOFSIGHT 0x0010 +#define SF_TANK_CANCONTROL 0x0020 +#define SF_TANK_SOUNDON 0x8000 + +/** + * grenade + */ +#define SF_DETONATE 0x0001 + +/** + * item_suit + */ +#define SF_SUIT_SHORTLOGON 0x0001 + +/** + * game_score + */ +#define SF_SCORE_NEGATIVE 0x0001 +#define SF_SCORE_TEAM 0x0002 + +/** + * game_text + */ +#define SF_ENVTEXT_ALLPLAYERS 0x0001 + +/** + * game_team_master + */ +#define SF_TEAMMASTER_FIREONCE 0x0001 +#define SF_TEAMMASTER_ANYTEAM 0x0002 + +/** + * game_team_set + */ +#define SF_TEAMSET_FIREONCE 0x0001 +#define SF_TEAMSET_CLEARTEAM 0x0002 + +/** + * game_player_hurt + */ +#define SF_PKILL_FIREONCE 0x0001 + +/** + * game_counter + */ +#define SF_GAMECOUNT_FIREONCE 0x0001 +#define SF_GAMECOUNT_RESET 0x0002 + +/** + * game_player_equip + */ +#define SF_PLAYEREQUIP_USEONLY 0x0001 + +/** + * game_player_team + */ +#define SF_PTEAM_FIREONCE 0x0001 +#define SF_PTEAM_KILL 0x0002 +#define SF_PTEAM_GIB 0x0004 + +/** + * func_trackchange + */ +#define SF_PLAT_TOGGLE 0x0001 +#define SF_TRACK_ACTIVATETRAIN 0x00000001 +#define SF_TRACK_RELINK 0x00000002 +#define SF_TRACK_ROTMOVE 0x00000004 +#define SF_TRACK_STARTBOTTOM 0x00000008 +#define SF_TRACK_DONT_MOVE 0x00000010 + +/** + * func_tracktrain + */ +#define SF_TRACKTRAIN_NOPITCH 0x0001 +#define SF_TRACKTRAIN_NOCONTROL 0x0002 +#define SF_TRACKTRAIN_FORWARDONLY 0x0004 +#define SF_TRACKTRAIN_PASSABLE 0x0008 +#define SF_PATH_DISABLED 0x00000001 +#define SF_PATH_FIREONCE 0x00000002 +#define SF_PATH_ALTREVERSE 0x00000004 +#define SF_PATH_DISABLE_TRAIN 0x00000008 +#define SF_PATH_ALTERNATE 0x00008000 +#define SF_CORNER_WAITFORTRIG 0x001 +#define SF_CORNER_TELEPORT 0x002 +#define SF_CORNER_FIREONCE 0x004 + +/** +* func_plat +*/ +#define SF_PLAT_TOGGLE 0x0001 + +/** +* path_track +*/ +#define SF_PATH_DISABLED 0x00000001 +#define SF_PATH_FIREONCE 0x00000002 +#define SF_PATH_ALTREVERSE 0x00000004 +#define SF_PATH_DISABLE_TRAIN 0x00000008 +#define SF_PATH_ALTERNATE 0x00008000 + +/** +* path_corner +*/ +#define SF_CORNER_WAITFORTRIG 0x001 +#define SF_CORNER_TELEPORT 0x002 +#define SF_CORNER_FIREONCE 0x004 + +/** + * trigger_push + */ +#define SF_TRIGGER_PUSH_START_OFF 2 // Spawnflag that makes trigger_push spawn turned OFF + +/** + * trigger_hurt + */ +#define SF_TRIGGER_HURT_TARGETONCE 1 // Only fire hurt target once +#define SF_TRIGGER_HURT_START_OFF 2 // Spawnflag that makes trigger_push spawn turned OFF +#define SF_TRIGGER_HURT_NO_CLIENTS 8 // Spawnflag that makes trigger_push spawn turned OFF +#define SF_TRIGGER_HURT_CLIENTONLYFIRE 16 // Trigger hurt will only fire its target if it is hurting a client +#define SF_TRIGGER_HURT_CLIENTONLYTOUCH 32 // Only clients may touch this trigger + +/** + * trigger_auto + */ +#define SF_AUTO_FIREONCE 0x0001 +#define SF_AUTO_NORESET 0x0002 + +/** + * trigger_relay + */ +#define SF_RELAY_FIREONCE 0x0001 + +/** + * multi_manager + */ +#define SF_MULTIMAN_CLONE 0x80000000 +#define SF_MULTIMAN_THREAD 0x00000001 + +/** + * env_render + * @note These are flags to indicate masking off various render parameters that + * are usually copied to the targets + */ +#define SF_RENDER_MASKFX (1<<0) +#define SF_RENDER_MASKAMT (1<<1) +#define SF_RENDER_MASKMODE (1<<2) +#define SF_RENDER_MASKCOLOR (1<<3) + +/** + * trigger_changelevel + */ +#define SF_CHANGELEVEL_USEONLY 0x0002 + +/** + * trigger_endsection + */ +#define SF_ENDSECTION_USEONLY 0x0001 + +/** + * trigger_camera + */ +#define SF_CAMERA_PLAYER_POSITION 1 +#define SF_CAMERA_PLAYER_TARGET 2 +#define SF_CAMERA_PLAYER_TAKECONTROL 4 + +/** + * func_rotating + */ +#define SF_BRUSH_ROTATE_Y_AXIS 0 +#define SF_BRUSH_ROTATE_INSTANT 1 +#define SF_BRUSH_ROTATE_BACKWARDS 2 +#define SF_BRUSH_ROTATE_Z_AXIS 4 +#define SF_BRUSH_ROTATE_X_AXIS 8 +#define SF_PENDULUM_AUTO_RETURN 16 +#define SF_PENDULUM_PASSABLE 32 +#define SF_BRUSH_ROTATE_SMALLRADIUS 128 +#define SF_BRUSH_ROTATE_MEDIUMRADIUS 256 +#define SF_BRUSH_ROTATE_LARGERADIUS 512 + +/** + * triggers + */ +#define SF_TRIGGER_ALLOWMONSTERS 1 // Monsters allowed to fire this trigger +#define SF_TRIGGER_NOCLIENTS 2 // Players not allowed to fire this trigger +#define SF_TRIGGER_PUSHABLES 4 // Only pushables can fire this trigger + +#define SF_TRIG_PUSH_ONCE 1 + +/** +* trigger_multiple +*/ +#define SF_TRIGGER_MULTIPLE_NOTOUCH 0x0001 + +/** +* trigger_counter +*/ +#define SF_TRIGGER_COUNTER_NOMESSAGE 0x0001 + +/** + * func_breakable + */ +#define SF_BREAK_TRIGGER_ONLY 1 // May only be broken by trigger +#define SF_BREAK_TOUCH 2 // Can be 'crashed through' by running player (plate glass) +#define SF_BREAK_PRESSURE 4 // Can be broken by a player standing on it +#define SF_BREAK_CROWBAR 256 // Instant break if hit with crowbar + +/** + * func_pushable (also func_breakable, so don't collide with those flags) + */ +#define SF_PUSH_BREAKABLE 128 + +/** + * light_spawn + */ +#define SF_LIGHT_START_OFF 1 +#define SPAWNFLAG_NOMESSAGE 1 +#define SPAWNFLAG_NOTOUCH 1 +#define SPAWNFLAG_DROIDONLY 4 +#define SPAWNFLAG_USEONLY 1 // Can't be touched, must be used (buttons) + +/** + * Monster Spawnflags + */ +#define SF_MONSTER_WAIT_TILL_SEEN 1 // Spawnflag that makes monsters wait until player can see them before attacking +#define SF_MONSTER_GAG 2 // No idle noises from this monster +#define SF_MONSTER_HITMONSTERCLIP 4 +#define SF_MONSTER_PRISONER 16 // Monster won't attack anyone, no one will attacke him +#define SF_MONSTER_WAIT_FOR_SCRIPT 128 // Spawnflag that makes monsters wait to check for attacking until the script is done or they've been attacked +#define SF_MONSTER_PREDISASTER 256 // This is a predisaster scientist or barney; influences how they speak +#define SF_MONSTER_FADECORPSE 512 // Fade out corpse after death +#define SF_MONSTER_FALL_TO_GROUND 0x80000000 +#define SF_MONSTER_TURRET_AUTOACTIVATE 32 +#define SF_MONSTER_TURRET_STARTINACTIVE 64 +#define SF_MONSTER_WAIT_UNTIL_PROVOKED 64 // Don't attack the player unless provoked + +/** + * info_decal + */ +#define SF_DECAL_NOTINDEATHMATCH 2048 + +/** + * worldspawn + */ +#define SF_WORLD_DARK 0x0001 // Fade from black at startup +#define SF_WORLD_TITLE 0x0002 // Display game title at startup +#define SF_WORLD_FORCETEAM 0x0004 // Force teams + +/** + * Set this bit on guns and stuff that should never respawn + */ +#define SF_NORESPAWN (1<<30) + +/** + * @endsection + */ + +/** + * Train status values + */ +#define TRAIN_ACTIVE 0x80 +#define TRAIN_NEW 0xc0 + +#define TRAIN_OFF 0x00 +#define TRAIN_NEUTRAL 0x01 +#define TRAIN_SLOW 0x02 +#define TRAIN_MEDIUM 0x03 +#define TRAIN_FAST 0x04 +#define TRAIN_BACK 0x05 + +/** + * Valve Mod Weapon Constants + */ +#define HLI_HEALTHKIT 1 +#define HLI_ANTIDOTE 2 +#define HLI_SECURITY 3 +#define HLI_BATTERY 4 + +#define HLW_NONE 0 +#define HLW_CROWBAR 1 +#define HLW_GLOCK 2 +#define HLW_PYTHON 3 +#define HLW_MP5 4 +#define HLW_CHAINGUN 5 +#define HLW_CROSSBOW 6 +#define HLW_SHOTGUN 7 +#define HLW_RPG 8 +#define HLW_GAUSS 9 +#define HLW_EGON 10 +#define HLW_HORNETGUN 11 +#define HLW_HANDGRENADE 12 +#define HLW_TRIPMINE 13 +#define HLW_SATCHEL 14 +#define HLW_SNARK 15 +#define HLW_SUIT 31 +#define HLW_ALLWEAPONS (~(1< 256) applied to world brush + * + * @note + * write_byte(TE_WORLDDECALHIGH) + * write_coord(position.x) decal position (center of texture in world) + * write_coord(position.y) + * write_coord(position.z) + * write_byte(texture index of precached decal texture name - 256) + */ +#define TE_WORLDDECALHIGH 117 + +/** + * Same as TE_DECAL, but the texture index was greater than 256 + * + * @note + * write_byte(TE_DECALHIGH) + * write_coord(position.x) decal position (center of texture in world) + * write_coord(position.y) + * write_coord(position.z) + * write_byte(texture index of precached decal texture name - 256) + * write_short(entity index) + */ +#define TE_DECALHIGH 118 + +/** + * Makes a projectile (like a nail) (this is a high-priority tent) + * + * @note + * write_byte(TE_PROJECTILE) + * write_coord(position.x) + * write_coord(position.y) + * write_coord(position.z) + * write_coord(velocity.x) + * write_coord(velocity.y) + * write_coord(velocity.z) + * write_short(modelindex) + * write_byte(life) + * write_byte(owner) projectile won't collide with owner (if owner == 0, projectile will hit any client). + */ +#define TE_PROJECTILE 119 + +/** + * Throws a shower of sprites or models + * + * @note + * write_byte(TE_SPRAY) + * write_coord(position.x) + * write_coord(position.y) + * write_coord(position.z) + * write_coord(direction.x) + * write_coord(direction.y) + * write_coord(direction.z) + * write_short(modelindex) + * write_byte(count) + * write_byte(speed) + * write_byte(noise) + * write_byte(rendermode) + */ +#define TE_SPRAY 120 + +/** + * Sprites emit from a player's bounding box (ONLY use for players!) + * + * @note + * write_byte(TE_PLAYERSPRITES) + * write_short(playernum) + * write_short(sprite modelindex) + * write_byte(count) + * write_byte(variance) (0 = no variance in size) (10 = 10% variance in size) + */ +#define TE_PLAYERSPRITES 121 + +/** + * Very similar to lavasplash + * + * @note + * write_byte(TE_PARTICLEBURST) + * write_coord(origin) + * write_short(radius) + * write_byte(particle color) + * write_byte(duration * 10) (will be randomized a bit) + */ +#define TE_PARTICLEBURST 122 + +/** + * Makes a field of fire + * + * @note + * write_byte(TE_FIREFIELD) + * write_coord(origin) + * write_short(radius) (fire is made in a square around origin. -radius, -radius to radius, radius) + * write_short(modelindex) + * write_byte(count) + * write_byte(flags) + * write_byte(duration (in seconds) * 10) (will be randomized a bit) + */ +#define TE_FIREFIELD 123 + +/** + * Flags for the TE_FIREFIELD effect, controlling its performance and aesthetic + * features + */ +#define TEFIRE_FLAG_ALLFLOAT 1 // All sprites will drift upwards as they animate +#define TEFIRE_FLAG_SOMEFLOAT 2 // Some of the sprites will drift upwards. (50% chance) +#define TEFIRE_FLAG_LOOP 4 // If set, sprite plays at 15 fps, otherwise plays at whatever rate stretches the animation over the sprite's duration. +#define TEFIRE_FLAG_ALPHA 8 // If set, sprite is rendered alpha blended at 50% else, opaque +#define TEFIRE_FLAG_PLANAR 16 // If set, all fire sprites have same initial Z instead of randomly filling a cube. + +/** + * Attaches a TENT to a player (this is a high-priority tent) + * + * @note + * write_byte(TE_PLAYERATTACHMENT) + * write_byte(entity index of player) + * write_coord(vertical offset) (attachment origin.z = player origin.z + vertical offset) + * write_short(model index) + * write_short(life * 10 ) + */ +#define TE_PLAYERATTACHMENT 124 + +/** + * Will expire all TENTS attached to a player. + * + * @note + * write_byte(TE_KILLPLAYERATTACHMENTS) + * write_byte(entity index of player) + */ +#define TE_KILLPLAYERATTACHMENTS 125 + +/** + * Much more compact shotgun message + * + * @note This message is used to make a client approximate a 'spray' of gunfire. + * Any weapon that fires more than one bullet per frame and fires in a bit + * of a spread is a good candidate for MULTIGUNSHOT use. (shotguns) + * @note This effect makes the client do traces for each bullet, these client + * traces ignore entities that have studio models.Traces are 4096 long. + * @note + * write_byte(TE_MULTIGUNSHOT) + * write_coord(origin.x) + * write_coord(origin.y) + * write_coord(origin.z) + * write_coord(direction.x) + * write_coord(direction.y) + * write_coord(direction.z) + * write_coord(x noise * 100) + * write_coord(y noise * 100) + * write_byte(count) + * write_byte(bullethole decal texture index) + */ +#define TE_MULTIGUNSHOT 126 + + +/** + * Larger message than the standard tracer, but allows some customization. + * + * @note + * write_byte(TE_USERTRACER) + * write_coord(origin.x) + * write_coord(origin.y) + * write_coord(origin.z) + * write_coord(velocity.x) + * write_coord(velocity.y) + * write_coord(velocity.z) + * write_byte(life * 10) + * write_byte(color) this is an index into an array of color vectors in the engine. (0 - ) + * write_byte(length * 10) + */ +#define TE_USERTRACER 127 + +/** + * @endsection + */ + +/** + * From hltv.h from the HLSDK, these are used in conjunction with SVC_DIRECTOR + * sub commands of svc_director + */ +#define DRC_CMD_NONE 0 // NULL director command +#define DRC_CMD_START 1 // start director mode +#define DRC_CMD_EVENT 2 // informs about director command +#define DRC_CMD_MODE 3 // switches camera modes +#define DRC_CMD_CAMERA 4 // sets camera registers +#define DRC_CMD_TIMESCALE 5 // sets time scale +#define DRC_CMD_MESSAGE 6 // send HUD centerprint +#define DRC_CMD_SOUND 7 // plays a particular sound +#define DRC_CMD_STATUS 8 // status info about broadcast +#define DRC_CMD_BANNER 9 // banner file name for HLTV gui +#define DRC_CMD_FADE 10 // send screen fade command +#define DRC_CMD_SHAKE 11 // send screen shake command +#define DRC_CMD_STUFFTEXT 12 // like the normal svc_stufftext but as director command + +#define DRC_CMD_LAST 12 + +/** + * HLTV_EVENT event flags + */ +#define DRC_FLAG_PRIO_MASK 0x0F // priorities between 0 and 15 (15 most important) +#define DRC_FLAG_SIDE (1<<4) // +#define DRC_FLAG_DRAMATIC (1<<5) // is a dramatic scene +#define DRC_FLAG_SLOWMOTION (1<<6) // would look good in SloMo +#define DRC_FLAG_FACEPLAYER (1<<7) // player is doning something (reload/defuse bomb etc) +#define DRC_FLAG_INTRO (1<<8) // is a introduction scene +#define DRC_FLAG_FINAL (1<<9) // is a final scene +#define DRC_FLAG_NO_RANDOM (1<<10) // don't randomize event data + +#define MAX_DIRECTOR_CMD_PARAMETERS 4 +#define MAX_DIRECTOR_CMD_STRING 128 diff --git a/bin/compiler/include/message_stocks.inc b/bin/compiler/include/message_stocks.inc new file mode 100644 index 0000000..a916194 --- /dev/null +++ b/bin/compiler/include/message_stocks.inc @@ -0,0 +1,161 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Message Stocks +// + +#if defined _message_stocks_included + #endinput +#endif +#define _message_stocks_included + +/** + * Sends a death message. + * + * @param killer Killer id + * @param victim Victim id + * @param weaponNUM Weapon index + * + * @noreturn + */ +stock dod_make_deathmsg(killer, victim, weaponNUM) +{ + static msgid = 0; + if (!msgid) + { + msgid = get_user_msgid("DeathMsg"); + } + message_begin(MSG_ALL, msgid, {0,0,0}, 0); + write_byte(killer); + write_byte(victim); + write_byte(weaponNUM); + message_end(); + + return 1; +} + +/** + * Kills a user without a message. + * + * @param index Client index + * @param flag If nonzero, the death will not affect the client's score + * + * @noreturn + */ +stock user_silentkill(index, flag = 1) +{ + static msgid = 0; + new msgblock; + if (!msgid) + { + msgid = get_user_msgid("DeathMsg"); + } + msgblock = get_msg_block(msgid); + set_msg_block(msgid, BLOCK_ONCE); + user_kill(index, flag); + set_msg_block(msgid, msgblock); + + return 1; +} + +/** + * Creates a death message. + * + * @param killer Killer id + * @param victim Victim id + * @param headshot Headshot + * @param weapon Weapon + * + * @noreturn + */ +stock make_deathmsg(killer, victim, headshot, const weapon[]) +{ + static msgid = 0; + if (!msgid) + { + msgid = get_user_msgid("DeathMsg"); + } + message_begin(MSG_ALL, msgid, {0,0,0}, 0); + write_byte(killer); + write_byte(victim); + + new mod_name[32]; + get_modname(mod_name, 31); + if (equal(mod_name, "cstrike") || equal(mod_name, "czero") || equal(mod_name, "csv15") || equal(mod_name, "cs13")) + write_byte(headshot); + write_string(weapon); + message_end(); + + return 1; +} + +/** + * Sends a predefined text message to player. + * Predefined texts are default game messages which will be translated + * to player's game language, e.g. #Game_join_ct. + * + * @note Set index to 0 to send text globally. + * + * @note There does not necessarily have to be a total of 6 arguments. + * It will depend if message takes arguments, e.g.: + * client_printex(id, print_chat, "#Game_join_ct", "Pimp Daddy") + * client_printex(id, print_chat, "1", "#Game_radio", "Pimp Daddy", "Hello world!") + * + * @param index Index of the player, use 0 to send to all players. + * @param type The message destination. See print_* constants. + * @param msg_name The custom or predefined message to send. + * @param msg_param1 Optional message argument. + * @param msg_param2 Optional message argument. + * @param msg_param3 Optional message argument. + * @param msg_param4 Optional message argument. + * + * @noreturn + */ +stock client_printex(index, type, const msg_name[], const msg_param1[] = "", const msg_param2[] = "", const msg_param3[] = "", const msg_param4[] = "") +{ + new ch = msg_name[0]; + + // If not a predefined message, we don't care about it and forward directly to client_print. + // Special case for radio message. msg_name is an index, msg_param1 #Game_radio*, etc. Checking index should be enough. + if (ch != '#' && (type != print_radio || !strtol(msg_name))) + { + return client_print(index, type, msg_name, msg_param1, msg_param2, msg_param3, msg_param4); + } + + // Even if message starts with '#', we should check its length for safety. + new length = strlen(msg_name); + + // If string is larger than expected, we forward to client_print which will cut message properly. + // This means also this can't be a predefined game message. + // Max console length: 128 = \n (126) + \0 (127) + // Max SayText length: 192 = \n (190) + \0 (191) + if ((length > 126 && (print_notify <= type <= print_console)) + || ( length > 190 && (print_chat <= type <= print_radio))) + { + return client_print(index, type, msg_name, msg_param1, msg_param2, msg_param3, msg_param4); + } + + static msgTextMsg; + if (!msgTextMsg) + { + msgTextMsg = get_user_msgid("TextMsg"); + } + + message_begin(index > 0 ? MSG_ONE_UNRELIABLE : MSG_BROADCAST, msgTextMsg, {0,0,0}, index); + write_byte(type); + write_string(msg_name); + if (msg_param1[0]) { write_string(msg_param1); } + if (msg_param2[0]) { write_string(msg_param2); } + if (msg_param3[0]) { write_string(msg_param3); } + if (msg_param4[0]) { write_string(msg_param4); } + message_end(); + + return 1; +} diff --git a/bin/compiler/include/messages.inc b/bin/compiler/include/messages.inc new file mode 100644 index 0000000..c0ef156 --- /dev/null +++ b/bin/compiler/include/messages.inc @@ -0,0 +1,604 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Message Functions +// + +#if defined _coremsg_included + #endinput +#endif +#define _coremsg_included + +#include + +/** + * Marks the beginning of a client message. + * + * @note You may generate menus, smoke, shockwaves, thunderlights, + * intermission and many other messages. + * @note For a list of HL game events, visit https://wiki.alliedmods.net/Half-Life_1_Game_Events + * @note For a list of HL engine messages, visit https://wiki.alliedmods.net/Half-Life_1_Engine_Messages + * @note You may also refer to the messages_const.inc file for examples. + * @note Each message starts with a message_begin() or message_begin_f() function + * and ends with message_end(). The specific message arguments go in between + * these two by using the write_*() functions found in messages.inc. + * + * @param dest Destination type (see MSG_* constants in messages_const.inc) + * @param msg_type Message id + * @param origin Message origin + * @param player Client index receiving the message or 0 for all clients + * + * @noreturn + * @error If an invalid message id is specified or an invalid number + * of parameters is passed, an error will be thrown. + */ +native message_begin(dest, msg_type, const origin[3] = {0,0,0}, player = 0); + +/** + * Marks the beginning of a client message. + * + * @note You may generate menus, smoke, shockwaves, thunderlights, + * intermission and many other messages. + * @note For a list of HL game events, visit https://wiki.alliedmods.net/Half-Life_1_Game_Events + * @note For a list of HL engine messages, visit https://wiki.alliedmods.net/Half-Life_1_Engine_Messages + * @note You may also refer to the messages_const.inc file for examples. + * @note This function is the same as message_begin(), but the origin + * argument accepts only float values in this one. + * @note Each message starts with a message_begin() or message_begin_f() function + * and ends with message_end(). The specific message arguments go in between + * these two by using the write_*() functions found in messages.inc. + * + * @param dest Destination type (see MSG_* constants in messages_const.inc) + * @param msg_type Message id + * @param origin Message origin + * @param player Client index receiving the message or 0 for all clients + * + * @noreturn + * @error If an invalid message id is specified or an invalid number + * of parameters is passed, an error will be thrown. + */ +native message_begin_f(dest, msg_type, const Float:origin[3] = {0.0,0.0,0.0}, player = 0); + +/** + * Ends a message that was started with message_begin() or message_begin_f(). + * + * @note If the function is called without using message_begin() or + * message_begin_f() first, the server will crash immediately. + * + * @noreturn + */ +native message_end(); + +/** + * Writes a single byte to a message. + * + * @note This function should only be used in between a message_begin() + * or message_begin_f() and a message_end() function. Trying to use + * it outside of these functions will crash the server immediately. + * + * @param x Byte to write + * + * @noreturn + */ +native write_byte(x); + +/** + * Writes a single character to a message. + * + * @note This function should only be used in between a message_begin() + * or message_begin_f() and a message_end() function. Trying to use + * it outside of these functions will crash the server immediately. + * + * @param x Character to write + * + * @noreturn + */ +native write_char(x); + +/** + * Writes a single number to a message (short). + * + * @note This function should only be used in between a message_begin() + * or message_begin_f() and a message_end() function. Trying to use + * it outside of these functions will crash the server immediately. + * + * @param x Number to write + * + * @noreturn + */ +native write_short(x); + +/** + * Writes a single number to a message (long). + * + * @note This function should only be used in between a message_begin() + * or message_begin_f() and a message_end() function. Trying to use + * it outside of these functions will crash the server immediately. + * + * @param x Number to write + * + * @noreturn + */ +native write_long(x); + +/** + * Writes an entity index to a message. + * + * @note This function should only be used in between a message_begin() + * or message_begin_f() and a message_end() function. Trying to use + * it outside of these functions will crash the server immediately. + * + * @param x Entity index to write + * + * @noreturn + */ +native write_entity(x); + +/** + * Writes an angle entry to a message. + * + * @note This function should only be used in between a message_begin() + * or message_begin_f() and a message_end() function. Trying to use + * it outside of these functions will crash the server immediately. + * + * @param x Angle to write + * + * @noreturn + */ +native write_angle(x); + +/** + * Writes an angle entry to a message using a float value. + * + * @note This function should only be used in between a message_begin() + * or message_begin_f() and a message_end() function. Trying to use + * it outside of these functions will crash the server immediately. + * + * @param x Angle to write + * + * @noreturn + */ +native write_angle_f(Float:x); + +/** + * Writes a coordinate entry to a message. + * + * @note This function should only be used in between a message_begin() + * or message_begin_f() and a message_end() function. Trying to use + * it outside of these functions will crash the server immediately. + * + * @param x Coordinate to write + * + * @noreturn + */ +native write_coord(x); + +/** + * Writes a coordinate entry to a message using a float value. + * + * @note This function should only be used in between a message_begin() + * or message_begin_f() and a message_end() function. Trying to use + * it outside of these functions will crash the server immediately. + * + * @param x Coordinate to write + * + * @noreturn + */ +native write_coord_f(Float:x); + +/** + * Writes a string to a message. + * + * @note This function should only be used in between a message_begin() + * or message_begin_f() and a message_end() function. Trying to use + * it outside of these functions will crash the server immediately. + * + * @param x String to write + * + * @noreturn + */ +native write_string(const x[]); + +/** + * Marks the beginning of a client message. + * + * @note You may generate menus, smoke, shockwaves, thunderlights, + * intermission and many other messages. + * @note For a list of HL game events, visit https://wiki.alliedmods.net/Half-Life_1_Game_Events + * @note For a list of HL engine messages, visit https://wiki.alliedmods.net/Half-Life_1_Engine_Messages + * @note You may also refer to the messages_const.inc file for examples. + * @note This function is the same as message_begin(), except that the messages + * sent with this one are also sent to all other AMXX and Metamod plugins. + * This means that if you send one of these messages, other plugins will + * be notified of that message, which was previously impossible. + * @note BE CAREFUL! Using this incorrectly, or not for its intended purpose, + * could cause infinite recursion or something just as bad! + * @note Each message starts with a emessage_begin() or emessage_begin_f() function + * and ends with emessage_end(). The specific message arguments go in between + * these two by using the ewrite_*() functions found in messages.inc. + * + * @param dest Destination type (see MSG_* constants in messages_const.inc) + * @param msg_type Message id + * @param origin Message origin + * @param player Client index receiving the message or 0 for all clients + * + * @noreturn + * @error If an invalid message id is specified or an invalid number + * of parameters is passed, an error will be thrown. + */ +native emessage_begin(dest, msg_type, const origin[3] = {0,0,0}, player = 0); + +/** + * Marks the beginning of a client message. + * + * @note You may generate menus, smoke, shockwaves, thunderlights, + * intermission and many other messages. + * @note For a list of HL game events, visit https://wiki.alliedmods.net/Half-Life_1_Game_Events + * @note For a list of HL engine messages, visit https://wiki.alliedmods.net/Half-Life_1_Engine_Messages + * @note You may also refer to the messages_const.inc file for examples. + * @note This function is the same as message_begin_f(), except that the messages + * sent with this one are also sent to all other AMXX and Metamod plugins. + * This means that if you send one of these messages, other plugins will + * be notified of that message, which was previously impossible. + * @note BE CAREFUL! Using this incorrectly, or not for its intended purpose, + * could cause infinite recursion or something just as bad! + * @note This function is the same as emessage_begin(), but the origin + * argument accepts only float values in this one. + * @note Each message starts with a emessage_begin() or emessage_begin_f() function + * and ends with emessage_end(). The specific message arguments go in between + * these two by using the ewrite_*() functions found in messages.inc. + * + * @param dest Destination type (see MSG_* constants in messages_const.inc) + * @param msg_type Message id + * @param origin Message origin + * @param player Client index receiving the message or 0 for all clients + * + * @noreturn + * @error If an invalid message id is specified or an invalid number + * of parameters is passed, an error will be thrown. + */ +native emessage_begin_f(dest, msg_type, const Float:origin[3] = {0.0,0.0,0.0}, player = 0); + +/** + * Ends a message that was started with emessage_begin() or emessage_begin_f(). + * + * @note If the function is called without using emessage_begin() or + * emessage_begin_f() first, the server will crash immediately. + * + * @noreturn + */ +native emessage_end(); + +/** + * Writes a single byte to a message. + * + * @note This function should only be used in between a emessage_begin() + * or emessage_begin_f() and a emessage_end() function. Trying to use + * it outside of these functions will crash the server immediately. + * + * @param x Byte to write + * + * @noreturn + */ +native ewrite_byte(x); + +/** + * Writes a single character to a message. + * + * @note This function should only be used in between a emessage_begin() + * or emessage_begin_f() and a emessage_end() function. Trying to use + * it outside of these functions will crash the server immediately. + * + * @param x Character to write + * + * @noreturn + */ +native ewrite_char(x); + +/** + * Writes a single number to a message (short). + * + * @note This function should only be used in between a emessage_begin() + * or emessage_begin_f() and a emessage_end() function. Trying to use + * it outside of these functions will crash the server immediately. + * + * @param x Number to write + * + * @noreturn + */ +native ewrite_short(x); + +/** + * Writes a single number to a message (long). + * + * @note This function should only be used in between a emessage_begin() + * or emessage_begin_f() and a emessage_end() function. Trying to use + * it outside of these functions will crash the server immediately. + * + * @param x Number to write + * + * @noreturn + */ +native ewrite_long(x); + +/** + * Writes an entity index to a message. + * + * @note This function should only be used in between a emessage_begin() + * or emessage_begin_f() and a emessage_end() function. Trying to use + * it outside of these functions will crash the server immediately. + * + * @param x Entity index to write + * + * @noreturn + */ +native ewrite_entity(x); + +/** + * Writes an angle entry to a message. + * + * @note This function should only be used in between a emessage_begin() + * or emessage_begin_f() and a emessage_end() function. Trying to use + * it outside of these functions will crash the server immediately. + * + * @param x Angle to write + * + * @noreturn + */ +native ewrite_angle(x); + +/** + * Writes an angle entry to a message using a float value. + * + * @note This function should only be used in between a emessage_begin() + * or emessage_begin_f() and a emessage_end() function. Trying to use + * it outside of these functions will crash the server immediately. + * + * @param x Angle to write + * + * @noreturn + */ +native ewrite_angle_f(Float:x); + +/** + * Writes a coordinate entry to a message. + * + * @note This function should only be used in between a emessage_begin() + * or emessage_begin_f() and a emessage_end() function. Trying to use + * it outside of these functions will crash the server immediately. + * + * @param x Coordinate to write + * + * @noreturn + */ +native ewrite_coord(x); + +/** + * Writes a coordinate entry to a message using a float value. + * + * @note This function should only be used in between a emessage_begin() + * or emessage_begin_f() and a emessage_end() function. Trying to use + * it outside of these functions will crash the server immediately. + * + * @param x Coordinate to write + * + * @noreturn + */ +native ewrite_coord_f(Float:x); + +/** + * Writes a string to a message. + * + * @note This function should only be used in between a emessage_begin() + * or emessage_begin_f() and a emessage_end() function. Trying to use + * it outside of these functions will crash the server immediately. + * + * @param x String to write + * + * @noreturn + */ +native ewrite_string(const x[]); + +/** + * Sets whether or not an engine message will be blocked. + * + * @note For a list of message flags, have a look at the BLOCK_* constants + * in message_const.inc. + * + * @param iMessage Message id + * @param iMessageFlags BLOCK_* constant + * + * @noreturn + * @error If an invalid message id is specified, an error + * will be thrown. + */ +native set_msg_block(iMessage, iMessageFlags); + +/** + * Gets whether or not an engine message is blocked. + * + * @param iMessage Message id + * + * @return BLOCK_* constant + * @error If an invalid message id is specified, an error + * will be thrown. + */ +native get_msg_block(iMessage); + +/** + * Lets you directly hook a message in the engine. + * + * @note The function is called in the following manner: + * msg_id - Message id + * msg_dest - Destination type (see MSG_* constants in messages_const.inc) + * msg_entity - Entity receiving the message + * + * @note You can overwrite the message before anything happens by using the + * set_msg_arg_* functions and either let the message continue by + * returning PLUGIN_CONTINUE or fully block it with PLUGIN_HANDLED. + * @note If you hook a message, the message is stored but not sent. You have + * the opportunity to not only execute code, but to get/set the contents + * of the message before you choose to either block it or let it go on + * its way. + * @note The return value can be passed to unregister_message() in order to + * stop the message from being hooked. + * + * @param iMsgId Message id + * @param szFunction Function that will be called + * + * @return Id that can be passed to unregister_message() on + * success, or 0 if an invalid message id is passed + * @error If the specified function can't be found, an + * error will be thrown. + */ +native register_message(iMsgId, const szFunction[]); + +/** + * Unregisters a message hook previously created with register_message(). + * + * @note You must pass the proper message id and return value from the + * message to unregister the message successfully. + * + * @param iMsgId Message id + * @param registeredmsg Registered message id + * + * @return Id that can again be passed to register_message() on + * success, or 0 if an invalid message id is passed + * @error If an invalid registered message handle is passed, an + * error will be thrown. + */ +native unregister_message(iMsgId, registeredmsg); + +/** + * Gets number of arguments that were passed to a message. + * + * @note This function will fail if used outside a hooked message scope, thus + * it should never be used unless inside a registered message function. + * + * @return Number of arguments + */ +native get_msg_args(); + +/** + * Gets the argument type of a specified argument. + * + * @note This function will fail if used outside a hooked message scope, thus + * it should never be used unless inside a registered message function. + * + * @param argn Argument number + * + * @return Argument type (see ARG_* constants in message_const.inc) + */ +native get_msg_argtype(argn); + +/** + * Gets the integer value of a specified argument. + * + * @note This function will fail if used outside a hooked message scope, thus + * it should never be used unless inside a registered message function. + * + * @param argn Argument number + * + * @return Argument value as an integer + * @error If an invalid message argument is passed, an + * error will be thrown. + */ +native get_msg_arg_int(argn); + +/** + * Gets the float value of a specified argument. + * + * @note This function will fail if used outside a hooked message scope, thus + * it should never be used unless inside a registered message function. + * + * @param argn Argument number + * + * @return Argument value as a float + * @error If an invalid message argument is passed, an + * error will be thrown. + */ +native Float:get_msg_arg_float(argn); + +/** + * Gets the string value from a specified argument. + * + * @note This function will fail if used outside a hooked message scope, thus + * it should never be used unless inside a registered message function. + * + * @param argn Argument number + * @param szReturn Buffer to store the value in + * @param iLength Maximum buffer length + * + * @return String length + * @error If an invalid message argument is passed, an + * error will be thrown. + */ +native get_msg_arg_string(argn, szReturn[], iLength); + +/** + * Sets the integer value of a specified argument. + * + * @note This function will fail if used outside a hooked message scope, thus + * it should never be used unless inside a registered message function. + * + * @param argn Argument number + * @param argtype Argument type (see ARG_* constants in message_const.inc) + * @param iValue Argument value + * + * @noreturn + * @error If an invalid message argument is passed, an + * error will be thrown. + */ +native set_msg_arg_int(argn, argtype, iValue); + +/** + * Sets the float value of a specified argument. + * + * @note This function will fail if used outside a hooked message scope, thus + * it should never be used unless inside a registered message function. + * + * @param argn Argument number + * @param argtype Argument type (see ARG_* constants in message_const.inc) + * @param fValue Argument value + * + * @noreturn + * @error If an invalid message argument is passed, an + * error will be thrown. + */ +native set_msg_arg_float(argn, argtype, Float:fValue); + +/** + * Sets the string value of a specified argument. + * + * @note This function will fail if used outside a hooked message scope, thus + * it should never be used unless inside a registered message function. + * + * @param argn Argument number + * @param szString Argument value + * + * @noreturn + * @error If an invalid message argument is passed, an + * error will be thrown. + */ +native set_msg_arg_string(argn, const szString[]); + +/** + * Gets the origin of a message. + * + * @note This function will fail if used outside a hooked message scope, thus + * it should never be used unless inside a registered message function. + * + * @param _Origin Array to store the origin in + * + * @noreturn + * @error If the function is used outside a message hook, an + * error will be thrown. + */ +native get_msg_origin(const Float:_Origin[3]); diff --git a/bin/compiler/include/mysqlt.inc b/bin/compiler/include/mysqlt.inc new file mode 100644 index 0000000..c197b27 --- /dev/null +++ b/bin/compiler/include/mysqlt.inc @@ -0,0 +1,243 @@ +#if defined _mysqlt_included + #endinput +#endif +#define _mysqlt_included +#if AMXX_VERSION_NUM >= 175 + #pragma reqclass mysqlt + #if !defined AMXMODX_NOAUTOLOAD + #pragma defclasslib mysqlt mysqlt + #endif +#endif + +//#define OLDNATIVES_COMPACTIBILITY + + +#if !defined _sqlx_included +enum +{ + TQUERY_CONNECT_FAILED=-2, + TQUERY_QUERY_FAILED=-1, + TQUERY_SUCCESS=0, +}; + +enum Handle +{ + Empty_Handle +}; + +#endif + +/* +[Configura la performance del ThreadsQuery] + -collect_time: + Tiempo en milisegundos en el que se recolectan los datos listos + -th_think_time: + Tiempo en milisegundos para el proximo frame del Thread + -threads_per_frame: + Cantidad de Threads simultaneamente +*/ +native mysql_performance(collect_time=100, th_think_time=100, threads_per_frame=1); + + +/* +[Realiza una consulta] + -cn_handler: + El handler devuelto por mysql_makehost o mysql_connect. + -handler: + La funcion que sera llamada al finalizar la consulta + -query: + La consulta + -data: + Array para pasar algun dato a la funcion handler + -datasize: + Tamao del array data +---------------------------------------------------------------------------------- +La funcion handler tiene este formato: +*public query_handler(failstate, error[], errnum, data[], size, Float:queuetime) + -failstate: + Estado de la consulta: + TQUERY_CONNECT_FAILED: Fallo la conexin + TQUERY_QUERY_FAILED: Fallo la consulta + TQUERY_SUCCESS: Todo OK :P + -error: + String del error + -errnum: + Codigo del error + -data: + Datos pasados desde mysql_query + -size: + Tamao del array data + -queuetime: + Tiempo transcurrido desde que se creo la consulta hasta que finalizo + +*/ +native mysql_query(Handle:cn_handler, const handler[], const query[], const data[]="", datasize=0); + +/* +[Crea un identificador a un Host] + return: Devuelve el Handle de un Host +*/ +native Handle:mysql_makehost(const host[], const user[], const pass[], const db[], timeout=0); + +/*[Libera el Handle de un Host o de una Conexin]*/ +native mysql_free(Handle:_handle); + +/* +[Crea una conexin permanente con el servidor MySQL] + return: Devuelve el Handle de la Conexin +*/ +native Handle:mysql_connect(Handle:host_handler, &errcode, error[], maxlength); + +/* +[Comprueba si hay mas resultados] + return: Devuelve true si hay mas resultados,de lo contrario false +*/ +native mysql_more_results(); + +/* +[Comprueba si una columna no tiene un valor] + return: Devuelve true si no tiene un valor,de lo contrario false +*/ +native mysql_isnull(column); + +/* +[Obtiene los datos de una columna(ID)] + -column: + El id de la columna + + Ejemplo: + -Para numeros: + new num = mysql_read_result(0) + + -Para Float: + new Float:num2 + mysql_read_result(1, num2) + -Para String: + new str[32] + mysql_read_result(2, str, 31) +*/ +native mysql_read_result(column, {Float,_}:...); + +/* +[Obtiene los datos de una columna(Name)] + -name: + El nombre de la columna + + Ejemplo: + -Para numeros: + new num = mysql_read_result2("columna1") + + -Para Float: + new Float:num2 + mysql_read_result2("columna2", num2) + -Para String: + new str[32] + mysql_read_result2("columna3", str, 31) +*/ +native mysql_read_result2(name[], {Float,_}:...); + +/*[Avanza al siguiente resultado]*/ +native mysql_next_row(); + +/*[Devuelve el numero de campos afectados]*/ +native mysql_affected_rows(); + +/*[Devuelve el numero de resultados]*/ +native mysql_num_results(); + +/*[Devuelve el numero de columnas]*/ +native mysql_num_columns(); + +/*[Se obtiene el nombre de una columna]*/ +native mysql_fieldnumtoname(num, name[], maxlength); + +/*[Se obtiene el id de una columna]*/ +native mysql_fieldnametonum(const name[]); + +/*[Se obtiene el ID del autoincrement si se inserto un campo nuevo]*/ +native mysql_get_insert_id(); + +/*[Se obtiene la consulta del ThreadsQuery]*/ +native mysql_get_query(buffer[], maxlength); + +/*[Vuelve atras un resultado]*/ +native mysql_rewind(); + + +native mysql_next_result_set(); + +native mysql_escape_string(buffer[], buflen, const string[]); +native mysql_escape_string2(buffer[], buflen, const fmt[], any:...); + + + + +#if !defined _sqlx_included && defined OLDNATIVES_COMPACTIBILITY +#define SQL_ThreadQuery mysql_query +#define SQL_MakeDbTuple mysql_makehost +#define SQL_FreeHandle mysql_free +#define SQL_Connect mysql_connect +stock SQL_MoreResults(Handle:query) + mysql_more_results() +stock SQL_IsNull(Handle:query, column) + mysql_isnull(column) +stock SQL_NextRow(Handle:query) + mysql_next_row() +stock SQL_AffectedRows(Handle:query) + mysql_affected_rows() +stock SQL_NumResults(Handle:query) + mysql_num_results() +stock SQL_NumRows(Handle:query) + mysql_num_results() +stock SQL_NumColumns(Handle:query) + mysql_num_columns() +stock SQL_FieldNumToName(Handle:query, num, name[], maxlength) + mysql_fieldnumtoname(num, name, maxlength) +stock SQL_FieldNameToNum(Handle:query, const name[]) + mysql_fieldnametonum(name) +stock SQL_GetInsertId(Handle:query) + mysql_get_insert_id() +stock SQL_GetQueryString(Handle:query, buffer[], maxlength) + mysql_get_query(buffer, maxlength) +stock SQL_Rewind(Handle:query) + mysql_rewind() +stock SQL_NextResultSet(Handle:query) + mysql_next_result_set() +stock SQL_QuoteString(Handle:db, buffer[], buflen, const string[]) + mysql_escape_string(buffer, buflen, string) +stock SQL_QuoteStringFmt(Handle:db, buffer[], buflen, const fmt[], any:...) + set_fail_state("SQL_QuoteStringFmt: This function is deprecated") +stock SQL_ReadResult(Handle:query, column, {Float,_}:...) +{ + new args = numargs() + + if(args == 2) return mysql_read_result(column) + if(args == 3) + { + new Float:value + mysql_read_result(column, value) + setarg(2, _, _:value) + return 1 + } + else { + new string[512], len = getarg(3) + + mysql_read_result(column, string, 511) + + len = min(getarg(3), strlen(string)) + new cell + while(cell < len) + { + if(!setarg(2, cell, string[cell])) break + cell++ + } + setarg(2, len, 0) + return len + } + + return 0 +} +#endif +/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE +*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang11274\\ f0\\ fs16 \n\\ par } +*/ diff --git a/bin/compiler/include/newmenus.inc b/bin/compiler/include/newmenus.inc new file mode 100644 index 0000000..9485ab2 --- /dev/null +++ b/bin/compiler/include/newmenus.inc @@ -0,0 +1,379 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +#if defined _newmenus_included + #endinput +#endif +#define _newmenus_included + +/** + * @section Menu properties for using in menu_setprop + */ + +/** + * Menu will have an exit option (default) + */ +#define MEXIT_ALL 1 + +/** + * Menu will have an exit option, even when pagination is disabled. + * There have to be less than 10 items in the menu or it won't appear. The exit + * option will be appended to the last item with no extra slot padding. If you + * want it in the 10th slot you have to pad it manually with menu_addblank2 + */ +#define MEXIT_FORCE 2 + +/** + * Menu will not have an exit option + */ +#define MEXIT_NEVER -1 + +/** + * Number of items per page (param1 = number, 0=no paginating, 7=default) + */ +#define MPROP_PERPAGE 1 + +/** + * Name of the back button (param1 = string) + */ +#define MPROP_BACKNAME 2 + +/** + * Name of the next button (param1 = string) + */ +#define MPROP_NEXTNAME 3 + +/** + * Name of the exit button (param1 = string) + */ +#define MPROP_EXITNAME 4 + +/** + * Menu title text (param1 = string) + */ +#define MPROP_TITLE 5 + +/** + * Exit functionality (param1 = number, see MEXIT constants) + */ +#define MPROP_EXIT 6 + +/** + * Sets whether colors are not auto (param1 = number, 0=default) + */ +#define MPROP_NOCOLORS 8 + +/** + * Color indicator to use for numbers (param1 = string, "\r"=default) + */ +#define MPROP_NUMBER_COLOR 10 + +/** + * Function to be called on Back and Next (param1 = string) + * public function(id, status); where status is either MENU_BACK or MENU_MORE + * Pass NULL_STRING to disable the callback + */ +#define MPROP_PAGE_CALLBACK 11 + +/** + * Whether to show the page number in menu title (param1 = bool, true = default) + */ +#define MPROP_SHOWPAGE 12 + +/** + * @deprecated + */ +#define MEXIT_NORMAL 0 /* DEPRECATED, do not use (has no effect) */ +#define MENUPAD_NONE 0 /* DEPRECATED, do not use (has no effect) */ +#define MENUPAD_PAGE 1 /* DEPRECATED, do not use (has no effect) */ +#define MPROP_ORDER 7 /* DEPRECATED, do not use (has no effect) */ +#define MPROP_PADMENU 9 /* DEPRECATED, do not use (has no effect) */ + +/** @endsection */ + +/** + * @brief Creates a new menu object. + * + * The handler function should be prototyped as: + * + * public (id, menu, item) + * id - Client the menu is being acted upon. + * menu - Menu resource identifier. + * item - Item the client selected. If less than 0, the menu was + * cancelled and the item is a status code. menu_display + * should never be called immediately if the item is a status + * code, for re-entrancy reasons. + * + * The handler function should always return PLUGIN_HANDLED to block + * any old menu handlers from potentially feeding on the menu, unless + * that is the desired functionality. + * + * @param title Title the menu should use. + * @param handler Name of the handler function. The function will be invoked + * once and only once to every menu_display() call. + * @param ml Unused (should be 0). + * @return Menu resource identifier which must be destroyed via + * menu_destroy(). All menus are destroyed when the plugin + * unloads. + * @error Function name not found. + */ +native menu_create(const title[], const handler[], ml=0); + +/** + * Creates a menu item callback handler. + * + * The handler function should be prototyped as: + * + * public (id, menu, item) + * id - Client index being displayed to. + * menu - Menu resource identifier. + * item - Item being drawn. + * - ITEM_IGNORE to use the default functionality. ITEM_ENABLED to + * explicitly enable or ITEM_DISABLED to explicitly disable. + * + * @param function Function name. + * @return Menu callback ID. + */ +native menu_makecallback(const function[]); + +/** + * Adds an menu to a menu. + * + * @param menu Menu resource identifier. + * @param name Item text to display. + * @param info Item info string for internal information. + * @param paccess Access required by the player viewing the menu. + * @param callback If set to a valid ID from menu_makecallback(), the + * callback will be invoked before drawing the item. + * @noreturn + * @error Invalid menu resource. + */ +native menu_additem(menu, const name[], const info[]="", paccess=0, callback=-1); + +/** + * Returns the number of pages in a menu. + * + * @param menu Menu resource identifier. + * @return Number of pages in the menu. + * @error Invalid menu resource. + */ +native menu_pages(menu); + +/** + * Returns the number of items in a menu. + * + * @param menu Menu resource identifier. + * @return Number of items in the menu. + * @error Invalid menu resource. + */ +native menu_items(menu); + +/** + * Displays a menu to one client. This should never be called from a handler + * when the item is less than 0 (i.e. calling this from a cancelled menu will + * result in an error). + * + * Starting with 1.8.3 this allows to specify a menu timeout similar to the + * show_menu native. If the menu exists on the client past the timeout *any* + * further action will send the MENU_TIMEOUT status code to the menu handler. + * That includes actions which would otherwise send MENU_EXIT, such as the + * client selecting an item or disconnecting and calling menu_cancel or + * menu_destroy on a live menu. + * + * @param id Client index. + * @param menu Menu resource identifier. + * @param page Page to start from (starting from 0). + * @param time If >=0 menu will timeout after this many seconds + * @noreturn + * @error Invalid menu resource or client index. + */ +native menu_display(id, menu, page=0, time=-1); + +/** + * Given a page on a menu and a keypress on that page, returns the item id selected. + * If the item is less than 0, a special option was chosen (such as MENU_EXIT). + * + * @param menu Menu resource identifier. + * @param page Page on the menu. + * @param key Key pressed (from 1 to 10). + * @return Item identifier, or <0 for a special selection code. + * @error Invalid menu resource. + */ +native menu_find_id(menu, page, key); + +/** + * Retrieves info about a menu item. + * + * @param menu Menu resource identifier. + * @param item Item identifier. + * @param access Variable to store access value. + * @param info Buffer to store item info. + * @param infolen Item info buffer length. + * @param name Buffer to store item display text. + * @param namelen Item name buffer length. + * @param callback Callback ID. + * @return 1 on success, 0 on failure. + * @error Invalid menu resource. + */ +native menu_item_getinfo(menu, item, &access = 0, info[] = "", infolen = 0, name[]="", namelen=0, &callback = 0); + +/** + * Sets an item's display text. + * + * @param menu Menu resource identifier. + * @param item Item identifier. + * @param name New item display text. + * @return 1 on success, 0 on failure. + * @error Invalid menu resource. + */ +native menu_item_setname(menu, item, const name[]); + +/** + * Sets an item's info string. + * + * @param menu Menu resource identifier. + * @param item Item identifier. + * @param info New item info string. + * @return 1 on success, 0 on failure. + * @error Invalid menu resource. + */ +native menu_item_setcmd(menu, item, const info[]); + +/** + * Sets an item's callback. + * + * @param menu Menu resource identifier. + * @param item Item identifier. + * @param callback New callback from menu_makecallback(), or -1 to clear. + * @return 1 on success, 0 on failure. + * @error Invalid menu resource. + */ +native menu_item_setcall(menu, item, callback=-1); + +/** + * Destroys a menu. Player menus will be cancelled (although may still linger + * on the HUD), and future attempts to access the menu resource will result in + * an error. + * + * This must be called if you create menus dynamically, otherwise you will + * leak memory. For normal dynamic menus, you will destroy the menu in the + * handler function (remembering to handle the case of a menu being cancelled, + * it must still be destroyed). + * + * @param menu Menu resource identifier. + * @noreturn + * @error Invalid menu resource. + */ +native menu_destroy(menu); + +/** + * Returns information about a menu (if any) the client is currently viewing. + * + * If newmenu is valid, then the menu will refer to the menuid associated with + * the title. If newmenu is not valid, and the menu is valid, then the player + * is viewing a menu displayed with show_menu(). + * + * Both may be invalid if the player is not viewing a menu. + * + * @param id Client index. + * @param menu Variable to store old menu id. If none, then <1 will be + * stored. + * @param newmenu Variable to store new menu id. If none, then -1 will be + * stored. + * @param menupage Variable to store current page of the new menu, if any. + * @return 1 if the player is viewing a menu, 0 otherwise. + * @error Invalid client. + */ +native player_menu_info(id, &menu, &newmenu, &menupage=0); + +/** + * Adds a blank line to a menu. + * + * When using slot=1 this might break your menu. To achieve this functionality + * menu_addblank2 should be used. + * + * @param menu Menu resource identifier. + * @param slot 1 (default) if the line should shift the numbering down. + * 0 if the line should be a visual shift only. + * @noreturn + * @error Invalid menu resource. + */ +native menu_addblank(menu, slot=1); + +/** + * Adds a text line to a menu. Only available in amxmodx 1.8.1 and above. + * + * When using slot=1 this might break your menu. To achieve this functionality + * menu_addtext2 should be used. + * + * @param menu Menu resource identifier. + * @param text Text to add. + * @param slot 1 (default) if the line should shift the numbering down. + * 0 if the line should be a visual shift only. + * @noreturn + * @error Invalid menu resource. + */ +native menu_addtext(menu, const text[], slot=1); + +/** + * Adds a blank line to a menu, always shifting the numbering down. + * + * This will add a special item to create a blank line. It will affect the menu + * item count and pagination. These items can be modified later but will ignore + * access and item callback results. + * + * Only available in 1.8.3 and above. + * + * @param menu Menu resource identifier. + * + * @return 1 on success, 0 on failure. + * @error Invalid menu resource. + * Too many items on non-paginated menu (max is 10) + */ +native menu_addblank2( menu ); + +/** + * Adds a text line to a menu, always shifting the numbering down. + * + * This will add a special item to create a blank line. It will affect the menu + * item count and pagination. These items can be modified later but will ignore + * access and item callback results. + * + * Only available in 1.8.3 and above. + * + * @param menu Menu resource identifier. + * @param text Text to add. + * + * @return 1 on success, 0 on failure. + * @error Invalid menu resource. + * Too many items on non-paginated menu (max is 10) + */ +native menu_addtext2( menu, const text[] ); + +/** + * Sets a menu property. + * + * @param menu Menu resource identifier. + * @param prop MPROP_ constant. + * @param ... Property parameters. + * @return 1 on success, 0 on failure. + * @error Invalid menu resource or property. + */ +native menu_setprop(menu, prop, ...); + +/** + * Cancels a player's menu, effectively forcing the player to select MENU_EXIT. + * The menu will still exist on their screen but any results are invalidated, + * and the callback is invoked. + * + * @param player Client index. + * @noreturn + * @error Invalid client index. + */ +native menu_cancel(player); diff --git a/bin/compiler/include/ns.inc b/bin/compiler/include/ns.inc new file mode 100644 index 0000000..75f1b5b --- /dev/null +++ b/bin/compiler/include/ns.inc @@ -0,0 +1,754 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Natural Selection Module Functions +// + +#if defined NS_INC + #endinput +#endif +#define NS_INC + +#pragma reqlib ns +#if !defined AMXMODX_NOAUTOLOAD + #pragma loadlib ns +#endif + +#include + + +/** + * Called whenever the client's class is changed. + * + * @param id The index of the player who changed. + * @param newclass The class the client changed to. Check the class enum in ns_const.inc. + * @param oldclass The class the client changed from. Check the class enum in ns_const.inc. + * @noreturn + */ +forward client_changeclass(id, newclass, oldclass); + +/** + * Called whenever the client builds a structure. + * + * @param idPlayer The player index who triggered the building. + * @param idStructure The structure index that was created. + * @param type The type of structure that was built (1 for marine, 2 for alien). + * @param impulse The impulse command that was issued to build this structure. + * @noreturn + */ +forward client_built(idPlayer, idStructure, type, impulse); + +/** + * Tell whether or not the map is combat. + * + * @return 1 if combat, 0 otherwise. + */ +native ns_is_combat(); + +/** + * Returns the gameplay type for the currently active map. + * Refer to ns_const.inc's NSGameplay enum for details. + * + * @note The earliest this is guaranteed to be accurate is during plugin_init(). It needs + * the info_gameplay entity to be properly set within the map, or it will return "Unknown", + * or "Cantfind". + * + * @return Return the gameplay mode, as accurate as the module can tell. + */ +native NSGameplay:ns_get_gameplay(); + +/** + * Exact syntax as get_user_team, but should be more accurate. + * + * @param id Player id. + * @param buff Buffer to store team name in. + * @param len Buffer length. + * @return The pev_team setting for the player. + */ +native ns_get_user_team(id, buff[], len); + +/** + * Send an NS-style popup message. + * + * @param target The client to receive the message. Set to 0 to send to everybody. + * @param szMsg The message to send, 180 characters max. + * @param ah Whether to only display the message on clients who have the cvar "cl_autohelp" set to 1. + * @noreturn + */ +native ns_popup(target, const szMsg[180], ah=0); + +/** + * Sets a player model. Omit the second parameter to return to default + * + * @note The model does not revert on death, teamswitch, gestation, etc. + * + * @param id The player id to change. + * @param szModel The model to change to. + * @noreturn + */ +native ns_set_player_model(id, const szModel[]=""); + +/** + * Sets a player skin. Omit the second parameter to return to default + * + * @note The skin does not revert on death, teamswitch, gestation, etc. + * + * @param id The player id to change. + * @param skin The skin number to change to. + * @noreturn + */ +native ns_set_player_skin(id, skin=-1); + +/** + * Sets a player body. Omit the second parameter to return to default + * + * @note The body does not revert on death, teamswitch, gestation, etc. + * + * @param id The player id to change. + * @param body The body number to change to. + * @noreturn + */ +native ns_set_player_body(id, body=-1); + +/** + * Set this to modify the player's speed by a certain amount. + * + * @note The speed does not revert on death, teamswitch, gestation, etc. + * + * @param id The player id to change. + * @param speedchange The speed to modify the player speed by. Set to 0 to revert to default speed. + * @noreturn + */ +native ns_set_speedchange(id, speedchange=0); + +/** + * Returns a client's current speed modifier. + * + * @param id The client id to check. + * @return The module's current speed modifier for the client. + */ +native ns_get_speedchange(id); + +/** + * Returns a client's maxspeed before the speed change modifier is factored in. + * + * @param id The client id to check. + * @return The maxspeed for the client. + */ +native ns_get_maxspeed(id); + +/* Returns whether or not this mask is set from the entity's iuser4 field. Use the "mask" enum for reference. */ +native ns_get_mask(id,mask); + +/* Sets or removes the mask from the entity's iuser4 field. Set "value" to 1 to turn the mask on, 0 to turn it off. */ +native ns_set_mask(id,mask,value); + +/* Returns built/unbuilt structures. + If: + builtOnly is 1 (default): + Only fully built structures are counted. + builtOnly is 0: + Any structure meeting the classname is counted. + + Number is 0 (default): + The total number of matching structures is returned. + Number is any other value: + The index of the #th matching structure is returned. +*/ +native ns_get_build(const classname[],builtOnly=1,Number=0); + +/* Returns if the player has the weapon or not in their pev->weapons field. + set "setweapon" to 0 to turn the bit off, set to 1 to turn it on. Or omit it to just return the value. */ +native ns_has_weapon(id,weapon,setweapon=-1); + +/* Gets spawn point for specified team (type). + If: + Team is equal to 0: + Ready room spawns are returned. + Team is greater than 0: + Spawns for the team are returned. + + Number is equal to 0: + Total number of spawns is returned. + Number is greater than 0: + The location of the specified spawn is returned. +*/ +native ns_get_spawn(team,number=0,Float:ret[3]); + +/* Returns the class of the player. Look in the classes enum in ns_const.inc for the value's meaning. */ +native ns_get_class(id); + +/** + * Gets the player's jetpack fuel reserve. + * + * @param id The player to get fuel from. + * @return The amount of fuel in the player's reserve. (0.0 through 100.0) + */ +native Float:ns_get_jpfuel(id); + +/** + * Sets the player's jetpack fuel reserve. + * + * @param id The player to set fuel. + * @param fuel The amount of fuel to set, as a percentage (0.0 through 100.0) + * @noreturn + */ +native ns_set_jpfuel(id, Float:fuel); + +/** + * Adds to the player's jetpack fuel reserve. + * + * @param id The player to add fuel to. + * @param amount The amount of fuel to add, as a percentage (0.0 through 100.0) + * @return The new amount of fuel in the player's reserve. (0.0 through 100.0) + */ +native Float:ns_add_jpfuel(id, Float:amount); + +/** + * Gets the player's energy percentage. + * + * @param id The player to get the energy from. + * @return The amount of energy the player has (0.0 through 100.0) + */ +native Float:ns_get_energy(id); + +/** + * Sets the player's energy percentage. + * + * @param id The player to set the energy on. + * @param energy The amount of energy to set (0.0 through 100.0) + * @noreturn + */ +native ns_set_energy(id, Float:energy); + +/** + * Adds to the player's energy percentage. + * + * @param id The player to add the energy to. + * @param amount The amount of energy to add to the player. + * @return The new amount of energy the player has (0.0 through 100.0) + */ +native Float:ns_add_energy(id, Float:amount); + + +/** + * Returns a player's resources. + * + * @note This is only for alien players. + * @param id The id of the player to check. + * @return Amount of resources this player has. + */ +native Float:ns_get_res(id); + +/** + * Sets a player's resources. + * + * @note This is only for alien players. + * @param id The id of the player to set. + * @param res Amount of resources to set on this player. + * @noreturn + */ +native ns_set_res(id, Float:res); + +/** + * Adds an amount of resources to the player. + * + * @note This is only for alien players. + * @param id The id of the player to add resources to. + * @param amount The amount to add to the player. + * @return The new amount of resources the player has. + */ +native Float:ns_add_res(id, Float:amount); + +/** + * Returns the team's resources. + * + * @param Team 1 for teama, 2 for teamb. (eg: in MvA maps, 1 is marines, + 2 is aliens. In mvm, 1 is marine1, 2 is marine2) + * @return The amount of resources in this team's resource pool. + */ +native Float:ns_get_teamres(Team); + +/** + * Sets the team's resources in the resource pool. + * + * @note If this is used on an alien team, the resources will be + * distributed between all of the players who need resources. + * @param Team 1 for teama, 2 for teamb. (eg: in MvA maps, 1 is marines, + * 2 is aliens. In mvm, 1 is marine1, 2 is marine2) + * @param value The amount to set the resources to set to. + * @noreturn + */ +native ns_set_teamres(Team, Float:value); + +/** + * Adds to the team's resources in the resource pool. + * + * @note If this is used on an alien team, the resources will be + * distributed between all of the players who need resources. + * @param Team 1 for teama, 2 for teamb. (eg: in MvA maps, 1 is marines, + * 2 is aliens. In mvm, 1 is marine1, 2 is marine2) + * @param value The amount to set the resources to add to the pool + * @return The new amount of resources in the resource pool. + */ +native Float:ns_add_teamres(Team,Float:value); + + +/** + * Returns the player's experience. + * + * @note Combat only. + * @param id The player to get experience value from. + * @return The amount of experience this player has. + */ +native Float:ns_get_exp(id); + +/** + * Sets the player's experience. + * + * @note Combat only. + * @param id The player to set experience value on. + * @param exp The amount of experience this player will have. + * @noreturn + */ +native ns_set_exp(id,Float:exp); + +/** + * Adds to the player's experience. + * + * @note Combat only. + * @param id The player to add experience value to. + * @param value The amount of experience this player will receive. + * @return The new amount of experience this player has. + */ +native Float:ns_add_exp(id, Float:value); + +/** + * Gets the player's points spent count in combat. + * + * @param id The player to check. + * @return The amount of points this player has spent. + */ +native ns_get_points(id); + +/** + * Sets the player's points spent count in combat. + * + * @param id The player to set this on. + * @param points The amount to set this to. + * @noreturn + */ +native ns_set_points(id, points); + +/** + * Adds to the player's points spent count in combat. + * + * @param id The player to add this to. + * @param value The value to add to the points spent. + * @return The new value of the points spent variable. + */ +native ns_add_points(id,points); + +/** + * Gets the damage for this weapon. + * + * @note Use weapon index, not player index! + * @param idWeapon The entity index of the weapon to check. + * @return The damage this weapon does. + */ +native Float:ns_get_weap_dmg(idWeapon); + +/** + * Sets the damage for this weapon. + * + * @note Use weapon index, not player index! + * @param idWeapon The entity index of the weapon to set. + * @param damage The damage to make this weapon cause. + * @noreturn + */ +native ns_set_weap_dmg(idWeapon, Float:damage); + +/** + * Gets the maximum range for this weapon. + * + * @note Use weapon index, not player index! + * @param idWeapon The entity index of the weapon to check. + * @return The maximum range this weapon has. + */ +native Float:ns_get_weap_range(idWeapon); + +/** + * Sets the maximum range for this weapon. + * + * @note Use weapon index, not player index! + * @param idWeapon The entity index of the weapon to set. + * @param range The maximum range this weapon will have. + * @noreturn + */ +native ns_set_weap_range(idWeapon, Float:range); + +/** + * Gets the weapon's clip ammo. + * + * @note Use weapon index, not player index! + * @param idWeapon The weapon to get the clip ammo from. + * @return The amount of ammunition in the weapon's clip. + */ +native ns_get_weap_clip(idWeapon); + +/** + * Sets the weapon's ammo in the clip. + * + * @note Use weapon index, not player index! + * @param idWeapon The weapon to set the clip ammo on. + * @param clipsize The amount of ammunition to set in the weapon's clip. + * @noreturn + */ +native ns_set_weap_clip(idWeapon, clipsize); + +/** + * Gets the player's weapon reserve (backpack ammo) for the specified + * type of weapon. + * + * @note Use player index, not weapon index! + * @param id The player id to check ammo count on. + * @param weapon The weapon type to check ammo count for. + * @return The ammunition count in the player's reserve. + */ +native ns_get_weap_reserve(id,weapon); + +/** + * Sets the player's weapon reserve (backpack ammo) for the specified + * type of weapon. + * + * @note Use player index, not weapon index! + * @param id The player id to set ammo count on. + * @param weapon The weapon type to set ammo count for. + * @param ammo The ammunition count to set. + * @noreturn + */ +native ns_set_weap_reserve(id,weapon,ammo); + +/** + * Gets the player's score. + * + * @note The score from level is automatically factored into the scoreboard in combat. + * @param idPlayer The player to get the score for. + * @return The player's score. + */ +native ns_get_score(idPlayer); + +/** + * Sets the player's score. + * + * @note The score from level is automatically factored into the scoreboard in combat. + * @param idPlayer The player to get the score for. + * @param score What to set the player's score as. + * @noreturn + */ +native ns_set_score(idPlayer, score); + +/* Adds to a player's score + * Returns the new score on success + */ +native ns_add_score(idPlayer,score); + +/* Gets a player's death count. */ +native ns_get_deaths(idPlayer); + +/* Sets a player's death count. */ +native ns_set_deaths(idPlayer,numdeaths); + +/* Adds to a player's death count + * Returns the new death count on success + */ +native ns_add_deaths(idPlayer,numdeaths); + +/* Gets the index of the owner of a structure. -1 for no owner. */ +native ns_get_struct_owner(idStructsure); + +/* Sets the index of the owner of a structure. -1 for no owner. */ +native ns_set_struct_owner(idStructure,indexOwner); + +/* Gets the trait type tied to the hive. Look at the hivetrait enum for the values. */ +native ns_get_hive_trait(idHive); + +/* Sets the trait type tied to the hive. Look at the hivetrait enum for the values. */ +native ns_set_hive_trait(idHive,trait); + +/* Sets the players field of view, set "_fov" to 0.0 (or omit it) to return to normal. FOV change will persist until disconnect unless reset by a plugin */ +native ns_set_fov(idPlayer,Float:_fov=0.0); + +/** + * Give the player an item. + * + * @param id The player to give the item to. + * @param class The map-classname of the entity to give to the player. + * @noreturn + */ +native ns_give_item(id, const class[]); + +/** + * Returns 1 if a player has the hive ability number. + * If ability is 0, it will return the number of active hives. + * + * @param idPlayer The player index to look up. + * @param ability The ability number to check, set to 0 to get number of active hives. + * @return If ability is != 0, returns 1 or 0 depending on if the client has the ability. + * If ability is 0, returns the number of active hives. + */ +native ns_get_hive_ability(idPlayer, ability=0); + +/** + * Triggered whenever a client's pev->team changes. + * + * @param id The id of the client. + * @param newteam The team number of the new team. + * @param oldteam The team number of the old team. + * @noreturn + */ +forward client_changeteam(id, newteam, oldteam); + +/** + * Triggered whenever a client's pev->deadflag changes from >0 to 0. + * + * @param id The id of the client. + * @noreturn + */ +forward client_spawn(id); + +/** + * Calls NS's private damage routine on the victim entity. + * + * @deprecated + * @note This is provided for backwards compatibility with peachy's module. + * It is suggested to use hamsandwich for this action instead. + * + * @param IDVictim The victim that is taking the damage. + * @param IDInflictor The entity that is causing the damage (weapon, etc). + * @param IDAttacker The attacker who is triggering the damage (person shooting). + * @param Damage The amount of damage being done. + * @param DamageType The damage type being done (bitmask). + */ +#pragma deprecated It is suggested to use hamsandwich for this action instead. +native ns_takedamage(IDVictim, IDInflictor, IDAttacker, Float:Damage, DamageType); + +/** + * Attempts to unstick a player. + * + * @param id Player to unstick. + * @param StartDistance Distance to start from the player to check for a new location. + * @param MaxAttempts How many attempts to try to find a new spot before giving up. + * @return 1 on success, 0 on cannot find a place to move player to, + * -1 on invalid state (stunned/webbed), -2 on invalid class (comm/egg) + * -3 if the player is dead or a spectator, -4 on invalid player, + * -5 if the player is not connected. + */ +native ns_unstick_player(id, StartDistance=32, MaxAttempts=128); + +/** + * Whether or not there is a game in progress. + * + * @return true if a game is in progress, false otherwise. + */ +native bool:ns_round_in_progress(); + +/** + * Called at the approximate time that a round is started. + * + * @noreturn + */ +forward round_start(); + +/** + * Called immediately when a round ends + * + * @param roundtime The length of the round in seconds. + * @noreturn + */ +forward round_end(Float:roundtime); + +forward map_reset(isload); + +native ns_get_weapon(idPlayer,weaponid,&weapontype=0); + +/* Returns the location name of the provided x/y position + * (z origin is ignored; can't have location over location) + * - + * Note that as of NS 3.2 beta 2, on the following maps + * the returned string should be passed through ns_lookup_title + * to be human readable: + * ns_bast, ns_hera, ns_nothing, ns_tanith, + * ns_nancy, ns_caged, ns_eclipse, ns_veil + * + * Passing the 5th parameter as non zero will auto look up + * the title if it exists. + */ +native ns_get_locationname(Float:x, Float:y, name[], len, titlelookup=0); + +/* Looks up a key from titles.txt + * Returns -1 if the key is not found + * Otherwise it returns the length of the output + */ +native ns_lookup_title(const KeyName[], Output[], length); + +/* Forces the structure to fully build + * Removes the ghost state from marine structures. + * Do not use this on hives! It wont work. + */ +native ns_build_structure(idStructure); + +/* Forces the structure to begin recycling + * Passing an index other than a marine structure will + * have undefined results! + * - + * Note: This calls a private NS function! + * Be careful when using this! + */ +native ns_recycle(idStructure); + +/* Forces the weldable to trigger + * Passing an index other than a weldable + * will have undefined results! + * - + * NS renames func_weldable to avhweldable + * at map load. + * - + * Note: This calls a private NS function! + * Be careful when using this! + */ +native ns_finish_weldable(idWeldable); + +/* Gets the total time needed to weld this + * func_weldable shut. + * Note: NS renames "func_weldable"s to "avhweldable"s + * at run time! + */ +native Float:ns_get_weld_time(idWeldable); + +/* Sets the total time needed to weld this + * func_weldable shut. + */ +native ns_set_weld_time(idWeldable,Float:value); + +/* Adds to the weldable's time required to open. + * Returns the new required time on success. + * Note this native clamps the low value to 0. + */ +native Float:ns_add_weld_time(idWeldable,Float:value); + +/* Gets the total time this func_weldable + * has been welded. + */ +native Float:ns_get_weld_done(idWeldable); + +/* Sets the total time this func_weldable + * has been welded. + */ +native ns_set_weld_done(idWeldable,Float:value); + +/* Adds to the total time this func_weldable + * has been welded. Returns the new value. + * Note this native clamps the low value to 0.0 + */ +native Float:ns_add_weld_done(idWeldable,Float:value); + +/* Gets/sets/adds to the energy pool of this observatory. */ +native Float:ns_get_obs_energy(idObs); +native ns_set_obs_energy(idObs,Float:value); +native Float:ns_add_obs_energy(idObs,Float:value); + +/** + * Removes an upgrade from the player's bought and active upgrade lists. + * This will not refund the points spent on the upgrade, nor will it + * immediately strip the upgrade if the player is alive. Rather, it will + * make it so the player no longer receives the upgrade on spawn. + * + * @note This only works in combat. + * @params idPlayer The player index to change upgrades for. + * @params ugprade The impulse number for the upgrade to strip. + * @return 2 for upgrade removed from player's bought and active list. + * 1 for upgrade removed from player's bought list only. + * 3 for upgrade removed from player's active list only (shouldn't happen, just incase.) + * 0 for the player didn't have the upgrade in either list. + */ +native ns_remove_upgrade(idPlayer, upgrade); + +/** + * Particle system natives + * - + * The particle system emulates a map-based custom particle system. + * Familiarity with the keyvalues from the map-based particle systems + * is recommended! You will be lost otherwise! + * - + * prsearle's NSPEdit is also recommended for designing the systems: + * http://homepage.ntlworld.com/pr.searle/NSPSEdit/NSPSEdit.html + */ + +/* Creates a handle to the a particle system to configure + * - + * Note! this is not a particle system you can pass to + * ns_fire_ps()! + */ +native RawPS:ns_create_ps(); + +/* Sets the name of the particle system. + * - + * This is used for things like ns_get_ps_id() + * and through calling another particle system + * through the "ps_to_gen" field + */ +native ns_set_ps_name(RawPS:system, const name[]); + +/* Sets the sprite to use for the particle system + * - + * You do NOT have to precache the sprite, BUT + * the sprite must obviously be on the client to + * display. + */ +native ns_set_ps_sprite(RawPS:system, const sprite[]); + +/* Finalizes the particle system. Do not configure it after this. + * A usable particle system handle is returned. + */ +native Particle:ns_spawn_ps(RawPS:system); + +/* Draws a particle system at the given origin (and angles) + * Flags are the FEV_* defines from hlsdk_const.inc + * Only use handles returned by ns_spawn_ps or ns_get_ps_id here! + */ +native ns_fire_ps(Particle:system,const Float:origin[3],const Float:angles[3]={0.0,0.0,0.0}, flags=0); + +/* Looks up a particle system by name + * Returns a usable particle system handle. + */ +native Particle:ns_get_ps_id(const Name[]); + +/* The following are the parameters for configuring the + * particle system. Look through the fgd and NSPSEdit + * for details! + */ +native ns_set_ps_genrate(RawPS:system, genrate); +native ns_set_ps_genshape(RawPS:system, NSPS_GenShape:genshape); +native ns_set_ps_genshape_params(RawPS:system, const params[]); +native ns_set_ps_spriteframes(RawPS:system, spriteframes); +native ns_set_ps_numparticles(RawPS:system, numparticles); +native ns_set_ps_size(RawPS:system, Float:size); +native ns_set_ps_vel_params(RawPS:system, const params[]); +native ns_set_ps_vel_shape(RawPS:system, NSPS_VelShape:shape); +native ns_set_ps_sys_life(RawPS:system, Float:lifetime); +native ns_set_ps_particle_life(RawPS:system, Float:lifetime); +native ns_set_ps_rendermode(RawPS:system, NSPS_RenderMode:rendermode); +native ns_set_ps_to_gen(RawPS:system, const name[]); +native ns_set_ps_anim_speed(RawPS:system, speed); +native ns_set_ps_spawn_flags(RawPS:system, NSPS_Flags:flags); +native ns_set_ps_base_color(RawPS:system, const colors[]); +native ns_set_ps_scale(RawPS:system, Float:scale); +native ns_set_ps_max_alpha(RawPS:system, Float:maxalpha); diff --git a/bin/compiler/include/ns_const.inc b/bin/compiler/include/ns_const.inc new file mode 100644 index 0000000..b1eb945 --- /dev/null +++ b/bin/compiler/include/ns_const.inc @@ -0,0 +1,196 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Natural Selection Module Constants +// + +#if defined NS_CONST_INC + #endinput +#endif +#define NS_CONST_INC + + +enum NSGameplay +{ + NSGame_CantTell, /**< It is too soon to tell (can't find avhgameplay + entity or it doesn't have private data) */ + + NSGame_MarineVAlien, /**< Marine vs Aliens (standard) gameplay */ + NSGame_MarineVMarine, /**< Marine vs Marine */ + NSGame_AlienVAlien, /**< Alien vs Alien */ + + NSGame_Unknown, /**< Can find the gameplay entity, but can't + determine gameplay type. */ +}; + +// entity pev->iuser4 fields +enum { + MASK_NONE = 0, + MASK_SIGHTED = 1, + MASK_DETECTED = 2, + MASK_BUILDABLE = 4, + MASK_BASEBUILD0 = 8, // Base build slot #0 + MASK_WEAPONS1 = 8, // Marine weapons 1 + MASK_CARAPACE = 8, // Alien carapace + MASK_WEAPONS2 = 16, // Marines weapons 2 + MASK_REGENERATION = 16, // Alien regeneration + MASK_BASEBUILD1 = 16, // Base build slot #1 + MASK_WEAPONS3 = 32, // Marine weapons 3 + MASK_REDEMPTION = 32, // Alien redemption + MASK_BASEBUILD2 = 32, // Base build slot #2 + MASK_ARMOR1 = 64, // Marine armor 1 + MASK_CELERITY = 64, // Alien celerity + MASK_BASEBUILD3 = 64, // Base build slot #3 + MASK_ARMOR2 = 128, // Marine armor 2 + MASK_ADRENALINE = 128, // Alien adrenaline + MASK_BASEBUILD4 = 128, // Base build slot #4 + MASK_ARMOR3 = 256, // Marine armor 3 + MASK_SILENCE = 256, // Alien silence + MASK_BASEBUILD5 = 256, // Base build slot #5 + MASK_JETPACK = 512, // Marine jetpacks + MASK_CLOAKING = 512, // Alien cloaking + MASK_BASEBUILD6 = 512, // Base build slot #6 + MASK_FOCUS = 1024, // Alien focus + MASK_MOTION = 1024, // Marine motion tracking + MASK_BASEBUILD7 = 1024, // Base build slot #7 + MASK_SCENTOFFEAR = 2048, // Alien scent of fear + MASK_DEFENSE2 = 4096, // Defense level 2 + MASK_DEFENSE3 = 8192, // Defense level 3 + MASK_ELECTRICITY = 8192, // Electricy + MASK_MOVEMENT2 = 16384, // Movement level 2, + MASK_MOVEMENT3 = 32768, // Movement level 3 + MASK_HEAVYARMOR = 32768, // Marine heavy armor + MASK_SENSORY2 = 65536, // Sensory level 2 + MASK_SENSORY3 = 131072, // Sensory level 3 + MASK_ALIEN_MOVEMENT = 262144, // Onos is charging + MASK_WALLSTICKING = 524288, // Flag for wall-sticking + MASK_PRIMALSCREAM = 1048576, // Alien is in range of active primal scream + MASK_UMBRA = 2097152, // In umbra + MASK_DIGESTING = 4194304, // When set on a visible player, player is digesting. When set on invisible player, player is being digested + MASK_RECYCLING = 8388608, // Building is recycling + MASK_TOPDOWN = 16777216, // Commander view + MASK_PLAYER_STUNNED = 33554432, // Player has been stunned by stomp + MASK_ENSNARED = 67108864, // Webbed + MASK_ALIEN_EMBRYO = 134217728, // Gestating + MASK_SELECTABLE = 268435456, // ??? + MASK_PARASITED = 536870912, // Parasite flag + MASK_SENSORY_NEARBY = 1073741824 // Sensory chamber in range +}; + + +enum { + CLASS_UNKNOWN = 0, + CLASS_SKULK, + CLASS_GORGE, + CLASS_LERK, + CLASS_FADE, + CLASS_ONOS, + CLASS_MARINE, + CLASS_JETPACK, + CLASS_HEAVY, + CLASS_COMMANDER, + CLASS_GESTATE, + CLASS_DEAD, + CLASS_NOTEAM +}; + +enum { + WEAPON_NONE = 0, + WEAPON_CLAWS, + WEAPON_SPIT, + WEAPON_SPORES, + WEAPON_SPIKE, + WEAPON_BITE, + WEAPON_BITE2, + WEAPON_SWIPE, + WEAPON_WEBSPINNER, + WEAPON_METABOLIZE, + WEAPON_PARASITE, + WEAPON_BLINK, + WEAPON_DIVINEWIND, + WEAPON_KNIFE, + WEAPON_PISTOL, + WEAPON_LMG, + WEAPON_SHOTGUN, + WEAPON_HMG, + WEAPON_WELDER, + WEAPON_MINE, + WEAPON_GRENADE_GUN, + WEAPON_LEAP, + WEAPON_CHARGE, + WEAPON_UMBRA, + WEAPON_PRIMALSCREAM, + WEAPON_BILEBOMB, + WEAPON_ACIDROCKET, + WEAPON_HEALINGSPRAY, + WEAPON_GRENADE, + WEAPON_STOMP, + WEAPON_DEVOUR, + WEAPON_MAX +}; + +enum { + HIVETRAIT_NONE = 0, + HIVETRAIT_DC = 92, + HIVETRAIT_SC = 93, + HIVETRAIT_MC = 94 +}; + +enum NSPS_VelShape +{ + NSPS_VS_POINT = 1, + NSPS_VS_BOX, + NSPS_VS_SPHERE, + NSPS_VS_BLOB +}; + +/* Genshape used in ns_set_ps_genshape + * NOTE: The following are in the ns.ps file but + * are not listed in the .fgd file. Use + * at your own risk! + * Line, Triangle, Plane, Cylinder, + * Cone, Disc, Rectangle and None + */ +enum NSPS_GenShape +{ + NSPS_GS_POINT = 0, + NSPS_GS_LINE, + NSPS_GS_TRIANGLE, + NSPS_GS_PLANE, + NSPS_GS_BOX, + NSPS_GS_CYLINDER, + NSPS_GS_CONE, + NSPS_GS_BLOB, + NSPS_GS_DISC, + NSPS_GS_RECTANGLE, + NSPS_GS_NONE +}; +enum NSPS_RenderMode +{ + NSPS_R_NORMAL = 0, + NSPS_R_TRANSCOLOR, + NSPS_R_TRANSTEXTURE, + NSPS_R_GLOW, + NSPS_R_TRANSALPHA, + NSPS_R_ADDITIVE +}; +enum NSPS_Flags +{ + NSPS_FL_START_ON = 1, + NSPS_FL_PARTICLE_DENSITY = 2, + NSPS_FL_FADE_IN = 4, + NSPS_FL_FADE_OUT = 8, + NSPS_FL_USE_GRAVITY = 16, + NSPS_FL_USE_TRI = 32, + NSPS_FL_CONSTRAIN_PITCH = 128, + NSPS_FL_COLLIDE = 256, + NSPS_FL_HI_DETAIL = 512, + NSPS_FL_FACE_UP = 1024 +}; diff --git a/bin/compiler/include/nvault.inc b/bin/compiler/include/nvault.inc new file mode 100644 index 0000000..4c025c1 --- /dev/null +++ b/bin/compiler/include/nvault.inc @@ -0,0 +1,154 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// NVault Functions +// + +#if defined _nvault_included + #endinput +#endif +#define _nvault_included + +#pragma reqlib nvault +#if !defined AMXMODX_NOAUTOLOAD + #pragma loadlib nvault +#endif + +/** + * @global All timestamps are in UNIX epoch form. + */ + +/** + * Opens a vault by name. Creates a vault if it doesn't exist yet. + * + * @param name Name of the vault. The vault will be created in + * ${amxx_datadir}/vault directory. + * + * @return The vault handle to be used in other natives. + * INVALID_HANDLE (-1) if not successfully opened. + */ +native nvault_open(const name[]); + +/** + * Retrieves a value from the given key. + * + * @note An example of retrieving a string: + * nvault_get(vaultHandle, "myKey", myString, charsmax(myString)); + * + * @param vault A vault handle returned from nvault_open() + * @param key A key to get the value from + * @param ... If three argument are given, gets a float value and + * puts it in the third argument by reference. + * If four arguments are given, gets a string from the + * vault and copies it to the third argument, up to + * 4th argument characters. + * + * @return Result as integer if only the first two arguments + * of the function are used. + * 1 if only the first three arguments are used. + * String length if all four parameters are used. + * @error On invalid vault handle. + */ +native nvault_get(vault, const key[], any:...); + +/** + * Retrieves full information about a vault entry. + * + * @param vault A vault handle returned from nvault_open() + * @param key A key to get information from + * @param value A string where the value should be stored + * @param maxlen Maximum length of the @value string + * @param timestamp The timestamp of the entry + * + * @return 1 if an entry was found, 0 otherwise. + * @error On invalid vault handle. + */ +native nvault_lookup(vault, const key[], value[], maxlen, ×tamp); + +/** + * Sets value of a vault entry and updates the timestamp. + * + * @note A new entry is created if one with the given key doesn't exist. + * + * @param vault A vault handle returned from nvault_open() + * @param key A key to set the value for + * @param value A value to set + * + * @noreturn + * @error On invalid vault handle. + */ +native nvault_set(vault, const key[], const value[]); + +/** + * Sets value of a vault entry and makes it permanent (non-erasable with nvault_prune()). + * + * @note A new entry is created if one with the given key doesn't exist. + * @note Permanent entries have no timestamp. + * + * @param vault A vault handle returned from nvault_open() + * @param key A key to set the permanent value for + * @param value A permanent value to set + * + * @noreturn + * @error On invalid vault handle. + */ +native nvault_pset(vault, const key[], const value[]); + +/** + * Prunes the vault for entries that are within the given timestamps. + * + * @note This will not erase values set with nvault_pset(). + * @note An example of pruning all entries that are older than 24 hours: + * nvault_prune(vaultHandle, 0, get_systime() - (60 * 60 * 24)); + * + * @param vault A vault handle returned from nvault_open() + * @param start The timestamp to start erasing from + * @param end The timestamp to erase to + * + * @return Number of erased values. + * @error On invalid vault handle. + */ +native nvault_prune(vault, start, end); + +/** + * Closes a vault. + * + * @param vault A vault handle returned from nvault_open() + * + * @noreturn + * @error On invalid vault handle. + */ +native nvault_close(vault); + +/** + * Removes an entry from the vault by its key. + * + * @param vault A vault handle returned from nvault_open() + * @param key The key to remove from the vault + * + * @noreturn + * @error On invalid vault handle. + */ +native nvault_remove(vault, const key[]); + +/** + * "Touches" an entry in the vault, updating its timestamp. + * + * @note If timestamp is equal to -1, it will use the current time. + * @note An empty entry is created if one with the given key doesn't exist. + * + * @param vault A vault handle returned from nvault_open() + * @param key The key to search for + * @param timestamp Update an entry's timestamp to this one. Default is -1. + * + * @noreturn + * @error On invalid vault handle. + */ +native nvault_touch(vault, const key[], timestamp=-1); diff --git a/bin/compiler/include/oldmenu.inc b/bin/compiler/include/oldmenu.inc new file mode 100644 index 0000000..e665281 --- /dev/null +++ b/bin/compiler/include/oldmenu.inc @@ -0,0 +1,205 @@ +#if defined _oldmenu_included + #endinput +#endif +#define _oldmenu_included + +#if !defined _fakemeta_included + #include +#endif + +/* VERSION 1.2 2016 */ + +#define MAX_MENU_STRING 512 +#define MAX_ITEM_LEN 200 + + +stock const oldmenuhandler[] = "oldmenu_handler" +stock const oldmenulog[] = "oldmenu_error.log" + +enum _:_OLDMENU_DATA +{ + _MENU[MAX_MENU_STRING+1], + _FUNCID, + _KEYS, + _LEN, + _ITEMS[10], + _MENUID +} + +stock g_oldmenu[_OLDMENU_DATA] +stock g_olmenu_player[33][12] + +stock oldmenu_register() +{ + g_oldmenu[_MENUID] = register_menuid(oldmenuhandler, 0) + register_menucmd(g_oldmenu[_MENUID], 1023, oldmenuhandler) +} + +stock oldmenu_current_menu(id) +{ + new menu, newmenu + player_menu_info(id, menu, newmenu, _) + + if(newmenu != -1 || (menu && menu != g_oldmenu[_MENUID])) + return -1 + if(menu < 1) + return 0 + + return (g_olmenu_player[id][10] + 1) +} + +stock oldmenu_create(const handler[], const title[], any:...) +{ + if(title[0]) + { + if(numargs() == 2) + g_oldmenu[_LEN] = formatex(g_oldmenu[_MENU], MAX_MENU_STRING, "%s^n^n", title) + else { + vformat(g_oldmenu[_MENU], MAX_MENU_STRING, title, 3) + g_oldmenu[_LEN] = add(g_oldmenu[_MENU], MAX_MENU_STRING, "^n^n") + } + } + else g_oldmenu[_LEN] = 0 + + g_oldmenu[_KEYS] = 0 + g_oldmenu[_FUNCID] = get_func_id(handler) + if(g_oldmenu[_FUNCID] == -1) + log_to_file(oldmenulog, "public %s() is invalid", handler) + + return (g_oldmenu[_FUNCID] + 1) +} + +stock oldmenu_additem(itemnum, value, const item[], any:...) +{ + new len = min(MAX_ITEM_LEN, MAX_MENU_STRING-g_oldmenu[_LEN]) + + if(numargs() == 3) + g_oldmenu[_LEN] += formatex(g_oldmenu[_MENU][g_oldmenu[_LEN]], len, "%s^n", item) + else { + vformat(g_oldmenu[_MENU][g_oldmenu[_LEN]], len, item, 4) + g_oldmenu[_LEN] = add(g_oldmenu[_MENU], MAX_MENU_STRING, "^n") + } + + if(itemnum != -1) + { + if(itemnum > 9 || itemnum <= 0) itemnum = 9 + else itemnum-- + + g_oldmenu[_ITEMS][itemnum] = value + g_oldmenu[_KEYS] |= (1<= MAX_MENU_STRING) + log_to_file(oldmenulog, "WARNING: Length of the menu exceeds MAX_MENU_STRING(%d) - menu: [%s]", MAX_MENU_STRING, g_oldmenu[_MENU]) + + if(!id) + { + new players[32], count, k + get_players(players, count, "ch") + + for(new i = 0; i < count; i++) + { + for(k=0; k <= 9; k++) g_olmenu_player[players[i]][k] = g_oldmenu[_ITEMS][k] + g_olmenu_player[players[i]][10] = g_oldmenu[_FUNCID] + g_olmenu_player[players[i]][11] = page + + oldmenu_pdata_fix(id) + } + } + else { + for(new k=0; k <= 9; k++) g_olmenu_player[id][k] = g_oldmenu[_ITEMS][k] + g_olmenu_player[id][10] = g_oldmenu[_FUNCID] + g_olmenu_player[id][11] = page + + oldmenu_pdata_fix(id) + } + + show_menu(id, g_oldmenu[_KEYS], g_oldmenu[_MENU], display_time, oldmenuhandler) +} + +stock oldmenu_pdata_fix(id) +{ + // m_iMenu: 205 -- OFFSET_LINUX: 5 + if(pev_valid(id) == 2) + set_pdata_int(id, 205, 0, 5) +} + +public oldmenu_handler(id, key) +{ + new itemnum = (key+1) + if(itemnum > 9) itemnum = 0 + + callfunc_begin_i(g_olmenu_player[id][10], -1) + callfunc_push_int(id) + callfunc_push_int(itemnum) + callfunc_push_int(g_olmenu_player[id][key]) + callfunc_push_int(g_olmenu_player[id][11]) + callfunc_end + + return PLUGIN_HANDLED +} + +stock oldmenu_maxpages(maxitems, perpage=7) +{ + new p = 1, i = perpage + while(maxitems > i) + { + i += perpage + p++ + } + return p +} + +stock oldmenu_calculate_pages(&maxpages, &start, &end, &page, const maxitems, const perpage=7, const start_offset=0) +{ + maxpages = oldmenu_maxpages(maxitems, perpage) + + if(page < 1) page=1 + else if(page > maxpages) page=maxpages + + start = ((page-1)*perpage)+start_offset + end = min(start+perpage, maxitems) +} + +stock oldmenu_pagination(page, maxpages, separation=true) +{ + if(maxpages != 1) + { + if(page > 1) oldmenu_additem(8, -1, "^n\r8. \wAtras") + else oldmenu_additem(-1, 0, "^n\d8. Atras") + if(page < maxpages) oldmenu_additem(9, 1, "\r9. \wSiguiente") + else oldmenu_additem(-1, 0, "\d9. Siguiente") + } + else if(separation) oldmenu_additem(-1, 0, "^n") + + oldmenu_additem(0, 0, "\r0. \wSalir") +} + +stock oldmenu_pagination_y(page, maxpages, separation=true) +{ + if(maxpages != 1) + { + if(page > 1) oldmenu_additem(8, -1, "^n\r8. \yAtras") + else oldmenu_additem(-1, 0, "^n\d8. Atras") + if(page < maxpages) oldmenu_additem(9, 1, "\r9. \ySiguiente") + else oldmenu_additem(-1, 0, "\d9. Siguiente") + } + else if(separation) oldmenu_additem(-1, 0, "^n") + + oldmenu_additem(0, 0, "\r0. \ySalir") +} diff --git a/bin/compiler/include/orpheu.inc b/bin/compiler/include/orpheu.inc new file mode 100644 index 0000000..760ea63 --- /dev/null +++ b/bin/compiler/include/orpheu.inc @@ -0,0 +1,220 @@ + +#if defined _orpheu_included + #endinput +#endif +#define _orpheu_included + +#include + +/** + * Retrieves a function based on a function name + * The name must be the same as the one in the file where the function is defined + * + * @param libFunctionName The name of the function as it is in the file where the function is defined + * @param className The name of the class if the function belongs to one + * + * @return A handler to the function + */ +native OrpheuFunction:OrpheuGetFunction(const libFunctionName[],const className[]="") + +/** + * Hooks a function + * + * @param function A handler to the function + * @param hookFunctionName The function name in the plugin that shall be called upon interception of the original function + * @param phase The phase of the hook. It can have two values. Pre means "right before the original function is called". Post means "right after the original function is called" + * + * @return A handler to the hook + */ +native OrpheuHook:OrpheuRegisterHook(OrpheuFunction:function,const hookFunctionName[],OrpheuHookPhase:phase = OrpheuHookPre) + +/** + * Unregisters a hook (stops it) + * + * @param hook A handler to the hook + */ +native OrpheuUnregisterHook(OrpheuHook:hook) + +/** + * Calls a function without triggering its hooks + * + * @param function A handler to the function + * @param any The arguments of the function + */ +native OrpheuCall(OrpheuFunction:function,any:...) + +/** + * Calls a function and triggers its hooks + * + * @param function A handler to the function + * @param any The arguments of the function + */ +native OrpheuCallSuper(OrpheuFunction:function,any:...) + +/** + * Gets the return value of a function (To be used in hooks Post) + * + * @param any In case the value is multi cell (string or vector), an holder to receive them by ref + * @return In case the value is uni cell, the value itself + */ +native any:OrpheuGetReturn(any:...) + +/** + * Sets the return value of a function + * + * @param any Depending on the type of the return of the function, a value to be used as the return as the original hooked function + */ +native OrpheuSetReturn(any:...) + +/** + * Sets the value of an argument + * + * @param num The number of the argument. The first argument would be the number "1" + * @param any Depending on the type of the argument, a value to be replace it to change the behaviour of the hooked function + */ +native OrpheuSetParam(num,any:...) + +/** + * Creates a struct + * + * @param structType The type of the struct + * + * @return A handler to the struct + */ +native OrpheuStruct:OrpheuCreateStruct(OrpheuStructType:structType) + +/** + * Retrieves the value of a member of a struct given the argument number the struct is and the member name + * + * @param num The number of the argument. The first argument would be the number "1" + * @param memberName The name of the member of the struct we want to deal with + * @param any If the member is multi cell, + * + * @return In case the value is uni cell, the value itself + */ +native OrpheuGetParamStructMember(num,const memberName[],any:...) + +/** + * Sets the value of member of a struct given the argument number the struct is and the member name + * + * @param num The number of the argument. The first argument would be the number "1" + * @param memberName The name of the member of the struct we want to deal with + * @param any The new value + */ +native OrpheuSetParamStructMember(num,const memberName[],any:...) + +/** + * Gets a struct handler for a struct received as an argument + * Beware that if the original struct gets destroyed or changed these effects will reflect on your use of it. + * + * @param num The number of the argument. The first argument would be the number "1" + * + * @return A handler to the struct + */ +native OrpheuStruct:OrpheuGetStructFromParam(num) + +/** + * Creates a struct equal to one received as an argument + * + * @param num The number of the argument. The first argument would be the number "1" + * + * @return A handler to the struct + */ +native OrpheuStruct:OrpheuCloneStructFromParam(num) + +/** + * Sets the value of a member of a struct given a struct handler and the member name + * + * @param struct A handler to the struct + * @param memberName The name of the member of the struct we want to deal with + * @param any The new value + */ +native OrpheuSetStructMember(OrpheuStruct:struct,const memberName[],any:...) + +/** + * Retrieves the value of a member of a struct given a struct handler and the member name + * + * @param struct A handler to the struct + * @param memberName The name of the member of the struct we want to deal with + * @param any In case the value is multi cell (string or vector), an holder to receive them by ref + * + * @return In case the value is uni cell, the value itself + */ +native OrpheuGetStructMember(OrpheuStruct:struct,const memberName[],any:...) + +/** + * Retrieves a handler to a struct that hold the addresses of the engine functions + * By retrieving addresses from the struct is possible to hook them. + * A easier way to achieve the same thing is by using the stock OrpheuGetEngineFunction + + * @return A handler to a struct that holds the engine functions + */ +native OrpheuStruct:OrpheuGetEngineFunctionsStruct() + +/** + * Retrieves a handler to a struct that hold the addresses of the dll functions + * By retrieving addresses from the struct is possible to hook them. + * A easier way to achieve the same thing is by using the stock OrpheuGetDllFunction + + * @return A handler to a struct that holds the dll functions + */ +native OrpheuStruct:OrpheuGetDLLFunctionsStruct() + +/** + * Retrieves a handler to a function given a classname, the function name and the classname + * This function is a virtual function (a function defined in abase class and implemented + * differently by each extender class) + * For example: every class that extends CBaseEntity has a Spawn function. That function is defined in CBaseEntity + * and implemented differently by each class derived from CBaseEntity + * + * @param entityClassName A class related to the object that holds the function wanted to be hooked. Example: "player" + * @param libFunctionName The library function name as it is in the file created to define the function + * @param libClassName The library function name as it is in the file created to define the function + * @return A handler to the function + */ +native OrpheuFunction:OrpheuGetFunctionFromClass(const entityClassName[],const libFunctionName[],const libClassName[]) + +/** + * Retrieves a handler to a function given the ID of an entity, the function name and the classname + * This function is a virtual function (a function defined in abase class and implemented + * differently by each extender class) + * For example: every class that extends CBaseEntity has a Spawn function. That function is defined in CBaseEntity + * and implemented differently by each class derived from CBaseEntity + * + * @param id The id of the entity + * @param libFunctionName The library function name as it is in the file created to define the function + * @param libClassName The library function name as it is in the file created to define the function + * @return A handler to the function + */ +native OrpheuFunction:OrpheuGetFunctionFromEntity(id,const libFunctionName[],const libClassName[]) + +/** + * Retrieves a handler to a function given an object, the function name and the classname + * This function is a virtual function (a function defined in abase class and implemented + * differently by each extender class) + * For example: every class that extends CBaseEntity has a Spawn function. That function is defined in CBaseEntity + * and implemented differently by each class derived from CBaseEntity + * + * @param object An object. More precisely, the address of a C++ object. This should be used for classes that are not entities + * @param libFunctionName The library function name as it is in the file created to define the function + * @param libClassName The library function name as it is in the file created to define the function + * @return A handler to the function + */ +native OrpheuFunction:OrpheuGetFunctionFromObject(object,const libFunctionName[],const libClassName[]) + +/** + * Retrieves a handler to a function given the id of a monster of monstermod, the function name and the classname + * This function is a virtual function (a function defined in abase class and implemented + * differently by each extender class) + * For example: every class that extends CBaseEntity has a Spawn function. That function is defined in CBaseEntity + * and implemented differently by each class derived from CBaseEntity + * + * This function goes against the spirit of orpheu of hardcoding the less possible but without it would be much + * more complex to use virtual functions + * + * @param id The id of a monster from monstermod + * @param libFunctionName The library function name as it is in the file created to define the function + * @param libClassName The library function name as it is in the file created to define the function + * @return A handler to the function + */ +native OrpheuFunction:OrpheuGetFunctionFromMonster(id, const libFunctionName[], const libClassName[]) diff --git a/bin/compiler/include/orpheu_advanced.inc b/bin/compiler/include/orpheu_advanced.inc new file mode 100644 index 0000000..5ce3c39 --- /dev/null +++ b/bin/compiler/include/orpheu_advanced.inc @@ -0,0 +1,77 @@ + +#if defined _orpheu_advanced_included + #endinput +#endif +#define _orpheu_advanced_included + +#include + +/** + * Gets the bytes found at an address + * + * @param address The direct address in memory + * @param bytes An array to hold the bytes + * @param count The number of bytes to get + */ +native OrpheuGetBytesAtAddress(address,bytes[],count) + +/** + * Gets the address in memory of a function given a handler to it + * + * @param function A handler to the function + * + * @return The address o the function + */ +native OrpheuGetFunctionAddress(OrpheuFunction:function) + +/** + * Gets a handle to a struct given an address in memory + * + * @param structType The type of the struct + * @param address The address where the struct is in + * + * @return A handler to the struct + */ +native OrpheuStruct:OrpheuGetStructFromAddress(OrpheuStructType:structType,address) + +/** + * Gets the handler to a function given its address and the name that you give it in the file where you define the function + * + * @param address The address where the function is + * @param libFunctionName The name of the function as it is in the file where the function is defined + * @param className The name of the class if the function belongs to one + * + * @return A handler to the function + */ +native OrpheuFunction:OrpheuCreateFunction(address,const libFunctionName[],const classname[]="") + +/** + * Gets the offset of the adress where the function is located to the base address of its library + * + * @param function A handler to the function + * + * @return The offset + */ +native OrpheuGetFunctionOffset(OrpheuFunction:function) + +/** + * Gets the adress of a library + * + * @param libraryName The name of the library. For the mod library (cstrike,czero,etc) use "mod" + * + * @return The address + */ +native OrpheuGetLibraryAddress(const libraryName[]) + +/** + * This native should retrieve the address of functions called from an address + * For example by passing the address of the function X, and 1 as n, it should retrieve the address of the first + * function called in X. It isn't confirmed to work on every condition and it should be use for experiments only + * to help retrieving functions on Windows + * + * @param address The address to start the search at + * @param number The number of the the call starting at 1 from the address + * + * @return The address of the function called + */ +native OrpheuGetNextCallAtAddress(address,number) diff --git a/bin/compiler/include/orpheu_const.inc b/bin/compiler/include/orpheu_const.inc new file mode 100644 index 0000000..1e8bceb --- /dev/null +++ b/bin/compiler/include/orpheu_const.inc @@ -0,0 +1,49 @@ + +#if defined _orpheu_const_included + #endinput +#endif +#define _orpheu_const_included + +#if AMXX_VERSION_NUM >= 175 + #pragma reqlib orpheu + #if !defined AMXMODX_NOAUTOLOAD + #pragma loadlib orpheu + #endif +#else + #pragma library orpheu +#endif + +const OrpheuFunction:OrpheuInvalidFunction = OrpheuFunction:0 + +enum OrpheuHookReturn +{ + OrpheuIgnored, + OrpheuOverride, + OrpheuSupercede +} + +enum OrpheuHookPhase +{ + OrpheuHookPre, + OrpheuHookPost +} + +enum OrpheuStructType +{ + OrpheuStructMovevars, + OrpheuStructUsercmd, + OrpheuStructMonsterEvent, + OrpheuStructDLL_FUNCTIONS, + OrpheuStructPlayerMove, + OrpheuStructEngineFuncs, + OrpheuStructTraceResult, + OrpheuStructPhysent, + OrpheuStructPmplane, + OrpheuStructPmtrace, + OrpheuStructWeaponData, + OrpheuStructAmmoInfo, + OrpheuStructItemInfo, + OrpheuStructTask, + OrpheuStructSchedule, + OrpheuStructKeyValueData +} diff --git a/bin/compiler/include/orpheu_memory.inc b/bin/compiler/include/orpheu_memory.inc new file mode 100644 index 0000000..0da278f --- /dev/null +++ b/bin/compiler/include/orpheu_memory.inc @@ -0,0 +1,98 @@ + +#if defined _orpheu_memory_included + #endinput +#endif +#define _orpheu_memory_included + +#include + +/* +* To use this functionality you must build files that identify memory locations +* This files go on the folder "configs/orpheu/memory" +* More instructions on Orpheu thread +*/ + +/** + * Replaces data in memory in the full extent of a library + * + * @param memoryDataName The name of the block that qualifies memory as defined in a file at "configs/orpheu/memory" + * @param count The number of occurences to replace. 0 = infinite + * @param any A pair "to be replaced" - "replacement". Pair members must be of the same type + * + * @return The number of replacements made + * + * Example: + * + * Replacing the value 16000 by 100000 in a library + * + * OrpheuMemoryReplace("name",0,16000,100000) (where name should be related to a block of data that qualifies the memory as holding a long value) + * + * Replacing the string "weapon_smokegrenade","weapon_flashbang" + * + * OrpheuMemoryReplace("name",0,"weapon_smokegrenade","weapon_flashbang") (where name should be related to a block of data that qualifies the memory as holding a string) + */ +native OrpheuMemoryReplace(const memoryDataName[],count,any:...) + +/** + * Replaces data in memory.It works like OrpheuMemoryReplace but starts at a given address + * + * @param address The address to start at + * @param memoryDataName The name of the block that qualifies memory as defined in a file at "configs/orpheu/memory" + * @param count The number of occurence. 0 = infinite + * @param any A pair "to be replaced" - "replacement". Pair members must be of the same type + * + * @return The number of replacements made + */ +native OrpheuMemoryReplaceAtAddress(address,const memoryDataNameName[],count,any:...) + + +/** + * Retrieves data in memory. The block of data that qualifies memory must also identify it by having identifier blocks, + * Memory can be located given an offset or a signature + * + * @param memoryDataName The name of the block that qualifies memory as defined in a file at "configs/orpheu/memory" + * @param any If the type of the memory location is passed by ref, the variables needed to get the value + * You can give an extra argument to retrieve the address where the data retrieved lies + * + * @return If the type of the memory location is not passed by ref, its value + */ +native OrpheuMemoryGet(const memoryDataName[],any:...) + +/** + * Retrieves data in memory. It works like OrpheuMemoryGet but starts at a given address + * + * @param address The address to start at + * @param memoryDataName The name of the block that qualifies memory as defined in a file at "configs/orpheu/memory" + * @param any If the type of the memory location is passed by ref, the variables needed to get the value + * You can give an extra argument to retrieve the address where the data retrieved lies + * + * @return If the type of the memory location is not passed by ref, its value + */ +native OrpheuMemoryGetAtAddress(address,const memoryDataName[],any:...) + +/** + * Alters data in memory. The block of data that qualifies memory must also identify it by having identifier blocks. + * Memory can be located given an offset or a signature + * + * @param memoryDataName The name of the block that qualifies memory as defined in a file at "configs/orpheu/memory" + * @param count The number of occurences to alter. 0 = infinite + * @param any The value to use as replacement + * You can give an extra argument to retrieve the address where the data retrieved lies + * + * @return Number of occurences replaced + */ +native OrpheuMemorySet(const memoryDataName[],count,any:...) + +/** + * Alters data in memory. It works like OrpheuMemorySet but starts at a given address + * + * @param address The address to start at + * @param memoryDataName The name of the block that qualifies memory as defined in a file at "configs/orpheu/memory" + * @param count The number of occurences to alter. 0 = infinite + * @param any The value to use as replacement + * You can give an extra argument to retrieve the address where the data retrieved lies + * + * @return Number of occurences replaced + */ +native OrpheuMemorySetAtAddress(address,const memoryDataName[],count,any:...) + diff --git a/bin/compiler/include/orpheu_stocks.inc b/bin/compiler/include/orpheu_stocks.inc new file mode 100644 index 0000000..1fff708 --- /dev/null +++ b/bin/compiler/include/orpheu_stocks.inc @@ -0,0 +1,75 @@ + +#if defined _orpheu_stocks_included + #endinput +#endif +#define _orpheu_stocks_included + +#include +#include +#include + + +/** + * Retrieves an engine function handler by having its name as a member of the struct that hold + * engine functions and the name that you give it in the file where you define the function + * The name must be the same as the one in the file where the function is defined + * + * @param memberName The name of the member of the struct that holds the address of the function + * Example: pfnPrecacheModel + * The struct representation can be seen in hlsdk at multiplayer/engine/eiface.h with the name "enginefuncs_s" + * + * @param libFunctionName The name of the function as it is in the file where the function is defined + * + * @return A handler to the function + */ +stock OrpheuFunction:OrpheuGetEngineFunction(const memberName[],const libFunctionName[]) +{ + static OrpheuStruct:engineFunctions + + if(!engineFunctions) + { + engineFunctions = OrpheuGetEngineFunctionsStruct() + } + + return OrpheuCreateFunction( OrpheuGetStructMember(engineFunctions,memberName),libFunctionName ) +} + +/** + * Retrieves a dll function handler by having its name as a member of the struct that hold + * dll functions and the name that you give it in the file where you define the function + * The name must be the same as the one in the file where the function is defined + * + * @param memberName The name of the member of the struct that holds the address of the function + * Example: pfnGameInit + * The struct representation can be seen in hlsdk at multiplayer/engine/eiface.h with the name "DLL_FUNCTIONS" + * + * @param libFunctionName The name of the function as it is in the file where the function is defined + * + * @return A handler to the function + */ +stock OrpheuFunction:OrpheuGetDLLFunction(const memberName[],const libFunctionName[]) +{ + static OrpheuStruct:OrpheuDLLFunctions + + if(!OrpheuDLLFunctions) + { + OrpheuDLLFunctions = OrpheuGetDLLFunctionsStruct() + } + + return OrpheuCreateFunction( OrpheuGetStructMember(OrpheuDLLFunctions,memberName),libFunctionName ) +} + +stock OrpheuHook:OrpheuRegisterHookFromClass(const entityClassName[],const libFunctionName[],const libClassName[],const hookFunctionName[],OrpheuHookPhase:phase = OrpheuHookPre) +{ + return OrpheuRegisterHook(OrpheuGetFunctionFromClass(entityClassName,libFunctionName,libClassName),hookFunctionName,phase) +} + +stock OrpheuHook:OrpheuRegisterHookFromEntity(id,const libFunctionName[],const libClassName[],const hookFunctionName[],OrpheuHookPhase:phase = OrpheuHookPre) +{ + return OrpheuRegisterHook(OrpheuGetFunctionFromEntity(id,libFunctionName,libClassName),hookFunctionName,phase) +} + +stock OrpheuHook:OrpheuRegisterHookFromObject(object,const libFunctionName[],const libClassName[],const hookFunctionName[],OrpheuHookPhase:phase = OrpheuHookPre) +{ + return OrpheuRegisterHook(OrpheuGetFunctionFromObject(object,libFunctionName,libClassName),hookFunctionName,phase) +} diff --git a/bin/compiler/include/reapi.inc b/bin/compiler/include/reapi.inc new file mode 100644 index 0000000..1616029 --- /dev/null +++ b/bin/compiler/include/reapi.inc @@ -0,0 +1,328 @@ +#if defined _reapi_included + #endinput +#endif + +#define _reapi_included + +#if AMXX_VERSION_NUM >= 175 + #pragma reqlib reapi + #if !defined AMXMODX_NOAUTOLOAD + #pragma loadlib reapi + #endif +#else + #pragma library reapi +#endif + +enum hooks_tables_e +{ + ht_engine, + ht_gamedll, + ht_animating, + ht_player, + ht_gamerules, + ht_rechecker, + ht_grenade, + ht_weaponbox, + ht_weapon, + ht_gib, + ht_cbaseentity, + ht_botmanager +}; + +enum members_tables_e +{ + mt_gamerules, + mt_base, + mt_animating, + mt_basemonster, + mt_player, + mt_entvars, + mt_playermove, + mt_movevars, + mt_usercmd, + mt_pmtrace, + mt_csplayer, + mt_baseitem, + mt_baseweapon, + mt_weaponbox, + mt_armoury, + mt_grenade, + mt_p228, + mt_scout, + mt_hegrenade, + mt_xm1014, + mt_c4, + mt_mac10, + mt_aug, + mt_smokegrenade, + mt_elite, + mt_fiveseven, + mt_ump45, + mt_sg550, + mt_galil, + mt_famas, + mt_usp, + mt_glock18, + mt_awp, + mt_mp5n, + mt_m249, + mt_m3, + mt_m4a1, + mt_tmp, + mt_g3sg1, + mt_deagle, + mt_sg552, + mt_ak47, + mt_knife, + mt_p90, + mt_shield, + mt_rebuystruct, + mt_mapinfo, + mt_csplayerweapon, + mt_gib, + mt_netadr, + mt_csentity, + mt_netchan +}; + +#define ReAPIFunc {EngineFunc, GamedllFunc, GamedllFunc_CBaseAnimating, GamedllFunc_CBasePlayer, GamedllFunc_CSGameRules, GamedllFunc_CGrenade, GamedllFunc_CWeaponBox, ReCheckerFunc, GamedllFunc_CBasePlayerWeapon, GamedllFunc_CGib, GamedllFunc_CBaseEntity, GamedllFunc_CBotManager} + +// Is like FNullEnt +#define is_nullent(%0) (%0 == 0 || is_entity(%0) == false) + +#define MAX_REGION_RANGE 1024 + +#define BEGIN_FUNC_REGION(%0) (any:MAX_REGION_RANGE * hooks_tables_e:ht_%0) +#define BEGIN_MEMBER_REGION(%0) (any:MAX_REGION_RANGE * members_tables_e:mt_%0) + +#include + +#include +#include // @note: only for ReHLDS +#include // @note: only for gamedll Counter-Strike (ReGameDLL_CS) + +// If you want to use s/get_member unsafe version, +// then macro MEMBER_UNSAFE must be defined before including header reapi.inc +#if !defined(MEMBER_UNSAFE) + #define set_member set_member_s + #define get_member get_member_s +#endif + +// addons +#include +#include +#include + +/** +* Hookchain return types +*/ +enum +{ + HC_CONTINUE = 0, // Plugin didn't take any action + HC_SUPERCEDE, // Skip real function, use my return value + HC_BREAK // Skip all forwards and real function, use my return value + // @note Warning: Be very careful, using this type of return will skip calls for all following AMXX plugins +}; + +/** +* Hookchain argument types +*/ +enum AType +{ + ATYPE_INTEGER = 0, + ATYPE_FLOAT, + ATYPE_STRING, + ATYPE_CLASSPTR, + ATYPE_EDICT, + ATYPE_EVARS, + ATYPE_BOOL, + ATYPE_VECTOR, + ATYPE_TRACE +}; + +enum HookChain +{ + INVALID_HOOKCHAIN = 0 +}; + +/* +* Hook API function that are available into enum. +* Look at the enums for parameter lists. +* +* @param function The function to hook +* @param callback The forward to call +* @param post Whether or not to forward this in post +* +* @return Returns a hook handle. Use EnableHookChain/DisableHookChain to toggle the forward on or off +*/ +native HookChain:RegisterHookChain(ReAPIFunc:function_id, const callback[], post = 0); + +/* +* Stops a hook from triggering. +* Use the return value from RegisterHookChain as the parameter here! +* +* @param hook The hook to stop +* +*/ +native bool:DisableHookChain(HookChain:hook); + +/* +* Starts a hook back up. +* Use the return value from RegisterHookChain as the parameter here! +* +* @param hook The hook to re-enable +* +* @return Returns true if the function is successfully executed, otherwise false +*/ +native bool:EnableHookChain(HookChain:hook); + +/* +* Sets the return value of a hookchain. +* +* @param type To specify the ATYPE_* parameter, look at the enum AType +* @param value The value to set the return to +* +*/ +native SetHookChainReturn(AType:type, any:...); + +/* +* Gets the return value of the current hookchain. +* This has no effect in pre hookchain. +* +* @param type To specify the ATYPE_* parameter, look at the enum AType +* @param [maxlen] Max length of string (optional) +* +* @return If an integer or boolean or one byte or float, array or everything else is passed via 1st argument and more +*/ +native any:GetHookChainReturn(AType:type, any:...); + +/* +* Set hookchain argument. +* This has no effect in post hookchain. +* +* @param number Number of argument +* @param value New value +* @param [maxlen] Max length of string (optional) +* +* @return Returns true if the function is successfully executed, otherwise false +*/ +native SetHookChainArg(number, AType:type, any:...); + +/* +* Return call state of original API function (that are available into enum). +* Look at the enums for parameter lists. +* +* @param func The function to get state +* +* @return Returns true if the original function was called, otherwise false +*/ +native bool:IsReapiHookOriginalWasCalled(ReAPIFunc:function_id); + +/* +* Returns the current hookchain handle. +* +* @return Returns the hook handle +*/ +native HookChain:GetCurrentHookChainHandle(); + +/* +* Compares the entity to a specified classname. +* @note This native also checks the validity of an entity. +* +* @return true/false +*/ +native bool:FClassnameIs(const entityIndex, const className[]); + +/* +* To get WeaponIdType from grenade entity +* +* @param entity Grenade entity +* +* @return return enum's of WeaponIdType +*/ +native WeaponIdType:GetGrenadeType(const entityIndex); + +/* +* Sets the view entity on a client. +* This allows pfnSetView able to hooks. +* +* @param index Client index +* @param viewEntity Entity index +* +*/ +native engset_view(const index, const viewEntity); + +/* +* Gets the return index of the current view entity on a client. +* +* @param index Client index +* +*/ +native get_viewent(const index); + +/* +* Check if the entity is valid. +* +* @return true/false +*/ +native bool:is_entity(const entityIndex); + +/* +* Check if ReHLDS is available. +* +* @return true/false +*/ +native bool:is_rehlds(); + +/* +* Check if ReGameDLL is available. +* +* @return true/false +*/ +native bool:is_regamedll(); + +/* +* Check if Reunion is available. +* +* @return true/false +* +*/ +native bool:has_reunion(); + +/* +* Check if VTC is available. +* +* @return true/false +*/ +native bool:has_vtc(); + +/* +* Check if Rechecker is available. +* +* @return true/false +*/ +native bool:has_rechecker(); + +/* +* This is the callback from the module that gives major/minor versions for verifying compatibility for ReAPI versions. +* If an AMXX plugin gets a failure, then you do need to upgrade to the latest version of the ReAPI module or update the files included for AMXX plugins. +* Do not modify this! +*/ +public __reapi_version_check(const majorVersion, const minorVersion) +{ + if (majorVersion != REAPI_VERSION_MAJOR) + { + new temp[512]; + formatex(temp, sizeof temp - 1, "[ReAPI]: Api major version mismatch; expected %d, real %d", REAPI_VERSION_MAJOR, majorVersion); + set_fail_state(temp); + return; + } + + if (minorVersion < REAPI_VERSION_MINOR) + { + new temp[512]; + formatex(temp, sizeof temp - 1, "[ReAPI]: Api minor version mismatch; expected at least %d, real %d", REAPI_VERSION_MINOR, minorVersion); + set_fail_state(temp); + return; + } +} diff --git a/bin/compiler/include/reapi_engine.inc b/bin/compiler/include/reapi_engine.inc new file mode 100644 index 0000000..be36a7d --- /dev/null +++ b/bin/compiler/include/reapi_engine.inc @@ -0,0 +1,459 @@ +#if defined _reapi_engine_included + #endinput +#endif + +#define _reapi_engine_included + +#include + +/* +* Sets entvars data for an entity. +* Use the var_* EntVars enum +*/ +native set_entvar(const index, const EntVars:var, any:...); + +/* +* Returns entvar data from an entity. +* Use the var_* EntVars enum +*/ +native any:get_entvar(const index, const EntVars:var, any:...); + +/* +* Sets usercmd data. +* Use the ucmd_* UCmd enum +*/ +native set_ucmd(const ucmd, const UCmd:var, any:...); + +/* +* Returns usercmd data from an entity. +* Use the ucmd_* UCmd enum +*/ +native any:get_ucmd(const ucmd, const UCmd:var, any:...); + +/* +* Sets netchan data. +* Use the net_* NetChan enum +*/ +native set_netchan(const index, const NetChan:var, any:...); + +/* +* Returns metchan data from an client. +* Use the net_* NetChan enum +*/ +native any:get_netchan(const index, const NetChan:var, any:...); + +/* +* Sets a NetAdr var. +* +* @param var The specified mvar, look at the enum NetAdrVars +* +* @return 1 on success. +*/ +native set_netadr(const adr, const NetAdrVars:var, any:...); + +/* +* Returns a NetAdr var +* +* @param var The specified mvar, look at the enum NetAdrVars +* +* @return If an integer or boolean or one byte, array or everything else is passed via the 3rd argument and more, look at the argument list for the specified mvar +*/ +native any:get_netadr(const adr, const NetAdrVars:var, any:...); + +/* +* Gets value for key in buffer +* +* @param pbuffer Pointer to buffer +* @param key Key string +* @param value Buffer to copy value to +* @param maxlen Maximum size of the buffer +* +* @return Number of cells written to buffer +* @error If invalid buffer handler provided, an error will be thrown. +*/ +native get_key_value(const pbuffer, const key[], const value[], const maxlen); + +/* +* Sets value for key in buffer +* +* @param pbuffer Pointer to buffer +* @param key Key string +* @param value Value to set +* +* @noreturn +* @error If invalid buffer handler provided, an error will be thrown. +*/ +native set_key_value(const pbuffer, const key[], const value[]); + +/* +* Gets an AMXX string buffer from a infobuffer pointer +* +* @param buffer Info string pointer +* @param value String to copy value to +* @param maxlen Maximum size of the output buffer +* +* @return Returns a string buffer on infobuffer pointer +*/ +native get_key_value_buffer(const pbuffer, const output[], const maxlen); + +/* +* Sets value string to entire buffer +* +* @param buffer Pointer to buffer +* @param value Value to set +* @param maxlen Maximum size of the value buffer to set, -1 means copy all characters +* +* @return 1 on success, 0 otherwise +*/ +native set_key_value_buffer(const pbuffer, const value[], const maxlen = -1); + +/* +* Gets the position of the bone +* +* @param entity Entity index +* @param bone Number of the bone +* @param vecOrigin Array to store origin in +* @param vecAngles Array to store angles in +* +* @return 1 on success, 0 otherwise +* @error If the index is not within the range of 1 to maxEntities or +* the entity is not valid, an error will be thrown. +*/ +native GetBonePosition(const entity, const bone, Float:vecOrigin[3], Float:vecAngles[3] = {0.0, 0.0, 0.0}); + +/* +* Gets the position of the attachment +* +* @param entity Entity index +* @param attachment Number of the attachment +* @param vecOrigin Array to store origin in +* @param vecAngles Array to store angles in +* +* @return 1 on success, 0 otherwise +* @error If the index is not within the range of 1 to maxEntities or +* the entity is not valid, an error will be thrown. +*/ +native GetAttachment(const entity, const attachment, Float:vecOrigin[3], Float:vecAngles[3] = {0.0, 0.0, 0.0}); + +/* +* Sets body group value based on entity's model group +* +* @param entity Entity index +* @param group Number of entity's model group index +* @param value Value to assign +* +* @return 1 on success, 0 otherwise +* @error If the index is not within the range of 1 to maxEntities or +* the entity is not valid, an error will be thrown. +* +*/ +native SetBodygroup(const entity, const group, const value); + +/* +* Gets body group value based on entity's model group +* +* @param entity Entity index +* @param group Number of entity's model group index +* +* @return Body group value +* @error If the index is not within the range of 1 to maxEntities or +* the entity is not valid, an error will be thrown. +* +*/ +native GetBodygroup(const entity, const group); + +/* +* Gets sequence information based on entity's model current sequence index +* +* @param entity Entity index +* @param piFlags Sequence flags (1 = sequence loops) +* @param pflFrameRate Sequence framerate +* @param pflGroundSpeed Sequence ground speed +* +* @return True on success, false otherwise +* @error If the index is not within the range of 1 to maxEntities or +* the entity is not valid, an error will be thrown. +* +*/ +native bool:GetSequenceInfo(const entity, &piFlags, &Float:pflFrameRate, &Float:pflGroundSpeed); + +/* +* Test visibility of an entity from a given origin using either PVS or PAS +* +* @param entity Entity index +* @param origin Vector representing the origin from which visibility is checked +* @param type Type of visibility check: VisibilityInPVS (Potentially Visible Set) or VisibilityInPAS (Potentially Audible Set) +* +* @return 0 - Not visible +* 1 - Visible, passed by a leafnum +* 2 - Visible, passed by a headnode +* +* @remarks This function checks the visibility of the specified entity from the given origin, using either +* the Potentially Visible Set (PVS) or the Potentially Audible Set (PAS) depending on the provided type +*/ +native CheckVisibilityInOrigin(const ent, Float:origin[3], CheckVisibilityType:type = VisibilityInPVS); + +/* +* Sets the name of the map. +* +* @param mapname New map name. +* +* @noreturn +*/ +native rh_set_mapname(const mapname[]); + +/* +* Gets the name of the map. +* +* @param output Buffer to copy map name to +* @param len Maximum buffer size +* @param type MNT_SET will return the name of the current map +* MNT_TRUE will return the original map name independant of the name set with via rh_set_mapname +* +* @noreturn +*/ +native rh_get_mapname(output[], len, MapNameType:type = MNT_SET); + +/* +* Reverts back the original map name. +* +* @noreturn +*/ +native rh_reset_mapname(); + +/* +* Emits a sound from an entity from the engine. +* +* @param entity Entity index or use 0 to emit from worldspawn at the specified position +* @param recipient Recipient index or use 0 to make all clients hear it +* @param channel Channel to emit from +* @param sample Sound file to emit +* @param vol Volume in percents +* @param attn Sound attenuation +* @param flags Emit flags +* @param pitch Sound pitch +* @param emitFlags Additional Emit2 flags, look at the defines like SND_EMIT2_* +* @param origin Specify origin and only on "param" entity worldspawn that is 0 +* +* @return true if the emission was successfull, false otherwise +*/ +native bool:rh_emit_sound2(const entity, const recipient, const channel, const sample[], Float:vol = VOL_NORM, Float:attn = ATTN_NORM, const flags = 0, const pitch = PITCH_NORM, emitFlags = 0, const Float:origin[3] = {0.0,0.0,0.0}); + +/* +* Forces an userinfo update +* +* @param index Client index +* +* @noreturn +*/ +native rh_update_user_info(const index); + +/* +* Kicks a client from server with message +* +* @param index Client index +* @param message Message that will be sent to client when it is deleted from server +* +* @noreturn +* +*/ +native rh_drop_client(const index, const message[] = ""); + +/* +* - +* +* @param output Buffer to copy the ip address +* @param len Maximum buffer size +* +* @noreturn +* +*/ +native rh_get_net_from(output[], len); + +/* +* Returns client's netchan playing time in seconds. +* +* @param index Client index +* +* @return Netchan connection time in seconds or 0 if client index is invalid or client is not connected +*/ +native rh_get_client_connect_time(const index); + +/* +* Checks if a specific entity is fully packed in a given frame for a host client. +* +* @param index Client index for whom we are checking the entity. +* @param entity Entity index to find in the table of entities for the given frame. +* @param frame Frame index where to look. Default is -1, which checks the previous frame. +* @note To check in the current frame, this native should be called at the end of the server frame. +* +* @return Returns true if the entity is fully packed and ready to be sent to all clients in the given frame, otherwise false. +*/ +native bool:rh_is_entity_fullpacked(const host, const entity, const frame = -1); + +/* +* Get real game time throughout the entire server lifecycle. +* +* @return Real game time +*/ +native Float:rh_get_realtime(); + +enum MessageHook +{ + INVALID_MESSAGEHOOK = 0 +}; + +/** +* Registers a callback function to be called when a game message with the specified ID is received. +* +* @param msg_id The ID of the message to register the callback for. +* @param callback The name of the callback function. +* @param post Whether the callback should be invoked before or after processing the message. (optional) +* +* @note The callback arguments have: +* msg_id - Message id +* msg_dest - Destination type (see MSG_* constants in messages_const.inc) +* msg_entity - Entity receiving the message +* +* @note You can modify the message content using SetMessageData native before the original function is invoked. +* Also can reading the message content using GetMessageData native. +* +* In the callback function, use the return values from Hookchain return types, such as HC_CONTINUE, HC_SUPERCEDE, etc. +* to control the flow of message processing. +* +* @return Returns a handle to the registered message hook. +*/ +native MessageHook:RegisterMessage(const msg_id, const callback[], post = 0); + +/** +* Unregisters a game message hook identified by the specified handle. +* +* @param handle The handle of the message hook to unregister. +* +* @return Returns true if the message hook is successfully unregistered, otherwise false. +*/ +native bool:UnregisterMessage(const MessageHook:handle); + +/** +* Enables a game message hook identified by the specified handle. +* +* @param handle The handle of the message hook to enable. +* +* @return Returns true if the message hook is successfully enabled, otherwise false. +*/ +native bool:EnableHookMessage(const MessageHook:handle); + +/** +* Disables a game message hook identified by the specified handle. +* +* @param handle The handle of the message hook to disable. +* +* @return Returns true if the message hook is successfully disabled, otherwise false. +*/ +native bool:DisableHookMessage(const MessageHook:handle); + +/** +* Sets the message data in the current game message. +* +* @param type The type of the message data that can be changed +* @param ... Additional args depending on the type of the message argument being retrieved (For more details, look at the enum MsgArgType) +* +* @return Returns true if the message data is successfully set, otherwise false. +*/ +native bool:SetMessageData(const MsgDataType:type, any:...); + +/** +* Gets the message data value in the current game message +* +* @param type The type of message data that can be get +* @param ... Additional args depending on the type of the message argument being retrieved (For more details, look at the enum MsgArgType) +* +* @return Returns value of argument in the current message +*/ +native any:GetMessageData(const MsgDataType:type, any:...); + +/** +* Gets the message data original value in the current game message. +* +* @param type The type of message data that can be get +* @param ... Additional args depending on the type of the message argument being retrieved (For more details, look at the enum MsgArgType) +* +* @return Returns original value of argument in the current message +*/ +native any:GetMessageOrigData(const MsgDataType:type, any:...); + +/** +* Retrieves the type of the argument at the specified number in the current game message. +* +* @param number The number of the argument to retrieve the type for. +* +* @return Returns the type of the argument, look at the enum MsgArgType +*/ +native MsgArgType:GetMessageArgType(const number); + +/** +* Retrieves the number of argument in the current game message. +* +* @return Returns the number of argument in the current game message. +*/ +native GetMessageArgsNum(); + +/** +* Sets the block type for the specified message ID. +* +* @param msgid The ID of the message to set the block type for. +* @param type The type of block to set for the message, look at the enum MsgBlockType +* +* @return Returns true if the block type is successfully set, otherwise false. +*/ +native bool:SetMessageBlock(const msgid, MsgBlockType:type); + +/** +* Retrieves the block type for the specified message ID. +* +* @param msgid The ID of the message to retrieve the block type for. +* +* @return Returns the block type of the specified message, look at the enum MsgBlockType +*/ +native MsgBlockType:GetMessageBlock(const msgid); + +/** +* Checks if the specified type of message data has been modified +* +* This native allows you to check if any part of the message data, such as its +* destination, type, origin, receiver, or any the specific argument of the message, has been modified +* +* @param type The type of the data to check for modification +* This can be one of the following: +* - MsgAny: Check if any part of the message has been modified +* - MsgDest: Check if the destination has been modified +* - MsgIndex: Check if the message ID has been modified +* - MsgOrigin: Check if the origin has been modified +* - MsgTargetId: Check if the index of the recipient client has been modified +* - MsgArg: Check if a specific argument of the message has been modified +* +* @param number The number of the argument to check for modification (used only when type is MsgDataType:MsgArg) +* Default value is -1, which means the argument number is not applicable +* +* @return Returns true if the specified data type has been modified, false otherwise +*/ +native bool:IsMessageDataModified(MsgDataType:type = MsgAny, const number = -1); + +/** +* Resets a specific type of message data to its original value +* +* @param type The type of the data to check for modification +* This can be one of the following: +* - MsgAny: Reset all modified message data to its original values +* - MsgDest: Reset the destination to its original value +* - MsgIndex: Reset the message ID to its original value +* - MsgOrigin: Reset the origin to its original value +* - MsgTargetId: Reset the index of the recipient client to its original value +* - MsgArg: Reset a specific argument of the message to its original value +* +* @param number The number of the argument to reset (used only when type is MsgDataType:MsgArg) +* Default value is -1, which means all arguments will be reset. +* +* @return Returns true if the modified data type was reset, otherwise false. +*/ +native bool:ResetModifiedMessageData(MsgDataType:type = MsgAny, const number = -1); diff --git a/bin/compiler/include/reapi_engine_const.inc b/bin/compiler/include/reapi_engine_const.inc new file mode 100644 index 0000000..eee1f36 --- /dev/null +++ b/bin/compiler/include/reapi_engine_const.inc @@ -0,0 +1,1538 @@ +#if defined _reapi_engine_const_included + #endinput +#endif + +#define _reapi_engine_const_included + +/** +* For native rh_get_mapname +*/ +enum MapNameType +{ + MNT_TRUE, // return the original map name independant of the name set with via rh_set_mapname + MNT_SET // return the name of the current map +}; + +/** +* For native CheckVisibilityInOrigin +*/ +enum CheckVisibilityType +{ + VisibilityInPVS = 0, // Check in Potentially Visible Set (PVS) + VisibilityInPAS // Check in Potentially Audible Set (PAS) +}; + +/** +* For RH_SV_AddResource hook +*/ +enum ResourceType_t +{ + t_sound = 0, + t_skin, + t_model, + t_decal, + t_generic, + t_eventscript, + t_world, // Fake type for world, is really t_model + rt_unk, + + rt_max +}; + +/** +* rh_emit_sound2 flags +*/ +#define SND_EMIT2_NOPAS BIT(0) // Never to check PAS +#define SND_EMIT2_INVOKER BIT(1) // Do not send to the client invoker + +/** +* enum EngineFunc +*/ +enum EngineFunc +{ + /* + * Description: - + * Params: (const recipients, const entity, const channel, const sample[], const volume, Float:attenuation, const fFlags, const pitch) + */ + RH_SV_StartSound = BEGIN_FUNC_REGION(engine), + + /* + * Description: - + * Params: (const client, bool:crash, const fmt[]) + */ + RH_SV_DropClient, + + /* + * Description: - + * Params: (const runPhysics) + */ + RH_SV_ActivateServer, + + /* + * Description: - + * Params: (pcvar, const value[]) + */ + RH_Cvar_DirectSet, + + /* + * Description: Receiver is player index or 0 when update will be sended to all. + * Params: (const client, buffer, const receiver) + */ + RH_SV_WriteFullClientUpdate, + + /* + * Description: - + * Params: (const classname[]) + */ + RH_GetEntityInit, + + /* + * Description: Called after processing a client connection request. + * Params: (const client) + */ + RH_ClientConnected, + + /* + * Description: Called when processing a 'connect' client connectionless packet. + * Params: () + */ + RH_SV_ConnectClient, + + /* + * Description: Called when client it's in the scoreboard + * Params: (const client) + */ + RH_SV_EmitPings, + + /* + * Description: Called when an entity is created. + * Return type: Edict * (Entity index) + * Params: () + */ + RH_ED_Alloc, + + /* + * Description: Called when an entity is removed (freed from server). + * Params: (const entity) + */ + RH_ED_Free, + + /* + * Description: Called when a message is being sent to the server's console. + * Params: (const string[]) + */ + RH_Con_Printf, + + /* + * Description: Called when a player's userinfo is being checked. + * Params: (adr, buffer, bool:reconnect, reconnectSlot, name[]) + * + * @note Param adr is unused, guaranteed to return nothing also, don't send anything through it. + * @note In order for param name work, hook needs to be registered as Post. + */ + RH_SV_CheckUserInfo, + + /* + * Description: Called when a generic resource is being added to generic precache list. + * Return type: int + * Params: (const string[]) + */ + RH_PF_precache_generic_I, + + /* + * Description: Called when a model is being added to model precache list. + * Return type: int + * Params: (const string[]) + */ + RH_PF_precache_model_I, + + /* + * Description: Called when a sound is being added to sound precache list. + * Return type: int + * Params: (const string[]) + */ + RH_PF_precache_sound_I, + + /* + * Description: Called when an event is being added to event precache list. + * Return type: int + * Params: (const string[]) + */ + RH_EV_Precache, + + /* + * Description: Called when a resource is being added to resource list. + * Params: (ResourceType_t:type, const filename[], size, flags, index) + */ + RH_SV_AddResource, + + /* + * Description: Called when message is being printed to client console. + * Params: (const string[]) + */ + RH_SV_ClientPrintf, + + /* + * Description: Called before adding an entity to the physents of a player. + * Return type: bool + * Params: (const entity, const client) + */ + RH_SV_AllowPhysent, + + /* + * Description: Called when a command is being sent to server. + * Params: (const cmd[], source, id) + */ + RH_ExecuteServerStringCmd, + + /* + * Description: Called when server sends resources list and location. + * Params: (const client) + */ + RH_SV_SendResources, + +}; + +/** +* enum EntVars +*/ +enum EntVars +{ + /* + * Description: - + * Member type: string_t + * Get params: get_entvar(index, EntVars:var, dest[], const lenght); + * Set params: set_entvar(index, EntVars:var, const source[]); + */ + var_classname = BEGIN_MEMBER_REGION(entvars), + + /* + * Description: - + * Member type: string_t + * Get params: get_entvar(index, EntVars:var, dest[], const lenght); + * Set params: set_entvar(index, EntVars:var, const source[]); + */ + var_globalname, + + /* + * Description: - + * Member type: class Vector + * Get params: get_entvar(index, EntVars:var, Float:output[3]); + * Set params: set_entvar(index, EntVars:var, Float:dest[3]); + */ + var_origin, + + /* + * Description: - + * Member type: class Vector + * Get params: get_entvar(index, EntVars:var, Float:output[3]); + * Set params: set_entvar(index, EntVars:var, Float:dest[3]); + */ + var_oldorigin, + + /* + * Description: - + * Member type: class Vector + * Get params: get_entvar(index, EntVars:var, Float:output[3]); + * Set params: set_entvar(index, EntVars:var, Float:dest[3]); + */ + var_velocity, + + /* + * Description: - + * Member type: class Vector + * Get params: get_entvar(index, EntVars:var, Float:output[3]); + * Set params: set_entvar(index, EntVars:var, Float:dest[3]); + */ + var_basevelocity, + + /* + * Description: Base velocity that was passed in to server physics so client can predict conveyors correctly. Server zeroes it, so we need to it store here, too. + * Member type: class Vector + * Get params: get_entvar(index, EntVars:var, Float:output[3]); + * Set params: set_entvar(index, EntVars:var, Float:dest[3]); + */ + var_clbasevelocity, + + /* + * Description: - + * Member type: class Vector + * Get params: get_entvar(index, EntVars:var, Float:output[3]); + * Set params: set_entvar(index, EntVars:var, Float:dest[3]); + */ + var_movedir, + + /* + * Description: Angles model. + * Member type: class Vector + * Get params: get_entvar(index, EntVars:var, Float:output[3]); + * Set params: set_entvar(index, EntVars:var, Float:dest[3]); + */ + var_angles, + + /* + * Description: Angle velocity (degrees per second). + * Member type: class Vector + * Get params: get_entvar(index, EntVars:var, Float:output[3]); + * Set params: set_entvar(index, EntVars:var, Float:dest[3]); + */ + var_avelocity, + + /* + * Description: Auto-decaying view angle adjustment. + * Member type: class Vector + * Get params: get_entvar(index, EntVars:var, Float:output[3]); + * Set params: set_entvar(index, EntVars:var, Float:dest[3]); + */ + var_punchangle, + + /* + * Description: View angle (player only). + * Member type: class Vector + * Get params: get_entvar(index, EntVars:var, Float:output[3]); + * Set params: set_entvar(index, EntVars:var, Float:dest[3]); + */ + var_v_angle, + + /* + * Description: - + * Member type: class Vector + * Get params: get_entvar(index, EntVars:var, Float:output[3]); + * Set params: set_entvar(index, EntVars:var, Float:dest[3]); + */ + var_endpos, + + /* + * Description: - + * Member type: class Vector + * Get params: get_entvar(index, EntVars:var, Float:output[3]); + * Set params: set_entvar(index, EntVars:var, Float:dest[3]); + */ + var_startpos, + + /* + * Description: - + * Member type: float + * Get params: Float:get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, Float:value); + */ + var_impacttime, + + /* + * Description: - + * Member type: float + * Get params: Float:get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, Float:value); + */ + var_starttime, + + /* + * Description: 0:nothing, 1:force view angles, 2:add avelocity + * Member type: int + * Get params: get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, value); + */ + var_fixangle, + + /* + * Description: - + * Member type: float + * Get params: Float:get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, Float:value); + */ + var_idealpitch, + + /* + * Description: - + * Member type: float + * Get params: Float:get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, Float:value); + */ + var_pitch_speed, + + /* + * Description: - + * Member type: float + * Get params: Float:get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, Float:value); + */ + var_ideal_yaw, + + /* + * Description: - + * Member type: float + * Get params: Float:get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, Float:value); + */ + var_yaw_speed, + + /* + * Description: - + * Member type: int + * Get params: get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, value); + */ + var_modelindex, + + /* + * Description: - + * Member type: string_t + * Get params: get_entvar(index, EntVars:var, dest[], const lenght); + * Set params: set_entvar(index, EntVars:var, const source[]); + */ + var_model, + + /* + * Description: Player's viewmodel. + * Member type: string_t + * Get params: get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, const source[]); + */ + var_viewmodel, + + /* + * Description: The model that other players see. + * Member type: string_t + * Get params: get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, const source[]); + */ + var_weaponmodel, + + /* + * Description: BB min translated to world coord. + * Member type: class Vector + * Get params: get_entvar(index, EntVars:var, Float:output[3]); + * Set params: set_entvar(index, EntVars:var, Float:dest[3]); + */ + var_absmin, + + /* + * Description: BB max translated to world coord. + * Member type: class Vector + * Get params: get_entvar(index, EntVars:var, Float:output[3]); + * Set params: set_entvar(index, EntVars:var, Float:dest[3]); + */ + var_absmax, + + /* + * Description: Local BB min. + * Member type: class Vector + * Get params: get_entvar(index, EntVars:var, Float:output[3]); + * Set params: set_entvar(index, EntVars:var, Float:dest[3]); + */ + var_mins, + + /* + * Description: Local BB max. + * Member type: class Vector + * Get params: get_entvar(index, EntVars:var, Float:output[3]); + * Set params: set_entvar(index, EntVars:var, Float:dest[3]); + */ + var_maxs, + + /* + * Description: maxs - mins + * Member type: class Vector + * Get params: get_entvar(index, EntVars:var, Float:output[3]); + * Set params: set_entvar(index, EntVars:var, Float:dest[3]); + */ + var_size, + + /* + * Description: - + * Member type: float + * Get params: Float:get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, Float:value); + */ + var_ltime, + + /* + * Description: - + * Member type: float + * Get params: Float:get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, Float:value); + */ + var_nextthink, + + /* + * Description: - + * Member type: int + * Get params: get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, value); + */ + var_movetype, + + /* + * Description: - + * Member type: int + * Get params: get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, value); + */ + var_solid, + + /* + * Description: Skin selection for studio models. + * Member type: int + * Get params: get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, value); + */ + var_skin, + + /* + * Description: Sub-model selection for studio models. + * Member type: int + * Get params: get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, value); + */ + var_body, + + /* + * Description: - + * Member type: int + * Get params: get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, value); + */ + var_effects, + + /* + * Description: % of "normal" gravity. + * Member type: float + * Get params: Float:get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, Float:value); + */ + var_gravity, + + /* + * Description: Inverse elasticity of MOVETYPE_BOUNCE + * Member type: float + * Get params: Float:get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, Float:value); + */ + var_friction, + + /* + * Description: - + * Member type: int + * Get params: get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, value); + */ + var_light_level, + + /* + * Description: Animation sequence. + * Member type: int + * Get params: get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, value); + */ + var_sequence, + + /* + * Description: Movement animation sequence for player (0 for none) + * Member type: int + * Get params: get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, value); + */ + var_gaitsequence, + + /* + * Description: % playback position in animation sequences (0..255) + * Member type: float + * Get params: Float:get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, Float:value); + */ + var_frame, + + /* + * Description: World time when frame was set. + * Member type: float + * Get params: Float:get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, Float:value); + */ + var_animtime, + + /* + * Description: Animation playback rate (-8x to 8x) + * Member type: float + * Get params: Float:get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, Float:value); + */ + var_framerate, + + /* + * Description: Bone controller setting (0..255) + * Member type: byte [4] + * Get params: get_entvar(index, EntVars:var, element); + * Set params: set_entvar(index, EntVars:var, value, element); + */ + var_controller, + + /* + * Description: Blending amount between sub-sequences (0..255) + * Member type: byte [2] + * Get params: get_entvar(index, EntVars:var, element); + * Set params: set_entvar(index, EntVars:var, value, element); + */ + var_blending, + + /* + * Description: Sprite rendering scale (0..255) + * Member type: float + * Get params: Float:get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, Float:value); + */ + var_scale, + + /* + * Description: - + * Member type: int + * Get params: get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, value); + */ + var_rendermode, + + /* + * Description: - + * Member type: float + * Get params: Float:get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, Float:value); + */ + var_renderamt, + + /* + * Description: - + * Member type: class Vector + * Get params: get_entvar(index, EntVars:var, Float:output[3]); + * Set params: set_entvar(index, EntVars:var, Float:dest[3]); + */ + var_rendercolor, + + /* + * Description: - + * Member type: int + * Get params: get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, value); + */ + var_renderfx, + + /* + * Description: - + * Member type: float + * Get params: Float:get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, Float:value); + */ + var_health, + + /* + * Description: - + * Member type: float + * Get params: Float:get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, Float:value); + */ + var_frags, + + /* + * Description: bit mask for available weapons + * Member type: int + * Get params: get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, value); + */ + var_weapons, + + /* + * Description: - + * Member type: float + * Get params: Float:get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, Float:value); + */ + var_takedamage, + + /* + * Description: - + * Member type: int + * Get params: get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, value); + */ + var_deadflag, + + /* + * Description: eye position + * Member type: class Vector + * Get params: get_entvar(index, EntVars:var, Float:output[3]); + * Set params: set_entvar(index, EntVars:var, Float:dest[3]); + */ + var_view_ofs, + + /* + * Description: - + * Member type: int + * Get params: get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, value); + */ + var_button, + + /* + * Description: - + * Member type: int + * Get params: get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, value); + */ + var_impulse, + + /* + * Description: Entity pointer when linked into a linked list. + * Member type: struct edict_s * + * Get params: get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, value); + */ + var_chain, + + /* + * Description: - + * Member type: struct edict_s * + * Get params: get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, value); + */ + var_dmg_inflictor, + + /* + * Description: - + * Member type: struct edict_s * + * Get params: get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, value); + */ + var_enemy, + + /* + * Description: Entity pointer when MOVETYPE_FOLLOW + * Member type: struct edict_s * + * Get params: get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, value); + */ + var_aiment, + + /* + * Description: - + * Member type: struct edict_s * + * Get params: get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, value); + */ + var_owner, + + /* + * Description: - + * Member type: struct edict_s * + * Get params: get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, value); + */ + var_groundentity, + + /* + * Description: - + * Member type: int + * Get params: get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, value); + */ + var_spawnflags, + + /* + * Description: - + * Member type: int + * Get params: get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, value); + */ + var_flags, + + /* + * Description: lowbyte topcolor, highbyte bottomcolor + * Member type: int + * Get params: get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, value); + */ + var_colormap, + + /* + * Description: - + * Member type: int + * Get params: get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, value); + */ + var_team, + + /* + * Description: - + * Member type: float + * Get params: Float:get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, Float:value); + */ + var_max_health, + + /* + * Description: - + * Member type: float + * Get params: Float:get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, Float:value); + */ + var_teleport_time, + + /* + * Description: - + * Member type: float + * Get params: Float:get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, Float:value); + */ + var_armortype, + + /* + * Description: - + * Member type: float + * Get params: Float:get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, Float:value); + */ + var_armorvalue, + + /* + * Description: - + * Member type: int + * Get params: get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, value); + */ + var_waterlevel, + + /* + * Description: - + * Member type: int + * Get params: get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, value); + */ + var_watertype, + + /* + * Description: - + * Member type: string_t + * Get params: get_entvar(index, EntVars:var, dest[], const lenght); + * Set params: set_entvar(index, EntVars:var, const source[]); + */ + var_target, + + /* + * Description: - + * Member type: string_t + * Get params: get_entvar(index, EntVars:var, dest[], const lenght); + * Set params: set_entvar(index, EntVars:var, const source[]); + */ + var_targetname, + + /* + * Description: - + * Member type: string_t + * Get params: get_entvar(index, EntVars:var, dest[], const lenght); + * Set params: set_entvar(index, EntVars:var, const source[]); + */ + var_netname, + + /* + * Description: - + * Member type: string_t + * Get params: get_entvar(index, EntVars:var, dest[], const lenght); + * Set params: set_entvar(index, EntVars:var, const source[]); + */ + var_message, + + /* + * Description: - + * Member type: float + * Get params: Float:get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, Float:value); + */ + var_dmg_take, + + /* + * Description: - + * Member type: float + * Get params: Float:get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, Float:value); + */ + var_dmg_save, + + /* + * Description: - + * Member type: float + * Get params: Float:get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, Float:value); + */ + var_dmg, + + /* + * Description: - + * Member type: float + * Get params: Float:get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, Float:value); + */ + var_dmgtime, + + /* + * Description: - + * Member type: string_t + * Get params: get_entvar(index, EntVars:var, dest[], const lenght); + * Set params: set_entvar(index, EntVars:var, const source[]); + */ + var_noise, + + /* + * Description: - + * Member type: string_t + * Get params: get_entvar(index, EntVars:var, dest[], const lenght); + * Set params: set_entvar(index, EntVars:var, const source[]); + */ + var_noise1, + + /* + * Description: - + * Member type: string_t + * Get params: get_entvar(index, EntVars:var, dest[], const lenght); + * Set params: set_entvar(index, EntVars:var, const source[]); + */ + var_noise2, + + /* + * Description: - + * Member type: string_t + * Get params: get_entvar(index, EntVars:var, dest[], const lenght); + * Set params: set_entvar(index, EntVars:var, const source[]); + */ + var_noise3, + + /* + * Description: - + * Member type: float + * Get params: Float:get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, Float:value); + */ + var_speed, + + /* + * Description: - + * Member type: float + * Get params: Float:get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, Float:value); + */ + var_air_finished, + + /* + * Description: - + * Member type: float + * Get params: Float:get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, Float:value); + */ + var_pain_finished, + + /* + * Description: - + * Member type: float + * Get params: Float:get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, Float:value); + */ + var_radsuit_finished, + + /* + * Description: - + * Member type: struct edict_s * + * Get params: get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, value); + */ + var_pContainingEntity, + + /* + * Description: - + * Member type: int + * Get params: get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, value); + */ + var_playerclass, + + /* + * Description: - + * Member type: float + * Get params: Float:get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, Float:value); + */ + var_maxspeed, + + /* + * Description: - + * Member type: float + * Get params: Float:get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, Float:value); + */ + var_fov, + + /* + * Description: - + * Member type: int + * Get params: get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, value); + */ + var_weaponanim, + + /* + * Description: - + * Member type: int + * Get params: get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, value); + */ + var_pushmsec, + + /* + * Description: - + * Member type: int + * Get params: get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, value); + */ + var_bInDuck, + + /* + * Description: - + * Member type: int + * Get params: get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, value); + */ + var_flTimeStepSound, + + /* + * Description: - + * Member type: int + * Get params: get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, value); + */ + var_flSwimTime, + + /* + * Description: - + * Member type: int + * Get params: get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, value); + */ + var_flDuckTime, + + /* + * Description: - + * Member type: int + * Get params: get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, value); + */ + var_iStepLeft, + + /* + * Description: - + * Member type: float + * Get params: Float:get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, Float:value); + */ + var_flFallVelocity, + + /* + * Description: - + * Member type: int + * Get params: get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, value); + */ + var_gamestate, + + /* + * Description: - + * Member type: int + * Get params: get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, value); + */ + var_oldbuttons, + + /* + * Description: - + * Member type: int + * Get params: get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, value); + */ + var_groupinfo, + + /* + * Description: - + * Member type: int + * Get params: get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, value); + */ + var_iuser1, + + /* + * Description: - + * Member type: int + * Get params: get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, value); + */ + var_iuser2, + + /* + * Description: - + * Member type: int + * Get params: get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, value); + */ + var_iuser3, + + /* + * Description: - + * Member type: int + * Get params: get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, value); + */ + var_iuser4, + + /* + * Description: - + * Member type: float + * Get params: Float:get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, Float:value); + */ + var_fuser1, + + /* + * Description: - + * Member type: float + * Get params: Float:get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, Float:value); + */ + var_fuser2, + + /* + * Description: - + * Member type: float + * Get params: Float:get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, Float:value); + */ + var_fuser3, + + /* + * Description: - + * Member type: float + * Get params: Float:get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, Float:value); + */ + var_fuser4, + + /* + * Description: - + * Member type: class Vector + * Get params: get_entvar(index, EntVars:var, Float:output[3]); + * Set params: set_entvar(index, EntVars:var, Float:dest[3]); + */ + var_vuser1, + + /* + * Description: - + * Member type: class Vector + * Get params: get_entvar(index, EntVars:var, Float:output[3]); + * Set params: set_entvar(index, EntVars:var, Float:dest[3]); + */ + var_vuser2, + + /* + * Description: - + * Member type: class Vector + * Get params: get_entvar(index, EntVars:var, Float:output[3]); + * Set params: set_entvar(index, EntVars:var, Float:dest[3]); + */ + var_vuser3, + + /* + * Description: - + * Member type: class Vector + * Get params: get_entvar(index, EntVars:var, Float:output[3]); + * Set params: set_entvar(index, EntVars:var, Float:dest[3]); + */ + var_vuser4, + + /* + * Description: - + * Member type: struct edict_s * + * Get params: get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, value); + */ + var_euser1, + + /* + * Description: - + * Member type: struct edict_s * + * Get params: get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, value); + */ + var_euser2, + + /* + * Description: - + * Member type: struct edict_s * + * Get params: get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, value); + */ + var_euser3, + + /* + * Description: - + * Member type: struct edict_s * + * Get params: get_entvar(index, EntVars:var); + * Set params: set_entvar(index, EntVars:var, value); + */ + var_euser4 +}; + +/** +* enum UCmd +*/ +enum UCmd +{ + /* + * Description: - + * Member type: short + * Get params: get_ucmd(const ucmd, UCmd:var); + * Set params: set_ucmd(const ucmd, UCmd:var, value); + */ + ucmd_lerp_msec = BEGIN_MEMBER_REGION(usercmd), + + /* + * Description: - + * Member type: byte + * Get params: get_ucmd(const ucmd, UCmd:var); + * Set params: set_ucmd(const ucmd, UCmd:var, value); + */ + ucmd_msec, + + /* + * Description: - + * Member type: vec3_t + * Get params: get_ucmd(const ucmd, UCmd:var, Float:output[3]); + * Set params: set_ucmd(const ucmd, UCmd:var, Float:dest[3]); + */ + ucmd_viewangles, + + /* + * Description: - + * Member type: float + * Get params: Float:get_ucmd(const ucmd, UCmd:var); + * Set params: set_ucmd(const ucmd, UCmd:var, Float:value); + */ + ucmd_forwardmove, + + /* + * Description: - + * Member type: float + * Get params: Float:get_ucmd(const ucmd, UCmd:var); + * Set params: set_ucmd(const ucmd, UCmd:var, Float:value); + */ + ucmd_sidemove, + + /* + * Description: - + * Member type: float + * Get params: Float:get_ucmd(const ucmd, UCmd:var); + * Set params: set_ucmd(const ucmd, UCmd:var, Float:value); + */ + ucmd_upmove, + + /* + * Description: - + * Member type: byte + * Get params: get_ucmd(const ucmd, UCmd:var); + * Set params: set_ucmd(const ucmd, UCmd:var, value); + */ + ucmd_lightlevel, + + /* + * Description: - + * Member type: unsigned short + * Get params: get_ucmd(const ucmd, UCmd:var); + * Set params: set_ucmd(const ucmd, UCmd:var, value); + */ + ucmd_buttons, + + /* + * Description: - + * Member type: byte + * Get params: get_ucmd(const ucmd, UCmd:var); + * Set params: set_ucmd(const ucmd, UCmd:var, value); + */ + ucmd_impulse, + + /* + * Description: - + * Member type: byte + * Get params: get_ucmd(const ucmd, UCmd:var); + * Set params: set_ucmd(const ucmd, UCmd:var, value); + */ + ucmd_weaponselect, + + /* + * Description: - + * Member type: int + * Get params: get_ucmd(const ucmd, UCmd:var); + * Set params: set_ucmd(const ucmd, UCmd:var, value); + */ + ucmd_impact_index, + + /* + * Description: - + * Member type: vec3_t + * Get params: get_ucmd(const ucmd, UCmd:var, Float:output[3]); + * Set params: set_ucmd(const ucmd, UCmd:var, Float:dest[3]); + */ + ucmd_impact_position +}; + +enum NetAdrType +{ + NA_NULL = 0, + NA_LOOPBACK, + NA_BROADCAST, + NA_IP, + NA_IPX, // Deprecated: GoldSrc + NA_BROADCAST_IPX, // Deprecated: GoldSrc +}; + +enum NetAdrVars +{ + /* + * Description: - + * Member type: NetAdrType + * Get params: get_netadr(const NetAdr:adr, const NetAdrVars:var); + * Set params: set_netadr(const NetAdr:adr, const NetAdrVars:var, const value); + */ + netadr_type = BEGIN_MEMBER_REGION(netadr), + + /* + * Description: - + * Member type: unsigned char [4] + * Get params: get_netadr(const NetAdr:adr, const NetAdrVars:var, dest[], const lenght); // Also returns a iplong value + * Set params: set_netadr(const NetAdr:adr, const NetAdrVars:var, const iplong_value); // Only iplong can to set + */ + netadr_ip, + + /* + * Description: - + * Member type: unsigned short + * Get params: get_netadr(const NetAdr:adr, const NetAdrVars:var); + * Set params: set_netadr(const NetAdr:adr, const NetAdrVars:var, const value); + */ + netadr_port +}; + +/** +* enum NetSrc +*/ +enum NetSrc +{ + NS_CLIENT, + NS_SERVER, + NS_MULTICAST // xxxMO +}; + +/** +* enum NetChan +*/ +enum NetChan +{ + /* + * Description: NS_SERVER or NS_CLIENT, depending on channel + * Member type: int + * Get params: NetSrc:get_netchan(const index, NetChan:var); + * Set params: set_netchan(const index, NetChan:var, NetSrc:value); + */ + net_sock = BEGIN_MEMBER_REGION(netchan), + + /* + * Description: Address this channel is talking to + * Member type: NetAdr + * Get params: NetAdr:get_netchan(const index, NetChan:var); + * Set params: set_netchan(const index, NetChan:var, NetAdr:value); + */ + net_remote_address, + + /* + * Description: - + * Member type: int + * Get params: get_netchan(const index, NetChan:var); + * Set params: set_netchan(const index, NetChan:var, value); + */ + net_player_slot, + + /* + * Description: For timeouts. Time last message was received + * Member type: float + * Get params: Float:get_netchan(const index, NetChan:var); + * Set params: set_netchan(const index, NetChan:var, Float:value); + */ + net_last_received, + + /* + * Description: Time when channel was connected + * Member type: float + * Get params: Float:get_netchan(const index, NetChan:var); + * Set params: set_netchan(const index, NetChan:var, Float:value); + */ + net_connect_time, + + /* + * Description: Bandwidth choke. (Bytes per second) + * Member type: float + * Get params: Float:get_netchan(const index, NetChan:var); + * Set params: set_netchan(const index, NetChan:var, Float:value); + */ + net_rate, + + /* + * Description: If rh_get_realtime() > cleartime, free to send next packet. + * Member type: float + * Get params: Float:get_netchan(const index, NetChan:var); + * Set params: set_netchan(const index, NetChan:var, Float:value); + */ + net_cleartime, + + /* + * Description: A sequence number that increases with each incoming bunch of packets. + * Member type: int + * Get params: get_netchan(const index, NetChan:var); + * Set params: set_netchan(const index, NetChan:var, value); + */ + net_incoming_sequence, + + /* + * Description: The number of last outgoing message that has been ack'd. + * Member type: int + * Get params: get_netchan(const index, NetChan:var); + * Set params: set_netchan(const index, NetChan:var, value); + */ + net_incoming_acknowledged, + + /* + * Description: Single bit indicating the state of acknowledgment for the last reliable message. + * Member type: int + * Get params: get_netchan(const index, NetChan:var); + * Set params: set_netchan(const index, NetChan:var, value); + */ + net_incoming_reliable_acknowledged, + + /* + * Description: Single bit, maintained local that toggles between 0 and 1 to track the sequence of reliable messages received + * Member type: int + * Get params: get_netchan(const index, NetChan:var); + * Set params: set_netchan(const index, NetChan:var, value); + */ + net_incoming_reliable_sequence, + + /* + * Description: Message we are sending to remote + * Member type: int + * Get params: get_netchan(const index, NetChan:var); + * Set params: set_netchan(const index, NetChan:var, value); + */ + net_outgoing_sequence, + + /* + * Description: Whether the message contains reliable payload, single bit + * Member type: int + * Get params: get_netchan(const index, NetChan:var); + * Set params: set_netchan(const index, NetChan:var, value); + */ + net_reliable_sequence, + + /* + * Description: Outgoing sequence number of last send that had reliable data + * Member type: int + * Get params: get_netchan(const index, NetChan:var); + * Set params: set_netchan(const index, NetChan:var, value); + */ + net_last_reliable_sequence +}; + +/** +* Message argument types used with GetMessageArgType() +*/ +enum MsgArgType +{ + ArgByte, + ArgChar, + ArgShort, + ArgLong, + ArgAngle, + ArgCoord, + ArgString, + ArgEntity, +}; + +/** +* Message data types used with SetMessageData()/GetMessageData() +* HasModifiedMessageData()/ResetModifiedMessageData() +*/ +enum MsgDataType +{ + /* + * Description: Any part of the message + */ + MsgAny, + + /* + * Description: The destination of the message + * Arg type: integer + * Get params: new dest = GetMessageData(MsgDest); + * Set params: SetMessageData(MsgDest, MSG_ALL); + */ + MsgDest, + + /* + * Description: The index of the message + * Arg type: integer + * Get params: new msg_id = GetMessageData(MsgMsgId); + * Set params: SetMessageData(MsgMsgId, const msg_id); + */ + MsgMsgId, + + /* + * Description: The origin of the message + * Arg type: float [3] + * Get params: GetMessageData(MsgOrigin, Float:dstVector[3]); + * Set params: SetMessageData(MsgOrigin, Float:srcVector[3]); + */ + MsgOrigin, + + /* + * Description: The index of the recipient client + * Arg type: integer + * Get params: new targetId = GetMessageData(MsgTargetId); + * Set params: SetMessageData(MsgTargetId, const targetId); (acceptable indexes 0-32, 0 index also as -1 means NULLENT) + */ + MsgTargetId, + + /* + * Description: The arguments of the message + * + * Arg type: string (ArgString) + * Get params: bool:GetMessageData(MsgArg, const argnumber, value[], const maxlen); + * Set params: bool:SetMessageData(MsgArg, const argnumber, const value[]); + * + * Arg type: float (ArgAngle, ArgCoord) + * Get params: Float:GetMessageData(MsgArg, const argnumber, &Float:value = 0.0); + * Set params: bool:SetMessageData(MsgArg, const argnumber, const Float:value); + * + * Arg type: integer (ArgByte, ArgChar, ArgShort, ArgLong, ArgEntity) + * Get params: GetMessageData(MsgArg, const argnumber); + * Set params: bool:SetMessageData(MsgArg, const argnumber, const value); + */ + MsgArg +}; + +/** +* Blocking behavior types for messages +* Flags for natives SetMessageBlock()/GetMessageBlock() +*/ +enum MsgBlockType +{ + MSG_BLOCK_NOT, // Not a block + MSG_BLOCK_ONCE, // Block once + MSG_BLOCK_SET // Set block +}; diff --git a/bin/compiler/include/reapi_gamedll.inc b/bin/compiler/include/reapi_gamedll.inc new file mode 100644 index 0000000..013eb5e --- /dev/null +++ b/bin/compiler/include/reapi_gamedll.inc @@ -0,0 +1,1223 @@ +#if defined _reapi_gamedll_included + #endinput +#endif + +#define _reapi_gamedll_included + +#include + +/* +* Sets Think callback for entity +* +* @param entity Entity index +* @param callback The forward to call +* @param params Optional set of data to pass through to callback +* @param len Optional size of data +* +* @note Use "" to reset callback +* @note Callback should be contains passing arguments as "public Think_Callback(const ent)" +* +* @noreturn +*/ +native SetThink(const ent, const callback[], const params[] = "", const len = 0); + +/* +* Sets Touch callback for entity +* +* @param entity Entity index +* @param callback The forward to call +* @param params Optional set of data to pass through to callback +* @param len Optional size of data +* +* @note Use "" to reset callback +* @note Callback should be contains passing arguments as "public Touch_Callback(const ent, const other)" +* +* @noreturn +*/ +native SetTouch(const ent, const callback[], const params[] = "", const len = 0); + +/* +* Sets Use callback for entity +* +* @param entity Entity index +* @param callback The forward to call +* @param params Optional set of data to pass through to callback +* @param len Optional size of data +* +* @note Use "" to reset callback +* @note Callback should be contains passing arguments as "public Use_Callback(const ent, const activator, const caller, USE_TYPE:useType, Float:value)" +* +* @noreturn +*/ +native SetUse(const ent, const callback[], const params[] = "", const len = 0); + +/* +* Sets Blocked callback for entity +* +* @param entity Entity index +* @param callback The forward to call +* @param params Optional set of data to pass through to callback +* @param len Optional size of data +* +* @note Use "" to reset callback +* @note Callback should be contains passing arguments as "public Blocked_Callback(const ent, const other)" +* +* @noreturn +*/ +native SetBlocked(const ent, const callback[], const params[] = "", const len = 0); + +/* +* Sets MoveDone callback for entity +* +* @param entity Entity index +* @param callback The forward to call +* @param params Optional set of data to pass through to callback +* @param len Optional size of data +* +* @note Use "" to reset callback +* @note Entity should be inherited from CBaseToggle, otherwise server can crash +* @note Callback should be contains passing arguments as "public MoveDone_Callback(const ent)" +* +* @noreturn +*/ +native SetMoveDone(const ent, const callback[], const params[] = "", const len = 0); + +/* +* Sets a value to CSGameRules_Members members. +* +* @param member The specified member, look at the enums with name CSGameRules_Members +* +* @return 1 on success. +*/ +native set_member_game(CSGameRules_Members:member, any:...); + +/* +* Returns a value from CSGameRules_Members members +* +* @param member The specified member, look at the enums with name CSGameRules_Members +* +* @return If an integer or boolean or one byte, array or everything else is passed via the 3rd argument and more, look at the argument list for the specified member +*/ +native any:get_member_game(CSGameRules_Members:member, any:...); + +/* +* Sets a value to an entity's member. +* +* @param index Entity index +* @param member The specified member, look at the enums with name *_Members +* +* @return 1 on success. +*/ +native set_member(const index, any:member, any:...); + +/* +* Returns a value from an entity's member. +* +* @param index Entity index +* @param member The specified member, look at the enums with name *_Members +* +* @return If an integer or boolean or one byte, array or everything else is passed via the 3rd argument and more, look at the argument list for the specified member +*/ +native any:get_member(const index, any:member, any:...); + +/* +* Sets a value to an entity's member. +* Safe version, can guarantee that the present member is refers to derived class of the entity. +* +* @param index Entity index +* @param member The specified member, look at the enums with name *_Members +* +* @return 1 on success. +*/ +native set_member_s(const index, any:member, any:...); + +/* +* Returns a value from an entity's member. +* Safe version, can guarantee that the present member is refers to derived class of the entity. +* +* @param index Entity index +* @param member The specified member, look at the enums with name *_Members +* +* @return If an integer or boolean or one byte, array or everything else is passed via the 3rd argument and more, look at the argument list for the specified member +*/ +native any:get_member_s(const index, any:member, any:...); + +/* +* Sets playermove var. +* +* @param var The specified playermove, look at the enum PlayerMove +* +* @return 1 on success. +*/ +native set_pmove(const PlayerMove:var, any:...); + +/* +* Returns a playermove var. +* +* @param var The specified playermove var, look at the enums PlayerMove +* +* @return If an integer or boolean or one byte, array or everything else is passed via the 3rd argument and more, look at the argument list for the specified mvar +*/ +native any:get_pmove(const PlayerMove:var, any:...); + +/* +* Sets a movevar value to a playermove. +* +* @param var The specified mvar, look at the enum MoveVars +* +* @return 1 on success. +*/ +native set_movevar(const MoveVars:var, any:...); + +/* +* Returns a movevar value from a playermove. +* +* @param var The specified mvar, look at the enum MoveVars +* +* @return If an integer or boolean or one byte, array or everything else is passed via the 3rd argument and more, look at the argument list for the specified mvar +*/ +native any:get_movevar(const MoveVars:var, any:...); + +/* +* Sets a pmtrace var. +* +* @param var The specified mvar, look at the enum PMTrace +* +* @return 1 on success. +*/ +native set_pmtrace(const tracehandle, const PMTrace:var, any:...); + +/* +* Returns a pmtrace var +* +* @param var The specified mvar, look at the enum PMTrace +* +* @return If an integer or boolean or one byte, array or everything else is passed via the 3rd argument and more, look at the argument list for the specified mvar +*/ +native any:get_pmtrace(const tracehandle, const PMTrace:var, any:...); + +/* +* Sets a RebuyStruct member. +* +* @param var The specified RebuyStruct, look at the enum RebuyStruct +* +* @return 1 on success. +*/ +native set_rebuy(const RebuyHandle:rebuyhandle, const RebuyStruct:member, any:value); + +/* +* Returns a RebuyStruct member +* +* @param var The specified RebuyStruct, look at the enum RebuyStruct +* +* @return If an integer or boolean or one byte, array or everything else is passed via the 3rd argument and more, look at the argument list for the specified RebuyStruct +*/ +native any:get_rebuy(const RebuyHandle:rebuyhandle, RebuyStruct:member); + +/* +* Assign the number of the player's animation. +* +* @param index Client index +* @param playerAnim Specific animation number +* +* @noreturn +*/ +native rg_set_animation(const index, PLAYER_ANIM:playerAnim); + +/* +* Adds money to player's account. +* +* @param index Client index +* @param amount The amount of money +* @param bTrackChange If bTrackChange is 1, the amount of money added will also be displayed. +* +* @noreturn +*/ +native rg_add_account(const index, amount, AccountSet:typeSet = AS_ADD, const bool:bTrackChange = true); + +/* +* Gives the player an item. +* +* @param index Client index +* @param pszName Item classname +* @param type Look at the enums with name GiveType +* +* @return Index of entity if successfull, -1 otherwise +*/ +native rg_give_item(const index, const pszName[], GiveType:type = GT_APPEND); + +/* +* Gives the player an custom item, this means that don't handled API things. +* +* @example rg_give_custom_item(id, "weapon_c4"); doesn't sets the member m_bHasC4 to true, as the rg_give_item does. +* +* @param index Client index +* @param pszName Item classname +* @param type Look at the enums with name GiveType +* @param uid Sets a unique index for the entity +* +* @return Index of entity if successfull, -1 otherwise +* +*/ +native rg_give_custom_item(const index, const pszName[], GiveType:type = GT_APPEND, const uid = 0); + +/* +* Give the default items to a player. +* +* @param index Client index +* +* @noreturn +*/ +native rg_give_default_items(const index); + +/* +* Gives the player a shield +* +* @param index Client index +* @param bDeploy To deploy the shield +* +* @noreturn +*/ +native rg_give_shield(const index, const bool:bDeploy = true); + +/* +* Inflicts damage in a radius from the source position. +* +* @param vecSrc The source position +* @param inflictor Inflictor is the entity that caused the damage (such as a gun) +* @param attacker Attacker is the entity that triggered the damage (such as the gun's owner) +* @param flDamage The amount of damage +* @param flRadius Damage radius +* @param iClassIgnore To specify classes that are immune to damage +* @param bitsDamageType Damage type DMG_* +* +* @noreturn +*/ +native rg_dmg_radius(Float:vecSrc[3], const inflictor, const attacker, const Float:flDamage, const Float:flRadius, const iClassIgnore, const bitsDamageType); + +/* +* Resets the global multi damage accumulator. +* +* @noreturn +*/ +native rg_multidmg_clear(); + +/* +* Inflicts contents of global multi damage registered on victim. +* +* @param inflictor Inflictor is the entity that caused the damage (such as a gun) +* @param attacker Attacker is the entity that triggered the damage (such as the gun's owner) +* +* @noreturn +*/ +native rg_multidmg_apply(const inflictor, const attacker); + +/* +* Adds damage to the accumulator. +* +* @param inflictor Inflictor is the entity that caused the damage (such as a gun) +* @param victim The victim that takes damage +* @param flDamage The amount of damage +* @param bitsDamageType Damage type DMG_* +* +* @noreturn +*/ +native rg_multidmg_add(const inflictor, const victim, const Float:flDamage, const bitsDamageType); + +/* +* Fires bullets from entity. +* +* @param inflictor Inflictor is the entity that caused the damage (such as a gun) +* @param attacker Attacker is the entity that triggered the damage (such as the gun's owner) +* @param shots The number of shots +* @param vecSrc The source position of the barrel +* @param vecDirShooting Shooting direction +* @param vecSpread Spread +* @param flDistance Max shot distance +* @param iBulletType Bullet type, look at the enum with name Bullet in cssdk_const.inc +* @param iTracerFreq Tracer frequency +* @param iDamage Damage amount +* +* @note: This native doesn't create a decal effect +* @note: Decal creation is handled by PlaybackEvent, including shot animation and shot sound +* +* @noreturn +*/ +native rg_fire_bullets(const inflictor, const attacker, const shots, Float:vecSrc[3], Float:vecDirShooting[3], Float:vecSpread[3], const Float:flDistance, const Bullet:iBulletType, const iTracerFreq, const iDamage); + +/* +* Fires buckshots from entity (used at XM1014 and M3 weapons). +* +* @param inflictor Inflictor is the entity that caused the damage (such as a gun) +* @param attacker Attacker is the entity that triggered the damage (such as the gun's owner) +* @param shots The number of shots +* @param vecSrc The source position of the barrel +* @param vecDirShooting Shooting direction +* @param vecSpread Spread +* @param flDistance Max shot distance +* @param iTracerFreq Tracer frequency +* @param iDamage Damage amount +* +* @note: This native doesn't create a decal effect +* @note: Decal creation is handled by PlaybackEvent, including shot animation and shot sound +* +* @noreturn +*/ +native rg_fire_buckshots(const inflictor, const attacker, const shots, Float:vecSrc[3], Float:vecDirShooting[3], Float:vecSpread[3], const Float:flDistance, const iTracerFreq, const iDamage); + +/* +* Fires bullets from player's weapon. +* +* @param inflictor Inflictor is the entity that caused the damage (such as a gun) +* @param attacker Attacker is the entity that triggered the damage (such as the gun's owner) +* @param vecSrc The source position of the barrel +* @param vecDirShooting Shooting direction +* @param vecSpread Spread +* @param flDistance Max shot distance +* @param iPenetration The amount of penetration +* @param iBulletType Bullet type, look at the enum with name Bullet in cssdk_const.inc +* @param iDamage Damage amount +* @param flRangeModifier Damage range modifier +* @param bPistol Pistol shot +* @param shared_rand Use player's random seed, get circular gaussian spread +* +* @note: This native doesn't create a decal effect +* @note: Decal creation is handled by PlaybackEvent, including shot animation and shot sound +* +* @return Float:[3] The spread result +*/ +native Float:[3] rg_fire_bullets3(const inflictor, const attacker, Float:vecSrc[3], Float:vecDirShooting[3], const Float:vecSpread, const Float:flDistance, const iPenetration, const Bullet:iBulletType, const iDamage, const Float:flRangeModifier, const bool:bPistol, const shared_rand); + +/* +* Forces the round to end. +* +* @param tmDelay Delay before the onset of a new round +* @param st Which team won +* @param event The event is the end of the round +* @param message The message on round end +* @param sentence The sound at the end of the round +* @param trigger This will trigger to all hooks on that function +* Be very careful about recursion! +* +* @return 1 on success, 0 otherwise +*/ +native rg_round_end(const Float:tmDelay, const WinStatus:st, const ScenarioEventEndRound:event = ROUND_NONE, const message[] = "default", const sentence[] = "default", const bool:trigger = false); + +/* +* Updates current scores. +* +* @param iCtsWins The amount of wins for counter-terrorists +* @param iTsWins The amount of wins for terrorists +* @param bAdd Adds the score to the current amount +* +* @noreturn +*/ +native rg_update_teamscores(const iCtsWins = 0, const iTsWins = 0, const bool:bAdd = true); + +/* +* Creates an entity using Counter-Strike's custom CreateNamedEntity wrapper. +* +* @param classname Entity classname +* @param useHashTable Use this only for known game entities +* @note: Do not use this if you plan to change custom classname an entity after creation, +* otherwise it will never be release from hash table even if an entity was destroyed, +* and that to lead table to inflate/memory leaks +* +* @return Index of the created entity or 0 otherwise +*/ +native rg_create_entity(const classname[], const bool:useHashTable = false); + +/* +* Finds an entity in the world using Counter-Strike's custom FindEntityByString wrapper. +* +* @param start_index Entity index to start searching from. -1 to start from the first entity +* @param classname Classname to search for +* @param useHashTable Use this only for known game entities +* +* @note: Do not use this if you use a custom classname +* +* @return Entity index > 0 if found, 0 otherwise +*/ +native rg_find_ent_by_class(start_index, const classname[], const bool:useHashTable = false); + +/* +* Finds an entity in the world using Counter-Strike's custom FindEntityByString wrapper, matching by owner. +* +* @param start_index Entity index to start searching from. AMX_NULLENT (-1) to start from the first entity +* @param classname Classname to search for +* +* @return true if found, false otherwise +*/ +native bool:rg_find_ent_by_owner(&start_index, const classname[], owner); + +/* +* Finds the weapon by name in the player's inventory. +* +* @param index Client index +* @param weapon Weapon name +* +* @return Weapon's entity index, 0 otherwise +*/ +native rg_find_weapon_bpack_by_name(const index, const weapon[]); + +/* +* Checks if the player has the item. +* +* @param index Client index +* @param item Item name +* +* @return true if he does, false otherwise +*/ +native bool:rg_has_item_by_name(const index, const item[]); + +/* +* Returns specific information about the weapon. +* +* @param weapon name or id Weapon id, see WEAPON_* constants, WeaponIdType or weapon_* name +* @param WpnInfo:type Info type, see WI_* constants +* +* @note weapon_* name can only be used to get WI_ID +* +* @return Weapon information +* @error If weapon_id or type are out of bounds, an error will be thrown +*/ +native any:rg_get_weapon_info(any:...); + +/* +* Sets specific weapon info values. +* +* @param weapon_id Weapon id, see WEAPON_* constants +* @param type Info type, see WI_* constants +* +* @return 1 on success, 0 otherwise +*/ +native rg_set_weapon_info(const {WeaponIdType,_}:weapon_id, WpnInfo:type, any:...); + +/* +* Remove all the player's stuff in a specific slot. +* +* @param index Client index +* @param slot The slot that will be emptied +* @param removeAmmo Remove ammunition +* +* @return 1 - successful removal of all items in the slot or the slot is empty +* 0 - if at least one item failed to remove +*/ +native rg_remove_items_by_slot(const index, const InventorySlotType:slot, const bool:removeAmmo = true); + +/* +* Drop to floor all the player's stuff by specific slot. +* +* @param index Client index +* @param slot Specific slot for remove of each item. +* +* @return 1 - successful drop of all items in the slot or the slot is empty +* 0 - if at least one item failed to drop +*/ +native rg_drop_items_by_slot(const index, const InventorySlotType:slot); + +/* +* Remove all of the player's items. +* +* @param index Client index +* @param removeSuit Remove suit +* +* @return 1 on success, 0 otherwise +*/ +native rg_remove_all_items(const index, const bool:removeSuit = false); + +/* +* Forces the player to drop the specified item classname. +* +* @param index Client index +* @param item_name Item classname, if no name, the active item classname +* +* @return Entity index of weaponbox, AMX_NULLENT (-1) otherwise +* +*/ +native rg_drop_item(const index, const item_name[]); + +/* +* Executes a client command on the gamedll side. +* +* @param index Client index +* @param command Client command to execute +* @param arg Optional command arguments +* +* @return 1 on success, 0 otherwise +*/ +native rg_internal_cmd(const index, const cmd[], const arg[] = ""); + +/* +* Removes the specified item classname from the player +* +* @param index Client index +* @param item_name Item classname +* @param removeAmmo Remove ammunition +* +* @return 1 if found and remove, 0 otherwise +*/ +native rg_remove_item(const index, const item_name[], const bool:removeAmmo = false); + +/* +* Sets the amount of ammo in the client's backpack for a specific weapon. +* +* @param index Client index +* @param weapon Weapon id +* @param amount New backpack ammo amount to set +* +* @noreturn +*/ +native rg_set_user_bpammo(const index, WeaponIdType:weapon, amount); + +/* +* Returns the amount of ammo in the client's backpack for a specific weapon. +* +* @param index Client index +* @param weapon Weapon id +* +* @return Amount of ammo in backpack +*/ +native rg_get_user_bpammo(const index, WeaponIdType:weapon); + +/* +* Sets the amount of clip ammo for a specific weapon. +* +* @param index Client index +* @param weapon Weapon id +* @param amount New clip ammo amount to set +* +* @noreturn +*/ +native rg_set_user_ammo(const index, WeaponIdType:weapon, amount); + +/* +* Returns the amount of clip ammo for a specific weapon. +* +* @param index Client index +* @param weapon Weapon id +* +* @return Amount of clip ammo +*/ +native rg_get_user_ammo(const index, WeaponIdType:weapon); + +/* +* Sets the client's defusekit status and allows to set a custom HUD icon and color. +* +* @param index Client index +* @param defusekit If nonzero the client will have a defusekit, otherwise it will be removed +* @param color Color RGB +* @param icon HUD sprite to use as an icon +* @param flash If nonzero the icon will flash red +* +* @noreturn +*/ +native rg_give_defusekit(const index, const bool:bDefusekit = true, const Float:color[] = {0.0, 160.0, 0.0}, const icon[] = "defuser", const bool:bFlash = false); + +/* +* Returns the client's armor value and retrieves the type of armor. +* +* @param index Client index +* @param armortype Variable to store armor type in +* +* @return Amount of armor, 0 if the client has no armor +*/ +native rg_get_user_armor(const index, &ArmorType:armortype = ARMOR_NONE); + +/* +* Sets the client's armor value and the type of armor. +* +* @param index Client index +* @param armorvalue Amount of armor to set +* @param armortype Armor type to set +* +* @noreturn +*/ +native rg_set_user_armor(const index, armorvalue, ArmorType:armortype); + +/* +* Sets the client's team without killing the player and sets the client's model. +* @note To obtain a TeamName use the following: +* new TeamName:team = get_member(id, m_iTeam); +* +* @param index Client index +* @param team Team id +* @param model Internal model, use MODEL_AUTO for a random appearance or MODEL_UNASSIGNED to not update it +* +* @param send_teaminfo If true, a TeamInfo message will be sent +* @param check_win_conditions If true, a CheckWinConditions will be call +* +* @return 1 on success, 0 otherwise +*/ +native rg_set_user_team(const index, {TeamName,_}:team, {ModelName,_}:model = MODEL_AUTO, const bool:send_teaminfo = true, const bool:check_win_conditions = false); + +/* +* Sets the client's player model. +* +* @param index Client index +* @param model Model name +* @param update_index If true, the modelindex is updated as well +* +* @return 1 on success, 0 otherwise +*/ +native rg_set_user_model(const index, const model[], const bool:update_index = false); + +/* +* Resets the client's model. +* +* @param index Client index +* @param update_index If true, the modelindex is reset as well +* +* @return 1 on success, 0 otherwise +*/ +native rg_reset_user_model(const index, const bool:update_index = false); + +/* +* Enable/Disable player's footsteps. +* +* @param index Client index +* @param silent To enable silent footsteps +* +* @return 1 on success, 0 otherwise +*/ +native rg_set_user_footsteps(const index, bool:silent = false); + +/* +* Get the current footsteps state of the player. +* +* @param index Client index +* +* @return 1 if the player has silent footsteps, 0 otherwise +*/ +native rg_get_user_footsteps(const index); + +/* +* Transfers C4 from one player to another. +* +* @param index Client index +* @param receiver Receiver index, if 0 it will transfer to a random player +* +* @return Index of player entity if successfull, 0 otherwise +*/ +native rg_transfer_c4(const index, const receiver = 0); + +/* +* Instantly reload client's weapons. +* +* @param index Client index +* @param weapon Weapon entity-index, if 0 then all weapons will be reloaded +* +* @return 1 on success, 0 otherwise +*/ +native rg_instant_reload_weapons(const index, const weapon = 0); + +/* +* Plant a bomb. +* +* @param index Owner index or 0 for worldspawn. +* @param origin The origin of the bomb where it will be planted. +* @param angles The angles of the planted bomb. +* +* @return Index of bomb entity or AMX_NULLENT (-1) otherwise +*/ +native rg_plant_bomb(const index, Float:vecOrigin[3], Float:vecAngles[3] = {0.0,0.0,0.0}); + +/* +* Sets the amount of reward in the game account for all players. +* +* @param rules_index Look at the enum with name RewardRules +* @param amount The money amount +* +* @noreturn +*/ +native rg_set_account_rules(const RewardRules:rules_index, const amount); + +/* +* Gets the specified reward rule's money amount. +* +* @param rules_index Look at the enum with name RewardRules +* +* @return The amount of reward +* +*/ +native rg_get_account_rules(const RewardRules:rules_index); + +/* +* Checks if the bomb is planted. +* +* @return true if the bomb is planted, false otherwise +*/ +native bool:rg_is_bomb_planted(); + +/* +* Forces a player to join a team. +* +* @param index Client index +* @param team Team id +* +* @return 1 on success, 0 otherwise +*/ +native rg_join_team(const index, const TeamName:team); + +/* +* Instantly balances the teams. +* +* @noreturn +*/ +native rg_balance_teams(); + +/* +* Swaps players' teams without reseting frags, deaths and wins. +* +* @noreturn +*/ +native rg_swap_all_players(); + +/* +* Instantly switches the player to his opposite team. +* @note Switch from CT to TERRORIST is also opposite. +* +* @param index Client index +* +* @noreturn +*/ +native rg_switch_team(const index); + +/* +* Forces the player to switch to a specific weapon. +* +* @param index Client index +* @param weapon Weapon entity-index +* +* @return 1 on success, 0 otherwise +*/ +native rg_switch_weapon(const index, const weapon); + +/* +* Gets which team has a higher join priority. +* +* @return Returns the Team Name +*/ +native TeamName:rg_get_join_team_priority(); + +/* +* Checks whether the player can take damage from the attacker. +* +* @param index Client index +* @param attacker Attacker index +* +* @return true if player can take damage, false otherwise +*/ +native bool:rg_is_player_can_takedamage(const index, const attacker); + +/* +* Checks whether the player can respawn. +* +* @param index Client index +* +* @return true if player can respawn, false otherwise +*/ +native bool:rg_is_player_can_respawn(const index); + +/* +* Gets WeaponIdType from weaponbox +* +* @param entity Weaponbox entity +* +* @return return enum of WeaponIdType +*/ +native WeaponIdType:rg_get_weaponbox_id(const entity); + +/* +* Respawn on round for players/bots. +* +* @param index Client index +* +* @noreturn +*/ +native rg_round_respawn(const index); + +/* +* Resets player's maxspeed. +* +* @param index Client index +* +* @noreturn +*/ +native rg_reset_maxspeed(const index); + +/* +* Draws a HUD progress bar which fills from 0% to 100% for the time duration in seconds. +* @note: Set the duration to 0 to hide the bar. +* +* @param index Client index +* @param time Duration +* @param observer Send for everyone who is observing the player +* +* @noreturn +*/ +native rg_send_bartime(const index, const duration, const bool:observer = true); + +/* +* Same as BarTime, but StartPercent specifies how much of the bar is (already) filled. +* +* @param index Client index +* @param time Duration +* @param startPercent Start percent +* @param observer Send for everyone who is observing the player +* +* @noreturn +*/ +native rg_send_bartime2(const index, const duration, const Float:startPercent, const bool:observer = true); + +/* +* Sends the SendAudio message - plays the specified audio. +* +* @param index Receiver index or use 0 for everyone +* @param sample Sound file to play +* @param pitch Sound pitch +* +* @noreturn +*/ +native rg_send_audio(const index, const sample[], const pitch = PITCH_NORM); + +/** +* Sets a parameter of the member CSPlayerItem::m_ItemInfo +* +* @param entity Entity index +* @param type Item info type. See ItemInfo constants. +* +*/ +native rg_set_iteminfo(const entity, ItemInfo:type, any:...); + +/** +* Gets a parameter of the member CSPlayerItem::m_ItemInfo +* +* @param entity Entity index +* @param type Item info type. See ItemInfo constants. +* +*/ +native rg_get_iteminfo(const ent, ItemInfo:type, any:...); + +/** +* Sets a parameter of the global CBasePlayerItem::m_ItemInfoArray array +* @note To have effect on client side (i.g. ammo size on HUD) you should +* alter this value BEFORE WeaponList message is sent to client, or +* force it's alteration by sending again to the specific client. +* Hooking WeaponList message with AMXX's register_message is a choice. +* +* @param weapon_id Weapon id, see WEAPON_* constants +* @param type Item info type. See ItemInfo constants. +* +*/ +native rg_set_global_iteminfo(const {WeaponIdType,_}:weapon_id, ItemInfo:type, any:...); + +/** +* Gets a parameter of the global CBasePlayerItem::m_ItemInfoArray array +* +* @param weapon_id Weapon id, see WEAPON_* constants +* @param type Item info type. See ItemInfo constants. +* +*/ +native rg_get_global_iteminfo(const {WeaponIdType,_}:weapon_id, ItemInfo:type, any:...); + +/* +* Adds hint message to the queue. +* +* @param index Client index +* @param message The message hint +* @param duration The time duration in seconds stays on screen +* @param bDisplayIfPlayerDead Whether to print hint for dead players? +* @param bOverride Whether to override previous messages? +* +* @return true if prints, false otherwise +*/ +native bool:rg_hint_message(const index, const message[], Float:duration = 6.0, bool:bDisplayIfPlayerDead = false, bool:bOverride = false); + +/* +* Instantly restart round. +* +* @noreturn +*/ +native rg_restart_round(); + +/* +* Instantly check win conditions. +* +* @noreturn +*/ +native rg_check_win_conditions(); + +/* +* Instantly initialize player counts. +* +* @param num_alive_terrorist Count alive terrorists +* @param num_alive_ct Count alive counter-terrorists +* @param num_dead_terrorist Count dead terrorists +* @param num_dead_ct Count dead counter-terrorists +* +* @noreturn +*/ +native rg_initialize_player_counts(&num_alive_terrorist = 0, &num_alive_ct = 0, &num_dead_terrorist = 0, &num_dead_ct = 0); + +/* +* Reset if player can hear another player. +* +* @param index Player id +* @noreturn +*/ +native rg_reset_can_hear_player(const index); + +/* +* Set if player can hear another player +* +* @param listener Listener player id +* @param sender Sender player id +* @param can_hear Can listener hear sender +* +* @noreturn +*/ +native rg_set_can_hear_player(const listener, const sender, const bool:can_hear); + +/* +* Get if player can hear another player +* +* @param listener Listener player id +* @param sender Sender player id +* +* @return boolean +*/ +native bool:rg_get_can_hear_player(const listener, const sender); + +/* +* Spawn a head gib +* +* @param index Entity id +* +* @return Index of head gib entity or AMX_NULLENT (-1) otherwise +*/ +native rg_spawn_head_gib(const index); + +/* +* Spawn random gibs +* +* @param index Entity id +* @param cGibs Count gibs +* @param bHuman Set gibs of a human or alien +* +* @noreturn +*/ +native rg_spawn_random_gibs(const index, const cGibs, const bool:bHuman = true); + +/* +* Spawn a grenade (HEGrenade, Flashbang, SmokeGrenade, or C4) +* +* @param weaponId WEAPON_HEGRENADE, WEAPON_SMOKEGRENADE, WEAPON_FLASHBANG or WEAPON_C4 +* @param pevOwner Grenade owner +* @param vecSrc Grenade spawn position +* @param vecThrow Grenade velocity vector +* @param time Grenade explosion time +* @param iTeam Grenade team, see TEAM_* constants +* @param usEvent Event index related to grenade (returned value of precache_event) +* +* @return Entity index on success, AMX_NULLENT (-1) otherwise +*/ +native rg_spawn_grenade(WeaponIdType:weaponId, pevOwner, Float:vecSrc[3], Float:vecThrow[3], Float:time, TeamName:iTeam, usEvent = 0); + +/* +* Spawn a weaponbox entity with its properties +* +* @param pItem Weapon entity index to attach +* @param pPlayerOwner Player index to remove pItem entity (0 = no weapon owner) +* @param modelName Model name ("models/w_*.mdl") +* @param origin Weaponbox origin position +* @param angles Weaponbox angles +* @param velocity Weaponbox initial velocity vector +* @param lifeTime Time to stay in world (< 0.0 = use mp_item_staytime cvar value) +* @param packAmmo Set if ammo should be removed from weapon owner +* +* @return Weaponbox ent index on success, AMX_NULLENT (-1) otherwise +*/ +native rg_create_weaponbox(const pItem, const pPlayerOwner, const modelName[], Float:origin[3], Float:angles[3], Float:velocity[3], Float:lifeTime, bool:packAmmo); + +/* +* Removes an entity using gamedll's UTIL_Remove function, which sets a frame delay to ensure its removal. +* +* @param pEntity Entity index to remove +* +* @return 1 on success, 0 otherwise +*/ +native rg_remove_entity(const pEntity); + +/* +* Creates a Decal in world based on a traceresult. +* +* @param ptr Traceresult pointer, use Fakemeta's create_tr2 to instantiate one +* @param decalNumber Number of decal to spray, see DECAL_ constants on cssdk_const.inc +* +* @noreturn +*/ +native rg_decal_trace(const ptr, Decal:decalNumber); + +/* +* Emits a sound based on a traceresult simulating a bullet hit (metal, wood, concrete, etc.). +* @note Used mostly on trace attacks (bullets, knife). +* +* @param ptr Traceresult pointer, use Fakemeta's create_tr2 to instantiate one +* @param vecSrc Start position +* @param vecEnd End position, must match ptr's vecEndPos member +* @param iBulletType Bullet type, see BULLET_* constants in cssdk_const.inc +* +* @noreturn +*/ +native rg_emit_texture_sound(const ptr, Float:vecSrc[3], Float:vecEnd[3], Bullet:iBulletType); + +/* +* Generates an ammo slot in game's logic +* @note To see a visual effect, WeaponList message should be sent using the custom ammo name, +* where ammo icon HUD will be the one listed in "sprites/weapon_.txt" file. +* +* @param szAmmoname Ammo name to create. +* +* @note Maximum ammo index is 31, after that every ammo instantiation will start from 1 overriding existing ones. +* @return New ammo index. If name already exists, will return the matched index from memory. +*/ +native rg_add_ammo_registry(const szAmmoname[]); + +/* +* Deploys a weapon attached to a player using the CBasePlayerWeapon::DefaultDeploy function. +* +* @param entity Weapon to deploy. Must be attached to a player. +* @param szViewModel Weapon view model name ("models/v_*.mdl") +* @param szWeaponModel Weapon world model bame ("models/p_*.mdl") +* @param iAnim Weapon view model animation to play (often "deploy", use HLMV to see anim index) +* @param szAnimExt Player anim extension name to assign. Examples: "carbine", "shotgun", "knife", etc. +* Use HLMV on a player model to see animext names. +* @param skiplocal If 0, weapon animation will be forced to play on client ignoring active client prediction. +* +* @return 1 on successful weapon deploy, 0 otherwise. +*/ +native rg_weapon_deploy(const entity, const szViewModel[], const szWeaponModel[], iAnim, const szAnimExt[], skiplocal = 0); + +/* +* Reloads a weapon or a player's active weapon using the CBasePlayerWeapon::DefaultReload function. +* +* @param entity Weapon to reload (> MaxClients) OR player index to reload his current active weapon (>= 1 & <= MaxClients). +* @param iClipSize Weapon max clip to check. 0 = weapon max clip stored in ItemInfo +* @param iAnim Weapon view model animation to play (often "reload", use HLMV to see anim index) +* @param fDelay Player reload duration before clip refill. +* +* @return 1 on successful weapon reload, 0 otherwise. +*/ +native rg_weapon_reload(const entity, iClipSize, iAnim, Float:fDelay); + +/* +* Forces shotgun reload thinking on a weapon or a player's active weapon using the CBasePlayerWeapon::DefaultShotgunReload function. +* +* @param entity Weapon to reload (> MaxClients) OR player index to reload his current active weapon (>= 1 & <= MaxClients). +* @param iAnim Weapon view model "insert" animation to play (use HLMV to see anim index) +* @param iStartAnim Weapon view model "start reload" animation to play (use HLMV to see anim index) +* @param fDelay Delay between each buckshot inserted +* @param fStartDelay Delay before buckshots insertion starts +* @param pszReloadSound1 Sound to play on every insertion +* @param pszReloadSound2 Another sound to play on every insertion +* +* @note This is used inside weapon's Reload function and is often called every frame player is pressing IN_RELOAD button. +* @return 1 while weapon not in delay and with ammo remaining to load, 0 otherwise. +*/ +native rg_weapon_shotgun_reload(const entity, iAnim, iStartAnim, Float:fDelay, Float:fStartDelay, const pszReloadSound1[] = "", const pszReloadSound2[] = ""); + +/* +* Sends a weapon animation using the CBasePlayerWeapon::SendWeaponAnim function. +* +* @param entity Weapon to send animation on owner (> MaxClients) OR player index to send animation (>= 1 & <= MaxClients). +* @param iAnim Weapon view model animation to play (use HLMV to see anim index) +* @param skiplocal If 0, weapon animation will be forced to play on client ignoring active client prediction. +* +* @noreturn +*/ +native rg_weapon_send_animation(const entity, iAnim, skiplocal = 0); + +/* +* Emits a "recoil" effect on weapon's player using the CBasePlayerWeapon::KickBack function. +* +* @param entity Weapon to reload (> MaxClients) OR player index to reload his current active weapon (>= 1 & <= MaxClients). +* @param up_base Minimum vertical punchangle +* @param lateral_base Minimum horizontal punchangle +* @param up_modifier Vertical punchangle units to multiply to m_iShotsFired member +* @param lateral_modifier Horizontal punchangle units to multiply to m_iShotsFired member +* @param up_max Maximum vertical punchangle +* @param lateral_max Maximum horizontal punchangle +* @param direction_change Probability to change punchangle orientation (positive or negative). 0 = 100% (1/1), 1 = 50% (1/2), 2 = 33.3% (1/3), ... +* +* @noreturn +*/ +native rg_weapon_kickback(const entity, Float:up_base, Float:lateral_base, Float:up_modifier, Float:lateral_modifier, Float:up_max, Float:lateral_max, direction_change); + +/* +* Switches player current weapon into the best one on its inventory using the CHalfLifeMultiplay::GetNextBestWeapon function. +* +* @param player Player index. +* @param currentWeapon Current player active weapon. 0 = retrieve from m_pActiveItem member +* +* @note Weapon selection is based on weapon's Weight attribute from ItemInfo structure. +* @return 1 if weapon was found and switched to, 0 otherwise +*/ +native rg_switch_best_weapon(const player, const currentWeapon = 0); + +/* +* Disappear a player from the world. Used when VIP reaches escape zone. Basically a silent kill. +* +* @param player Player index. +* +* @noreturn +*/ +native rg_disappear(const player); + +/* +* Sets player current Observer mode. +* @note Player must be a valid observer (m_afPhysicsFlags & PFLAG_OBSERVER). +* +* @param player Player index. +* @param mode Observer mode, see OBS_* constants in cssdk_const.inc +* +* @noreturn +*/ +native rg_set_observer_mode(const player, const mode); + +/* +* Emits a death notice (logs, DeathMsg event, win conditions check) +* +* @param pVictim Player index. +* @param pKiller Killer entity. +* @param pevInflictor Inflictor entity. 0 = world +* +* @noreturn +*/ +native rg_death_notice(const pVictim, const pKiller, const pevInflictor); + +/* +* Checks a player relationship with another reference +* +* @param player Player index +* @param target Target index +* +* @return Match player relationship, see GR_* constants in cssdk_const.inc +*/ +native rg_player_relationship(const player, const target); + +/* +* Sends death messages to all players, including info about the killer, victim, weapon used, +* extra death flags, death position, assistant, and kill rarity using the CHalfLifeMultiplay::SendDeathMessage function. +* +* @param pKiller Killer index (if any). +* @param pVictim Victim index. +* @param pAssister Assisting player index (if any). +* @param pevInflictor Inflictor entity. 0 = world +* @param killerWeaponName The name of the weapon used by the killer. +* @param iDeathMessageFlags Flags indicating extra death message info, see DeathMessageFlags enum in cssdk_const.inc +* @param iRarityOfKill An bitsums representing the rarity classification of the kill, see KillRarity enum in cssdk_const.inc +* +* @noreturn +*/ +native rg_send_death_message(const pKiller, const pVictim, const pAssister, const pevInflictor, const killerWeaponName[], const DeathMessageFlags:iDeathMessageFlags, const KillRarity:iRarityOfKill); diff --git a/bin/compiler/include/reapi_gamedll_const.inc b/bin/compiler/include/reapi_gamedll_const.inc new file mode 100644 index 0000000..30c0f55 --- /dev/null +++ b/bin/compiler/include/reapi_gamedll_const.inc @@ -0,0 +1,6401 @@ +#if defined _reapi_gamedll_const_included + #endinput +#endif + +#define _reapi_gamedll_const_included + +/** +* Returns true if round has ended by expired time +* +* @note Use this for hookchain RG_RoundEnd with the parameter ScenarioEventEndRound:event +*/ +#define IsRoundExpireEvent(%0) (((1 << _:(%0) + _:ScenarioEventEndRound:0) & ((1 << _:ROUND_TARGET_SAVED) | (1 << _:ROUND_HOSTAGE_NOT_RESCUED) | (1 << _:ROUND_TERRORISTS_NOT_ESCAPED) | (1 << _:ROUND_VIP_NOT_ESCAPED) | (1 << _:ROUND_GAME_OVER))) != 0) + +/** +* suppress warning: 200 on amxmodx 1.8.2 +*/ +#if AMXX_VERSION_NUM < 183 + #define RG_CBaseAnimating_ResetSequenceInfo RG_CBaseAnimating_ResetSequence + #define RG_CBasePlayer_Observer_IsValidTarget RG_CBasePlayer_Observer_IsValid + #define RG_CSGameRules_FShouldSwitchWeapon RG_CSGameRules_ShouldSwitchWpn + #define RG_CSGameRules_GetNextBestWeapon RG_CSGameRules_GetNextBestWpn + #define RG_CSGameRules_FlPlayerFallDamage RG_CSGameRules_PlayerFallDmg + #define RG_CSGameRules_FPlayerCanTakeDamage RG_CSGameRules_PlayerCanTakeDmg + #define RG_CSGameRules_FPlayerCanRespawn RG_CSGameRules_PlayerCanRespawn + #define RG_CSGameRules_GetPlayerSpawnSpot RG_CSGameRules_PlayerSpawnSpot + #define RG_CSGameRules_ClientUserInfoChanged RG_CSGameRules_UserInfoChanged + #define RG_CSGameRules_CanHavePlayerItem RG_CSGameRules_CanPlayerItem + #define RG_CSGameRules_DeadPlayerWeapons RG_CSGameRules_DeadPlayerWpn + #define RG_CSGameRules_CheckMapConditions RG_CSGameRules_CheckMapCond + #define RG_CSGameRules_CheckWinConditions RG_CSGameRules_CheckWinCond + #define RG_CSGameRules_CanPlayerHearPlayer RG_CSGameRules_CanPlrHearPlr + #define RG_CBasePlayer_SetClientUserInfoModel RG_CBasePlayer_SetUserInfoModel + #define RG_CBasePlayer_SetClientUserInfoName RG_CBasePlayer_SetUserInfoName + #define m_Shield_hEntToIgnoreTouchesFrom m_Shield_EntToIgnoreTouchesFrom + #define RG_CBasePlayer_RemoveSpawnProtection RG_CBasePlayer_RemoveProtection + #define RG_CBasePlayer_SetSpawnProtection RG_CBasePlayer_SetProtection + #define RG_CBasePlayerWeapon_DefaultDeploy RG_CBaseWeapon_DefDeploy + #define RG_CBasePlayerWeapon_DefaultReload RG_CBaseWeapon_DefReload + #define RG_CBasePlayerWeapon_DefaultShotgunReload RG_CBaseWeapon_DefShotgunReload + #define RG_CBasePlayer_Observer_SetMode RG_CBasePlayer_Observer_SetMod + #define RG_CBasePlayer_Observer_FindNextPlayer RG_CBasePlayer_Observer_FindNxt +#endif + +/** +* enum UnifiedSignals +*/ +enum UnifiedSignals +{ + US_Signal, + US_State +}; + +/** +* enum AccountSet +*/ +enum AccountSet +{ + AS_SET, // Setts the value of the account + AS_ADD // Adds a value to the account +}; + +/** +* Weapon info types for use with rg_set_weapon_info/rg_get_weapon_info() +*/ +enum WpnInfo +{ + /* + * Description: - + * Return type: enum WeaponIdType + * Get params: rg_get_weapon_info(const weapon_name[], WI_ID); + * Set params: - + */ + WI_ID, + + /* + * Description: - + * Return type: int + * Get params: rg_get_weapon_info(const weapon_id, WI_COST); + * Set params: rg_set_weapon_info(const weapon_id, WI_COST, const value); + */ + WI_COST, + + /* + * Description: - + * Return type: int + * Get params: rg_get_weapon_info(const weapon_id, WI_CLIP_COST); + * Set params: rg_set_weapon_info(const weapon_id, WI_CLIP_COST, const value); + */ + WI_CLIP_COST, + + /* + * Description: - + * Return type: int + * Get params: rg_get_weapon_info(const weapon_id, WI_BUY_CLIP_SIZE); + * Set params: rg_set_weapon_info(const weapon_id, WI_BUY_CLIP_SIZE, const value); + */ + WI_BUY_CLIP_SIZE, + + /* + * Description: - + * Return type: int + * Get params: rg_get_weapon_info(const weapon_id, WI_GUN_CLIP_SIZE); + * Set params: rg_set_weapon_info(const weapon_id, WI_GUN_CLIP_SIZE, const value); + */ + WI_GUN_CLIP_SIZE, + + /* + * Description: - + * Return type: int + * Get params: rg_get_weapon_info(const weapon_id, WI_MAX_ROUNDS); + * Set params: rg_set_weapon_info(const weapon_id, WI_MAX_ROUNDS, const value); + */ + WI_MAX_ROUNDS, + + /* + * Description: - + * Return type: int + * Get params: rg_get_weapon_info(const weapon_id, WI_AMMO_TYPE); + * Set params: rg_set_weapon_info(const weapon_id, WI_AMMO_TYPE, const value); + */ + WI_AMMO_TYPE, + + /* + * Description: - + * Return type: - + * Get params: rg_get_weapon_info(const weapon_id, WI_AMMO_NAME, const output[], maxlenght); + * Set params: - + */ + WI_AMMO_NAME, + + /* + * Description: - + * Return type: - + * Get params: rg_get_weapon_info(const weapon_id, WI_NAME, const output[], maxlenght); + * Set params: - + */ + WI_NAME, + + /* + * Description: - + * Return type: enum InventorySlotType + * Get params: rg_get_weapon_info(const weapon_id, WI_SLOT); + * Set params: rg_set_weapon_info(const weapon_id, WI_SLOT, const value); + */ + WI_SLOT, +}; + +/** +* Item's info types for use with rg_set_[global_]iteminfo/rg_get_[global_]iteminfo() +*/ +enum ItemInfo +{ + /* + * Description: - + * Return type: int + * Get params: rg_get_iteminfo(const ent, ItemInfo_iSlot); + * Set params: rg_set_iteminfo(const ent, ItemInfo_iSlot, const value); + */ + ItemInfo_iSlot, + + /* + * Description: - + * Return type: int + * Get params: rg_get_iteminfo(const ent, ItemInfo_iPosition); + * Set params: rg_set_iteminfo(const ent, ItemInfo_iPosition, const value); + */ + ItemInfo_iPosition, + + /* + * Description: - + * Return type: - + * Get params: rg_get_iteminfo(const ent, ItemInfo_pszAmmo1, const output[], maxlenght); + * Set params: rg_set_iteminfo(const ent, ItemInfo_pszAmmo1, const value[]); + */ + ItemInfo_pszAmmo1, + + /* + * Description: - + * Return type: int + * Get params: rg_get_iteminfo(const ent, ItemInfo_iMaxAmmo1); + * Set params: rg_set_iteminfo(const ent, ItemInfo_iMaxAmmo1, const value); + */ + ItemInfo_iMaxAmmo1, + + /* + * Description: - + * Return type: - + * Get params: rg_get_iteminfo(const ent, ItemInfo_pszAmmo2, const output[], maxlenght); + * Set params: rg_set_iteminfo(const ent, ItemInfo_pszAmmo2, const value[]); + */ + ItemInfo_pszAmmo2, + + /* + * Description: - + * Return type: int + * Get params: rg_get_iteminfo(const ent, ItemInfo_iMaxAmmo2); + * Set params: rg_set_iteminfo(const ent, ItemInfo_iMaxAmmo2, const value); + */ + ItemInfo_iMaxAmmo2, + + /* + * Description: - + * Return type: - + * Get params: rg_get_iteminfo(const ent, ItemInfo_pszName, const output[], maxlenght); + * Set params: rg_set_iteminfo(const ent, ItemInfo_pszName, const value[]); + */ + ItemInfo_pszName, + + /* + * Description: - + * Return type: int + * Get params: rg_get_iteminfo(const ent, ItemInfo_iMaxClip); + * Set params: rg_set_iteminfo(const ent, ItemInfo_iMaxClip, const value); + */ + ItemInfo_iMaxClip, + + /* + * Description: - + * Return type: int + * Get params: rg_get_iteminfo(const ent, ItemInfo_iId); + * Set params: rg_set_iteminfo(const ent, ItemInfo_iId, const value); + */ + ItemInfo_iId, + + /* + * Description: - + * Return type: int + * Get params: rg_get_iteminfo(const ent, ItemInfo_iFlags); + * Set params: rg_set_iteminfo(const ent, ItemInfo_iFlags, const value); + */ + ItemInfo_iFlags, + + /* + * Description: - + * Return type: int + * Get params: rg_get_iteminfo(const ent, ItemInfo_iWeight); + * Set params: rg_set_iteminfo(const ent, ItemInfo_iWeight, const value); + */ + ItemInfo_iWeight +}; + +/** +* Use with rg_give_item +*/ +enum GiveType +{ + GT_APPEND, // Just give item + GT_REPLACE, // Give the item and remove all other weapons from the slot + GT_DROP_AND_REPLACE // Give the item and drop all other weapons from the slot +}; + +/** +* MenuChooseTeam +*/ +enum MenuChooseTeam +{ + MenuChoose_T = 1, + MenuChoose_CT, + MenuChoose_VIP, + + MenuChoose_AutoSelect = 5, + MenuChoose_Spec, +}; + +/** +* VGUIMenu +*/ +enum VGUIMenu +{ + VGUI_Menu_Team = 2, + VGUI_Menu_MapBriefing = 4, + + VGUI_Menu_Class_T = 26, + VGUI_Menu_Class_CT, + VGUI_Menu_Buy, + VGUI_Menu_Buy_Pistol, + VGUI_Menu_Buy_ShotGun, + VGUI_Menu_Buy_Rifle, + VGUI_Menu_Buy_SubMachineGun, + VGUI_Menu_Buy_MachineGun, + VGUI_Menu_Buy_Item, +}; + +/** +* GamedllFunc +*/ +enum GamedllFunc +{ + /* + * Description: - + * Return type: int + * Params: (const pObserver) + */ + RG_GetForceCamera = BEGIN_FUNC_REGION(gamedll), + + /* + * Description: - + * Params: (const index, const inflictor, const attacker, const Float:fadeTime, const Float:fadeHold, const alpha, Float:color[3]) + */ + RG_PlayerBlind, + + /* + * Description: - + * Params: (const index, inflictor, attacker, Float:vecSrc[3], Float:vecSpot[3], tracehandle) + */ + RG_RadiusFlash_TraceLine, + + /* + * Description: - + * Params: (WinStatus:status, ScenarioEventEndRound:event, Float:tmDelay) + */ + RG_RoundEnd, + + /* + * Description: - + * Params: (const playerIndex) + */ + RG_PM_Move, + + /* + * Description: - + * Params: (const playerIndex) + */ + RG_PM_AirMove, + + /* + * Description: - + * Params: (const index, const slot) + */ + RG_HandleMenu_ChooseAppearance, + + /* + * Description: - + * Params: (const index, const MenuChooseTeam:slot) + */ + RG_HandleMenu_ChooseTeam, + + /* + * Description: - + * Params: (const index, const bitsSlots, const iDisplayTime, const iNeedMore, pszText[]) + */ + RG_ShowMenu, + + /* + * Description: - + * Params: (const index, VGUIMenu:menuType, const bitsSlots, szOldMenu[]) + */ + RG_ShowVGUIMenu, + + /* + * Description: The player buys ammo. + * Return type: bool + * Params: (const index, const weapon_entity, const bool:blinkMoney) + */ + RG_BuyGunAmmo, + + /* + * Description: - + * Return type: CBaseEntity * (Entity index of weapon) + * Params: (const index, const WeaponIdType:weaponID) + */ + RG_BuyWeaponByWeaponID, + + /* + * Description: Called when a player throws the hegrenade. + * Return type: CGrenade * (Entity index of hegrenade) + * Params: (const index, Float:vecStart[3], Float:vecVelocity[3], Float:time, const team, const usEvent) + */ + RG_ThrowHeGrenade, + + /* + * Description: Called when a player throws the flashbang. + * Return type: CGrenade * (Entity index of flashbang) + * Params: (const index, Float:vecStart[3], Float:vecVelocity[3], Float:time) + */ + RG_ThrowFlashbang, + + /* + * Description: Called when a player throws the smokegrenade. + * Return type: CGrenade * (Entity index of smokegrenade) + * Params: (const index, Float:vecStart[3], Float:vecVelocity[3], Float:time, const usEvent) + */ + RG_ThrowSmokeGrenade, + + /* + * Description: Called when a player plant's the bomb on the ground. + * Return type: CGrenade * (Entity index of bomb) + * Params: (const index, Float:vecStart[3], Float:vecVelocity[3]) + */ + RG_PlantBomb, + + /* + * Description: Called when a player hit to entity. + * Return type: bool + * Params: (Float:vecSrc[3], Float:vecEnd[3], index, entity) + */ + RG_IsPenetrableEntity, + + /* + * Description: - + * Return type: CGib * (Entity index of gib) + * Params: (pevVictim) + */ + RG_SpawnHeadGib, + + /* + * Description: - + * Params: (pevVictim, cGibs, human) + */ + RG_SpawnRandomGibs, + + /* + * Description: Called when a player drops a weapon (usually manual drop or death) + * Return type: CWeaponBox * (Entity index of weaponbox) + * Params: (const weaponent, const owner, modelName[], Float:origin[3], Float:angles[3], Float:velocity[3], Float:lifeTime, bool:packAmmo) + */ + RG_CreateWeaponBox, + + /* + * Description: Called when a player is on a ladder. + * Params: (const pLadder, const playerIndex) + */ + RG_PM_LadderMove, + + /* + * Description: Called on every frame after a player jumps on water for a short period of time + * Params: (const playerIndex) + */ + RG_PM_WaterJump, + + /* + * Description: Called when a player jumps on water for the first time + * Params: (const playerIndex) + */ + RG_PM_CheckWaterJump, + + /* + * Description: Called on every frame while player presses jump button + * Params: (const playerIndex) + */ + RG_PM_Jump, + + /* + * Description: Called on every frame to check player ducking + * Params: (const playerIndex) + */ + RG_PM_Duck, + + /* + * Description: Called whenever player tries to unduck + * Params: (const playerIndex) + */ + RG_PM_UnDuck, + + /* + * Description: Called whenever player emits an step sound + * Params: (step, Float:fvol, const playerIndex) + */ + RG_PM_PlayStepSound, + + /* + * Description: Called whenever player is on air (not touching floor) + * Params: (Float:wishdir[3], Float:wishspeed, Float:accel, const playerIndex) + */ + RG_PM_AirAccelerate, + + /* + * Description: Called when game clears multidamage data (before TraceAttack) + * Params: () + */ + RG_ClearMultiDamage, + + /* + * Description: Called inside TraceAttack to store entity damage to multidamage data + * Params: (const pevInflictor, const pEntity, Float:flDamage, bitsDamageType) + */ + RG_AddMultiDamage, + + /* + * Description: Called after game finished a bullet tracing for applying damage cached on multidamage data + * Params: (const pevInflictor, const pevAttacker) + */ + RG_ApplyMultiDamage, + + /* + * Description: Called when player buys an item from buy menu (Nightvision, Kevlar, etc.) + * Params: (const pPlayer, iSlot) + */ + RG_BuyItem, +}; + +/** +* GamedllFunc CBaseAnimating +*/ +enum GamedllFunc_CBaseAnimating +{ + /* + * Description: - + * Params: (const this) + */ + RG_CBaseAnimating_ResetSequenceInfo = BEGIN_FUNC_REGION(animating) +}; + +/** +* GamedllFunc CGrenade +*/ +enum GamedllFunc_CGrenade +{ + /* + * Description: Called when a player goes to start defuse the bomb. + * Params: (const this, const player) + */ + RG_CGrenade_DefuseBombStart = BEGIN_FUNC_REGION(grenade), + + /* + * Description: Called when a player has ended to defuses the bomb or when the previous defuser has taken off or been killed. + * Params: (const this, const player, bool:bDefused) + */ + RG_CGrenade_DefuseBombEnd, + + /* + * Description: Called when a hegrenade detonates. + * Params: (const this, tracehandle, const bitsDamageType) + */ + RG_CGrenade_ExplodeHeGrenade, + + /* + * Description: Called when a flashbang detonates. + * Params: (const this, tracehandle, const bitsDamageType) + */ + RG_CGrenade_ExplodeFlashbang, + + /* + * Description: Called when a smokegrenade detonates. + * Params: (const this) + */ + RG_CGrenade_ExplodeSmokeGrenade, + + /* + * Description: Called when a C4 goes to explodes. + * Params: (const this, tracehandle, const bitsDamageType) + */ + RG_CGrenade_ExplodeBomb, +}; + +/** +* GamedllFunc CWeaponBox +*/ +enum GamedllFunc_CWeaponBox +{ + /* + * Description: Called when a player dies to pack up the appropriate weapons and ammo items, and creates a weaponbox that falls to floor with sets specify the model or when a player drop the item. + * Params: (const this, const szModelName[]) + */ + RG_CWeaponBox_SetModel = BEGIN_FUNC_REGION(weaponbox), +}; + +/** +* GamedllFunc CBasePlayer +*/ +enum GamedllFunc_CBasePlayer +{ + /* + * Description: - + * Params: (const this) + */ + RG_CBasePlayer_Spawn = BEGIN_FUNC_REGION(player), + + /* + * Description: - + * Params: (const this) + */ + RG_CBasePlayer_Precache, + + /* + * Description: - + * Return type: int + * Params: (const this) + */ + RG_CBasePlayer_ObjectCaps, + + /* + * Description: - + * Return type: int + * Params: (const this) + */ + RG_CBasePlayer_Classify, + + /* + * Description: - + * Params: (const this, pevAttacker, Float:flDamage, Float:vecDir[3], tracehandle, bitsDamageType) + */ + RG_CBasePlayer_TraceAttack, + + /* + * Description: - + * Return type: int + * Params: (const this, pevInflictor, pevAttacker, Float:flDamage, bitsDamageType) + */ + RG_CBasePlayer_TakeDamage, + + /* + * Description: - + * Params: (const this, Float:flHealth, bitsDamageType) + */ + RG_CBasePlayer_TakeHealth, + + /* + * Description: - + * Params: (const this, pevAttacker, iGib) + */ + RG_CBasePlayer_Killed, + + /* + * Description: - + * Params: (const this, score, bAllowNegativeScore) + */ + RG_CBasePlayer_AddPoints, + + /* + * Description: - + * Params: (const this, score, bAllowNegativeScore) + */ + RG_CBasePlayer_AddPointsToTeam, + + /* + * Description: - + * Return type: BOOL + * Params: (const this, const pItem) + */ + RG_CBasePlayer_AddPlayerItem, + + /* + * Description: - + * Return type: BOOL + * Params: (const this, const pItem) + */ + RG_CBasePlayer_RemovePlayerItem, + + /* + * Description: - + * Return type: int + * Params: (const this, iAmount, szName[], iMax) + */ + RG_CBasePlayer_GiveAmmo, + + /* + * Description: - + * Params: (const this) + */ + RG_CBasePlayer_ResetMaxSpeed, + + /* + * Description: - + * Params: (const this) + */ + RG_CBasePlayer_Jump, + + /* + * Description: - + * Params: (const this) + */ + RG_CBasePlayer_Duck, + + /* + * Description: - + * Params: (const this) + */ + RG_CBasePlayer_PreThink, + + /* + * Description: - + * Params: (const this) + */ + RG_CBasePlayer_PostThink, + + /* + * Description: - + * Params: (const this) + */ + RG_CBasePlayer_UpdateClientData, + + /* + * Description: - + * Params: (const this) + */ + RG_CBasePlayer_ImpulseCommands, + + /* + * Description: - + * Params: (const this) + */ + RG_CBasePlayer_RoundRespawn, + + /* + * Description: - + * Params: (const this, Float:flUntilTime, Float:flHoldTime, Float:flFadeTime, iAlpha) + */ + RG_CBasePlayer_Blind, + + /* + * Description: - + * Params: (const this, infobuffer[], szNewModel[]) + */ + RG_CBasePlayer_SetClientUserInfoModel, + + /* + * Description: - + * Params: (const this, infobuffer[], szNewName[]) + */ + RG_CBasePlayer_SetClientUserInfoName, + + /* + * Description: - + * Params: (const this, iPlayerIndex, bool:bSameTeam) + */ + RG_CBasePlayer_Observer_IsValidTarget, + + /* + * Description: - + * Params: (const this, PLAYER_ANIM:playerAnim) + */ + RG_CBasePlayer_SetAnimation, + + /* + * Description: - + * Params: (const this) + */ + RG_CBasePlayer_GiveDefaultItems, + + /* + * Description: - + * Return type: CBaseEntity * (Entity index of item) + * Params: (const this, const pszName[]) + */ + RG_CBasePlayer_GiveNamedItem, + + /* + * Description: - + * Params: (const this, amount, RewardType:type, bool:bTrackChange) + */ + RG_CBasePlayer_AddAccount, + + /* + * Description: - + * Params: (const this, bool:bDeploy) + */ + RG_CBasePlayer_GiveShield, + + /* + * Description: - + * Return type: CBaseEntity * (Entity index of item) + * Params: (const this, const pszItemName[]) + */ + RG_CBasePlayer_DropPlayerItem, + + /* + * Description: - + * Params: (const this, ItemID:item, ItemRestType:type) + */ + RG_CBasePlayer_HasRestrictItem, + + /* + * Description: Called when a player throws the shield on the ground. + * Return type: CBaseEntity * (Entity index of shield) + * Params: (const this, bool:deploy) + */ + RG_CBasePlayer_DropShield, + + /* + * Description: Called on spawn, the attempt to equip a player. + * Params: (const this, bool:addDefault, bool:equipGame) + */ + RG_CBasePlayer_OnSpawnEquip, + + /* + * Description: The player uses a radio message. + * Called on self-radio uses, throwing grenades or on freeze time end. + * Params: (const this, const msg_id[], const msg_verbose[], pitch, bool:showIcon) + */ + RG_CBasePlayer_Radio, + + /* + * Description: VIP player got to the point of rescue. + * Params: (const this) + */ + RG_CBasePlayer_Disappear, + + /* + * Description: Makes a random player the VIP. + * Params: (const this) + */ + RG_CBasePlayer_MakeVIP, + + /* + * Description: Makes a random player the bomber. + * Return type: bool + * Params: (const this) + */ + RG_CBasePlayer_MakeBomber, + + /* + * Description: The player goes into observer mode. + * Params: (const this, Float:vecPosition[3], Float:vecViewAngle[3]) + */ + RG_CBasePlayer_StartObserver, + + /* + * Description: Called when a player enters the game. + * Return type: bool + * Params: (const this) + */ + RG_CBasePlayer_GetIntoGame, + + /* + * Description: Called when a player dying and goes into observer mode like StartObserver + * Params: (const this) + */ + RG_CBasePlayer_StartDeathCam, + + /* + * Description: Called when a player goes switch to opposite team after auto-teambalance or caused by 3rd-party things. + * @note This doesn't register the event when a player switched manually + * Params: (const this) + */ + RG_CBasePlayer_SwitchTeam, + + /* + * Description: Can a player switch to team? + * Return type: bool + * Params: (const this, TeamName:teamToSwap) + */ + RG_CBasePlayer_CanSwitchTeam, + + /* + * Description: Called when a player throws the grenade. + * Return type: CGrenade * (Entity index of grenade) + * Params: (const this, const grenade, Float:vecSrc[3], Float:vecThrow[3], Float:time, const usEvent) + */ + RG_CBasePlayer_ThrowGrenade, + + /* + * Description: Called when a player's set protection. + * Return type: void + * Params: (const this, Float:time) + */ + RG_CBasePlayer_SetSpawnProtection, + + /* + * Description: Called when a player's remove protection. + * Return type: void + * Params: (const this) + */ + RG_CBasePlayer_RemoveSpawnProtection, + + /* + * Description: Called when the game prints hint message into DHUD. + * Return type: bool + * Params: (const this, const message[], Float:duration, bool:bDisplayIfPlayerDead, bool:bOverride) + */ + RG_CBasePlayer_HintMessageEx, + + /* + * Description: Called when a player press use and if a suitable candidate is not found. + * Return type: void + * Params: (const this) + */ + RG_CBasePlayer_UseEmpty, + + /* + * Description: Called when a idle player is removed from server. + * Return type: void + * Params: (const this, const reason[]) + */ + RG_CBasePlayer_DropIdlePlayer, + + /* + * Description: Called when a client attempt to change the observer mode. + * Params: (const this, iMode) + */ + RG_CBasePlayer_Observer_SetMode, + + /* + * Description: Called when a client attempt to find the next observer. + * Return type: void + * Params: (const this, bool bReverse, name[]) + */ + RG_CBasePlayer_Observer_FindNextPlayer, + + /* + * Description: Called when a client emits a "pain sound" after received damage. + * Return type: void + * Params: (const this) + */ + RG_CBasePlayer_Pain, + + /* + * Description: Called when a client emits a "death sound" after death. + * Return type: void + * Params: (const this, lastHitGroup, bool:hasArmour) + */ + RG_CBasePlayer_DeathSound, + + /* + * Description: Called when a client "thinks for the join status". + * (permanently called on each call of "CBasePlayer::PreThink", and only when he is not assigned as specatator or not playing) + * Return type: void + * Params: (const this) + */ + RG_CBasePlayer_JoiningThink, + + /* + * Description: Called every client frame to check time based damage + * Return type: void + * Params: (const this) + */ + RG_CBasePlayer_CheckTimeBasedDamage, + + /* + * Description: Called when game selects a spawn point (info_player_start/deathmatch) to position the player + * Return type: edict_t * (Entity index of selected spawn point) + * Params: (const this) + */ + RG_CBasePlayer_EntSelectSpawnPoint, + + /* + * Description: - + * Params: (const this) + */ + RG_CBasePlayer_PlayerDeathThink, + + /* + * Description: - + * Params: (const this) + */ + RG_CBasePlayer_Observer_Think, + + /* + * Description: - + * Params: (const this, bool:removeSuit) + */ + RG_CBasePlayer_RemoveAllItems, +}; + +/** +* GamedllFunc CBasePlayer +*/ +enum GamedllFunc_CBasePlayerWeapon +{ + /* + * Description: - + * Return type: BOOL + * Params: (const this) + */ + RG_CBasePlayerWeapon_CanDeploy = BEGIN_FUNC_REGION(weapon), + + /* + * Description: - + * Return type: BOOL + * Params: (const this, szViewModel[], szWeaponModel[], iAnim, szAnimExt[], skiplocal) + */ + RG_CBasePlayerWeapon_DefaultDeploy, + + /* + * Description: - + * Return type: int + * Params: (const this, iClipSize, iAnim, Float:fDelay) + */ + RG_CBasePlayerWeapon_DefaultReload, + + /* + * Description: - + * Return type: bool + * Params: (const this, iAnim, iStartAnim, Float:fDelay, Float:fStartDelay, const pszReloadSound1[], const pszReloadSound2[]) + */ + RG_CBasePlayerWeapon_DefaultShotgunReload, + + /* + * Description: Called every client frame (PlayerPostThink) for the player's active weapon + * Return type: void + * Params: (const this) + */ + RG_CBasePlayerWeapon_ItemPostFrame, + + /* + * Description: Called whenever player fires a weapon and shakes player screen (punchangles altering) + * @note Weapons that use KickBack: AK47, AUG, FAMAS, GALIL, M249, M4A1, MAC10, MP5NAVY, P90, SG552, TMP, UMP45 + * Return type: void + * Params: (const this, Float:up_base, Float:lateral_base, Float:up_modifier, Float:lateral_modifier, Float:p_max, Float:lateral_max, direction_change) + */ + RG_CBasePlayerWeapon_KickBack, + + /* + * Description: Called whenever game sends an animation to his current holder (player) + * @note This is often called for all animations in exception of "fire" and "idle" sequences (both called via client prediction) + * Return type: void + * Params: (const this, iAnim, skiplocal) + */ + RG_CBasePlayerWeapon_SendWeaponAnim, +}; + +/** +* GamedllFunc CGib +*/ +enum GamedllFunc_CGib +{ + /* + * Description: - + * Params: (const this, const szGibModel[]) + */ + RG_CGib_Spawn = BEGIN_FUNC_REGION(gib), + + /* + * Description: - + * Params: (const this, pOther) + */ + RG_CGib_BounceGibTouch, + + /* + * Description: - + * Params: (const this) + */ + RG_CGib_WaitTillLand, +}; + +/** +* GamedllFunc CBaseEntity +*/ +enum GamedllFunc_CBaseEntity +{ + /* + * Description: - + * Return type: void + * Params: (pEntity, cShots, Float:vecSrc[3], Float:vecDirShooting[3], Float:vecSpread[3], Float:flDistance, iBulletType, iTracerFreq, iDamage, pevAttacker) + + */ + RG_CBaseEntity_FireBullets = BEGIN_FUNC_REGION(cbaseentity), + + /* + * Description: - + * Return type: void + * Params: (pEntity, cShots, Float:vecSrc[3], Float:vecDirShooting[3], Float:vecSpread[3], Float:flDistance, iTracerFreq, iDamage, pevAttacker) + */ + RG_CBaseEntity_FireBuckshots, + + /* + * Description: - + * Return type: Vector [3] + * Params: (pEntity, Float:vecSrc[3], Float:vecDirShooting[3], Float:vecSpread, Float:flDistance, iPenetration, iBulletType, iDamage, Float:flRangeModifier, pevAttacker, bool:bPistol, shared_rand) + */ + RG_CBaseEntity_FireBullets3, +}; + +/** +* GamedllFunc CBotManager +*/ +enum GamedllFunc_CBotManager +{ + /* + * Description: Called on each improved bot event + * Return type: void + * Params: (GameEventType:event, const pEntity, const pOther) + + */ + RG_CBotManager_OnEvent = BEGIN_FUNC_REGION(botmanager), +} + + +/** +* GamedllFunc CSGameRules +*/ +enum GamedllFunc_CSGameRules +{ + /* + * Description: Should the player switch to this weapon? + * Return type: BOOL + * Params: (const index, const weapon) + */ + RG_CSGameRules_FShouldSwitchWeapon = BEGIN_FUNC_REGION(gamerules), + + /* + * Description: I can't use this weapon anymore, get me the next best one. + * Return type: BOOL + * Params: (const index, const currentWeapon) + */ + RG_CSGameRules_GetNextBestWeapon, + + /* + * Description: - + * Return type: float + * Params: (const index) + */ + RG_CSGameRules_FlPlayerFallDamage, + + /* + * Description: Can this player take damage from this attacker? + * Return type: float + * Params: (const index, const attacker) + */ + RG_CSGameRules_FPlayerCanTakeDamage, + + /* + * Description: Called by CBasePlayer::Spawn just before releasing the player into the game. + * Params: (const index) + */ + RG_CSGameRules_PlayerSpawn, + + /* + * Description: Is this player allowed to respawn now? + * Return type: BOOL + * Params: (const index) + */ + RG_CSGameRules_FPlayerCanRespawn, + + /* + * Description: Place this player on his spawnspot and face him in the proper direction. + * Return type: edict_t * (Entity index of spawnspot) + * Params: (const index) + */ + RG_CSGameRules_GetPlayerSpawnSpot, + + /* + * Description: The player has changed userinfo; can change it now. + * Params: (const index, infobuffer[]) + */ + RG_CSGameRules_ClientUserInfoChanged, + + /* + * Description: Called each time a player dies. + * Params: (const victim, const killer, const inflictor) + */ + RG_CSGameRules_PlayerKilled, + + /* + * Description: Call this from within a GameRules class to report an obituary. + * Params: (const victim, const killer, const inflictor) + */ + RG_CSGameRules_DeathNotice, + + /* + * Description: The player is touching a CBasePlayerItem, do I give it to him? + * Return type: BOOL + * Params: (const index, const item) + */ + RG_CSGameRules_CanHavePlayerItem, + + /* + * Description: What do I do with player's weapons when he's killed? + * Return type: int + * Params: (const index) + */ + RG_CSGameRules_DeadPlayerWeapons, + + /* + * Description: - + * Params: () + */ + RG_CSGameRules_ServerDeactivate, + + /* + * Description: - + * Params: () + */ + RG_CSGameRules_CheckMapConditions, + + /* + * Description: Recreate all the map entities from the map data (preserving their indices), + * then remove everything else except the players. + * Also get rid of all world decals. + * Params: () + */ + RG_CSGameRules_CleanUpMap, + + /* + * Description: Call this on a new round or restart round with member m_bCompleteReset is TRUE + * Params: () + */ + RG_CSGameRules_RestartRound, + + /* + * Description: Check if the scenario has been won/lost. + * Params: () + */ + RG_CSGameRules_CheckWinConditions, + + /* + * Description: - + * Params: () + */ + RG_CSGameRules_RemoveGuns, + + /* + * Description: - + * Return type: CBasePlayer * (Entity index of player) + * Params: () + */ + RG_CSGameRules_GiveC4, + + /* + * Description: - + * Params: () + */ + RG_CSGameRules_ChangeLevel, + + /* + * Description: - + * Params: () + */ + RG_CSGameRules_GoToIntermission, + + /* + * Description: - + * Params: () + */ + RG_CSGameRules_BalanceTeams, + + /* + * Description: It's called when the freeze time ends. + * Params: () + */ + RG_CSGameRules_OnRoundFreezeEnd, + + /* + * Description: It's called when a player hears another player. + * Return type: bool + * Params: (const listener, const sender) + */ + RG_CSGameRules_CanPlayerHearPlayer, + + /* + * Description: Called every server frame to process game rules + * Params: () + */ + RG_CSGameRules_Think, + + /* + * Description: Called each time player tries to join a team to ensure availability + * Return type: bool + * Params: (team_id) + */ + RG_CSGameRules_TeamFull, + + /* + * Description: Called each time player tries to join a team to ensure a fair distribution of players (based on mp_limitteams cvar) + * Return type: bool + * Params: (newTeam_id, curTeam_id) + */ + RG_CSGameRules_TeamStacked, + + /* + * Description: Called each time player gets a weapon linked to his inventory + * Params: (const pPlayer, const pWeapon) + */ + RG_CSGameRules_PlayerGotWeapon, + + /* + * Description: Called when a player is killed, sends death messages to all players, including info about the killer, victim, weapon used, + * extra death flags, death position, assistant, and kill rarity + * Return type: void + * Params: (const pKiller, const pVictim, const pAssister, const pevInflictor, const killerWeaponName[], const DeathMessageFlags:iDeathMessageFlags, const KillRarity:iRarityOfKill) + */ + RG_CSGameRules_SendDeathMessage, +}; + +/** +* CSGameRules Members +*/ +enum CSGameRules_Members +{ + /* + * Description: - + * Member type: BOOL + * Get params: get_member_game(member); + * Set params: set_member_game(member, value); + */ + m_bFreezePeriod = BEGIN_MEMBER_REGION(gamerules), + + /* + * Description: - + * Member type: BOOL + * Get params: get_member_game(member); + * Set params: set_member_game(member, value); + */ + m_bBombDropped, + + /* + * Description: - + * Member type: char * + * Get params: get_member_game(member, dest[], const lenght); + * Set params: set_member_game(member, const source[]); + */ + m_GameDesc, + + /* + * Description: - + * Member type: int + * Get params: get_member_game(member); + * Set params: set_member_game(member, value); + */ + m_msgPlayerVoiceMask, + + /* + * Description: - + * Member type: int + * Get params: get_member_game(member); + * Set params: set_member_game(member, value); + */ + m_msgRequestState, + + /* + * Description: - + * Member type: int + * Get params: get_member_game(member); + * Set params: set_member_game(member, value); + */ + m_nMaxPlayers, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member_game(member); + * Set params: set_member_game(member, Float:value); + */ + m_UpdateInterval, + + /* + * Description: The global time when the round is supposed to end, if this is not 0. + * Member type: float + * Get params: Float:get_member_game(member); + * Set params: set_member_game(member, Float:value); + */ + m_flRestartRoundTime, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member_game(member); + * Set params: set_member_game(member, Float:value); + */ + m_flCheckWinConditions, + + /* + * Description: Time round has started. + * Member type: float + * Get params: Float:get_member_game(member); + * Set params: set_member_game(member, Float:value); + */ + m_fRoundStartTime, + + /* + * Description: How many seconds long this round is. + * Member type: int + * Get params: get_member_game(member); + * Set params: set_member_game(member, value); + */ + m_iRoundTime, + + /* + * Description: - + * Member type: int + * Get params: get_member_game(member); + * Set params: set_member_game(member, value); + */ + m_iRoundTimeSecs, + + /* + * Description: (From mp_freezetime) - How many seconds long the intro round (when players are frozen) is. + * Member type: int + * Get params: get_member_game(member); + * Set params: set_member_game(member, value); + */ + m_iIntroRoundTime, + + /* + * Description: The global time when the intro round ends and the real one starts (wrote the original "m_flRoundTime" comment for this variable). + * Member type: float + * Get params: Float:get_member_game(member); + * Set params: set_member_game(member, Float:value); + */ + m_fRoundStartTimeReal, + + /* + * Description: - + * Member type: int + * Get params: get_member_game(member); + * Set params: set_member_game(member, value); + */ + m_iAccountTerrorist, + + /* + * Description: - + * Member type: int + * Get params: get_member_game(member); + * Set params: set_member_game(member, value); + */ + m_iAccountCT, + + /* + * Description: The number of terrorists on the team (this is generated at the end of a round). + * Member type: int + * Get params: get_member_game(member); + * Set params: set_member_game(member, value); + */ + m_iNumTerrorist, + + /* + * Description: The number of CTs on the team (this is generated at the end of a round). + * Member type: int + * Get params: get_member_game(member); + * Set params: set_member_game(member, value); + */ + m_iNumCT, + + /* + * Description: - + * Member type: int + * Get params: get_member_game(member); + * Set params: set_member_game(member, value); + */ + m_iNumSpawnableTerrorist, + + /* + * Description: - + * Member type: int + * Get params: get_member_game(member); + * Set params: set_member_game(member, value); + */ + m_iNumSpawnableCT, + + /* + * Description: Number of Terrorist spawn points. + * Member type: int + * Get params: get_member_game(member); + * Set params: set_member_game(member, value); + */ + m_iSpawnPointCount_Terrorist, + + /* + * Description: Number of CT spawn points. + * Member type: int + * Get params: get_member_game(member); + * Set params: set_member_game(member, value); + */ + m_iSpawnPointCount_CT, + + /* + * Description: - + * Member type: int + * Get params: get_member_game(member); + * Set params: set_member_game(member, value); + */ + m_iHostagesRescued, + + /* + * Description: - + * Member type: int + * Get params: get_member_game(member); + * Set params: set_member_game(member, value); + */ + m_iHostagesTouched, + + /* + * Description: 1 == CTs won last round, 2 == Terrorists did, 3 == Draw, no winner + * Member type: int + * Get params: get_member_game(member); + * Set params: set_member_game(member, value); + */ + m_iRoundWinStatus, + + /* + * Description: - + * Member type: short + * Get params: get_member_game(member); + * Set params: set_member_game(member, value); + */ + m_iNumCTWins, + + /* + * Description: - + * Member type: short + * Get params: get_member_game(member); + * Set params: set_member_game(member, value); + */ + m_iNumTerroristWins, + + /* + * Description: Whether or not the bomb target has been bombed. + * Member type: bool + * Get params: get_member_game(member); + * Set params: set_member_game(member, bool:value); + */ + m_bTargetBombed, + + /* + * Description: Whether or not the bomb has been defused. + * Member type: bool + * Get params: get_member_game(member); + * Set params: set_member_game(member, bool:value); + */ + m_bBombDefused, + + /* + * Description: - + * Member type: bool + * Get params: get_member_game(member); + * Set params: set_member_game(member, bool:value); + */ + m_bMapHasBombTarget, + + /* + * Description: - + * Member type: bool + * Get params: get_member_game(member); + * Set params: set_member_game(member, bool:value); + */ + m_bMapHasBombZone, + + /* + * Description: - + * Member type: bool + * Get params: get_member_game(member); + * Set params: set_member_game(member, bool:value); + */ + m_bMapHasBuyZone, + + /* + * Description: - + * Member type: bool + * Get params: get_member_game(member); + * Set params: set_member_game(member, bool:value); + */ + m_bMapHasRescueZone, + + /* + * Description: - + * Member type: bool + * Get params: get_member_game(member); + * Set params: set_member_game(member, bool:value); + */ + m_bMapHasEscapeZone, + + /* + * Description: 0 = uninitialized, 1 = has VIP safety zone, 2 = DOES not have VIP safetyzone + * Member type: qboolean + * Get params: get_member_game(member); + * Set params: set_member_game(member, value); + */ + m_bMapHasVIPSafetyZone, + + /* + * Description: - + * Member type: BOOL + * Get params: get_member_game(member); + * Set params: set_member_game(member, value); + */ + m_bMapHasCameras, + + /* + * Description: - + * Member type: int + * Get params: get_member_game(member); + * Set params: set_member_game(member, value); + */ + m_iC4Timer, + + /* + * Description: The current Terrorist who has the C4. + * Member type: int + * Get params: get_member_game(member); + * Set params: set_member_game(member, value); + */ + m_iC4Guy, + + /* + * Description: The amount of money the losing team gets. This scales up as they lose more rounds in a row. + * Member type: int + * Get params: get_member_game(member); + * Set params: set_member_game(member, value); + */ + m_iLoserBonus, + + /* + * Description: The number of rounds the CTs have lost in a row. + * Member type: int + * Get params: get_member_game(member); + * Set params: set_member_game(member, value); + */ + m_iNumConsecutiveCTLoses, + + /* + * Description: The number of rounds the Terrorists have lost in a row. + * Member type: int + * Get params: get_member_game(member); + * Set params: set_member_game(member, value); + */ + m_iNumConsecutiveTerroristLoses, + + /* + * Description: For the idle kick functionality. This is the max amount of time that the player has to be idle before being kicked. + * Member type: float + * Get params: Float:get_member_game(member); + * Set params: set_member_game(member, Float:value); + */ + m_fMaxIdlePeriod, + + /* + * Description: - + * Member type: int + * Get params: get_member_game(member); + * Set params: set_member_game(member, value); + */ + m_iLimitTeams, + + /* + * Description: - + * Member type: bool + * Get params: get_member_game(member); + * Set params: set_member_game(member, bool:value); + */ + m_bLevelInitialized, + + /* + * Description: - + * Member type: bool + * Get params: get_member_game(member); + * Set params: set_member_game(member, bool:value); + */ + m_bRoundTerminating, + + /* + * Description: Set to TRUE to have the scores reset next time round restarts. + * Member type: bool + * Get params: get_member_game(member); + * Set params: set_member_game(member, bool:value); + */ + m_bCompleteReset, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member_game(member); + * Set params: set_member_game(member, Float:value); + */ + m_flRequiredEscapeRatio, + + /* + * Description: - + * Member type: int + * Get params: get_member_game(member); + * Set params: set_member_game(member, value); + */ + m_iNumEscapers, + + /* + * Description: - + * Member type: int + * Get params: get_member_game(member); + * Set params: set_member_game(member, value); + */ + m_iHaveEscaped, + + /* + * Description: Who can and can't buy. + * Member type: bool + * Get params: get_member_game(member); + * Set params: set_member_game(member, bool:value); + */ + m_bCTCantBuy, + + /* + * Description: Who can and can't buy. + * Member type: bool + * Get params: get_member_game(member); + * Set params: set_member_game(member, bool:value); + */ + m_bTCantBuy, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member_game(member); + * Set params: set_member_game(member, Float:value); + */ + m_flBombRadius, + + /* + * Description: - + * Member type: int + * Get params: get_member_game(member); + * Set params: set_member_game(member, value); + */ + m_iConsecutiveVIP, + + /* + * Description: - + * Member type: int + * Get params: get_member_game(member); + * Set params: set_member_game(member, value); + */ + m_iTotalGunCount, + + /* + * Description: - + * Member type: int + * Get params: get_member_game(member); + * Set params: set_member_game(member, value); + */ + m_iTotalGrenadeCount, + + /* + * Description: - + * Member type: int + * Get params: get_member_game(member); + * Set params: set_member_game(member, value); + */ + m_iTotalArmourCount, + + /* + * Description: Keeps track of the # of consecutive rounds that have gone by where one team outnumbers the other team by more than 2. + * Member type: int + * Get params: get_member_game(member); + * Set params: set_member_game(member, value); + */ + m_iUnBalancedRounds, + + /* + * Description: Keeps track of the # of consecutive rounds of escape played. Teams will be swapped after 8 rounds. + * Member type: int + * Get params: get_member_game(member); + * Set params: set_member_game(member, value); + */ + m_iNumEscapeRounds, + + /* + * Description: - + * Member type: int [100] + * Get params: get_member_game(member, element); + * Set params: set_member_game(member, value, element); + */ + m_iMapVotes, + + /* + * Description: - + * Member type: int + * Get params: get_member_game(member); + * Set params: set_member_game(member, value); + */ + m_iLastPick, + + /* + * Description: - + * Member type: int + * Get params: get_member_game(member); + * Set params: set_member_game(member, value); + */ + m_iMaxMapTime, + + /* + * Description: - + * Member type: int + * Get params: get_member_game(member); + * Set params: set_member_game(member, value); + */ + m_iMaxRounds, + + /* + * Description: - + * Member type: int + * Get params: get_member_game(member); + * Set params: set_member_game(member, value); + */ + m_iTotalRoundsPlayed, + + /* + * Description: - + * Member type: int + * Get params: get_member_game(member); + * Set params: set_member_game(member, value); + */ + m_iMaxRoundsWon, + + /* + * Description: - + * Member type: int + * Get params: get_member_game(member); + * Set params: set_member_game(member, value); + */ + m_iStoredSpectValue, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member_game(member); + * Set params: set_member_game(member, Float:value); + */ + m_flForceCameraValue, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member_game(member); + * Set params: set_member_game(member, Float:value); + */ + m_flForceChaseCamValue, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member_game(member); + * Set params: set_member_game(member, Float:value); + */ + m_flFadeToBlackValue, + + /* + * Description: - + * Member type: int + * Get params: get_member_game(member); + * Set params: set_member_game(member, value); + */ + m_pVIP, + + /* + * Description: - + * Member type: int [5] + * Get params: get_member_game(member, element); + * Set params: set_member_game(member, value, element); + */ + m_pVIPQueue, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member_game(member); + * Set params: set_member_game(member, Float:value); + */ + m_flIntermissionEndTime, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member_game(member); + * Set params: set_member_game(member, Float:value); + */ + m_flIntermissionStartTime, + + + /* + * Description: - + * Member type: BOOL + * Get params: get_member_game(member); + * Set params: set_member_game(member, value); + */ + m_iEndIntermissionButtonHit, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member_game(member); + * Set params: set_member_game(member, Float:value); + */ + m_tmNextPeriodicThink, + + /* + * Description: TRUE = the game commencing when there is at least one CT and T, FALSE = scoring will not start until both teams have players (deprecated name m_bFirstConnected) + * Member type: bool + * Get params: get_member_game(member); + * Set params: set_member_game(member, bool:value); + */ + m_bGameStarted, + + /* + * Description: - + * Member type: bool + * Get params: get_member_game(member); + * Set params: set_member_game(member, bool:value); + */ + m_bInCareerGame, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member_game(member); + * Set params: set_member_game(member, Float:value); + */ + m_fCareerRoundMenuTime, + + /* + * Description: - + * Member type: int + * Get params: get_member_game(member); + * Set params: set_member_game(member, value); + */ + m_iCareerMatchWins, + + /* + * Description: - + * Member type: int + * Get params: get_member_game(member); + * Set params: set_member_game(member, value); + */ + m_iRoundWinDifference, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member_game(member); + * Set params: set_member_game(member, Float:value); + */ + m_fCareerMatchMenuTime, + + /* + * Description: - + * Member type: bool + * Get params: get_member_game(member); + * Set params: set_member_game(member, bool:value); + */ + m_bSkipSpawn, + + /* + * Description: - + * Member type: bool + * Get params: get_member_game(member); + * Set params: set_member_game(member, bool:value); + */ + m_bSkipShowMenu, + + /* + * Description: - + * Member type: bool + * Get params: get_member_game(member); + * Set params: set_member_game(member, bool:value); + */ + m_bNeededPlayers, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member_game(member); + * Set params: set_member_game(member, Float:value); + */ + m_flEscapeRatio, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member_game(member); + * Set params: set_member_game(member, Float:value); + */ + m_flTimeLimit, + + /* + * Description: Stores the start time of the game. + * @note The time resets when the game is restarting or the game commencing. + * Member type: float + * Get params: Float:get_member_game(member); + * Set params: set_member_game(member, Float:value); + */ + m_flGameStartTime, + + /* + * Description: TRUE = goes balance team, otherwise FALSE + * Member type: bool + * Get params: get_member_game(member); + * Set params: set_member_game(member, bool:value); + */ + m_bTeamBalanced, +}; + +/** +* CBaseEntity Members +*/ +enum CBaseEntity_Members +{ + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + currentammo = BEGIN_MEMBER_REGION(base), + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + maxammo_buckshot, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + ammo_buckshot, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + maxammo_9mm, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + ammo_9mm, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + maxammo_556nato, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + ammo_556nato, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + maxammo_556natobox, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + ammo_556natobox, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + maxammo_762nato, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + ammo_762nato, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + maxammo_45acp, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + ammo_45acp, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + maxammo_50ae, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + ammo_50ae, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + maxammo_338mag, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + ammo_338mag, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + maxammo_57mm, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + ammo_57mm, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + maxammo_357sig, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + ammo_357sig, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_flStartThrow, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_flReleaseThrow, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_iSwing, + + /* + * Description: - + * Member type: bool + * Get params: get_member(index, member); + * Set params: set_member(index, member, bool:value); + */ + has_disconnected, +}; + +/** +* CBaseAnimating Members +*/ +enum CBaseAnimating_Members +{ + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_flFrameRate = BEGIN_MEMBER_REGION(animating), + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_flGroundSpeed, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_flLastEventCheck, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_fSequenceFinished, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_fSequenceLoops, +}; + +/** +* CBaseMonster Members +*/ +enum CBaseMonster_Members +{ + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_Activity = BEGIN_MEMBER_REGION(basemonster), + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_IdealActivity, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_LastHitGroup, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_bitsDamageType, + + /* + * Description: - + * Member type: byte [8] + * Get params: get_member(index, member, TimeBasedDamage:element); + * Set params: set_member(index, member, value, TimeBasedDamage:element); + */ + m_rgbTimeBasedDamage, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_MonsterState, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_IdealMonsterState, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_afConditions, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_afMemory, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_flNextAttack, + + /* + * Description: - + * Member type: class EHANDLE + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_hEnemy, + + /* + * Description: - + * Member type: class EHANDLE + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_hTargetEnt, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_flFieldOfView, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_bloodColor, + + /* + * Description: - + * Member type: class Vector + * Get params: get_member(index, member, Float:output[3]); + * Set params: set_member(index, member, Float:dest[3]); + */ + m_HackedGunPos, + + /* + * Description: - + * Member type: class Vector + * Get params: get_member(index, member, Float:output[3]); + * Set params: set_member(index, member, Float:dest[3]); + */ + m_vecEnemyLKP, +}; + +/** +* CBasePlayer Members +*/ +enum CBasePlayer_Members +{ + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + random_seed = BEGIN_MEMBER_REGION(player), + + /* + * Description: - + * Member type: unsigned short + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_usPlayerBleed, + + /* + * Description: - + * Member type: class EHANDLE + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_hObserverTarget, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_flNextObserverInput, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_iObserverWeapon, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_iObserverC4State, + + /* + * Description: - + * Member type: bool + * Get params: get_member(index, member); + * Set params: set_member(index, member, bool:value); + */ + m_bObserverHasDefuser, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_iObserverLastMode, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_flFlinchTime, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_flAnimTime, + + /* + * Description: - + * Member type: bool + * Get params: get_member(index, member); + * Set params: set_member(index, member, bool:value); + */ + m_bHighDamage, + + /* + * Description: Slow down the player based on the velocity modifier, applies when the player takes damage. + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_flVelocityModifier, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_iLastZoom, + + /* + * Description: - + * Member type: bool + * Get params: get_member(index, member); + * Set params: set_member(index, member, bool:value); + */ + m_bResumeZoom, + + /* + * Description: Delay to call EjectBrass function on M3, Scout and AWP (rest of weapons are client-side). + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_flEjectBrass, + + /* + * Description: - + * Member type: enum ArmorType + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_iKevlar, + + /* + * Description: - + * Member type: bool + * Get params: get_member(index, member); + * Set params: set_member(index, member, bool:value); + */ + m_bNotKilled, + + /* + * Description: - + * Member type: enum TeamName + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_iTeam, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_iAccount, + + /* + * Description: - + * Member type: bool + * Get params: get_member(index, member); + * Set params: set_member(index, member, bool:value); + */ + m_bHasPrimary, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_flDeathThrowTime, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_iThrowDirection, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_flLastTalk, + + /* + * Description: - + * Member type: bool + * Get params: get_member(index, member); + * Set params: set_member(index, member, bool:value); + */ + m_bJustConnected, + + /* + * Description: - + * Member type: bool + * Get params: get_member(index, member); + * Set params: set_member(index, member, bool:value); + */ + m_bContextHelp, + + /* + * Description: - + * Member type: enum JoinState + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_iJoiningState, + + /* + * Description: - + * Member type: class CBaseEntity * + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_pIntroCamera, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_fIntroCamTime, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_fLastMovement, + + /* + * Description: - + * Member type: bool + * Get params: get_member(index, member); + * Set params: set_member(index, member, bool:value); + */ + m_bMissionBriefing, + + /* + * Description: - + * Member type: bool + * Get params: get_member(index, member); + * Set params: set_member(index, member, bool:value); + */ + m_bTeamChanged, + + /* + * Description: - + * Member type: enum ModelName + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_iModelName, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_iTeamKills, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_iIgnoreGlobalChat, + + /* + * Description: - + * Member type: bool + * Get params: get_member(index, member); + * Set params: set_member(index, member, bool:value); + */ + m_bHasNightVision, + + /* + * Description: - + * Member type: bool + * Get params: get_member(index, member); + * Set params: set_member(index, member, bool:value); + */ + m_bNightVisionOn, + + /* + * Description: - + * Member type: class Vector [20] + * Get params: get_member(index, member, Float:output[3], element); + * Set params: set_member(index, member, Float:dest[3], element); + */ + m_vRecentPath, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_flIdleCheckTime, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_flRadioTime, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_iRadioMessages, + + /* + * Description: - + * Member type: bool + * Get params: get_member(index, member); + * Set params: set_member(index, member, bool:value); + */ + m_bIgnoreRadio, + + /* + * Description: - + * Member type: bool + * Get params: get_member(index, member); + * Set params: set_member(index, member, bool:value); + */ + m_bHasC4, + + /* + * Description: - + * Member type: bool + * Get params: get_member(index, member); + * Set params: set_member(index, member, bool:value); + */ + m_bHasDefuser, + + /* + * Description: - + * Member type: bool + * Get params: get_member(index, member); + * Set params: set_member(index, member, bool:value); + */ + m_bKilledByBomb, + + /* + * Description: - + * Member type: class Vector + * Get params: get_member(index, member, Float:output[3]); + * Set params: set_member(index, member, Float:dest[3]); + */ + m_vBlastVector, + + /* + * Description: - + * Member type: bool + * Get params: get_member(index, member); + * Set params: set_member(index, member, bool:value); + */ + m_bKilledByGrenade, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_flDisplayHistory, + + /* + * Description: - + * Member type: enum _Menu + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_iMenu, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_iChaseTarget, + + /* + * Description: - + * Member type: class CBaseEntity * + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_pChaseTarget, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_fCamSwitch, + + /* + * Description: - + * Member type: bool + * Get params: get_member(index, member); + * Set params: set_member(index, member, bool:value); + */ + m_bEscaped, + + /* + * Description: - + * Member type: bool + * Get params: get_member(index, member); + * Set params: set_member(index, member, bool:value); + */ + m_bIsVIP, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_tmNextRadarUpdate, + + /* + * Description: - + * Member type: class Vector + * Get params: get_member(index, member, Float:output[3]); + * Set params: set_member(index, member, Float:dest[3]); + */ + m_vLastOrigin, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_iCurrentKickVote, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_flNextVoteTime, + + /* + * Description: - + * Member type: bool + * Get params: get_member(index, member); + * Set params: set_member(index, member, bool:value); + */ + m_bJustKilledTeammate, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_iHostagesKilled, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_iMapVote, + + /* + * Description: The player can't shoot for freezetime period or during defuse bomb + * @note This member isn't flexible, you can't override it for other behavior, so for this purpose use m_bCanShootOverride + * Member type: bool + * Get params: get_member(index, member); + * Set params: set_member(index, member, bool:value); + */ + m_bCanShoot, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_flLastFired, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_flLastAttackedTeammate, + + /* + * Description: - + * Member type: bool + * Get params: get_member(index, member); + * Set params: set_member(index, member, bool:value); + */ + m_bHeadshotKilled, + + /* + * Description: - + * Member type: bool + * Get params: get_member(index, member); + * Set params: set_member(index, member, bool:value); + */ + m_bPunishedForTK, + + /* + * Description: - + * Member type: bool + * Get params: get_member(index, member); + * Set params: set_member(index, member, bool:value); + */ + m_bReceivesNoMoneyNextRound, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_iTimeCheckAllowed, + + /* + * Description: - + * Member type: bool + * Get params: get_member(index, member); + * Set params: set_member(index, member, bool:value); + */ + m_bHasChangedName, + + /* + * Description: - + * Member type: char [32] + * Get params: get_member(index, member, dest[], const lenght); + * Set params: set_member(index, member, const source[]); + */ + m_szNewName, + + /* + * Description: - + * Member type: bool + * Get params: get_member(index, member); + * Set params: set_member(index, member, bool:value); + */ + m_bIsDefusing, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_tmHandleSignals, + + /* + * Description: (0 - signal, 1 - state) + * Member type: class CUnifiedSignals + * Get params: get_member(index, member, signals[UnifiedSignals]); + * Set params: set_member(index, member, signals[UnifiedSignals]); + */ + m_signals, + + /* + * Description: - + * Member type: struct edict_s * + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_pentCurBombTarget, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_iPlayerSound, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_iTargetVolume, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_iWeaponVolume, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_iExtraSoundTypes, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_iWeaponFlash, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_flStopExtraSoundTime, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_flFlashLightTime, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_iFlashBattery, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_afButtonLast, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_afButtonPressed, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_afButtonReleased, + + /* + * Description: - + * Member type: struct edict_s * + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_pentSndLast, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_flSndRoomtype, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_flSndRange, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_flFallVelocity, + + /* + * Description: - + * Member type: int [4] + * Get params: get_member(index, member, element); + * Set params: set_member(index, member, value, element); + */ + m_rgItems, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_fNewAmmo, + + /* + * Description: - + * Member type: unsigned int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_afPhysicsFlags, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_fNextSuicideTime, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_flTimeStepSound, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_flTimeWeaponIdle, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_flSwimTime, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_flDuckTime, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_flWallJumpTime, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_flSuitUpdate, + + /* + * Description: - + * Member type: int [4] + * Get params: get_member(index, member, element); + * Set params: set_member(index, member, value, element); + */ + m_rgSuitPlayList, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_iSuitPlayNext, + + /* + * Description: - + * Member type: int [32] + * Get params: get_member(index, member, element); + * Set params: set_member(index, member, value, element); + */ + m_rgiSuitNoRepeat, + + /* + * Description: - + * Member type: float [32] + * Get params: Float:get_member(index, member, element); + * Set params: set_member(index, member, Float:value, element); + */ + m_rgflSuitNoRepeatTime, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_lastDamageAmount, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_tbdPrev, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_flgeigerRange, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_flgeigerDelay, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_igeigerRangePrev, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_iStepLeft, + + /* + * Description: - + * Member type: char [17] + * Get params: get_member(index, member, dest[], const lenght); + * Set params: set_member(index, member, const source[]); + */ + m_szTextureName, + + /* + * Description: - + * Member type: char + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_chTextureType, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_idrowndmg, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_idrownrestored, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_bitsHUDDamage, + + /* + * Description: - + * Member type: BOOL + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_fInitHUD, + + /* + * Description: - + * Member type: BOOL + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_fGameHUDInitialized, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_iTrain, + + /* + * Description: - + * Member type: BOOL + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_fWeapon, + + /* + * Description: - + * Member type: class EHANDLE + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_pTank, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_fDeadTime, + + /* + * Description: - + * Member type: BOOL + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_fNoPlayerSound, + + /* + * Description: - + * Member type: BOOL + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_fLongJump, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_tSneaking, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_iUpdateTime, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_iClientHealth, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_iClientBattery, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_iHideHUD, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_iClientHideHUD, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_iFOV, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_iClientFOV, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_iNumSpawns, + + /* + * Description: - + * Member type: class CBaseEntity * + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_pObserver, + + /* + * Description: - + * Member type: class CBasePlayerItem *[6] + * Get params: get_member(index, member, element); + * Set params: set_member(index, member, value, element); + */ + m_rgpPlayerItems, + + /* + * Description: - + * Member type: class CBasePlayerItem * + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_pActiveItem, + + /* + * Description: - + * Member type: class CBasePlayerItem * + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_pClientActiveItem, + + /* + * Description: - + * Member type: class CBasePlayerItem * + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_pLastItem, + + /* + * Description: - + * Member type: int [32] + * Get params: get_member(index, member, element); + * Set params: set_member(index, member, value, element); + */ + m_rgAmmo, + + /* + * Description: - + * Member type: int [32] + * Get params: get_member(index, member, element); + * Set params: set_member(index, member, value, element); + */ + m_rgAmmoLast, + + /* + * Description: - + * Member type: class Vector + * Get params: get_member(index, member, Float:output[3]); + * Set params: set_member(index, member, Float:dest[3]); + */ + m_vecAutoAim, + + /* + * Description: - + * Member type: BOOL + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_fOnTarget, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_iDeaths, + + /* + * Description: - + * Member type: int [4] + * Get params: get_member(index, member, element); + * Set params: set_member(index, member, value, element); + */ + m_izSBarState, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_flNextSBarUpdateTime, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_flStatusBarDisappearDelay, + + /* + * Description: - + * Member type: char [128] + * Get params: get_member(index, member, dest[], const lenght); + * Set params: set_member(index, member, const source[]); + */ + m_SbarString0, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_lastx, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_lasty, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_nCustomSprayFrames, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_flNextDecalTime, + + /* + * Description: - + * Member type: char [16] + * Get params: get_member(index, member, dest[], const lenght); + * Set params: set_member(index, member, const source[]); + */ + m_szTeamName, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_modelIndexPlayer, + + /* + * Description: - + * Member type: char [32] + * Get params: get_member(index, member, dest[], const lenght); + * Set params: set_member(index, member, const source[]); + */ + m_szAnimExtention, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_iGaitsequence, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_flGaitframe, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_flGaityaw, + + /* + * Description: - + * Member type: class Vector + * Get params: get_member(index, member, Float:output[3]); + * Set params: set_member(index, member, Float:dest[3]); + */ + m_prevgaitorigin, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_flPitch, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_flYaw, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_flGaitMovement, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_iAutoWepSwitch, + + /* + * Description: - + * Member type: bool + * Get params: get_member(index, member); + * Set params: set_member(index, member, bool:value); + */ + m_bVGUIMenus, + + /* + * Description: - + * Member type: bool + * Get params: get_member(index, member); + * Set params: set_member(index, member, bool:value); + */ + m_bShowHints, + + /* + * Description: - + * Member type: bool + * Get params: get_member(index, member); + * Set params: set_member(index, member, bool:value); + */ + m_bShieldDrawn, + + /* + * Description: - + * Member type: bool + * Get params: get_member(index, member); + * Set params: set_member(index, member, bool:value); + */ + m_bOwnsShield, + + /* + * Description: - + * Member type: bool + * Get params: get_member(index, member); + * Set params: set_member(index, member, bool:value); + */ + m_bWasFollowing, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_flNextFollowTime, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_flYawModifier, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_blindUntilTime, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_blindStartTime, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_blindHoldTime, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_blindFadeTime, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_blindAlpha, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_allowAutoFollowTime, + + /* + * Description: - + * Member type: char [256] + * Get params: get_member(index, member, dest[], const lenght); + * Set params: set_member(index, member, const source[]); + */ + m_autoBuyString, + + /* + * Description: - + * Member type: char * + * Get params: get_member(index, member, dest[], const lenght); + * Set params: set_member(index, member, const source[]); + */ + m_rebuyString, + + /* + * Description: - + * Member type: struct RebuyStruct + * Get params: RebuyHandle:get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_rebuyStruct, + + /* + * Description: - + * Member type: bool + * Get params: get_member(index, member); + * Set params: set_member(index, member, bool:value); + */ + m_bIsInRebuy, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_flLastUpdateTime, + + /* + * Description: - + * Member type: char [32] + * Get params: get_member(index, member, dest[], const lenght); + * Set params: set_member(index, member, const source[]); + */ + m_lastLocation, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_progressStart, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_progressEnd, + + /* + * Description: - + * Member type: bool + * Get params: get_member(index, member); + * Set params: set_member(index, member, bool:value); + */ + m_bObserverAutoDirector, + + /* + * Description: - + * Member type: bool + * Get params: get_member(index, member); + * Set params: set_member(index, member, bool:value); + */ + m_canSwitchObserverModes, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_heartBeatTime, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_intenseTimestamp, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_silentTimestamp, + + /* + * Description: - + * Member type: enum MusicState + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_musicState, + + /* + * Description: - + * Member type: float [8] + * Get params: Float:get_member(index, member, element); + * Set params: set_member(index, member, Float:value, element); + */ + m_flLastCommandTime, + + /* + * Description: The amount of money sent to the client last time. + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_iLastAccount, + + /* + * Description: The amount of health sent to the client last time. + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_iLastClientHealth, + + /* + * Description: Waiting time for update fields into scoreboard. + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_tmNextAccountHealthUpdate, +}; + +/** +* RebuyStruct +*/ +enum RebuyStruct +{ + /* + * Description: - + * Member type: int + * Get params: get_rebuy(RebuyHandle:handle, RebuyStruct:member); + * Set params: set_rebuy(RebuyHandle:handle, RebuyStruct:member, value); + */ + m_primaryWeapon = BEGIN_MEMBER_REGION(rebuystruct), + + /* + * Description: - + * Member type: int + * Get params: get_rebuy(RebuyHandle:handle, RebuyStruct:member); + * Set params: set_rebuy(RebuyHandle:handle, RebuyStruct:member, value); + */ + m_primaryAmmo, + + /* + * Description: - + * Member type: int + * Get params: get_rebuy(RebuyHandle:handle, RebuyStruct:member); + * Set params: set_rebuy(RebuyHandle:handle, RebuyStruct:member, value); + */ + m_secondaryWeapon, + + /* + * Description: - + * Member type: int + * Get params: get_rebuy(RebuyHandle:handle, RebuyStruct:member); + * Set params: set_rebuy(RebuyHandle:handle, RebuyStruct:member, value); + */ + m_secondaryAmmo, + + /* + * Description: - + * Member type: int + * Get params: get_rebuy(RebuyHandle:handle, RebuyStruct:member); + * Set params: set_rebuy(RebuyHandle:handle, RebuyStruct:member, value); + */ + m_heGrenade, + + /* + * Description: - + * Member type: int + * Get params: get_rebuy(RebuyHandle:handle, RebuyStruct:member); + * Set params: set_rebuy(RebuyHandle:handle, RebuyStruct:member, value); + */ + m_flashbang, + + /* + * Description: - + * Member type: int + * Get params: get_rebuy(RebuyHandle:handle, RebuyStruct:member); + * Set params: set_rebuy(RebuyHandle:handle, RebuyStruct:member, value); + */ + m_smokeGrenade, + + /* + * Description: - + * Member type: int + * Get params: get_rebuy(RebuyHandle:handle, RebuyStruct:member); + * Set params: set_rebuy(RebuyHandle:handle, RebuyStruct:member, value); + */ + m_defuser, + + /* + * Description: - + * Member type: int + * Get params: get_rebuy(RebuyHandle:handle, RebuyStruct:member); + * Set params: set_rebuy(RebuyHandle:handle, RebuyStruct:member, value); + */ + m_nightVision, + + /* + * Description: enum ArmorType + * Member type: int + * Get params: get_rebuy(RebuyHandle:handle, RebuyStruct:member); + * Set params: set_rebuy(RebuyHandle:handle, RebuyStruct:member, value); + */ + m_armor, +}; + +/** +* PlayerMove +*/ +enum PlayerMove +{ + /* + * Description: - + * Member type: int + * Get params: get_pmove(member); + * Set params: set_pmove(const PlayerMove:var, value); + */ + pm_player_index = BEGIN_MEMBER_REGION(playermove), + + /* + * Description: - + * Member type: qboolean + * Get params: get_pmove(member); + * Set params: set_pmove(const PlayerMove:var, value); + */ + pm_server, + + /* + * Description: - + * Member type: qboolean + * Get params: get_pmove(member); + * Set params: set_pmove(const PlayerMove:var, value); + */ + pm_multiplayer, + + /* + * Description: - + * Member type: float + * Get params: Float:get_pmove(const MoveVars:var); + * Set params: set_pmove(const MoveVars:var, Float:value); + */ + pm_time, + + /* + * Description: - + * Member type: float + * Get params: Float:get_pmove(const MoveVars:var); + * Set params: set_pmove(const MoveVars:var, Float:value); + */ + pm_frametime, + + /* + * Description: - + * Member type: vec3_t + * Get params: get_pmove(const PlayerMove:var, Float:output[3]); + * Set params: set_pmove(const PlayerMove:var, Float:dest[3]); + */ + pm_forward, + + /* + * Description: - + * Member type: vec3_t + * Get params: get_pmove(const PlayerMove:var, Float:output[3]); + * Set params: set_pmove(const PlayerMove:var, Float:dest[3]); + */ + pm_right, + + /* + * Description: - + * Member type: vec3_t + * Get params: get_pmove(const PlayerMove:var, Float:output[3]); + * Set params: set_pmove(const PlayerMove:var, Float:dest[3]); + */ + pm_up, + + /* + * Description: - + * Member type: vec3_t + * Get params: get_pmove(const PlayerMove:var, Float:output[3]); + * Set params: set_pmove(const PlayerMove:var, Float:dest[3]); + */ + pm_origin, + + /* + * Description: - + * Member type: vec3_t + * Get params: get_pmove(const PlayerMove:var, Float:output[3]); + * Set params: set_pmove(const PlayerMove:var, Float:dest[3]); + */ + pm_angles, + + /* + * Description: - + * Member type: vec3_t + * Get params: get_pmove(const PlayerMove:var, Float:output[3]); + * Set params: set_pmove(const PlayerMove:var, Float:dest[3]); + */ + pm_oldangles, + + /* + * Description: - + * Member type: vec3_t + * Get params: get_pmove(const PlayerMove:var, Float:output[3]); + * Set params: set_pmove(const PlayerMove:var, Float:dest[3]); + */ + pm_velocity, + + /* + * Description: - + * Member type: vec3_t + * Get params: get_pmove(const PlayerMove:var, Float:output[3]); + * Set params: set_pmove(const PlayerMove:var, Float:dest[3]); + */ + pm_movedir, + + /* + * Description: - + * Member type: vec3_t + * Get params: get_pmove(const PlayerMove:var, Float:output[3]); + * Set params: set_pmove(const PlayerMove:var, Float:dest[3]); + */ + pm_basevelocity, + + /* + * Description: - + * Member type: vec3_t + * Get params: get_pmove(const PlayerMove:var, Float:output[3]); + * Set params: set_pmove(const PlayerMove:var, Float:dest[3]); + */ + pm_view_ofs, + + /* + * Description: - + * Member type: float + * Get params: Float:get_pmove(member); + * Set params: set_pmove(const PlayerMove:var, Float:value); + */ + pm_flDuckTime, + + /* + * Description: - + * Member type: qboolean + * Get params: get_pmove(member); + * Set params: set_pmove(const PlayerMove:var, value); + */ + pm_bInDuck, + + /* + * Description: - + * Member type: int + * Get params: get_pmove(member); + * Set params: set_pmove(const PlayerMove:var, value); + */ + pm_flTimeStepSound, + + /* + * Description: - + * Member type: int + * Get params: get_pmove(member); + * Set params: set_pmove(const PlayerMove:var, value); + */ + pm_iStepLeft, + + /* + * Description: - + * Member type: float + * Get params: Float:get_pmove(member); + * Set params: set_pmove(const PlayerMove:var, Float:value); + */ + pm_flFallVelocity, + + /* + * Description: - + * Member type: vec3_t + * Get params: get_pmove(const PlayerMove:var, Float:output[3]); + * Set params: set_pmove(const PlayerMove:var, Float:dest[3]); + */ + pm_punchangle, + + /* + * Description: - + * Member type: float + * Get params: Float:get_pmove(member); + * Set params: set_pmove(const PlayerMove:var, Float:value); + */ + pm_flSwimTime, + + /* + * Description: - + * Member type: float + * Get params: Float:get_pmove(member); + * Set params: set_pmove(const PlayerMove:var, Float:value); + */ + pm_flNextPrimaryAttack, + + /* + * Description: - + * Member type: int + * Get params: get_pmove(member); + * Set params: set_pmove(const PlayerMove:var, value); + */ + pm_effects, + + /* + * Description: - + * Member type: int + * Get params: get_pmove(member); + * Set params: set_pmove(const PlayerMove:var, value); + */ + pm_flags, + + /* + * Description: - + * Member type: int + * Get params: get_pmove(member); + * Set params: set_pmove(const PlayerMove:var, value); + */ + pm_usehull, + + /* + * Description: - + * Member type: float + * Get params: Float:get_pmove(member); + * Set params: set_pmove(const PlayerMove:var, Float:value); + */ + pm_gravity, + + /* + * Description: - + * Member type: float + * Get params: Float:get_pmove(member); + * Set params: set_pmove(const PlayerMove:var, Float:value); + */ + pm_friction, + + /* + * Description: - + * Member type: int + * Get params: get_pmove(member); + * Set params: set_pmove(const PlayerMove:var, value); + */ + pm_oldbuttons, + + /* + * Description: - + * Member type: float + * Get params: Float:get_pmove(member); + * Set params: set_pmove(const PlayerMove:var, Float:value); + */ + pm_waterjumptime, + + /* + * Description: - + * Member type: qboolean + * Get params: get_pmove(member); + * Set params: set_pmove(const PlayerMove:var, value); + */ + pm_dead, + + /* + * Description: - + * Member type: int + * Get params: get_pmove(member); + * Set params: set_pmove(const PlayerMove:var, value); + */ + pm_deadflag, + + /* + * Description: - + * Member type: int + * Get params: get_pmove(member); + * Set params: set_pmove(const PlayerMove:var, value); + */ + pm_spectator, + + /* + * Description: - + * Member type: int + * Get params: get_pmove(member); + * Set params: set_pmove(const PlayerMove:var, value); + */ + pm_movetype, + + /* + * Description: - + * Member type: int + * Get params: get_pmove(member); + * Set params: set_pmove(const PlayerMove:var, value); + */ + pm_onground, + + /* + * Description: - + * Member type: int + * Get params: get_pmove(member); + * Set params: set_pmove(const PlayerMove:var, value); + */ + pm_waterlevel, + + /* + * Description: - + * Member type: int + * Get params: get_pmove(member); + * Set params: set_pmove(const PlayerMove:var, value); + */ + pm_watertype, + + /* + * Description: - + * Member type: int + * Get params: get_pmove(member); + * Set params: set_pmove(const PlayerMove:var, value); + */ + pm_oldwaterlevel, + + /* + * Description: - + * Member type: char [256] + * Get params: get_pmove(const PlayerMove:var, dest[], const lenght); + * Set params: set_pmove(const PlayerMove:var, const source[]); + */ + pm_sztexturename, + + /* + * Description: - + * Member type: char + * Get params: get_pmove(member); + * Set params: set_pmove(const PlayerMove:var, value); + */ + pm_chtexturetype, + + /* + * Description: - + * Member type: float + * Get params: Float:get_pmove(member); + * Set params: set_pmove(const PlayerMove:var, Float:value); + */ + pm_maxspeed, + + /* + * Description: - + * Member type: float + * Get params: Float:get_pmove(member); + * Set params: set_pmove(const PlayerMove:var, Float:value); + */ + pm_clientmaxspeed, + + /* + * Description: - + * Member type: int + * Get params: get_pmove(member); + * Set params: set_pmove(const PlayerMove:var, value); + */ + pm_iuser1, + + /* + * Description: - + * Member type: int + * Get params: get_pmove(member); + * Set params: set_pmove(const PlayerMove:var, value); + */ + pm_iuser2, + + /* + * Description: - + * Member type: int + * Get params: get_pmove(member); + * Set params: set_pmove(const PlayerMove:var, value); + */ + pm_iuser3, + + /* + * Description: - + * Member type: int + * Get params: get_pmove(member); + * Set params: set_pmove(const PlayerMove:var, value); + */ + pm_iuser4, + + /* + * Description: - + * Member type: float + * Get params: Float:get_pmove(member); + * Set params: set_pmove(const PlayerMove:var, Float:value); + */ + pm_fuser1, + + /* + * Description: - + * Member type: float + * Get params: Float:get_pmove(member); + * Set params: set_pmove(const PlayerMove:var, Float:value); + */ + pm_fuser2, + + /* + * Description: - + * Member type: float + * Get params: Float:get_pmove(member); + * Set params: set_pmove(const PlayerMove:var, Float:value); + */ + pm_fuser3, + + /* + * Description: - + * Member type: float + * Get params: Float:get_pmove(member); + * Set params: set_pmove(const PlayerMove:var, Float:value); + */ + pm_fuser4, + + /* + * Description: - + * Member type: vec3_t + * Get params: get_pmove(const PlayerMove:var, Float:output[3]); + * Set params: set_pmove(const PlayerMove:var, Float:dest[3]); + */ + pm_vuser1, + + /* + * Description: - + * Member type: vec3_t + * Get params: get_pmove(const PlayerMove:var, Float:output[3]); + * Set params: set_pmove(const PlayerMove:var, Float:dest[3]); + */ + pm_vuser2, + + /* + * Description: - + * Member type: vec3_t + * Get params: get_pmove(const PlayerMove:var, Float:output[3]); + * Set params: set_pmove(const PlayerMove:var, Float:dest[3]); + */ + pm_vuser3, + + /* + * Description: - + * Member type: vec3_t + * Get params: get_pmove(const PlayerMove:var, Float:output[3]); + * Set params: set_pmove(const PlayerMove:var, Float:dest[3]); + */ + pm_vuser4, + + /* + * Description: - + * Member type: int + * Get params: get_pmove(member); + * Set params: set_pmove(const PlayerMove:var, value); + */ + pm_numphysent, + + /* + * Description: - + * Member type: struct usercmd_s * + * Get params: get_pmove(member); + * Set params: set_pmove(const PlayerMove:var, value); + */ + pm_cmd, + + /* + * Description: - + * Member type: int + * Get params: get_pmove(member); + * Set params: set_pmove(const PlayerMove:var, value); + */ + pm_numtouch, + + /* + * Description: - + * Member type: char [256] + * Get params: get_pmove(const PlayerMove:var, dest[], const lenght); + * Set params: set_pmove(const PlayerMove:var, const source[]); + */ + pm_physinfo, + + /* + * Description: - + * Member type: vec3_t [4] + * Get params: get_pmove(const PlayerMove:var, Float:output[3], element); + * Set params: set_pmove(const PlayerMove:var, Float:dest[3], element); + */ + pm_player_mins, + + /* + * Description: - + * Member type: vec3_t [4] + * Get params: get_pmove(const PlayerMove:var, Float:output[3], element); + * Set params: set_pmove(const PlayerMove:var, Float:dest[3], element); + */ + pm_player_maxs, +}; + +/** +* MoveVars +*/ +enum MoveVars +{ + /* + * Description: - + * Member type: float + * Get params: Float:get_movevar(const MoveVars:var); + * Set params: set_movevar(const MoveVars:var, Float:value); + */ + mv_gravity = BEGIN_MEMBER_REGION(movevars), + + /* + * Description: - + * Member type: float + * Get params: Float:get_movevar(const MoveVars:var); + * Set params: set_movevar(const MoveVars:var, Float:value); + */ + mv_stopspeed, + + /* + * Description: - + * Member type: float + * Get params: Float:get_movevar(const MoveVars:var); + * Set params: set_movevar(const MoveVars:var, Float:value); + */ + mv_maxspeed, + + /* + * Description: - + * Member type: float + * Get params: Float:get_movevar(const MoveVars:var); + * Set params: set_movevar(const MoveVars:var, Float:value); + */ + mv_spectatormaxspeed, + + /* + * Description: - + * Member type: float + * Get params: Float:get_movevar(const MoveVars:var); + * Set params: set_movevar(const MoveVars:var, Float:value); + */ + mv_accelerate, + + /* + * Description: - + * Member type: float + * Get params: Float:get_movevar(const MoveVars:var); + * Set params: set_movevar(const MoveVars:var, Float:value); + */ + mv_airaccelerate, + + /* + * Description: - + * Member type: float + * Get params: Float:get_movevar(const MoveVars:var); + * Set params: set_movevar(const MoveVars:var, Float:value); + */ + mv_wateraccelerate, + + /* + * Description: - + * Member type: float + * Get params: Float:get_movevar(const MoveVars:var); + * Set params: set_movevar(const MoveVars:var, Float:value); + */ + mv_friction, + + /* + * Description: - + * Member type: float + * Get params: Float:get_movevar(const MoveVars:var); + * Set params: set_movevar(const MoveVars:var, Float:value); + */ + mv_edgefriction, + + /* + * Description: - + * Member type: float + * Get params: Float:get_movevar(const MoveVars:var); + * Set params: set_movevar(const MoveVars:var, Float:value); + */ + mv_waterfriction, + + /* + * Description: - + * Member type: float + * Get params: Float:get_movevar(const MoveVars:var); + * Set params: set_movevar(const MoveVars:var, Float:value); + */ + mv_entgravity, + + /* + * Description: - + * Member type: float + * Get params: Float:get_movevar(const MoveVars:var); + * Set params: set_movevar(const MoveVars:var, Float:value); + */ + mv_bounce, + + /* + * Description: - + * Member type: float + * Get params: Float:get_movevar(const MoveVars:var); + * Set params: set_movevar(const MoveVars:var, Float:value); + */ + mv_stepsize, + + /* + * Description: - + * Member type: float + * Get params: Float:get_movevar(const MoveVars:var); + * Set params: set_movevar(const MoveVars:var, Float:value); + */ + mv_maxvelocity, + + /* + * Description: - + * Member type: float + * Get params: Float:get_movevar(const MoveVars:var); + * Set params: set_movevar(const MoveVars:var, Float:value); + */ + mv_zmax, + + /* + * Description: - + * Member type: float + * Get params: Float:get_movevar(const MoveVars:var); + * Set params: set_movevar(const MoveVars:var, Float:value); + */ + mv_waveHeight, + + /* + * Description: - + * Member type: BOOL + * Get params: Float:get_movevar(const MoveVars:var); + * Set params: set_movevar(const MoveVars:var, Float:value); + */ + mv_footsteps, + + /* + * Description: - + * Member type: char [32] + * Get params: Float:get_movevar(const MoveVars:var, dest[], const lenght); + * Set params: set_movevar(const MoveVars:var, const source[]); + */ + mv_skyName, + + /* + * Description: - + * Member type: float + * Get params: Float:get_movevar(const MoveVars:var); + * Set params: set_movevar(const MoveVars:var, Float:value); + */ + mv_rollangle, + + /* + * Description: - + * Member type: float + * Get params: Float:get_movevar(const MoveVars:var); + * Set params: set_movevar(const MoveVars:var, Float:value); + */ + mv_rollspeed, + + /* + * Description: - + * Member type: float + * Get params: Float:get_movevar(const MoveVars:var); + * Set params: set_movevar(const MoveVars:var, Float:value); + */ + mv_skycolor_r, + + /* + * Description: - + * Member type: float + * Get params: Float:get_movevar(const MoveVars:var); + * Set params: set_movevar(const MoveVars:var, Float:value); + */ + mv_skycolor_g, + + /* + * Description: - + * Member type: float + * Get params: Float:get_movevar(const MoveVars:var); + * Set params: set_movevar(const MoveVars:var, Float:value); + */ + mv_skycolor_b, + + /* + * Description: - + * Member type: float + * Get params: Float:get_movevar(const MoveVars:var); + * Set params: set_movevar(const MoveVars:var, Float:value); + */ + mv_skyvec_x, + + /* + * Description: - + * Member type: float + * Get params: Float:get_movevar(const MoveVars:var); + * Set params: set_movevar(const MoveVars:var, Float:value); + */ + mv_skyvec_y, + + /* + * Description: - + * Member type: float + * Get params: Float:get_movevar(const MoveVars:var); + * Set params: set_movevar(const MoveVars:var, Float:value); + */ + mv_skyvec_z, +}; + +/** +* PMTrace +*/ +enum PMTrace +{ + /* + * Description: - + * Member type: qboolean + * Get params: get_pmtrace(const tr, const PMTrace:var); + * Set params: set_pmtrace(const tr, const PMTrace:var, value); + */ + pmt_allsolid = BEGIN_MEMBER_REGION(pmtrace), + + /* + * Description: - + * Member type: qboolean + * Get params: get_pmtrace(const tr, const PMTrace:var); + * Set params: set_pmtrace(const tr, const PMTrace:var, value); + */ + pmt_startsolid, + + /* + * Description: - + * Member type: qboolean + * Get params: get_pmtrace(const tr, const PMTrace:var); + * Set params: set_pmtrace(const tr, const PMTrace:var, value); + */ + pmt_inopen, + + /* + * Description: - + * Member type: qboolean + * Get params: get_pmtrace(const tr, const PMTrace:var); + * Set params: set_pmtrace(const tr, const PMTrace:var, value); + */ + pmt_inwater, + + /* + * Description: - + * Member type: float + * Get params: Float:get_pmtrace(const tr, const PMTrace:var); + * Set params: set_pmtrace(const tr, const PMTrace:var, Float:value); + */ + pmt_fraction, + + /* + * Description: - + * Member type: vec3_t + * Get params: get_pmtrace(const tr, const PMTrace:var, Float:output[3]); + * Set params: set_pmtrace(const tr, const PMTrace:var, Float:dest[3]); + */ + pmt_endpos, + + /* + * Description: - + * Member type: int + * Get params: get_pmtrace(const tr, const PMTrace:var); + * Set params: set_pmtrace(const tr, const PMTrace:var, value); + */ + pmt_ent, + + /* + * Description: - + * Member type: vec3_t + * Get params: get_pmtrace(const tr, const PMTrace:var, Float:output[3]); + * Set params: set_pmtrace(const tr, const PMTrace:var, Float:dest[3]); + */ + pmt_deltavelocity, + + /* + * Description: - + * Member type: int + * Get params: get_pmtrace(const tr, const PMTrace:var); + * Set params: set_pmtrace(const tr, const PMTrace:var, value); + */ + pmt_hitgroup +}; + +/** +* CCSPlayer API Members +*/ +enum CCSPlayer_Members +{ + /* + * Description: - + * Member type: char [32] + * Get params: get_member(index, member, dest[], const lenght); + * Set params: set_member(index, member, const source[]); + */ + m_szModel = BEGIN_MEMBER_REGION(csplayer), + + /* + * Description: - + * Member type: bool + * Get params: get_member(index, member); + * Set params: set_member(index, member, bool:value); + */ + m_bForceShowMenu, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_flRespawnPending, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_flSpawnProtectionEndTime, + + /* + * Description: - + * Member type: class Vector + * Get params: get_member(index, member, Float:output[3]); + * Set params: set_member(index, member, Float:dest[3]); + */ + m_vecOldvAngle, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_iWeaponInfiniteAmmo, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_iWeaponInfiniteIds, + + /* + * Description: Forcing override for CBasePlayer::m_bCanShoot + * Member type: bool + * Get params: get_member(index, member); + * Set params: set_member(index, member, bool:value); + */ + m_bCanShootOverride, + + /* + * Description: - + * Member type: bool + * Get params: get_member(index, member); + * Set params: set_member(index, member, bool:value); + */ + m_bGameForcingRespawn, + + /* + * Description: - + * Member type: bool + * Get params: get_member(index, member); + * Set params: set_member(index, member, bool:value); + */ + m_bAutoBunnyHopping, + + /* + * Description: - + * Member type: bool + * Get params: get_member(index, member); + * Set params: set_member(index, member, bool:value); + */ + m_bMegaBunnyJumping, + + /* + * Description: - + * Member type: bool + * Get params: get_member(index, member); + * Set params: set_member(index, member, bool:value); + */ + m_bPlantC4Anywhere, + + /* + * Description: - + * Member type: bool + * Get params: get_member(index, member); + * Set params: set_member(index, member, bool:value); + */ + m_bSpawnProtectionEffects, + + /* + * Description: Player vertical jump height + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_flJumpHeight, + + /* + * Description: Player vertical jump height with longjump + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_flLongJumpHeight, + + /* + * Description: Player horizontal jump height with longjump + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_flLongJumpForce, + + /* + * Description: Player crouch maxspeed multiplier + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_flDuckSpeedMultiplier, + + /* + * Description: How many unanswered kills this player has been dealt by each other player (0-31) + * Member type: int [32] + * Get params: get_member(index, member, element); + * Set params: set_member(index, member, value, element); + */ + m_iNumKilledByUnanswered, + + /* + * Description: Array of state per other player whether player is dominating other players (0-31) + * Member type: bool [32] + * Get params: get_member(index, member, element); + * Set params: set_member(index, member, value, element); + */ + m_bPlayerDominated, +}; + +/** +* CBasePlayerItem Members +*/ +enum CBasePlayerItem_Members +{ + /* + * Description: ID of the owner on this item + * Member type: class CBasePlayer * + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_pPlayer = BEGIN_MEMBER_REGION(baseitem), + + /* + * Description: Iterator for linked list of the entities + * Member type: class CBasePlayerItem * + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_pNext, + + /* + * Description: ID of the item + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_iId, +}; + +/** +* CBasePlayerWeapon Members +*/ +enum CBasePlayerWeapon_Members +{ + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_Weapon_iPlayEmptySound = BEGIN_MEMBER_REGION(baseweapon), + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_Weapon_fFireOnEmpty, + + /* + * Description: Soonest time ItemPostFrame will call PrimaryAttack. + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_Weapon_flNextPrimaryAttack, + + /* + * Description: Soonest time ItemPostFrame will call SecondaryAttack. + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_Weapon_flNextSecondaryAttack, + + /* + * Description: Soonest time ItemPostFrame will call WeaponIdle. + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_Weapon_flTimeWeaponIdle, + + /* + * Description: "primary" ammo index into player's m_rgAmmo[] + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_Weapon_iPrimaryAmmoType, + + /* + * Description: "secondary" ammo index into player's m_rgAmmo[] + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_Weapon_iSecondaryAmmoType, + + /* + * Description: Number of shots left in the primary weapon clip, -1 if not used. + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_Weapon_iClip, + + /* + * Description: The last version of m_Weapon_iClip sent to hud dll. + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_Weapon_iClientClip, + + /* + * Description: The last version of the weapon state sent to hud dll (is current weapon, is on target). + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_Weapon_iClientWeaponState, + + /* + * Description: Are we in the middle of a reload? + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_Weapon_fInReload, + + /* + * Description: Are we in the middle of a reload for the shotguns? + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_Weapon_fInSpecialReload, + + /* + * Description: How much ammo you get when you pick up this weapon as placed by a level designer. + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_Weapon_iDefaultAmmo, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_Weapon_iShellId, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_Weapon_fMaxSpeed, + + /* + * Description: - + * Member type: bool + * Get params: get_member(index, member); + * Set params: set_member(index, member, bool:value); + */ + m_Weapon_bDelayFire, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_Weapon_iDirection, + + /* + * Description: - + * Member type: bool + * Get params: get_member(index, member); + * Set params: set_member(index, member, bool:value); + */ + m_Weapon_bSecondarySilencerOn, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_Weapon_flAccuracy, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_Weapon_flLastFire, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_Weapon_iShotsFired, + + /* + * Description: Time to shoot the remaining bullets of the glock18 burst fire. + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_Weapon_flGlock18Shoot, + + /* + * Description: Used to keep track of the shots fired during the Glock18 burst fire mode. + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_Weapon_iGlock18ShotsFired, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_Weapon_flFamasShoot, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_Weapon_iFamasShotsFired, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_Weapon_fBurstSpread, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_Weapon_iWeaponState, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_Weapon_flNextReload, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_Weapon_flDecreaseShotsFired, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_Weapon_usFireGlock18, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_Weapon_usFireFamas, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_Weapon_flPrevPrimaryAttack, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_Weapon_flLastFireTime, +}; + +/** +* CWeaponBox Members +*/ +enum CWeaponBox_Members +{ + /* + * Description: - + * Member type: class CBasePlayerItem *[MAX_ITEM_TYPES] + * Get params: get_member(index, member, element); + * Set params: set_member(index, member, value, element); + */ + m_WeaponBox_rgpPlayerItems = BEGIN_MEMBER_REGION(weaponbox), + + /* + * Description: - + * Member type: string_t [MAX_AMMO_SLOTS] + * Get params: get_member(index, member, dest[], const lenght, element); + * Set params: set_member(index, member, const source[], element); + */ + m_WeaponBox_rgiszAmmo, + + /* + * Description: - + * Member type: int [MAX_AMMO_SLOTS] + * Get params: get_member(index, member, element); + * Set params: set_member(index, member, value, element); + */ + m_WeaponBox_rgAmmo, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_WeaponBox_cAmmoTypes, + + /* + * Description: - + * Member type: bool + * Get params: get_member(index, member); + * Set params: set_member(index, member, bool:value); + */ + m_WeaponBox_bIsBomb, +}; + +/** +* CArmoury Members +*/ +enum CArmoury_Members +{ + /* + * Description: - + * Member type: enum ArmouryItemPack + * Get params: ArmouryItemPack:get_member(index, member); + * Set params: set_member(index, member, ArmouryItemPack:value); + */ + m_Armoury_iItem = BEGIN_MEMBER_REGION(armoury), + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_Armoury_iCount, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_Armoury_iInitialCount, + + /* + * Description: - + * Member type: bool + * Get params: get_member(index, member); + * Set params: set_member(index, member, bool:value); + */ + m_Armoury_bAlreadyCounted, +}; + +/** +* CGrenade Members +*/ +enum CGrenade_Members +{ + /* + * Description: - + * Member type: bool + * Get params: get_member(index, member); + * Set params: set_member(index, member, bool:value); + */ + m_Grenade_bStartDefuse = BEGIN_MEMBER_REGION(grenade), + + /* + * Description: - + * Member type: bool + * Get params: get_member(index, member); + * Set params: set_member(index, member, bool:value); + */ + m_Grenade_bIsC4, + + /* + * Description: - + * Member type: class EHANDLE + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_Grenade_pBombDefuser, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_Grenade_flDefuseCountDown, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_Grenade_flC4Blow, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_Grenade_flNextFreqInterval, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_Grenade_flNextBeep, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_Grenade_flNextFreq, + + /* + * Description: - + * Member type: char * + * Get params: get_member(index, member, dest[], const lenght); + * Set params: set_member(index, member, const source[]); + */ + m_Grenade_sBeepName, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_Grenade_fAttenu, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_Grenade_flNextBlink, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_Grenade_fNextDefuse, + + /* + * Description: - + * Member type: bool + * Get params: get_member(index, member); + * Set params: set_member(index, member, bool:value); + */ + m_Grenade_bJustBlew, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_Grenade_iTeam, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_Grenade_iCurWave, + + /* + * Description: - + * Member type: struct edict_s * + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_Grenade_pentCurBombTarget, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_Grenade_SGSmoke, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_Grenade_angle, + + /* + * Description: - + * Member type: unsigned short + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_Grenade_usEvent, + + /* + * Description: - + * Member type: bool + * Get params: get_member(index, member); + * Set params: set_member(index, member, bool:value); + */ + m_Grenade_bLightSmoke, + + /* + * Description: - + * Member type: bool + * Get params: get_member(index, member); + * Set params: set_member(index, member, bool:value); + */ + m_Grenade_bDetonated, + + /* + * Description: - + * Member type: class Vector + * Get params: get_member(index, member, Float:output[3]); + * Set params: set_member(index, member, Float:dest[3]); + */ + m_Grenade_vSmokeDetonate, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_Grenade_iBounceCount, + + /* + * Description: Whether or not this grenade has issued its DANGER sound to the world sound list yet. + * Member type: BOOL + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_Grenade_fRegisteredSound, +}; + +/** +* CP228 Members +*/ +enum CP228_Members +{ + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_P228_iShell = BEGIN_MEMBER_REGION(p228), + + /* + * Description: - + * Member type: unsigned short + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_P228_usFire, +}; + +/** +* CSCOUT Members +*/ +enum CSCOUT_Members +{ + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_SCOUT_iShell = BEGIN_MEMBER_REGION(scout), + + /* + * Description: - + * Member type: unsigned short + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_SCOUT_usFire, +}; + +/** +* CHEGrenade Members +*/ +enum CHEGrenade_Members +{ + /* + * Description: - + * Member type: unsigned short + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_HEGrenade_usCreate = BEGIN_MEMBER_REGION(hegrenade), +}; + +/** +* CXM1014 Members +*/ +enum CXM1014_Members +{ + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_XM1014_iShell = BEGIN_MEMBER_REGION(xm1014), + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_XM1014_flPumpTime, + + /* + * Description: - + * Member type: unsigned short + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_XM1014_usFire, +}; + +/** +* CC4 Members +*/ +enum CC4_Members +{ + /* + * Description: - + * Member type: bool + * Get params: get_member(index, member); + * Set params: set_member(index, member, bool:value); + */ + m_C4_bStartedArming = BEGIN_MEMBER_REGION(c4), + + /* + * Description: - + * Member type: bool + * Get params: get_member(index, member); + * Set params: set_member(index, member, bool:value); + */ + m_C4_bBombPlacedAnimation, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_C4_fArmedTime, + + /* + * Description: - + * Member type: bool + * Get params: get_member(index, member); + * Set params: set_member(index, member, bool:value); + */ + m_C4_bHasShield, +}; + +/** +* CMAC10 Members +*/ +enum CMAC10_Members +{ + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_MAC10_iShell = BEGIN_MEMBER_REGION(mac10), + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_MAC10_iShellOn, + + /* + * Description: - + * Member type: unsigned short + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_MAC10_usFire, +}; + +/** +* CAUG Members +*/ +enum CAUG_Members +{ + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_AUG_iShell = BEGIN_MEMBER_REGION(aug), + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_AUG_iShellOn, + + /* + * Description: - + * Member type: unsigned short + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_AUG_usFire, +}; + +/** +* CSmokeGrenade Members +*/ +enum CSmokeGrenade_Members +{ + /* + * Description: - + * Member type: unsigned short + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_SmokeGrenade_usCreate = BEGIN_MEMBER_REGION(smokegrenade), +}; + +/** +* CELITE Members +*/ +enum CELITE_Members +{ + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_ELITE_iShell = BEGIN_MEMBER_REGION(elite), + + /* + * Description: - + * Member type: unsigned short + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_ELITE_usFire_LEFT, + + /* + * Description: - + * Member type: unsigned short + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_ELITE_usFire_RIGHT, +}; + +/** +* CFiveSeven Members +*/ +enum CFiveSeven_Members +{ + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_FiveSeven_iShell = BEGIN_MEMBER_REGION(fiveseven), + + /* + * Description: - + * Member type: unsigned short + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_FiveSeven_usFire, +}; + +/** +* CUMP45 Members +*/ +enum CUMP45_Members +{ + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_UMP45_iShell = BEGIN_MEMBER_REGION(ump45), + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_UMP45_iShellOn, + + /* + * Description: - + * Member type: unsigned short + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_UMP45_usFire, +}; + +/** +* CSG550 Members +*/ +enum CSG550_Members +{ + m_SG550_iShell = BEGIN_MEMBER_REGION(sg550), + + /* + * Description: - + * Member type: unsigned short + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_SG550_usFire, +}; + +/** +* CGalil Members +*/ +enum CGalil_Members +{ + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_Galil_iShell = BEGIN_MEMBER_REGION(galil), + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_Galil_iShellOn, + + /* + * Description: - + * Member type: unsigned short + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_Galil_usFire, +}; + +/** +* CFamas Members +*/ +enum CFamas_Members +{ + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_Famas_iShell = BEGIN_MEMBER_REGION(famas), + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_Famas_iShellOn, + + /* + * Description: Basic damage that famas deals before any multiplier, such as hitgroup, armor, distance and bullet penetration in burst mode + * Member type: float + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_Famas_flBaseDamageBurst, +}; + +/** +* CUSP Members +*/ +enum CUSP_Members +{ + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_USP_iShell = BEGIN_MEMBER_REGION(usp), + + /* + * Description: - + * Member type: unsigned short + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_USP_usFire, + + /* + * Description: Basic damage that usp deals before any multiplier, such as hitgroup, armor, distance and bullet penetration in silence mdoe + * Member type: float + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_USP_flBaseDamageSil, +}; + +/** +* CGLOCK18 Members +*/ +enum CGLOCK18_Members +{ + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_GLOCK18_iShell = BEGIN_MEMBER_REGION(glock18), + + /* + * Description: - + * Member type: bool + * Get params: get_member(index, member); + * Set params: set_member(index, member, bool:value); + */ + m_GLOCK18_bBurstFire, +}; + +/** +* CAWP Members +*/ +enum CAWP_Members +{ + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_AWP_iShell = BEGIN_MEMBER_REGION(awp), + + /* + * Description: - + * Member type: unsigned short + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_AWP_usFire, +}; + +/** +* CMP5N Members +*/ +enum CMP5N_Members +{ + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_MP5N_iShell = BEGIN_MEMBER_REGION(mp5n), + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_MP5N_iShellOn, + + /* + * Description: - + * Member type: unsigned short + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_MP5N_usFire, +}; + +/** +* CM249 Members +*/ +enum CM249_Members +{ + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_M249_iShell = BEGIN_MEMBER_REGION(m249), + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_M249_iShellOn, + + /* + * Description: - + * Member type: unsigned short + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_M249_usFire, +}; + +/** +* CM3 Members +*/ +enum CM3_Members +{ + m_M3_iShell = BEGIN_MEMBER_REGION(m3), + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_M3_flPumpTime, + + /* + * Description: - + * Member type: unsigned short + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_M3_usFire, +}; + +/** +* CM4A1 Members +*/ +enum CM4A1_Members +{ + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_M4A1_iShell = BEGIN_MEMBER_REGION(m4a1), + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_M4A1_iShellOn, + + /* + * Description: - + * Member type: unsigned short + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_M4A1_usFire, + + /* + * Description: Basic damage that m4a1 deals before any multiplier, such as hitgroup, armor, distance and bullet penetration in silence mdoe + * Member type: float + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_M4A1_flBaseDamageSil, +}; + +/** +* CTMP Members +*/ +enum CTMP_Members +{ + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_TMP_iShell = BEGIN_MEMBER_REGION(tmp), + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_TMP_iShellOn, + + /* + * Description: - + * Member type: unsigned short + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_TMP_usFire, +}; + +/** +* CG3SG1 Members +*/ +enum CG3SG1_Members +{ + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_G3SG1_iShell = BEGIN_MEMBER_REGION(g3sg1), + + /* + * Description: - + * Member type: unsigned short + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_G3SG1_usFire, +}; + +/** +* CDEAGLE Members +*/ +enum CDEAGLE_Members +{ + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_DEAGLE_iShell = BEGIN_MEMBER_REGION(deagle), + + /* + * Description: - + * Member type: unsigned short + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_DEAGLE_usFire, +}; + +/** +* CSG552 Members +*/ +enum CSG552_Members +{ + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_SG552_iShell = BEGIN_MEMBER_REGION(sg552), + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_SG552_iShellOn, + + /* + * Description: - + * Member type: unsigned short + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_SG552_usFire, +}; + +/** +* CAK47 Members +*/ +enum CAK47_Members +{ + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_AK47_iShell = BEGIN_MEMBER_REGION(ak47), + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_AK47_iShellOn, + + /* + * Description: - + * Member type: unsigned short + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_AK47_usFire, +}; + +/** +* CKnife Members +*/ +enum CKnife_Members +{ + /* + * Description: - + * Member type: TraceResult + * Get params: TraceResult:get_member(index, member); + * Set params: set_member(index, member, TraceResult:value); + */ + m_Knife_trHit = BEGIN_MEMBER_REGION(knife), + + /* + * Description: - + * Member type: unsigned short + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_Knife_usKnife, + + /* + * Description: Stab damage (default: 65.0) + * Member type: float + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_Knife_flStabBaseDamage, + + /* + * Description: Swing damage (default: 15.0) + * Member type: float + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_Knife_flSwingBaseDamage, + + /* + * Description: Fast Swing (first one) damage (default: 20.0) + * Member type: float + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_Knife_flSwingBaseDamage_Fast, + + /* + * Description: Stab distance (default: 32.0) + * Member type: float + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_Knife_flStabDistance, + + /* + * Description: Swing distance (default: 64.0) + * Member type: float + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_Knife_flSwingDistance, + + /* + * Description: Back Stab damage multiplier (default: 3.0) + * Member type: float + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_Knife_flBackStabMultiplier, +}; + +/** +* CP90 Members +*/ +enum CP90_Members +{ + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_P90_iShell = BEGIN_MEMBER_REGION(p90), + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_P90_iShellOn, + + /* + * Description: - + * Member type: unsigned short + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_P90_usFire, +}; + +/** +* CWShield Members +*/ +enum CShield_Members +{ + /* + * Description: - + * Member type: class EHANDLE + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_Shield_hEntToIgnoreTouchesFrom = BEGIN_MEMBER_REGION(shield), + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_Shield_flTimeToIgnoreTouches, +}; + +/** +* CMapInfo Members +*/ +enum CMapInfo_Members +{ + /* + * Description: - + * Member type: enum InfoMapBuyParam + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_MapInfo_iBuyingStatus = BEGIN_MEMBER_REGION(mapinfo), + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_MapInfo_flBombRadius, +}; + +/** +* CCSPlayerWeapon API Members +*/ +enum CCSPlayerWeapon_Members +{ + /* + * Description: Weapon secondary attack state + * Member type: enum SecondaryAtkState + * Get params: get_member(index, member); + * Set params: set_member(index, member, SecondaryAtkState:value); + */ + m_Weapon_iStateSecondaryAttack = BEGIN_MEMBER_REGION(csplayerweapon), + + /* + * Description: Basic damage that weapon deals before any multiplier, such as hitgroup, armor, distance and bullet penetration + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_Weapon_flBaseDamage, +}; + +// API compatibility +#define m_Weapon_bHasSecondaryAttack m_Weapon_iStateSecondaryAttack + +/** +* CGib Members +*/ +enum CGib_Members +{ + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_Gib_bloodColor = BEGIN_MEMBER_REGION(gib), + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_Gib_cBloodDecals, + + /* + * Description: - + * Member type: int + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_Gib_material, + + /* + * Description: - + * Member type: float + * Get params: Float:get_member(index, member); + * Set params: set_member(index, member, Float:value); + */ + m_Gib_lifeTime, +}; + +/** +* CCSEntity API Members +*/ +enum CCSEntity_Members +{ + /* + * Description: Penetration level of the damage caused by the inflictor + * Member type: unsigned char + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_ucDmgPenetrationLevel = BEGIN_MEMBER_REGION(csentity), + + /* + * Description: Cached inflictor passed inside TakeDamage to retrieve in Killed + * Member type: entvars_t * + * Get params: get_member(index, member); + * Set params: set_member(index, member, value); + */ + m_pevLastInflictor, +}; diff --git a/bin/compiler/include/reapi_rechecker.inc b/bin/compiler/include/reapi_rechecker.inc new file mode 100644 index 0000000..50c7f2d --- /dev/null +++ b/bin/compiler/include/reapi_rechecker.inc @@ -0,0 +1,58 @@ +#if defined _reapi_rechecker_included + #endinput +#endif +#define _reapi_rechecker_included + +enum ResourceType +{ + RES_TYPE_NONE = 0, + RES_TYPE_EXISTS, // to comparison with the specified hash value + RES_TYPE_MISSING, // check it missing file on client + RES_TYPE_IGNORE, // ignore the specified hash value + RES_TYPE_HASH_ANY, // any file with any the hash value +}; + +enum ReCheckerFunc +{ + /* + * Description: - + * Params: (const client, const filename[], const cmd[], const ResourceType:type, const responseHash, bool:isBreak) + */ + RC_FileConsistencyProcess = BEGIN_FUNC_REGION(rechecker), + + /* + * Description: - + * Params: (const client) + */ + RC_FileConsistencyFinal, + + /* + * Description: - + * Params: (const client, const filename[], const cmd[], const responseHash) + */ + RC_CmdExec, + + // [...] +}; + +/* +* Send request the file for the client to get hash +* +* @param file The file (Can contain a relative path to the file) +* @param function The forward to call +* @param type The request type, can be only RES_TYPE_EXISTS, RES_TYPE_MISSING or RES_TYPE_HASH_ANY +* @param hash Hash of file to request. +* +* @return Returns a hook handle. Use UnRegisterQueryFile to remove the forward +*/ +native QueryFileHook:RegisterQueryFile(const file[], const function[], const ResourceType:type, const hash = -1); + +/* +* Unregister the forward. +* Use the return value from RegisterQueryFile as the parameter here! +* +* @param hook The hook to remove +* +* @return Returns true if the hook is successfully removed, otherwise false +*/ +native bool:UnRegisterQueryFile(QueryFileHook:hook); diff --git a/bin/compiler/include/reapi_reunion.inc b/bin/compiler/include/reapi_reunion.inc new file mode 100644 index 0000000..311f0c2 --- /dev/null +++ b/bin/compiler/include/reapi_reunion.inc @@ -0,0 +1,61 @@ +#if defined _reapi_reunion_included + #endinput +#endif +#define _reapi_reunion_included + +enum client_auth_type +{ + CA_TYPE_NONE = 0, + CA_TYPE_DPROTO, + CA_TYPE_STEAM, + CA_TYPE_STEAMEMU, + CA_TYPE_REVEMU, + CA_TYPE_OLDREVEMU, + CA_TYPE_HLTV, + CA_TYPE_SC2009, + CA_TYPE_AVSMP, + CA_TYPE_SXEI, + CA_TYPE_REVEMU2013, + CA_TYPE_SSE3, +}; + +#define is_user_steam(%0) (REU_GetAuthtype(%0) == CA_TYPE_STEAM) + +/* +* Gets client protocol. +* +* @param index Client index +* +* @return Client protocol +*/ +native REU_GetProtocol(const index); + +/* +* Gets client auth type. +* +* @param index Client index +* +* @return Client auth type +*/ +native client_auth_type:REU_GetAuthtype(const index); + +/* +* Get client authkey +* +* @param index Client index +* @param index Buffer to copy the authkey +* @param index Maximum buffer size +* +* @return Number of cells copied to buffer +* +*/ +native REU_GetAuthKey(const index, dest[], maxlen); + +/* +* Check if the client is running RevEmu with limited user rights. +* +* @param index Client index +* +* @return 1/0 +*/ +native bool:REU_IsRevemuWithoutAdminRights(const index); diff --git a/bin/compiler/include/reapi_version.inc b/bin/compiler/include/reapi_version.inc new file mode 100644 index 0000000..e8d9800 --- /dev/null +++ b/bin/compiler/include/reapi_version.inc @@ -0,0 +1,9 @@ +#if defined _reapi_version_included + #endinput +#endif +#define _reapi_version_included + +// reapi version +#define REAPI_VERSION 524300 +#define REAPI_VERSION_MAJOR 5 +#define REAPI_VERSION_MINOR 24 diff --git a/bin/compiler/include/reapi_vtc.inc b/bin/compiler/include/reapi_vtc.inc new file mode 100644 index 0000000..98e3aae --- /dev/null +++ b/bin/compiler/include/reapi_vtc.inc @@ -0,0 +1,71 @@ +#if defined _reapi_vtc_included + #endinput +#endif +#define _reapi_vtc_included + +/* +* Checks whether the player is talking at the moment. +* +* @param index Client index +* +* @return true if client is speaking, false otherwise +*/ +native bool:VTC_IsClientSpeaking(const index); + +/* +* Mutes the player. +* +* @param index Client index +* +* @noreturn +*/ +native VTC_MuteClient(const index); + +/* +* Unmutes the player. +* +* @param index Client index +* +* @noreturn +*/ +native VTC_UnmuteClient(const index); + +/* +* Checks whether the player is muted at the moment. +* +* @param index Client index +* +* @return true if client is muted, false otherwise +*/ +native bool:VTC_IsClientMuted(const index); + +/* +* Play the audio file via the voice stream. +* +* @param receiver Receiver index +* @param soundFilePath The path to the sound file +* +* @note Usage example: +* VTC_PlaySound(id, "sound/ambience/Opera.wav"); +* +* @noreturn +*/ +native VTC_PlaySound(const receiver, const soundFilePath[]); + +/* +* Called when the player started talking. +* +* @param index Client index +* +* @noreturn +*/ +forward VTC_OnClientStartSpeak(const index); + +/* +* Called when the player stopped talking. +* +* @param index Client index +* +* @noreturn +*/ +forward VTC_OnClientStopSpeak(const index); diff --git a/bin/compiler/include/regex.inc b/bin/compiler/include/regex.inc new file mode 100644 index 0000000..5c777e4 --- /dev/null +++ b/bin/compiler/include/regex.inc @@ -0,0 +1,348 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Regular Expressions API +// + +#if defined _regex_included + #endinput +#endif +#define _regex_included + +#pragma reqlib regex +#if !defined AMXMODX_NOAUTOLOAD + #pragma loadlib regex +#endif + + +enum Regex +{ + REGEX_MATCH_FAIL = -2, + REGEX_PATTERN_FAIL = -1, + REGEX_NO_MATCH = 0, + REGEX_OK = 1 +}; + +/** + * Flags for compiling regex expressions. + * These come directly from the pcre library and can be used in regex_compile_ex. + */ +#define PCRE_CASELESS 0x00000001 /* Ignore Case */ +#define PCRE_MULTILINE 0x00000002 /* Multilines (affects ^ and $ so that they match the start/end of a line rather than matching the start/end of the string). */ +#define PCRE_DOTALL 0x00000004 /* Single line (affects . so that it matches any character, even new line characters). */ +#define PCRE_EXTENDED 0x00000008 /* Pattern extension (ignore whitespace and # comments). */ +#define PCRE_ANCHORED 0x00000010 /* Force pattern anchoring. */ +#define PCRE_DOLLAR_ENDONLY 0x00000020 /* $ not to match newline at end. */ +#define PCRE_UNGREEDY 0x00000200 /* Invert greediness of quantifiers */ +#define PCRE_NOTEMPTY 0x00000400 /* An empty string is not a valid match. */ +#define PCRE_UTF8 0x00000800 /* Use UTF-8 Chars */ +#define PCRE_NO_UTF8_CHECK 0x00002000 /* Do not check the pattern for UTF-8 validity (only relevant if PCRE_UTF8 is set) */ +#define PCRE_NEVER_UTF 0x00010000 /* Lock out interpretation of the pattern as UTF-8 */ +#define PCRE_FIRSTLINE 0x00040000 /* Force matching to be before newline */ +#define PCRE_DUPNAMES 0x00080000 /* Allow duplicate names for subpattern */ +#define PCRE_NEWLINE_CR 0x00100000 /* Specify that a newline is indicated by a single character CR ) */ +#define PCRE_NEWLINE_CRLF 0x00300000 /* specify that a newline is indicated by the two-character CRLF sequence ) Overrides the default */ +#define PCRE_NEWLINE_ANY 0x00400000 /* Specify that any Unicode newline sequence should be recognized. ) newline definition (LF) */ +#define PCRE_NEWLINE_ANYCRLF 0x00500000 /* Specify that any of CR, LF and CRLF sequences should be recognized ) */ +#define PCRE_UCP 0x20000000 /* Change the way PCRE processes \B, \b, \D, \d, \S, \s, \W, \w etc. to use Unicode properties */ + +/** + * Regex expression error codes. + * This can be used with regex_compile_ex and regex_match_ex. + */ +enum /*RegexError*/ +{ + REGEX_ERROR_NONE = 0, /* No error */ + REGEX_ERROR_NOMATCH = -1, /* No match was found */ + REGEX_ERROR_NULL = -2, + REGEX_ERROR_BADOPTION = -3, + REGEX_ERROR_BADMAGIC = -4, + REGEX_ERROR_UNKNOWN_OPCODE = -5, + REGEX_ERROR_NOMEMORY = -6, + REGEX_ERROR_NOSUBSTRING = -7, + REGEX_ERROR_MATCHLIMIT = -8, + REGEX_ERROR_CALLOUT = -9, /* Never used by PCRE itself */ + REGEX_ERROR_BADUTF8 = -10, + REGEX_ERROR_BADUTF8_OFFSET = -11, + REGEX_ERROR_PARTIAL = -12, + REGEX_ERROR_BADPARTIAL = -13, + REGEX_ERROR_INTERNAL = -14, + REGEX_ERROR_BADCOUNT = -15, + REGEX_ERROR_DFA_UITEM = -16, + REGEX_ERROR_DFA_UCOND = -17, + REGEX_ERROR_DFA_UMLIMIT = -18, + REGEX_ERROR_DFA_WSSIZE = -19, + REGEX_ERROR_DFA_RECURSE = -20, + REGEX_ERROR_RECURSIONLIMIT = -21, + REGEX_ERROR_NULLWSLIMIT = -22, /* No longer actually used */ + REGEX_ERROR_BADNEWLINE = -23, + REGEX_ERROR_BADOFFSET = -24, + REGEX_ERROR_SHORTUTF8 = -25, + REGEX_ERROR_RECURSELOOP = -26, + REGEX_ERROR_JIT_STACKLIMIT = -27, + REGEX_ERROR_BADMODE = -28, + REGEX_ERROR_BADENDIANNESS = -29, + REGEX_ERROR_DFA_BADRESTART = -30, + REGEX_ERROR_JIT_BADOPTION = -31, + REGEX_ERROR_BADLENGTH = -32, + REGEX_ERROR_UNSET = -33 +}; + +/** + * Precompile a regular expression. + * + * @note Use this if you intend on using the same expression multiple times. + * Pass the regex handle returned here to regex_match_c to check for matches. + * + * @note This handle is automatically freed on map change. However, + * if you are completely done with it before then, you should + * call regex_free on this handle. + * + * @note Consider using regex_compile_ex instead if you want to use PCRE_* flags. + * + * @param pattern The regular expression pattern. + * @param ret Error code encountered, if applicable. + * @param error Error message encountered, if applicable. + * @param maxLen Maximum string length of the error buffer. + * @param flags General flags for the regular expression. + * i = Ignore case + * m = Multilines (affects ^ and $ so that they match + * the start/end of a line rather than matching the + * start/end of the string). + * s = Single line (affects . so that it matches any character, + * even new line characters). + * x = Pattern extension (ignore whitespace and # comments). + * + * @return -1 on error in the pattern, > valid regex handle (> 0) on success. + */ +native Regex:regex_compile(const pattern[], &ret = 0, error[] = "", maxLen = 0, const flags[]=""); + +/** + * Matches a string against a pre-compiled regular expression pattern. + * + * @note You should free the returned handle with regex_free() + * when you are done with this pattern. + * + * @note Use the regex handle passed to this function to extract + * matches with regex_substr(). + * + * @param string The string to check. + * @param pattern The regular expression pattern. + * @param ret Error code, if applicable, or number of results on success. See REGEX_ERROR_* defines. + * + * @return -2 = Matching error (error code is stored in ret) + * 0 = No match. + * >1 = Number of results. + */ +native regex_match_c(const string[], Regex:pattern, &ret = 0); + +/** + * Matches a string against a regular expression pattern. + * + * @note If you intend on using the same regular expression pattern + * multiple times, consider using regex_compile and regex_match_ex + * instead of making this function reparse the expression each time. + * + * @note Flags only exist in amxmodx 1.8 and later. + * + * @note You should free the returned handle with regex_free() + * when you are done extracting all of the substrings. + * + * @param string The string to check. + * @param pattern The regular expression pattern. + * @param ret Error code, or result state of the match. + * @param error Error message, if applicable. + * @param maxLen Maximum length of the error buffer. + * @param flags General flags for the regular expression. + * i = Ignore case + * m = Multilines (affects ^ and $ so that they match + * the start/end of a line rather than matching the + * start/end of the string). + * s = Single line (affects . so that it matches any character, + * even new line characters). + * x = Pattern extension (ignore whitespace and # comments). + * + * @return -2 = Matching error (error code is stored in ret) + * -1 = Error in pattern (error message and offset # in error and ret) + * 0 = No match. + * >1 = Handle for getting more information (via regex_substr) + */ +native Regex:regex_match(const string[], const pattern[], &ret = 0, error[] = "", maxLen = 0, const flags[] = ""); + +/** + * Returns a matched substring from a regex handle. + * + * @note Substring ids start at 0 and end at ret - 1, where ret is from the corresponding + * regex_match* function call. + * + * @param id The regex handle to extract data from. + * @param str_id The index of the expression to get - starts at 0, and ends at ret - 1. + * @param buffer The buffer to set to the matching substring. + * @param maxLen The maximum string length of the buffer. + * + * @return 1 on success, otherwise 0 on failure. + */ +native regex_substr(Regex:id, str_id, buffer[], maxLen); + +/** + * Frees the memory associated with a regex result, and sets the handle to 0. + * + * @note This must be called on all results from regex_match() when you are done extracting + * the results with regex_substr(). + * + * @note The results of regex_compile() or regex_compile_ex() (and subsequently, regex_match_c()) + * only need to be freed when you are done using the pattern. + * + * @note Do not use the handle again after freeing it! + * + * @param id The regex handle to free. + * @noreturn + */ +native regex_free(&Regex:id); + + +/** + * The following natives are only available in 1.8.3 and above. + */ + +/** + * Precompile a regular expression. + * + * @note Use this if you intend on using the same expression multiple times. + * Pass the regex handle returned here to regex_match_c() to check for matches. + * + * @note Unlike regex_compile(), this allows you to use PCRE flags directly. + * + * @param pattern The regular expression pattern. + * @param flags General flags for the regular expression, see PCRE_* defines. + * @param error Error message encountered, if applicable. + * @param maxLen Maximum string length of the error buffer. + * @param errcode Regex type error code encountered, if applicable. See REGEX_ERROR_* defines. + * + * @return Valid regex handle (> 0) on success, or -1 on failure. + */ +native Regex:regex_compile_ex(const pattern[], flags = 0, error[]= "", maxLen = 0, &errcode = 0); + +/** + * Matches a string against a pre-compiled regular expression pattern, matching all + * occurrences of the pattern inside the string. This is similar to using the "g" flag + * in perl regex. + * + * @note You should free the returned handle (with regex_free()) + * when you are done with this pattern. + * + * @note Use the regex handle passed to this function to extract + * matches with regex_substr(). + * + * @param pattern The regular expression pattern. + * @param string The string to check. + * @param ret Error code, if applicable, or number of results on success. + * See REGEX_ERROR_* defines. + * + * @return -2 = Matching error (error code is stored in ret) + * 0 = No match. + * >1 = Number of results. + */ +native regex_match_all_c(const string[], Regex:pattern, &ret = 0); + +/** + * Matches a string against a regular expression pattern, matching all occurrences of the + * pattern inside the string. This is similar to using the "g" flag in perl regex. + * + * @note If you intend on using the same regular expression pattern + * multiple times, consider using regex_compile and regex_match_ex + * instead of making this function reparse the expression each time. + * + * @note Flags only exist in amxmodx 1.8 and later. + * + * @note You should free the returned handle with regex_free() + * when you are done extracting all of the substrings. + * + * @param string The string to check. + * @param pattern The regular expression pattern. + * @param flags General flags for the regular expression, see PCRE_* defines. + * @param error Error message encountered, if applicable. + * @param maxLen Maximum string length of the error buffer. + * @param errcode Regex type error code encountered, if applicable. See REGEX_ERROR_* defines. + * + * @return -2 = Matching error (error code is stored in ret) + * -1 = Error in pattern (error message and offset # in error and ret) + * 0 = No match. + * >1 = Handle for getting more information (via regex_substr) + */ +native Regex:regex_match_all(const string[], const pattern[], flags = 0, error[]= "", maxLen = 0, &errcode = 0); + +/** + * Matches a string against a regular expression pattern. + * + * @note If you intend on using the same regular expression pattern + * multiple times, consider using compile regex_compile_ex and regex_match* + * instead of making this function reparse the expression each time. + * + * @param str The string to check. + * @param pattern The regular expression pattern. + * @param flags General flags for the regular expression. + * @param error Error message, if applicable. + * @param maxLen Maximum length of the error buffer. + * @param errcode Regex type error code encountered, if applicable. See REGEX_ERROR_* defines. + * + * @return -2 = Matching error (error code is stored in ret) + * -1 = Pattern error (error code is stored in ret) + * 0 = No match. + * >1 = Number of results. + */ +stock regex_match_simple(const str[], const pattern[], flags = 0, error[]= "", maxLen = 0, &errcode = 0) +{ + new Regex:regex = regex_compile_ex(pattern, flags, error, maxLen, errcode); + if (regex < REGEX_OK) + { + return -1; + } + new substrings = regex_match_c(str, regex); + regex_free(regex); + return substrings; +} + +/** + * Flags used with regex_replace to control the replacement behavior. + */ +#define REGEX_FORMAT_DEFAULT 0 /* Uses the standard formatting rules to replace matches */ +#define REGEX_FORMAT_NOCOPY (1<<0) /* The sections that do not match the regular expression are not copied when replacing matches. */ +#define REGEX_FORMAT_FIRSTONLY (1<<1) /* Only the first occurrence of a regular expression is replaced. */ + +/** + * Perform a regular expression search and replace. + * + * An optional parameter, flags, allows you to specify options on how the replacement is performed. + * Supported format specifiers for replace parameter: + * $number : Substitutes the substring matched by group number. + * n must be an integer value designating a valid backreference, greater than 0, and of two digits at most. + * ${name} : Substitutes the substring matched by the named group name (a maximum of 32 characters). + * $& : Substitutes a copy of the whole match. + * $` : Substitutes all the text of the input string before the match. + * $' : Substitutes all the text of the input string after the match. + * $+ : Substitutes the last group that was captured. + * $_ : Substitutes the entire input string. + * $$ : Substitutes a literal "$". + * As note, the character \ can be also used with format specifier, this is same hehavior as $. + * + * @param pattern The regular expression pattern. + * @param string The string to check. + * @param error Error message, if applicable. + * @param maxLen Maximum length of the error buffer. + * @param replace The string will be used to replace any matches. See above for format specifiers. + * @param flags General flags to control how the string is replaced. See REGEX_FORMAT_* defines. + * @param errcode Regex type error code encountered, if applicable. See REGEX_ERROR_* defines. + * + * @return -2 = Matching error (error code is stored in ret) + * 0 = No match. + * >1 = Number of matches. + */ +native regex_replace(Regex:pattern, string[], maxLen, const replace[], flags = REGEX_FORMAT_DEFAULT, &errcode = 0); diff --git a/bin/compiler/include/sockets.inc b/bin/compiler/include/sockets.inc new file mode 100644 index 0000000..6102a9e --- /dev/null +++ b/bin/compiler/include/sockets.inc @@ -0,0 +1,183 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Socket Functions +// + +#if defined _socket_included + #endinput +#endif +#define _socket_included + +#pragma reqlib sockets +#if !defined AMXMODX_NOAUTOLOAD + #pragma loadlib sockets +#endif + +/** + * Socket connection type (TCP/UDP) + */ +#define SOCKET_TCP 1 +#define SOCKET_UDP 2 + +/** + * Socket flags + */ +#define SOCK_NON_BLOCKING (1 << 0) /* Set the socket a nonblocking */ +#define SOCK_LIBC_ERRORS (1 << 1) /* Enable libc error reporting */ + +/** + * Error reporting + */ +#define SOCK_ERROR_OK 0 /* No error */ +#define SOCK_ERROR_CREATE_SOCKET 1 /* Couldn't create a socket */ +#define SOCK_ERROR_SERVER_UNKNOWN 2 /* Server unknown */ +#define SOCK_ERROR_WHILE_CONNECTING 3 /* Error while connecting */ + +/** + * Connects to the given node and service via TCP/UDP. + * + * @note There's 2 types of error reporting on this function that you can use. + * @note Default error codes: + * 0 - No error + * 1 - Error while creating socket + * 2 - Couldn't resolve hostname + * 3 - Couldn't connect + * @note New, more expressive libc error codes: + * https://www.gnu.org/software/libc/manual/html_node/Error-Codes.html + * https://github.com/torvalds/linux/blob/master/include/uapi/asm-generic/errno.h + * https://msdn.microsoft.com/en-us/library/ms740668.aspx + * + * @note The currently available bit flags are: + * - SOCK_NON_BLOCKING : if set, the socket will be on nonblocking mode + * - SOCK_LIBC_ERRORS : if set, the new libc errors will be seen on _error + * + * @note If no flags are set, the behaviour of the function will not be modified. + * + * @note Multiple flags may be set at the same time using the | operator. + * For example, SOCK_NON_BLOCKING|SOCK_LIBC_ERRORS will create a nonblocking socket with libc error codes. + * + * @note If you're creating a new nonblocking socket, _hostname should be numeric to avoid calling the + * name resolution server and potentially blocking the call. + * + * @note If the socket is a nonblocking one, the returned socket descriptor may be still connecting and + * further checks should be done with socket_is_writable() before trying to send data. + * + * @param _hostname Node to connect to + * @param _port Service to connect to + * @param _protocol Connect via SOCKET_TCP or SOCKET_UDP + * @param _error Set an error code here if anything goes wrong + * @param _flags Optional bit flags that change the behaviour of the function + * + * @return A socket descriptor (a positive integer) on success + * -1 on failure +*/ +native socket_open(const _hostname[], _port, _protocol = SOCKET_TCP, &_error, _flags = 0); + +/** + * Closes a socket. + * + * @param _socket Socket descriptor + * + * @return 1 on success + * 0 on failure + */ +native socket_close(_socket); + +/** + * Receives data. + * + * @note The amount of bytes than you end up receiving can be less than the one you expected. + * + * @note This function will completely block the server until some data arrives + * to the given socket. Use this only if you are sure there is some data + * to be retrieved. You can do that by polling with socket_is_readable(). + * + * @param _socket Socket descriptor + * @param _data Array to save the data + * @param _length Length of the array + * + * @return Amount of bytes received + * 0 if the peer closed the connection + * -1 on failure + */ +native socket_recv(_socket, _data[], _length); + +/** + * Sends data. + * + * @note The amount of bytes that end up being sent may be lower than the total length of the array, + * check the return value and send the rest if needed. + * + * @param _socket Socket descriptor + * @param _data Array with the data to send + * @param _length Length of the array + * + * @return Amount of bytes sent + * -1 on failure + */ +native socket_send(_socket, const _data[], _length); + +/** + * Sends data that can contain null bytes. + * + * @note The amount of bytes that end up being sent may be lower than the total length of the array, + * check the return value and send the rest if needed. + * + * @note strlen(_data) will return the wrong length if the array contains null bytes. + * + * @param _socket Socket descriptor + * @param _data Array with the data to send + * @param _length Length of the array + * + * @return Amount of bytes sent + * -1 on failure + */ +native socket_send2(_socket, const _data[], _length); + +/** + * Backwards compatible function. + * + * @deprecated Renamed to socket_is_readable() + */ +#pragma deprecated Use socket_is_readable() instead +native socket_change(_socket, _timeout = 100000); + +/** + * Checks if a socket is marked as readable. + * + * @note You can use this function to make sure there's something on the socket and avoid a blocking call. + * @note Set _timeout to 0 avoid blocking the call. + * @note A socket will become readable if there's any data or an EOF. + * + * @param _socket Socket descriptor + * @param _timeout Amount of time to block the call waiting for the socket to be marked as readable or + * for the timeout to expire, in µSeconds (1 sec = 1000000 µsec) + * + * @return 1 if the socket is marked as readable + * 0 otherwise + */ +native socket_is_readable(_socket, _timeout = 100000); + +/** + * Checks if a socket is marked as writable. + * + * @note Use this function to check if a nonblocking socket is ready to be used. + * @note Set _timeout to 0 avoid blocking the call. + * @note An UDP socket is always writable. + * + * @param _socket Socket descriptor + * @param _timeout Amount of time to block the call waiting for the socket to be marked as writable or + * for the timeout to expire, in µSeconds (1 sec = 1000000 µsec) + * + * @return 1 if the socket is marked as writable + * 0 otherwise + */ +native socket_is_writable(_socket, _timeout = 100000); diff --git a/bin/compiler/include/sockets_async.inc b/bin/compiler/include/sockets_async.inc new file mode 100644 index 0000000..12e2b40 --- /dev/null +++ b/bin/compiler/include/sockets_async.inc @@ -0,0 +1,49 @@ +#if defined _sockets_async_included + #endinput +#endif +#define _sockets_async_included + /*=================| +| Sockets Async 1.2 | +|==================*/ +#pragma reqlib sockets_async +#pragma loadlib sockets_async + + +enum SOCKET: {} + + +enum { + SOCK_TYPE_UDP=0, + SOCK_TYPE_TCP, + SOCK_TYPE_CHILD // Son los nuevos sockets que se crean al aceptar una conexion TCP +} + + +native SOCKET:socket_create(type, customID) + +native socket_lasterror() +native socket_getip(const hostname[], ip[], len) + +native socket_close(SOCKET:socket) +native socket_bind(SOCKET:socket, const local_ip[]="", local_port) + +native socket_get_custom(SOCKET:socket) +native socket_set_custom(SOCKET:socket, customID) + +// TCP +native socket_connect(SOCKET:socket, const hostname[], port) +native socket_send(SOCKET:socket, const data[], sendsize=0) +native socket_recv(SOCKET:socket, data[], maxlen) + +// UDP +native socket_sendto(SOCKET:socket, const ip[], port, const data[], sendsize=0) +native socket_recvfrom(SOCKET:socket, data[], maxlen, ip[], len, &port) + +forward fw_sockConnected(SOCKET:socket, customID) +forward fw_sockClosed(SOCKET:socket, customID, error) +forward fw_sockAccepted(SOCKET:socket, customID, SOCKET:cl_sock, const cl_ip[], cl_port) +forward fw_sockReadable(SOCKET:socket, customID, type) +forward fw_sockWritable(SOCKET:socket, customID, type) +/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE +*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang11274\\ f0\\ fs16 \n\\ par } +*/ diff --git a/bin/compiler/include/sorting.inc b/bin/compiler/include/sorting.inc new file mode 100644 index 0000000..f4b259b --- /dev/null +++ b/bin/compiler/include/sorting.inc @@ -0,0 +1,107 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Sorting Functions +// + +// +// All sort functions are based off the qsort() function from the +// C standard library, which uses the Quick Sort algorithm. +// For more info, see: http://linux.wku.edu/~lamonml/algor/sort/sort.html +// + +#if defined _sorting_included + #endinput +#endif +#define _sorting_included + +/** + * Contains sorting orders. + */ +enum SortMethod +{ + Sort_Ascending = 0, + Sort_Descending, + Sort_Random, +}; + +/** + * Data types for ADT Array Sorts + */ +enum SortType +{ + Sort_Integer = 0, + Sort_Float, + Sort_String, +}; +/** + * Basic sorting functions below. + */ + +native SortIntegers(array[], array_size, SortMethod:order = Sort_Ascending); + +native SortFloats(Float:array[], array_size, SortMethod:order = Sort_Ascending); + +native SortStrings(array[][], num_strings, SortMethod:order = Sort_Ascending); + +/** + * Custom sorting functions below. + */ + +/** + * Sorts a custom 1D array. You must pass in a comparison function. + * The sorting algorithm then uses your comparison function to sort the data. + * The function is called in the following manner: + * + * public MySortFunc(elem1, elem2, const array[], const data[], data_size) + * + * elem1, elem2 - Current element pair being compared + * array[] - Array in its current mid-sorted state. + * data[] - Extra data array you passed to the sort func. + * data_size - Size of extra data you passed to the sort func. + * + * Your function should return: + * -1 if elem1 should go before elem2 + * 0 if elem1 and elem2 are equal + * 1 if elem1 should go after elem2 + * Note that the parameters after elem2 are all optional and you do not need to specify them. + */ +native SortCustom1D(array[], array_size, const comparefunc[], data[]="", data_size=0); + + +/** + * Sorts a custom 2D array. + * The sorting algorithm then uses your comparison function to sort the data. + * The function is called in the following manner: + * + * public MySortFunc(const elem1[], const elem2[], const array[], data[], data_size) + * + * elem1[], elem2[] - Current element array pairs being compared + * array[][] - Array in its currently being sorted state. + * data[] - Extra data array you passed to the sort func. + * data_size - Size of extra data you passed to the sort func. + * + * Your function should return: + * -1 if elem1[] should go before elem2[] + * 0 if elem1[] and elem2 are equal[] + * 1 if elem1[] should go after elem2[] + * Note that the parameters after elem2[] are all optional and you do not need to specify them. + */ +native SortCustom2D(array[][], array_size, const comparefunc[], data[]="", data_size=0); + +/** + * Sort an ADT Array. Specify the type as Integer, Float, or String. + * + * @param array Array Handle to sort + * @param order Sort order to use, same as other sorts. + * @param type Data type stored in the ADT Array + * @noreturn + */ +native SortADTArray(Array:array, SortMethod:order, SortType:type); diff --git a/bin/compiler/include/sqlx.inc b/bin/compiler/include/sqlx.inc new file mode 100644 index 0000000..5576f88 --- /dev/null +++ b/bin/compiler/include/sqlx.inc @@ -0,0 +1,582 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// SQLX - Newer SQL Database API +// + +#if defined _sqlx_included + #endinput +#endif +#define _sqlx_included + +//eh.. +#define SQL_NumRows SQL_NumResults + +#pragma reqclass sqlx +#if !defined AMXMODX_NOAUTOLOAD + #pragma defclasslib sqlx mysql +#endif + +enum Handle +{ + Empty_Handle +}; + +/** + * Creates a connection information tuple. This tuple must be passed + * into connection routines. + * + * @note Freeing the tuple is not necessary, but is a good idea if you create + * many of them. You can cache these handles globally. + * @note This does not connect to the DB; it only caches the connection information. + * + * @param host Database host + * @param user Database user + * @param pass Database password + * @param db Database name to use + * @param timeout Specifies how long connections should wait before giving up. + * If <= 0, the default of 60s is used. + * + * @return A newly created tuple handle to be used in connection routines. + */ +native Handle:SQL_MakeDbTuple(const host[], const user[], const pass[], const db[], timeout=0); + + +/** + * Frees an SQL handle. + * + * @note The handle can be to anything (tuple, connection, query, results, etc). + * @note If you free the database connection handle, it closes the connection as well. + * + * @param h Handle to be freed. + * + * @noreturn + */ +native SQL_FreeHandle(Handle:h); + + +/** + * Opens a database connection. + * + * @param cn_tuple Tuple handle, returned from SQL_MakeDbTuple(). + * @param errcode An error code set by reference. + * @param error String where error string will be stored. + * @param maxlength Maximum length of the error buffer. + * + * @return Returns an SQL connection handle, which must be freed. + * Returns Empty_Handle on failure. + * @error Invalid info tuple handle. + */ +native Handle:SQL_Connect(Handle:cn_tuple, &errcode, error[], maxlength); + + +/** + * Sets the character set of the current connection. + * Like SET NAMES .. in mysql, but stays after connection problems. + * + * @note If a connection tuple is supplied, this should be called before SQL_Connect or SQL_ThreadQuery. + * @note The change will remain until you call this function with another value. + * @note This native does nothing in SQLite. + * + * Example: "utf8", "latin1" + * + * @param h Database or connection tuple Handle. + * @param charset The character set string to change to. + * + * @return True, if character set was changed, false otherwise. + */ +native bool:SQL_SetCharset(Handle:h, const charset[]); + + +/** + * Prepares a query. + * + * @note This does not actually do a query! + * + * @param db Connection handle, returned from SQL_Connect(). + * @param fmt Query string. Can be formated with format specifiers. + * @param ... Additional format specifiers used to format the query. + * + * @return Returns an SQL query handle, which must always be freed. + * Returns Empty_Handle on failure. + */ +native Handle:SQL_PrepareQuery(Handle:db, const fmt[], any:...); + + +/** + * Back-quotes characters in a string for database querying. + * + * @note The buffer's maximum size should be 2*strlen(string) to catch all scenarios. + * + * @param db Database handle for localization, or Empty_Handle + * for when a handle is not available. + * @param buffer Buffer to copy to. + * @param buflen Maximum size of the buffer. + * @param string String to backquote (should not overlap buffer). + * + * @return Length of new string, or -1 on failure. + * @error Invalid database handle. + */ +native SQL_QuoteString(Handle:db, buffer[], buflen, const string[]); + +/** + * Back-quotes characters in a string for database querying. + * Note: The buffer's maximum size should be 2*strlen(string) to catch + * all scenarios. + * + * @param db Database handle for localization, or Empty_Handle + * for when a handle is not available. + * @param buffer Buffer to copy to. + * @param buflen Maximum size of the buffer. + * @param fmt Format of string to backquote (should not overlap buffer). + * @param ... Format arguments. + * + * @return Length of new string, or -1 on failure. + */ +native SQL_QuoteStringFmt(Handle:db, buffer[], buflen, const fmt[], any:...); + + +/** + * Threaded query states. Used to check the state of a complete threaded query. + */ +#define TQUERY_CONNECT_FAILED -2 +#define TQUERY_QUERY_FAILED -1 +#define TQUERY_SUCCESS 0 + +/** + * Prepares and executes a threaded query. + * @note The handler should look like: + * public QueryHandler(failstate, Handle:query, error[], errnum, data[], size, Float:queuetime) + * failstate - One of the three TQUERY_ defines. + * query - Handle to the query, do not free it. + * error - An error message, if any. + * errnum - An error code, if any. + * data - Data array you passed in. + * size - Size of the data array you passed in. + * queuetime - Amount of gametime that passed while the query was resolving. + * @note This will not interrupt gameplay in the event of a poor/lossed + * connection, however, the interface is more complicated and + * asynchronous. Furthermore, a new connection/disconnection is + * made for each query to simplify driver support. + * @note The handle does not need to be freed. + * + * @param db_tuple Tuple handle, returned from SQL_MakeDbTuple(). + * @param handler A function to be called when the query finishes. It has to be public. + * @param query The query string. + * @param data Additional data array that will be passed to the handler function. + * @param dataSize The size of the additional data array. + * + * @noreturn + * @error Thread worker was unable to start. + * Invalid info tuple handle. + * Handler function not found. + */ +native SQL_ThreadQuery(Handle:db_tuple, const handler[], const query[], const data[]="", dataSize=0); + + +/** + * Executes an already prepared query. + * + * @note You can call this multiple times as long as its parent connection is kept open. + * Each time the result set from the previous call will be freed. + * + * @param query Handle of a prepared query to be executed. + * + * @return 1 if the query succeeded, 0 if the query failed. + * @error Invalid query handle. + */ +native SQL_Execute(Handle:query); + + +/** + * Gets information about a failed query error. + * + * @param query Handle of a query to extract the error from. + * @param error Buffer where to store the error string. + * @param maxlength The maximum length of the output buffer. + * + * @return The error code. + */ +native SQL_QueryError(Handle:query, error[], maxlength); + + +/** + * Checks whether there are more results to be read. + * + * @param query Handle of a query to check. + * + * @return 1 if there are more results, 0 otherwise. + * @error Invalid query handle. + */ +native SQL_MoreResults(Handle:query); + + +/** + * Tells whether a specific column in the current row is NULL or not. + * + * @param query Handle of a query to check. + * @param column Which column to check for NULL. + * + * @return 1 if the column is NULL, 0 otherwise. + * @error Invalid query handle. + * No result set in this query. + * Invalid column. + */ +native SQL_IsNull(Handle:query, column); + + +/** + * Retrieves the current result. + * + * @note A successful query starts at the first result, so you should not call + * SQL_NextRow() first. + * + * @note Example how to get different types of values: + * new num = SQL_ReadResult(query, 0) + * new Float:num2 + * new string[32] + * SQL_ReadResult(query, 1, num2) + * SQL_ReadResult(query, 2, string, charsmax(string)) + * + * @param query Handle of a query to read results from. + * @param column Which column to get the value from. + * @param ... Passing no extra arguments - returns an integer. + * Passing one extra argument - returns a float in the first extra argument + * Passing two extra params - returns a string in the first argument + * with a maximum string length in the second argument. + * + * @return If no extra arguments are passed, returns an integer value. + * @error Invalid query handle. + */ +native SQL_ReadResult(Handle:query, column, any:...); + + +/** + * Advances to the next result (row). + * + * @param query Handle of a query. + * + * @noreturn + * @error Invalid query handle. + * No result set in this query. + */ +native SQL_NextRow(Handle:query); + + +/** + * Returns the number of affected rows by a query. + * + * @param query Handle of a query to check. + * + * @return The number of affected rows. + * @error Invalid query handle. + */ +native SQL_AffectedRows(Handle:query); + + +/** + * The number of retrieved rows (results) after a query. + * + * @param query Handle of a query to check. + * + * @return The number of retrieved rows by the query. + * @error Invalid query handle. + */ +native SQL_NumResults(Handle:query); + + +/** + * Returns the total number of columns. + * + * @param query Handle of a query to check. + * + * @return The number of retrieved columns by the query. + * @error Invalid query handle. + * No result set in this query. + */ +native SQL_NumColumns(Handle:query); + + +/** + * Retrieves the name of a column by its index. + * + * @param query Handle of a query. + * @param num The number (index) of a column to retrieve the name from. + * @param name Buffer where to store the column's name. + * @param maxlength Maximum length of the output buffer. + * + * @noreturn + * @error Invalid query handle. + * No result set in this query. + * Invalid column index. + */ +native SQL_FieldNumToName(Handle:query, num, name[], maxlength); + + +/** + * Retrieves the number of a named column. + * + * @param query Handle of a query. + * @param name Name to search for. + * + * @return Column index if found (>= 0); -1 otherwise. + * @error Invalid query handle. + * No result set in this query. + */ +native SQL_FieldNameToNum(Handle:query, const name[]); + + +/** + * Rewinds a result set to the first row. + * + * @param query Handle of a query to rewind the result set of. + * + * @noreturn + * @error Invalid query handle. + * No result set in this query. + */ +native SQL_Rewind(Handle:query); + + +/** + * Retrieves the instert ID of the latest INSERT query. + * + * @param query Handle of a query. + * + * @return The insert ID of the latest INSERT query. + * @error Invalid query handle. + */ +native SQL_GetInsertId(Handle:query); + + +/** + * Retrieves which driver is this plugin currently bound to. + * + * @param driver Buffer to store the driver name in. + * @param maxlen Maximum length of the output buffer. + * + * @noreturn + */ +native SQL_GetAffinity(driver[], maxlen); + + +/** + * Sets driver affinity. You can use this to force a particular driver implementation. + * This will automatically change all SQL natives in your plugin to be "bound" to + * the module in question. + * + * @note Using this while you have open handles to another database type will + * cause problems. I.e., you cannot open a handle, switch affinity, + * then close the handle with a different driver. + * @note Switching affinity is an O(n * m) operation, where n is the number of + * SQL natives and m is the number of used natives in total. + * @note Intuitive programmers will note that this causes problems for + * threaded queries. You will have to either force your script to work + * under one affinity, or to pack the affinity type into the query data, + * check it against the current, then set the new affinity if necessary. + * Then, restore the old one for safety. + * + * @param driver The name of a driver to use. + * + * @return If no module with the given name is found, returns 0. + * Unless your plugin is bult to handle different driver + * types at once, you should let this error pass. + */ +native SQL_SetAffinity(const driver[]); + +/** + * Returns the original query string that a query handle used. + * + * @param query Handle of a query. + * @param buffer Buffer where to put the query string in. + * @param maxlength The maximum length of the output buffer. + * + * @noreturn + * @error Invalid query handle. + */ +native SQL_GetQueryString(Handle:query, buffer[], maxlength); + +/** + * For queries which return multiple result sets, this advances to the next + * result set if one is available. Otherwise, the current result set is + * destroyed and will no longer be accessible. + * + * @note This function will always return false on SQLite, and when using threaded + * queries in MySQL. Nonetheless, it has the same effect of removing the last + * result set. + * + * @param query Query Handle. + * + * @return True on success, false on failure. + * @error Invalid query handle. + * No result set in this query. + */ +native bool:SQL_NextResultSet(Handle:query); + + +/** + * This function can be used to find out if a table in a SQLite database exists. + * + * @param db Connection handle returned from SQL_Connect(). + * @param table The table name to check for. + * + * @return True if it exists, false otherwise. + */ +stock bool:sqlite_TableExists(Handle:db, const table[]) +{ + new Handle:query = SQL_PrepareQuery( + db, + "SELECT name FROM sqlite_master WHERE type='table' AND name='%s' LIMIT 1;", + table); + + if (!SQL_Execute(query) || !SQL_NumResults(query)) + { + SQL_FreeHandle(query); + return false; + } + + SQL_FreeHandle(query); + + return true; +} + +/** + * Use this for executing a query where you don't care about the result. + * + * @param db Connection handle returned from SQL_Connect(). + * @param query The query string. + * @param error If an error occurs, it will be placed into this buffer. + * @param maxlength Maximum length of the error buffer. + * @param rows Optional. If put, retrieves the number of rows the query returned. + * + * @return 1 on success, 0 on failure. + */ +stock SQL_SimpleQuery(Handle:db, const query[], error[]="", maxlength=0, &rows=0) +{ + new Handle:hQuery = SQL_PrepareQuery(db, "%s", query); + + if (!SQL_Execute(hQuery)) + { + SQL_QueryError(hQuery, error, maxlength); + SQL_FreeHandle(hQuery); + return 0; + } + + rows = SQL_NumResults(hQuery); + + SQL_FreeHandle(hQuery); + + return 1; +} + + +/** + * Use this for executing a query where you don't care about the result. + * + * @note Differs from SQL_SimpleQuery() because the query can be formated. + * + * @param db Connection handle returned from SQL_Connect(). + * @param error If an error occurs, it will be placed into this buffer. + * @param maxlength The maximum length of the error buffer. + * @param rows Optional. If put, retrieves the number of rows the query returned. + * @param fmt The query string that can be formated with format specifiers. + * @param ... Additional arguments for formating the query. + * + * @return 1 on success, 0 on failure. + */ +stock SQL_SimpleQueryFmt(Handle:db, error[]="", maxlength=0, &rows=0, const fmt[], any:...) +{ + static query_buf[2048]; + vformat(query_buf, 2047, fmt, 6); + + new Handle:hQuery = SQL_PrepareQuery(db, "%s", query_buf); + + if (!SQL_Execute(hQuery)) + { + SQL_QueryError(hQuery, error, maxlength); + SQL_FreeHandle(hQuery); + return 0; + } + + rows = SQL_NumResults(hQuery); + + SQL_FreeHandle(hQuery); + + return 1; +} + +/** + * Use this for executing a query and not caring about the error. + * + * @param db A connection handle returned from SQL_Connect(). + * @param queryfmt The query string that can be formated with format specifiers. + * @pram ... Additional arguments for formating the query. + * + * @return -1 on error. + * >= 0 on success (with the number of affected rows). + */ +stock SQL_QueryAndIgnore(Handle:db, const queryfmt[], any:...) +{ + static query[4096]; + new Handle:hQuery; + new ret; + + vformat(query, sizeof(query)-1, queryfmt, 3); + + hQuery = SQL_PrepareQuery(db, "%s", query); + + if (SQL_Execute(hQuery)) + { + ret = SQL_AffectedRows(hQuery); + } else { + ret = -1; + } + + SQL_FreeHandle(hQuery); + + return ret; +} + +/** + * Use this for making a standard DB Tuple, using AMXX's database info cvars. + * + * @param timeout Specifies how long connections should wait before giving up. + * If 0, the value is read from "amx_sql_timeout" cvar. + * + * @return A newly created tuple handle to be used in connection routines. + */ +stock Handle:SQL_MakeStdTuple(timeout = 0) +{ + static host[64], user[32], pass[32], db[128]; + static get_type[12], set_type[12]; + + get_cvar_string("amx_sql_host", host, 63); + get_cvar_string("amx_sql_user", user, 31); + get_cvar_string("amx_sql_pass", pass, 31); + get_cvar_string("amx_sql_type", set_type, 11); + get_cvar_string("amx_sql_db", db, 127); + + if (timeout <= 0) + { + timeout = get_cvar_num("amx_sql_timeout"); + } + + SQL_GetAffinity(get_type, 12); + + if (!equali(get_type, set_type)) + { + if (!SQL_SetAffinity(set_type)) + { + log_amx("Failed to set affinity from %s to %s.", get_type, set_type); + } + } + + return SQL_MakeDbTuple(host, user, pass, db, timeout); +} diff --git a/bin/compiler/include/string.inc b/bin/compiler/include/string.inc new file mode 100644 index 0000000..d21676d --- /dev/null +++ b/bin/compiler/include/string.inc @@ -0,0 +1,786 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// String Manipulation +// + +#if defined _string_included + #endinput +#endif +#define _string_included + +#include + +/** + * @global Unless otherwise noted, all string functions which take in a + * writable buffer and maximum length should NOT have the null terminator INCLUDED + * in the length. This means that this is valid: + * copy(string, charsmax(string), ...) + */ + +/** + * Calculates the length of a string. + * + * @param string String to check. + * @return Number of valid character bytes in the string. + */ +native strlen(const string[]); + +/** + * Tests whether a string is found inside another string. + * + * @param source String to search in. + * @param string Substring to find inside the original string. + * + * @return -1 on failure (no match found). Any other value + * indicates a position in the string where the match starts. + */ +native contain(const source[], const string[]); + +/** + * Tests whether a string is found inside another string with case ignoring. + * + * @note This supports multi-byte characters (UTF-8) on comparison. + * + * @param source String to search in. + * @param string Substring to find inside the original string. + * + * @return -1 on failure (no match found). Any other value + * indicates a position in the string where the match starts. + */ +native containi(const source[], const string[]); + +/** + * Given a string, replaces the first occurrence of a search string with a + * replacement string. + * + * @param text String to perform search and replacements on. + * @param len Maximum length of the string buffer. + * @param what String to search for. + * @param with String to replace the search string with. + * + * @return The new string length after replacement, or 0 if no replacements were made. + */ +native replace(text[], len, const what[], const with[]); + +/** + * Given a string, replaces all occurrences of a search string with a + * replacement string. + * + * @note Similar to replace_all() stock, but implemented as native and + * with different algorithm. This native doesn't error on bad + * buffer size and will smartly cut off the string in a way + * that pushes old data out. + * + * @note Only available in 1.8.3 and above. + * @note This supports multi-byte characters (UTF-8) on case insensitive comparison. + * + * @param text String to perform search and replacements on. + * @param maxlength Maximum length of the string buffer. + * @param search String to search for. + * @param replace String to replace the search string with. + * @param caseSensitive If true (default), search is case sensitive. + * + * @return Number of replacements that were performed. + */ +native replace_string(text[], maxlength, const search[], const replace[], bool:caseSensitive = true); + +/** + * Given a string, replaces the first occurrence of a search string with a + * replacement string. + * + * @note Similar to replace() native, but implemented with more options and + * with different algorithm. This native doesn't error on bad + * buffer size and will smartly cut off the string in a way + * that pushes old data out. + * + * @note Only available in 1.8.3 and above. + * @note This supports multi-byte characters (UTF-8) on case insensitive comparison. + * + * @param text String to perform search and replacements on. + * @param maxlength Maximum length of the string buffer. + * @param search String to search for. + * @param replace String to replace the search string with. + * @param searchLen If higher than -1, its value will be used instead of + * a strlen() call on the search parameter. + * @param replaceLen If higher than -1, its value will be used instead of + * a strlen() call on the replace parameter. + * @param caseSensitive If true (default), search is case sensitive. + * + * @return Index into the buffer (relative to the start) from where + * the last replacement ended, or -1 if no replacements were + * made. + */ +native replace_stringex(text[], maxlength, const search[], const replace[], searchLen = -1, replaceLen = -1, bool:caseSensitive = true); + +/** + * Concatenates one string onto another. + * + * @param dest String to append to. + * @param len Maximum length of entire buffer. + * @param src Source string to concatenate. + * @param max Number of characters to add. + * + * @return Number of of all merged characters. + */ +native add(dest[],len,const src[],max=0); + +/** + * Formats a string according to the AMX Mod X format rules (see documentation). + * + * @note Example: format(dest, "Hello %s. You are %d years old", "Tom", 17). + * If any of your input buffers overlap with the destination buffer, + * format() falls back to a "copy-back" version as of 1.65. This is + * slower, so you should using a source string that is the same as + * the destination. + * + * @param output Destination string buffer. + * @param len Maximum length of output string buffer. + * @param format Formatting rules. + * @param ... Variable number of format parameters. + * + * @return Number of cells written. + */ +native format(output[], len, const format[], any:...); + +/** + * Formats a string according to the AMX Mod X format rules (see documentation). + * + * @note Same as format(), except does not perform a "copy back" check. + * This means formatex() is faster, but DOES NOT ALLOW this type + * of call: + * formatex(buffer, len, "%s", buffer) + * formatex(buffer, len, buffer, buffer) + * formatex(buffer, len, "%s", buffer[5]) + * This is because the output is directly stored into "buffer", + * rather than copied back at the end. + * + * @param output Destination string buffer. + * @param len Maximum length of output string buffer. + * @param format Formatting rules. + * @param ... Variable number of format parameters. + * + * @return Number of cells written. + */ +native formatex(output[], len, const format[], any:...); + +/** + * Formats and returns a string according to the AMX Mod X format rules + * (see documentation). + * + * @note Example: menu_additem(menu, fmt("My first %s", "item")). + * @note This should only be used for simple inline formatting like in the above example. + * Avoid using this function to store strings into variables as an additional + * copying step is required. + * @note The buffer size is defined by MAX_FMT_LENGTH. + * + * @param format Formatting rules. + * @param ... Variable number of format parameters. + * + * @return Formatted string + */ +native [MAX_FMT_LENGTH]fmt(const format[], any:...); + +/** + * Formats a string according to the AMX Mod X format rules (see documentation). + * + * @note This is the same as format(), except it grabs parameters from a + * parent parameter stack, rather than a local. This is useful for + * implementing your own variable argument functions. + * + * @note Replacement for format_args. Much faster and %L compatible. + * This works exactly like vsnprintf() from C. + * You must pass in the output buffer and its size, + * the string to format, and the number of the FIRST variable + * argument parameter. For example, for: + * function (a, b, c, ...) + * You would pass 4 (a is 1, b is 2, c is 3, et cetera). + * There is no vformatex(). + * + * @param buffer Destination string buffer. + * @param len Maximum length of output string buffer. + * @param fmt Formatting rules. + * @param vararg Argument number which contains the '...' symbol. + * Note: Arguments start at 1. + * @return Number of bytes written. + */ +native vformat(buffer[], len, const fmt[], vararg); + +/** + * Formats a string according to the AMX Mod X format rules (see documentation). + * + * @note Same as vformat(), except works in normal style dynamic natives. + * Instead of passing the format arg string, you can only pass the + * actual format argument number itself. + * If you pass 0, it will read the format string from an optional + * fifth parameter. + * + * @param buffer Destination string buffer. + * @param len Maximum length of output string buffer. + * @param fmt_arg Argument number which contains the format. + * @param vararg Argument number which contains the '...' symbol. + * Note: Arguments start at 1. + * @return Number of bytes written. + */ +native vdformat(buffer[], len, fmt_arg, vararg, ...); + +/** + * Gets parameters from function as formated string. + * + * @param output Destination string buffer. + * @param len Maximum length of output string buffer. + * @param pos Argument number which contains the '...' symbol. + * + * @return Number of bytes written. + */ +native format_args(output[], len, pos = 0); + +/** + * Converts an integer to a string. + * + * @param num Integer to convert. + * @param string Buffer to store string in. + * @param len Maximum length of string buffer. + * + * @return Number of cells written to buffer. + */ +native num_to_str(num,string[],len); + +/** + * Converts a string to an integer. + * + * @param string String to convert. + * @return Integer conversion of string, or 0 on failure. + */ +native str_to_num(const string[]); + +/** + * Parses the 'string' interpreting its content as an integral number of the specified 'base', + * which is returned as integer value. The function also sets the value of 'endPos' to point + * to the position of the first character after the number. + * + * This is the same as C++ strtol function with a difference on second param. + * + * The function first discards as many whitespace characters as necessary until the first + * non-whitespace character is found. Then, starting from this character, takes as many + * characters as possible that are valid following a syntax that depends on the 'base' parameter, + * and interprets them as a numerical value. Finally, a position of the first character following + * the integer representation in 'string' is stored in 'endPos'. + * + * If the value of 'base' is zero, the syntax expected is similar to that of integer constants, + * which is formed by a succession of : + * An optional sign character (+ or -) + * An optional prefix indicating octal or hexadecimal base ("0" or "0x"/"0X" respectively) + * A sequence of decimal digits (if no base prefix was specified) or either octal or hexadecimal digits if a specific prefix is present + * + * If the 'base' value is between 2 and 36, the format expected for the integral number is a succession + * of any of the valid digits and/or letters needed to represent integers of the specified radix + * (starting from '0' and up to 'z'/'Z' for radix 36). The sequence may optionally be preceded by + * a sign (either + or -) and, if base is 16, an optional "0x" or "0X" prefix. + * + * If the first sequence of non-whitespace characters in 'string' is not a valid integral number + * as defined above, or if no such sequence exists because either 'string' is empty or it contains + * only whitespace characters, no conversion is performed. + * + * @param string The string to parse. + * @param endPos The position of the first character following the number. + * On success and when containing only numbers, position is at the end of string, meaning equal to 'string' length. + * On failure, position is sets always to 0. + * @param base The numerical base (radix) that determines the valid characters and their interpretation. + * If this is 0, the base used is determined by the format in the sequence. + * @return On success, the function returns the converted integral number as integer value. + * If no valid conversion could be performed, a zero value is returned. + * If the value read is out of the range of representable values by a cell, + * the function returns 'cellmin' or 'cellmax'. + */ +native strtol(const string[], &endPos = 0, base = 0); + +/** + * Parses the 'string' interpreting its content as an floating point number and returns its value as a float. + * The function also sets the value of 'endPos' to point to the position of the first character after the number. + * + * This is the same as C++ strtod function with a difference on second param. + * + * The function first discards as many whitespace characters as necessary until the first + * non-whitespace character is found. Then, starting from this character, takes as many + * characters as possible that are valid and interprets them as a numerical value. + * Finally, a position of the first character following the float representation in 'string' + * is stored in 'endPos'. + * + * If the first sequence of non-whitespace characters in 'string' is not a valid float number + * as defined above, or if no such sequence exists because either 'string' is empty or it contains + * only whitespace characters, no conversion is performed. + * + * @param string The string to parse. + * @param endPos The position of the first character following the number. + * On success and when containing only numbers, position is at the end of string, meaning equal to 'string' length. + * On failure, position is sets always to 0. + * @return On success, the function returns the converted floating point number as float value. + * If no valid conversion could be performed, a zero value is returned. + */ +native Float:strtof(const string[], &endPos = 0); + +/** + * Converts a floating point number to a string. + * + * @param fl Floating point number to convert. + * @param string Buffer to store string in. + * @param len Maximum length of string buffer. + * + * @return Number of cells written to buffer. + */ +native float_to_str(Float:fl, string[], len); + +/** + * Converts a string to a floating point number. + * + * @param string String to convert to a foat. + * @return Floating point result, or 0.0 on error. + */ +native Float:str_to_float(const string[]); + +/** + * Returns whether two strings are equal. + * + * @param a First string (left). + * @param b Second string (right). + * @param c Number of characters to compare. + * + * @return True if equal, false otherwise. + */ +native equal(const a[],const b[],c=0); + +/** + * Returns whether two strings are equal with case ignoring. + * + * @note This supports multi-byte characters (UTF-8) on comparison. + * + * @param a First string (left). + * @param b Second string (right). + * @param c Number of characters to compare. + * + * @return True if equal, false otherwise. + */ +native equali(const a[], const b[], c = 0); + +/** + * Copies one string to another string. + * + * @note If the destination buffer is too small to hold the source string, the + * destination will be truncated. + * + * @param dest Destination string buffer to copy to. + * @param len Destination buffer length. + * @param src Source string buffer to copy from. + * + * @return Number of cells written. + */ +native copy(dest[],len,const src[]); + +/** + * Copies one string to another string until ch is found. + * + * @param dest Destination string buffer to copy to. + * @param len Destination buffer length. + * @param src Source string buffer to copy from. + * @param ch Character to search for. + * + * @return Number of cells written. + */ +native copyc(dest[],len,const src[],ch); + +/** + * Sets string with given character. + * + * @param src Destination string buffer to copy to. + * @param len Destination buffer length. + * @param ch Character to set string. + * + * @noreturn + */ +native setc(src[],len,ch); + +/** + * Gets parameters from text. + * + * @note Example: to split text: "^"This is^" the best year", + * call function like this: parse(text,arg1,len1,arg2,len2,arg3,len3,arg4,len4) + * and you will get: "This is", "the", "best", "year" + * Function returns number of parsed parameters. + * + * @param text String to parse. + * @param ... Variable number of format parameters. + * + * @return Number of parsed parameters. + */ +native parse(const text[], ... ); + +/** + * Breaks a string in two by token. + * + * @note Trimming spaces is buggy. Consider strtok2 instead. + * + * @note See argbreak() for doing this with parameters. + * Example: + * str1[] = This *is*some text + * strtok(str1, left, 24, right, 24, '*') + * left will be "This " + * Right will be "is*some text" + * If you use trimSpaces, all spaces are trimmed from Left. + * + * @param text String to tokenize + * @param Left Buffer to store left half + * @param leftLen Size of left buffer + * @param Right Buffer to store right half + * @param rightLen Size of right buffer + * @param token Token to split by + * @param trimSpaces Whether spaces are trimmed. + * + * @noreturn + */ +native strtok(const text[], Left[], leftLen, Right[], rightLen, token=' ', trimSpaces=0); + +/** + * Breaks a string in two by token. + * + * @note Only available in 1.8.3 and above. + * + * @param text String to tokenize + * @param left Buffer to store left half + * @param llen Size of left buffer + * @param right Buffer to store right half + * @param rlen Size of right buffer + * @param token Token to split by + * @param trim Flags for trimming behavior, see above + * + * @return Returns position of token in string if found, + * -1 if token was not found + */ +native strtok2(const text[], left[], const llen, right[], const rlen, const token = ' ', const trim = 0); + +/** + * Removes whitespace characters from the beginning and end of a string. + * + * @param text The string to trim. + * @return Number of bytes written. + */ +native trim(text[]); + +/** + * Converts all chars in string to lower case. + * + * @param string The string to convert. + * @return Number of bytes written. + */ +native strtolower(string[]); + +/** + * Performs a multi-byte safe (UTF-8) conversion of all chars in string to lower case. + * + * @note Although most code points can be converted in-place, there are notable + * exceptions and the final length can vary. + * @note Case mapping is not reversible. That is, toUpper(toLower(x)) != toLower(toUpper(x)). + * + * @param string The string to convert. + * @param maxlength Optional size of the buffer. If 0, the length of the original string + * will be used instead. + * + * @return Number of bytes written. + */ +native mb_strtolower(string[], maxlength = 0); + +/** + * Converts all chars in string to upper case. + * + * @param string The string to convert. + * @return Number of bytes written. + */ +native strtoupper(string[]); + +/** + * Performs a multi-byte safe (UTF-8) conversion of all chars in string to upper case. + * + * @note Although most code points can be converted in-place, there are notable + * exceptions and the final length can vary. + * @note Case mapping is not reversible. That is, toUpper(toLower(x)) != toLower(toUpper(x)). + * + * @param string The string to convert. + * @param maxlength Optional size of the buffer. If 0, the length of the original string + * will be used instead. + * + * @return Number of bytes written. + */ +native mb_strtoupper(string[], maxlength = 0); + +/** + * Make a string's first character uppercase. + * + * @param string The string to convert. + * @return 1 on success, otherwise 0. + */ +native ucfirst(string[]); + +/** + * Performs a multi-byte safe (UTF-8) conversion of a string's first character to upper case. + * + * @note Although most code points can be converted in-place, there are notable + * exceptions and the final length can vary. + * + * @param string The string to convert. + * @param maxlength Optional size of the buffer. If 0, the length of the original string + * will be used instead. + * + * @return Number of bytes written. + */ +native mb_ucfirst(string[], maxlength = 0); + +/** + * Performs a multi-byte safe (UTF-8) conversion of all chars in string to title case. + * + * @note Although most code points can be converted in-place, there are notable + * exceptions and the final length can vary. + * @note Any type of punctuation can break up a word, even if this is + * not grammatically valid. This happens because the titlecasing algorithm + * does not and cannot take grammar rules into account. + * @note Examples: + * The running man | The Running Man + * NATO Alliance | Nato Alliance + * You're amazing at building libraries | You'Re Amazing At Building Libraries + * + * @param string The string to convert. + * @param maxlength Optional size of the buffer. If 0, the length of the original string + * will be used instead. + * + * @return Number of bytes written. + */ +native mb_strtotitle(string[], maxlength = 0); + +/** + * Checks if the input string conforms to the category specified by the flags. + * + * @note This function can be used to check if the code points in a string are part + * of a category. Valid flags are part of the UTF8C_* list of defines. + * The category for a code point is defined as part of the entry in + * UnicodeData.txt, the data file for the Unicode code point database. + * @note Flags parameter must be a combination of UTF8C_* flags or a single UTF8C_IS* flag. + * In order to main backwards compatibility with POSIX functions like `isdigit` + * and `isspace`, compatibility flags have been provided. Note, however, that + * the result is only guaranteed to be correct for code points in the Basic + * Latin range, between U+0000 and 0+007F. Combining a compatibility flag with + * a regular category flag will result in undefined behavior. + * @note The function is greedy. This means it will try to match as many code + * points with the matching category flags as possible and return the offset in + * the input in bytes. + * + * @param input The string to check + * @param input_size Size of the string, use 1 to check one character regardless its size + * @param flags Requested category, see UTF8C_* flags + * @param output_size Number of bytes in the input that conform to the specified + * category flags + * @return True if the whole input of `input_size` conforms to the specified + * category flags, false otherwise + */ +native bool:is_string_category(const input[], input_size, flags, &output_size = 0); + +/** + * Returns whether a character is numeric. + * + * @note Multi-byte characters will always return false. + * + * @param ch Character to test. + * @return True if character is numeric, otherwise false. + */ +native isdigit(ch); + +/** + * Returns whether a character is an ASCII alphabet character. + * + * @note Multi-byte characters will always return false. + * + * @param ch Character to test. + * @return True if character is alphabetical, otherwise false. + */ +native isalpha(ch); + +/** + * Returns whether a character is whitespace. + * + * @note Multi-byte characters will always return false. + * + * @param ch Character to test. + * @return True if character is whitespace, otherwise false. + */ +native isspace(ch); + +/** + * Returns whether a character is numeric or an ASCII alphabet character. + * + * @note Multi-byte characters will always return false. + * + * @param ch Character to test. + * @return True if character is numeric, otherwise false. + */ +native isalnum(ch); + +/** + * Returns if a character is multi-byte or not. + * + * @note Only available in 1.8.3 and above. + * + * @param ch Character to test. + * @return 0 for a normal 7-bit ASCII character, + * otherwise number of bytes in multi-byte character. + */ +native is_char_mb(ch); + +/** + * Returns whether an alphabetic character is uppercase. + * + * @note Only available in 1.8.3 and above. + * @note Multi-byte characters will always return false. + * + * @param ch Character to test. + * @return True if character is uppercase, otherwise false. + */ +native bool:is_char_upper(ch); + +/** + * Returns whether an alphabetic character is lowercase. + * + * @note Only available in 1.8.3 and above. + * @note Multi-byte characters will always return false. + * + * @param ch Character to test. + * @return True if character is lowercase, otherwise false. + */ +native bool:is_char_lower(ch); + +/** + * Returns the number of bytes a character is using. This is + * for multi-byte characters (UTF-8). For normal ASCII characters, + * this will return 1. + * + * @note Only available in 1.8.3 and above. + * + * @param source Source input string. + * @return Number of bytes the current character uses. + */ +native get_char_bytes(const source[]); + +/** + * Concatenates one string onto another. + * + * @param dest String to append to. + * @param source Source string to concatenate. + * @param maxlength Maximum length of entire buffer. + * @return Number of bytes written. + */ +native strcat(dest[], const source[], maxlength); + +/** + * Tests whether a string is found inside another string. + * + * @note This supports multi-byte characters (UTF-8) on case insensitive comparison. + * + * @param string String to search in. + * @param sub Substring to find inside the original string. + * @param ignorecase If true, search is case insensitive. + * If false (default), search is case sensitive. + * @param pos Start position to search from. + * @return -1 on failure (no match found). Any other value + * indicates a position in the string where the match starts. + */ +native strfind(const string[], const sub[], bool:ignorecase = false, pos = 0); + +/** + * Compares two strings lexographically. + * + * @note This supports multi-byte characters (UTF-8) on case insensitive comparison. + * + * @param string1 First string (left). + * @param string2 Second string (right). + * @param ignorecase If true, comparison is case insensitive. + * If false (default), comparison is case sensitive. + * @return -1 if string1 < string2 + * 0 if string1 == string2 + * 1 if string1 > string2 + */ +native strcmp(const string1[], const string2[], bool:ignorecase = false); + +/** + * Compares two strings parts lexographically. + * + * @note Only available in 1.8.3 and above. + * @note This supports multi-byte characters (UTF-8) on case insensitive comparison. + * + * @param string1 First string (left). + * @param string2 Second string (right). + * @param num Number of characters to compare. + * @param ignorecase If true, comparison is case insensitive. + * If false (default), comparison is case sensitive. + * @return -1 if string1 < string2 + * 0 if string1 == string2 + * 1 if string1 > string2 + */ +native strncmp(const string1[], const string2[], num, bool:ignorecase = false); + +/** + * Parses an argument string to find the first argument. You can use this to + * replace strbreak(). + * + * @note Only available in 1.8.3 and above. + * + * @note You can use argparse() to break a string into all of its arguments: + * new arg[N], pos; + * while (true) { + * pos = argparse(string, pos, arg, sizeof(arg) - 1); + * if (pos == -1) + * break; + * } + * + * @note All initial whitespace is removed. Remaining characters are read until an + * argument separator is encountered. A separator is any whitespace not inside + * a double-quotation pair (i.e. "x b" is one argument). If only one quotation + * mark appears, argparse() acts as if one existed at the end of the string. + * Quotation marks are never written back, and do not act as separators. For + * example, "a""b""c" will return "abc". An empty quote pair ("") will count + * as an argument containing no characters. + * + * @note argparse() will write an empty string to argbuffer if no argument is found. + * + * @param text String to tokenize. + * @param pos Position to start parsing from. + * @param argbuffer Buffer to store first argument. + * @param maxlen Size of the buffer. + * @return If no argument was found, -1 is returned. Otherwise, + * the index to the next position to parse from is + * returned. This might be the very end of the string. + */ +native argparse(const text[], pos, argbuffer[], maxlen); + +/** + * Returns text in a string up until a certain character sequence is reached. + * + * @note Only available in 1.8.3 and above. + * + * @param source Source input string. + * @param split A string which specifies a search point to break at. + * @param part Buffer to store string part. + * @param partLen Maximum length of the string part buffer. + * + * @return -1 if no match was found; otherwise, an index into source + * marking the first index after the searched text. The + * index is always relative to the start of the input string. + */ +native split_string(const source[], const split[], part[], partLen); + + +// Always keep this at the bottom of this file. +#include diff --git a/bin/compiler/include/string_const.inc b/bin/compiler/include/string_const.inc new file mode 100644 index 0000000..989282e --- /dev/null +++ b/bin/compiler/include/string_const.inc @@ -0,0 +1,156 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// String Manipulation Constants +// + +#if defined _string_const_included + #endinput +#endif +#define _string_const_included + +#define charsmax(%1) (sizeof(%1)-1) + +/** + * @global Unless otherwise noted, all string functions which take in a + * writable buffer and maximum length should NOT have the null terminator INCLUDED + * in the length. This means that this is valid: + * copy(string, charsmax(string), ...) + */ + +/** + * Buffer size used by fmt(). + */ +#define MAX_FMT_LENGTH 256 + +/** + * Below are the trim flags for strtok2 + * + * You can specify how the left and right buffers will + * be trimmed by strtok2. LTRIM trims spaces from the + * left side. RTRIM trims from the right side. + * + * The defines TRIM_INNER, TRIM_OUTER and TRIM_FULL are + * shorthands for commonly used flag combinations. + * + * When the initial string is trimmed, using TRIM_INNER + * for all subsequent strtok2 calls will ensure that left + * and right are always trimmed from both sides. + * + * Examples: + * str1[] = " This is * some text " + * strtok2(str1, left, 24, right, 24, '*', TRIM_FULL) + * left will be "This is", right will be "some text" + * + * str2[] = " Here is | an | example " + * trim(str2) + * strtok2(str2, left, 24, right, 24, '|', TRIM_INNER) + * left will be "Here is", right will be "an | example" + * strtok2(right, left, 24, right, 24, '|', TRIM_INNER) + * left will be "an", right will be "example" + * + * str3[] = " One - more " + * strtok2(str3, left, 24, right, 24, '-', TRIM_OUTER) + * left will be "One ", right will be " more" + * + * str4[] = " Final . example " + * strtok2(str4, left, 24, right, 24, '.', LTRIM_LEFT|LTRIM_RIGHT) + * left will be "Final ", right will be "example " +*/ +#define LTRIM_LEFT (1<<0) +#define RTRIM_LEFT (1<<1) +#define LTRIM_RIGHT (1<<2) +#define RTRIM_RIGHT (1<<3) + +#define TRIM_INNER RTRIM_LEFT|LTRIM_RIGHT +#define TRIM_OUTER LTRIM_LEFT|RTRIM_RIGHT +#define TRIM_FULL TRIM_OUTER|TRIM_INNER + +/** + * Category flags to be used with is_string_category(), to check whether code points in a + * string are part of that category. + */ +#define UTF8C_LETTER_UPPERCASE 0x00000001 // Uppercase letter code points, Lu in the Unicode database. +#define UTF8C_LETTER_LOWERCASE 0x00000002 // Lowercase letter code points, Ll in the Unicode database. +#define UTF8C_LETTER_TITLECASE 0x00000004 // Titlecase letter code points, Lt in the Unicode database. +#define UTF8C_LETTER_MODIFIER 0x00000008 // Modifier letter code points, Lm in the Unicode database. +#define UTF8C_LETTER_OTHER 0x00000010 // Other letter code points, Lo in the Unicode database. + +// Combined flag for all letter categories with case mapping +// Combined flag for all letter categories +const UTF8C_LETTER = (UTF8C_LETTER_UPPERCASE | UTF8C_LETTER_LOWERCASE | UTF8C_LETTER_TITLECASE | UTF8C_LETTER_MODIFIER | UTF8C_LETTER_OTHER); +const UTF8C_CASE_MAPPED = (UTF8C_LETTER_UPPERCASE | UTF8C_LETTER_LOWERCASE | UTF8C_LETTER_TITLECASE); + +#define UTF8C_MARK_NON_SPACING 0x00000020 // Non-spacing mark code points, Mn in the Unicode database. +#define UTF8C_MARK_SPACING 0x00000040 // Spacing mark code points, Mc in the Unicode database. +#define UTF8C_MARK_ENCLOSING 0x00000080 // Enclosing mark code points, Me in the Unicode database. + +// Combined flag for all mark categories. +const UTF8C_MARK = (UTF8C_MARK_NON_SPACING | UTF8C_MARK_SPACING | UTF8C_MARK_ENCLOSING); + +#define UTF8C_NUMBER_DECIMAL 0x00000100 // Decimal number code points, Nd in the Unicode database. +#define UTF8C_NUMBER_LETTER 0x00000200 // Letter number code points, Nl in the Unicode database. +#define UTF8C_NUMBER_OTHER 0x00000400 // Other number code points, No in the Unicode database. + +// Combined flag for all number categories. +const UTF8C_NUMBER = (UTF8C_NUMBER_DECIMAL | UTF8C_NUMBER_LETTER | UTF8C_NUMBER_OTHER); + +#define UTF8C_PUNCTUATION_CONNECTOR 0x00000800 // Connector punctuation category, Pc in the Unicode database. +#define UTF8C_PUNCTUATION_DASH 0x00001000 // Dash punctuation category, Pd in the Unicode database. +#define UTF8C_PUNCTUATION_OPEN 0x00002000 // Open punctuation category, Ps in the Unicode database. +#define UTF8C_PUNCTUATION_CLOSE 0x00004000 // Close punctuation category, Pe in the Unicode database. +#define UTF8C_PUNCTUATION_INITIAL 0x00008000 // Initial punctuation category, Pi in the Unicode database. +#define UTF8C_PUNCTUATION_FINAL 0x00010000 // Final punctuation category, Pf in the Unicode database. +#define UTF8C_PUNCTUATION_OTHER 0x00020000 // Other punctuation category, Po in the Unicode database. + +// Combined flag for all punctuation categories. +const UTF8C_PUNCTUATION = (UTF8C_PUNCTUATION_CONNECTOR | UTF8C_PUNCTUATION_DASH | UTF8C_PUNCTUATION_OPEN | \ + UTF8C_PUNCTUATION_CLOSE | UTF8C_PUNCTUATION_INITIAL | UTF8C_PUNCTUATION_FINAL | \ + UTF8C_PUNCTUATION_OTHER); + +#define UTF8C_SYMBOL_MATH 0x00040000 // Math symbol category, Sm in the Unicode database. +#define UTF8C_SYMBOL_CURRENCY 0x00080000 // Currency symbol category, Sc in the Unicode database. +#define UTF8C_SYMBOL_MODIFIER 0x00100000 // Modifier symbol category, Sk in the Unicode database. +#define UTF8C_SYMBOL_OTHER 0x00200000 // Other symbol category, So in the Unicode database. + +// Combined flag for all symbol categories. +const UTF8C_SYMBOL = (UTF8C_SYMBOL_MATH | UTF8C_SYMBOL_CURRENCY | UTF8C_SYMBOL_MODIFIER | UTF8C_SYMBOL_OTHER); + +#define UTF8C_SEPARATOR_SPACE 0x00400000 // Space separator category, Zs in the Unicode database. +#define UTF8C_SEPARATOR_LINE 0x00800000 // Line separator category, Zl in the Unicode database. +#define UTF8C_SEPARATOR_PARAGRAPH 0x01000000 // Paragraph separator category, Zp in the Unicode database. + +// Combined flag for all separator categories. +const UTF8C_SEPARATOR = (UTF8C_SEPARATOR_SPACE | UTF8C_SEPARATOR_LINE | UTF8C_SEPARATOR_PARAGRAPH); + +#define UTF8C_CONTROL 0x02000000 // Control category, Cc in the Unicode database. +#define UTF8C_FORMAT 0x04000000 // Format category, Cf in the Unicode database. +#define UTF8C_SURROGATE 0x08000000 // Surrogate category, Cs in the Unicode database. +#define UTF8C_PRIVATE_USE 0x10000000 // Private use category, Co in the Unicode database. +#define UTF8C_UNASSIGNED 0x20000000 // Unassigned category, Cn in the Unicode database. +#define UTF8C_COMPATIBILITY 0x40000000 // Flag used for maintaining backwards compatibility with POSIX +#define UTF8C_IGNORE_GRAPHEME_CLUSTER 0x80000000 // Flag used for checking only the general category of code points at the start of a grapheme cluster. + +// Flag used for maintaining backwards compatibility with POSIX function +const UTF8C_ISCNTRL = (UTF8C_COMPATIBILITY | UTF8C_CONTROL); +const UTF8C_ISPRINT = (UTF8C_COMPATIBILITY | UTF8C_LETTER | UTF8C_NUMBER | UTF8C_PUNCTUATION | UTF8C_SYMBOL | UTF8C_SEPARATOR); +const UTF8C_ISSPACE = (UTF8C_COMPATIBILITY | UTF8C_SEPARATOR_SPACE); +const UTF8C_ISBLANK = (UTF8C_COMPATIBILITY | UTF8C_SEPARATOR_SPACE | UTF8C_PRIVATE_USE); +const UTF8C_ISGRAPH = (UTF8C_COMPATIBILITY | UTF8C_LETTER | UTF8C_NUMBER | UTF8C_PUNCTUATION | UTF8C_SYMBOL); +const UTF8C_ISPUNCT = (UTF8C_COMPATIBILITY | UTF8C_PUNCTUATION | UTF8C_SYMBOL); +const UTF8C_ISALNUM = (UTF8C_COMPATIBILITY | UTF8C_LETTER | UTF8C_NUMBER); +const UTF8C_ISALPHA = (UTF8C_COMPATIBILITY | UTF8C_LETTER); +const UTF8C_ISUPPER = (UTF8C_COMPATIBILITY | UTF8C_LETTER_UPPERCASE); +const UTF8C_ISLOWER = (UTF8C_COMPATIBILITY | UTF8C_LETTER_LOWERCASE); +const UTF8C_ISDIGIT = (UTF8C_COMPATIBILITY | UTF8C_NUMBER); +const UTF8C_ISXDIGIT = (UTF8C_COMPATIBILITY | UTF8C_NUMBER | UTF8C_PRIVATE_USE); + +// All flags. +const UTF8C_ALL = 0xFFFFFFFF & (~UTF8C_COMPATIBILITY); diff --git a/bin/compiler/include/string_stocks.inc b/bin/compiler/include/string_stocks.inc new file mode 100644 index 0000000..67acbd0 --- /dev/null +++ b/bin/compiler/include/string_stocks.inc @@ -0,0 +1,325 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// String Manipulation Stocks +// + +#if defined _string_stocks_included + #endinput +#endif +#define _string_stocks_included + +#if !defined _string_included + #include +#endif + +/** + * @global Unless otherwise noted, all string functions which take in a + * writable buffer and maximum length should NOT have the null terminator INCLUDED + * in the length. This means that this is valid: + * copy(string, charsmax(string), ...) + */ + +/** + * Returns whether a given string contains only digits. + * This returns false for zero-length strings. + * + * @param sString Character to test. + * @return True if string contains only digit, otherwise false. + */ +stock bool:is_str_num(const sString[]) +{ + new i = 0; + + while (sString[i] && isdigit(sString[i])) + { + ++i; + } + + return sString[i] == 0 && i != 0; +} + +/** + * Returns an uppercase character to a lowercase character. + * + * @note Only available in 1.8.3 and above. + * + * @param chr Characer to convert. + * @return Lowercase character on success, + * no change on failure. + */ +stock char_to_upper(chr) +{ + if (is_char_lower(chr)) + { + return (chr & ~(1<<5)); + } + + return chr; +} + +/** + * Returns a lowercase character to an uppercase character. + * + * @note Only available in 1.8.3 and above. + * + * @param chr Characer to convert. + * @return Uppercase character on success, + * no change on failure. + */ +stock char_to_lower(chr) +{ + if (is_char_upper(chr)) + { + return (chr | (1<<5)); + } + + return chr; +} + +/** + * Backwards compatibility stock - use argbreak or argparse. + * @deprecated this function does not work properly. + */ +#pragma deprecated Use argbreak() instead +stock strbreak(const text[], Left[], leftLen, Right[], rightLen) +{ + return argbreak(text, Left, leftLen, Right, rightLen); +} + +/** + * Emulates strbreak() using argparse(). + * + * @param text Source input string. + * @param left Buffer to store string left part. + * @param leftlen Maximum length of the string part buffer. + * @param right Buffer to store string right part. + * @param rightlen Maximum length of the string part buffer. + * + * @return -1 if no match was found; otherwise, an index into source + * marking the first index after the searched text. The + * index is always relative to the start of the input string. + */ +stock argbreak(const text[], left[], leftlen, right[], rightlen) +{ + new pos = argparse(text, 0, left, leftlen); + + if (pos == -1) + { + return -1; + } + + new textlen = strlen(text); + + while (pos < textlen && isspace(text[pos])) + { + pos++; + } + + copy(right, rightlen, text[pos]); + + return pos; +} + +/** + * It is basically strbreak but you have a delimiter that is more than one character in length. By Suicid3. + * + * @param szInput Source input string. + * @param szLeft Buffer to store left string part. + * @param pL_Max Maximum length of the string part buffer. + * @param szRight Buffer to store right string part. + * @param pR_Max Maximum length of the string part buffer. + * @param szDelim A string which specifies a search point to break at. + * + * @noreturn + */ +stock split(const szInput[], szLeft[], pL_Max, szRight[], pR_Max, const szDelim[]) +{ + new iEnd = contain(szInput, szDelim); + new iStart = iEnd + strlen(szDelim); + + // If delimiter isnt in Input just split the string at max lengths + if (iEnd == -1) + { + iStart = copy(szLeft, pL_Max, szInput); + copy(szRight, pR_Max, szInput[iStart]); + return; + } + + // If delimter is in Input then split at input for max lengths + if (pL_Max >= iEnd) + copy(szLeft, iEnd, szInput); + else + copy(szLeft, pL_Max, szInput); + + copy(szRight, pR_Max, szInput[iStart]); +} + +/** + * Removes a path from szFilePath leaving the name of the file in szFile for a pMax length. + * + * @param szFilePath String to perform search and replacements on. + * @param szFile Buffer to store file name. + * @param pMax Maximum length of the string buffer. + * + * @noreturn + */ +stock remove_filepath(const szFilePath[], szFile[], pMax) +{ + new len = strlen(szFilePath); + + while ((--len >= 0) && (szFilePath[len] != '/') && (szFilePath[len] != '\')) { } + + copy(szFile, pMax, szFilePath[len + 1]); + + return; +} + +/** + * Replaces a contained string iteratively. + * + * @note Consider using replace_string() instead. + * + * @note This ensures that no infinite replacements will take place by + * intelligently moving to the next string position each iteration. + * + * @param string String to perform search and replacements on. + * @param len Maximum length of the string buffer. + * @param what String to search for. + * @param with String to replace the search string with. + * + * @return Number of replacements on success, otherwise 0. + */ +stock replace_all(string[], len, const what[], const with[]) +{ + new pos = 0; + + if ((pos = contain(string, what)) == -1) + { + return 0; + } + + new total = 0; + new with_len = strlen(with); + new diff = strlen(what) - with_len; + new total_len = strlen(string); + new temp_pos = 0; + + while (replace(string[pos], len - pos, what, with) != 0) + { + total++; + + /* jump to position after replacement */ + pos += with_len; + + /* update cached length of string */ + total_len -= diff; + + /* will the next call be operating on the last character? */ + if (pos >= total_len) + { + break; + } + + /* find the next position from our offset */ + temp_pos = contain(string[pos], what); + + /* if it's invalid, we're done */ + if (temp_pos == -1) + { + break; + } + + /* otherwise, reposition and update counters */ + pos += temp_pos; + } + + return total; +} + +/** + * Breaks a string into pieces and stores each piece into an array of buffers. + * + * @param text The string to split. + * @param split The string to use as a split delimiter. + * @param buffers An array of string buffers (2D array). + * @param maxStrings Number of string buffers (first dimension size). + * @param maxStringLength Maximum length of each string buffer. + * @param copyRemainder False (default) discard excess pieces, true to ignore + * delimiters after last piece. + * @return Number of strings retrieved. + */ +stock explode_string(const text[], const split[], buffers[][], maxStrings, maxStringLength, bool:copyRemainder = false) +{ + new reloc_idx, idx, total; + + if (maxStrings < 1 || !split[0]) + { + return 0; + } + + while ((idx = split_string(text[reloc_idx], split, buffers[total], maxStringLength)) != -1) + { + reloc_idx += idx; + if (++total == maxStrings) + { + if (copyRemainder) + { + copy(buffers[total-1], maxStringLength, text[reloc_idx-idx]); + } + return total; + } + } + + copy(buffers[total++], maxStringLength, text[reloc_idx]); + + return total; +} + +/** + * Joins an array of strings into one string, with a "join" string inserted in + * between each given string. This function complements ExplodeString. + * + * @param strings An array of strings. + * @param numStrings Number of strings in the array. + * @param join The join string to insert between each string. + * @param buffer Output buffer to write the joined string to. + * @param maxLength Maximum length of the output buffer. + * @return Number of bytes written to the output buffer. + */ +stock implode_strings(const strings[][], numStrings, const join[], buffer[], maxLength) +{ + new total, length, part_length; + new join_length = strlen(join); + + for (new i=0; i + * + * Example file below. Note that the second line is technically invalid. + * The event handler must decide whether this should be allowed. + * --FILE BELOW-- + * [gaben] + * hi = clams + * bye = "NO CLAMS" + * + * [valve] + * cannot + * maintain + * products + */ + +/** + * Parser invalid code. + */ +enum INIParser +{ + Invalid_INIParser = 0 +}; + +/** + * Creates a new INI parser. + * This is used to set parse hooks. + * + * @return A new handle to an INI Parse structure. + */ +native INIParser:INI_CreateParser(); + +/** + * Disposes of an INI parser. + * + * @param handle Handle to an INI Parse structure. + * + * @return True if disposed, false otherwise. + */ +native INI_DestroyParser(&INIParser:handle); + +/** + * Parses an INI config file. + * + * @param handle A handle to an INI Parse structure. + * @param file A string containing the file path. + * @param line An optional by reference cell to store the last line number read. + * @param col An optional by reference cell to store the last column number read. + * @param data An optional handle or value to pass through to callback functions + * + * @return An SMCParseError result. + * @error Invalid or corrupt handle. + */ +native bool:INI_ParseFile(INIParser:handle, const file[], &line = 0, &col = 0, any:data = 0); + +/** + * Sets the INI_ParseStart function of a parse handle. + * + * @note Below is the prototype of callback: + * - + * Called when parsing is started. + * + * @param handle A handle to an INI Parse structure. + * @param data Handle or value passed in INI_ParseFile + * + * @noreturn + * + * public OnParseStart(INIParser:handle, any:data) + * - + * @param handle Handle to an INI Parse structure. + * @param func A ParseStart callback. + * + * @noreturn + * @error Invalid or corrupt handle. + */ +native INI_SetParseStart(INIParser:handle, const func[]); + +/** + * Sets the INI_ParseEnd function of a parse handle. + * + * @note Below is the prototype of callback: + * - + * Called when parsing is halted. + * + * @param handle A handle to an INI Parse structure. + * @param halted True if abnormally halted, false otherwise. + * @param data Handle or value passed in INI_ParseFile + * + * @noreturn + * + * public OnParseEnd(INIParser:handle, bool:halted, any:data) + * - + * @param handle Handle to an INI Parse structure. + * @param func A ParseEnd callback. + * + * @noreturn + * @error Invalid or corrupt handle. + */ +native INI_SetParseEnd(INIParser:handle, const func[]); + +/** + * Sets the two main reader functions. + * + * @note Below is the prototype of callback: + * - + * NewSection: + * Called when the parser finds a new section. + * + * @param handle Handle to an INI Parse structure. + * @param section Name of section in between the [ and ] characters. + * @param invalid_tokens True if invalid tokens were detected in the name. + * @param close_bracket True if a closing bracket was detected, false otherwise. + * @param extra_tokens True if extra tokens were detected on the line. + * @param curtok Contains current token in the line where the section name starts. + * You can add to this offset when failing to point to a token. + * @param data Handle or value passed in INI_ParseFile + * + * @return True to keep parsing, false otherwise. + * + * public bool:OnNewSection(INIParser:handle, const section[], bool:invalid_tokens, bool:close_bracket, bool:extra_tokens, curtok, any:data) + * + * KeyValue: + * Called when the parser finds a new key/value pair. + * + * @param handle Handle to an INI Parse structure. + * @param key Name of key. + * @param value String containing value (with quotes stripped, if any). + * @param invalid_tokens Whether or not the key contained invalid tokens. + * @param equal_token There was an '=' sign present (in case the value is missing). + * @param quotes Whether value was enclosed in quotes. + * @param curtok Contains the token index of the start of the value string. + * This can be changed when returning false. + * @param data Handle or value passed in INI_ParseFile + * + * @return True to keep parsing, false otherwise. + * + * public bool:OnKeyValue(INIParser:handle, const key[], const value[], bool:invalid_tokens, bool:equal_token, bool:quotes, curtok, any:data) + * - + * @param handle Handle to an INI Parse structure. + * @param kv A KeyValue callback. + * @param ns An optional NewSection callback. + * + * @noreturn + */ +native INI_SetReaders(INIParser:smc, const kvFunc[], const nsFunc[] = "" ); + +/** + * Sets a raw line reader on an INI parser handle. + * + * @note Below is the prototype of callback: + * - + * Called whenever a raw line is read. + * + * @param handle The INI Parse handle. + * @param line Contents of line. + * @param lineno The line number it occurs on. + * @param curtok Pointer to optionally store failed position in string. + * @param data Handle or value passed in INI_ParseFile + * + * @return True to keep parsing, false otherwise. + * + * public bool:OnRawLine(INIParser:smc, const line[], lineno, curtok, any:data) + * + * @param handle Handle to an INI Parse structure. + * @param func A RawLine callback. + * + * @noreturn + */ +native INI_SetRawLine(INIParser:handle, const func[]); diff --git a/bin/compiler/include/textparse_smc.inc b/bin/compiler/include/textparse_smc.inc new file mode 100644 index 0000000..f97f244 --- /dev/null +++ b/bin/compiler/include/textparse_smc.inc @@ -0,0 +1,261 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// SMC Parser Functions +// + +#if defined _textparse_smc_included + #endinput +#endif +#define _textparse_smc_included + +/** + * Everything below describes the SMC Parse, or "SourceMod Configuration" format. + * This parser is entirely event based. You must hook events to receive data. + * The file format itself is nearly identical to Valve's KeyValues format (also known as VDF). + */ + +/** + * The SMC file format is defined as: + * WHITESPACE: 0x20, \n, \t, \r + * IDENTIFIER: Any ASCII character EXCLUDING ", {, }, ;, //, / *, or WHITESPACE. + * STRING : Any set of symbols enclosed in quotes. + * + * Note: if a STRING does not have quotes, it is parsed as an IDENTIFIER. + * + * Basic syntax is comprised of SECTIONBLOCKs. + * A SECTIONBLOCK defined as: + * + * SECTIONNAME + * { + * OPTION + * } + * + * OPTION can be repeated any number of times inside a SECTIONBLOCK. + * A new line will terminate an OPTION, but there can be more than one OPTION per line. + * OPTION is defined any of: + * "KEY" "VALUE" + * SECTIONBLOCK + * + * SECTIONNAME, KEY, VALUE, and SINGLEKEY are strings + * SECTIONNAME cannot have trailing characters if quoted, but the quotes can be optionally removed. + * If SECTIONNAME is not enclosed in quotes, the entire sectionname string is used (minus surrounding whitespace). + * If KEY is not enclosed in quotes, the key is terminated at first whitespace. + * If VALUE is not properly enclosed in quotes, the entire value string is used (minus surrounding whitespace). + * The VALUE may have inner quotes, but the key string may not. + * + * For an example, see scripting/testsuite/textparse_test.cfg + * + * WHITESPACE should be ignored. + * Comments are text occurring inside the following tokens, and should be stripped + * unless they are inside literal strings: + * ; + * // + * / * * / + */ + +/** + * Parser invalid code. + */ +enum SMCParser +{ + Invalid_SMCParser = 0 +}; + +/** + * Parse result directive. + */ +enum SMCResult +{ + SMCParse_Continue, /* Continue parsing */ + SMCParse_Halt, /* Stop parsing here */ + SMCParse_HaltFail /* Stop parsing and return failure */ +}; + +/** + * Parse error codes. + */ +enum SMCError +{ + SMCError_Okay = 0, /* No error */ + SMCError_StreamOpen, /* Stream failed to open */ + SMCError_StreamError, /* The stream died... somehow */ + SMCError_Custom, /* A custom handler threw an error */ + SMCError_InvalidSection1, /* A section was declared without quotes, and had extra tokens */ + SMCError_InvalidSection2, /* A section was declared without any header */ + SMCError_InvalidSection3, /* A section ending was declared with too many unknown tokens */ + SMCError_InvalidSection4, /* A section ending has no matching beginning */ + SMCError_InvalidSection5, /* A section beginning has no matching ending */ + SMCError_InvalidTokens, /* There were too many unidentifiable strings on one line */ + SMCError_TokenOverflow, /* The token buffer overflowed */ + SMCError_InvalidProperty1, /* A property was declared outside of any section */ +}; + +/** + * Creates a new SMC parser. + * This is used to set parse hooks. + * + * @return A new handle to an SMC Parse structure. + */ +native SMCParser:SMC_CreateParser(); + +/** + * Disposes of an SMC parser. + * + * @param handle Handle to an SMC Parse structure. + * + * @return True if disposed, false otherwise. + */ +native SMC_DestroyParser(&SMCParser:handle); + +/** + * Parses a config file. + * + * @param handle A handle to an SMC Parse structure. + * @param file A string containing the file path. + * @param line An optional by reference cell to store the last line number read. + * @param col An optional by reference cell to store the last column number read. + * @param data An optional handle or value to pass through to callback functions + * + * @return An SMCParseError result. + * @error Invalid or corrupt handle. + */ +native SMCError:SMC_ParseFile(SMCParser:handle, const file[], &line = 0, &col = 0, any:data = 0); + +/** + * Sets the SMC_ParseStart function of a parse handle. + * + * @note Below is the prototype of callback: + * - + * Called when parsing is started. + * + * @param handle Handle to an SMC Parse structure. + * @param data Handle or value passed in SMC_ParseFile + * + * @noreturn + * + * public OnParseStart(SMCParser:handle, any:data) + * - + * @param handle Handle to an SMC Parse structure. + * @param func A ParseStart callback. + * + * @noreturn + * @error Invalid or corrupt handle. + */ +native SMC_SetParseStart(SMCParser:handle, const func[]); + +/** + * Sets the SMC_ParseEnd function of a parse handle. + * + * @note Below is the prototype of callback: + * - + * Called when parsing is halted. + * + * @param handle Handle to an SMC Parse structure. + * @param halted True if abnormally halted, false otherwise. + * @param failed True if parsing failed, false otherwise. + * @param data Handle or value passed in SMC_ParseFile + * + * @noreturn + * + * public OnParseEnd(SMCParser:handle, bool:halted, bool:failed, any:data) + * - + * @param handle Handle to an SMC Parse structure. + * @param func A ParseEnd callback. + * + * @noreturn + * @error Invalid or corrupt handle. + */ +native SMC_SetParseEnd(SMCParser:handle, const func[]); + +/** + * Sets the three main reader functions. + * + * @note Enclosing quotes are always stripped. + * @note Below is the prototype of callbacks: + * - + * NewSection: + * Called when the parser finds a new section or sub-section. + * + * @param handle Handle to an SMC Parse structure. + * @param name String containing section name. + * @param data Handle or value passed in SMC_ParseFile + * + * @return An SMCResult action to take. + * + * public SMCResult:OnNewSection(SMCParser:handle, const name[], any:data) + * + * KeyValue: + * Called when the parser finds a new key/value pair. + * + * @param handle Handle to an SMC Parse structure. + * @param key String containing key name. + * @param value String containing value name. + * @param data Handle or value passed in SMC_ParseFile + * + * @return An SMCResult action to take. + * + * public SMCResult:OnKeyValue(SMCParser:handle, const key[], const value[], any:data) + * + * EndSection: + * Called when the parser finds the end of the current section. + * + * @param handle Handle to an SMC Parse structure. + * @param data Handle or value passed in SMC_ParseFile + * + * @return An SMCResult action to take. + * + * public SMCResult:OnEndSection(SMCParser:handle, any:data) + * - + * @param handle Handle to an SMC Parse structure. + * @param kv A KeyValue callback. + * @param ns An optional NewSection callback. + * @param es An optional EndSection callback. + * + * @noreturn + */ +native SMC_SetReaders(SMCParser:smc, const kvFunc[], const nsFunc[] = "", const esFunc[] = ""); + +/** + * Sets a raw line reader on an text parser handle. + * + * @note Below is the prototype of callbacks: + * - + * Called whenever a raw line is read. + * + * @param handle Handle to an SMC Parse structure. + * @param line A string containing the raw line from the file. + * @param lineno The line number it occurs on. + * @param data Handle or value passed in SMC_ParseFile + * + * @return An SMCResult action to take. + * + * public SMCResult:SMC_RawLine(SMCParser:handle, const line[], lineno, any:data) + * - + * @param handle Handle to an SMC Parse structure. + * @param func A RawLine callback. + * + * @noreturn + */ +native SMC_SetRawLine(SMCParser:handle, const func[]); + +/** + * Gets an error string for an SMCError code. + * + * @note SMCError_Okay returns false. + * @note SMCError_Custom (which is thrown on SMCParse_HaltFail) returns false. + * + * @param error The SMCParseError code. + * @param buffer A string buffer for the error (contents undefined on failure). + * @param buf_max The maximum size of the buffer. + * + * @return True on success, false otherwise. + */ +native bool:SMC_GetErrorString(SMCError:error, buffer[], buf_max); diff --git a/bin/compiler/include/tfcconst.inc b/bin/compiler/include/tfcconst.inc new file mode 100644 index 0000000..7c41a05 --- /dev/null +++ b/bin/compiler/include/tfcconst.inc @@ -0,0 +1,84 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// TFCX Constants +// + +#if defined _tfcconst_included + #endinput +#endif +#define _tfcconst_included + + +#define TFCMAX_WEAPONS 37 + +enum { + TFC_AMMO_SHELLS = 0, + TFC_AMMO_BULLETS, + TFC_AMMO_CELLS, + TFC_AMMO_ROCKETS, + TFC_AMMO_NADE1, + TFC_AMMO_NADE2, +}; + +enum { + TFC_WPN_NONE = 0, + TFC_WPN_TIMER,//TFC_WPN_UNK1, + TFC_WPN_SENTRYGUN,//TFC_WPN_UNK2, + TFC_WPN_MEDIKIT, + TFC_WPN_SPANNER, + TFC_WPN_AXE, + TFC_WPN_SNIPERRIFLE, + TFC_WPN_AUTORIFLE, + TFC_WPN_SHOTGUN, + TFC_WPN_SUPERSHOTGUN, + TFC_WPN_NG, + TFC_WPN_SUPERNG, + TFC_WPN_GL, + TFC_WPN_FLAMETHROWER, + TFC_WPN_RPG, + TFC_WPN_IC, + TFC_WPN_FLAMES,//TFC_WPN_UNK16, + TFC_WPN_AC, + TFC_WPN_UNK18, + TFC_WPN_UNK19, + TFC_WPN_TRANQ, + TFC_WPN_RAILGUN, + TFC_WPN_PL, + TFC_WPN_KNIFE, + TFC_WPN_CALTROP, // 24 + TFC_WPN_CONCUSSIONGRENADE, + TFC_WPN_NORMALGRENADE, + TFC_WPN_NAILGRENADE, + TFC_WPN_MIRVGRENADE, + TFC_WPN_NAPALMGRENADE, + TFC_WPN_GASGRENADE, + TFC_WPN_EMPGRENADE, +}; + +enum { + TFC_PC_SCOUT = 1, + TFC_PC_SNIPER, + TFC_PC_SOLDIER, + TFC_PC_DEMOMAN, + TFC_PC_MEDIC, + TFC_PC_HWGUY, + TFC_PC_PYRO, + TFC_PC_SPY, + TFC_PC_ENGENEER, // Typo; preserved for backward compatibility + TFC_PC_ENGINEER = 9, + TFC_PC_CIVILIAN = 11, +}; + +// Goal items +#define TFC_GOALITEM_BLUE (1 << 17) +#define TFC_GOALITEM_RED (1 << 18) +#define TFC_GOALITEM_YELLOW (1 << 24) +#define TFC_GOALITEM_GREEN (1 << 25) diff --git a/bin/compiler/include/tfcstats.inc b/bin/compiler/include/tfcstats.inc new file mode 100644 index 0000000..367406a --- /dev/null +++ b/bin/compiler/include/tfcstats.inc @@ -0,0 +1,62 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// TFCX Stats Functions +// + +#if defined _tfcstats_included + #endinput +#endif +#define _tfcstats_included + +/* Gets stats from given weapon index. If wpnindex is 0 +* then the stats are from all weapons. If weapon has not been used function +* returns 0 in other case 1. Fields in stats are: +* 0 - kills +* 1 - deaths +* 2 - headshots +* 3 - teamkilling +* 4 - shots +* 5 - hits +* 6 - damage +* For body hits fields see amxconst.inc. */ +native get_user_wstats(index,wpnindex,stats[STATSX_MAX_STATS],bodyhits[MAX_BODYHITS]); + +/* Gets round stats from given weapon index.*/ +native get_user_wrstats(index,wpnindex,stats[STATSX_MAX_STATS],bodyhits[MAX_BODYHITS]); + +/* Gets overall stats which are stored in file on server +* and updated on every respawn or user disconnect. +* Function returns the position in stats by diff. kills to deaths. */ +native get_user_stats(index,stats[STATSX_MAX_STATS],bodyhits[MAX_BODYHITS]); + +/* Gets round stats of player. */ +native get_user_rstats(index,stats[STATSX_MAX_STATS],bodyhits[MAX_BODYHITS]); + +/* Gets stats with which user have killed/hurt his victim. If victim is 0 +* then stats are from all victims. If victim has not been hurt, function +* returns 0 in other case 1. User stats are reset on his respawn. */ +native get_user_vstats(index,victim,stats[STATSX_MAX_STATS],bodyhits[MAX_BODYHITS],wpnname[]="",len=0); + +/* Gets stats with which user have been killed/hurt. If killer is 0 +* then stats are from all attacks. If killer has not hurt user, function +* returns 0 in other case 1. User stats are reset on his respawn. */ +native get_user_astats(index,wpnindex,stats[STATSX_MAX_STATS],bodyhits[MAX_BODYHITS],wpnname[]="",len=0); + +/* Resets life, weapon, victims and attackers user stats. */ +native reset_user_wstats(index); + +/* Gets overall stats which stored in stats.dat file in amx folder +* and updated on every mapchange or user disconnect. +* Function returns next index of stats entry or 0 if no more exists. */ +native get_stats(index,stats[STATSX_MAX_STATS],bodyhits[MAX_BODYHITS],name[],len); + +/* Returns number of all entries in stats. */ +native get_statsnum(); diff --git a/bin/compiler/include/tfcx.inc b/bin/compiler/include/tfcx.inc new file mode 100644 index 0000000..0da0118 --- /dev/null +++ b/bin/compiler/include/tfcx.inc @@ -0,0 +1,148 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// TFCX Functions +// + +#if defined _tfcx_included + #endinput +#endif +#define _tfcx_included + +#include +#include + +#pragma reqclass xstats +#if !defined AMXMODX_NOAUTOLOAD + #pragma defclasslib xstats tfcx +#endif + +/************* Shared Natives Start ********************************/ + +/* Forward types */ +enum { + XMF_DAMAGE = 0, + XMF_DEATH, +}; + +/* Use this function to register forwards */ +native register_statsfwd( ftype ); + +/* Function is called after player to player attacks , +* if players were damaged by teammate TA is set to 1 */ +forward client_damage(attacker,victim,damage,wpnindex,hitplace,TA); + +/* Function is called after player death , +* if player was killed by teammate TK is set to 1 */ +forward client_death(killer,victim,wpnindex,hitplace,TK); + +/* Custom Weapon Support */ +/* function will return index of new weapon */ +native custom_weapon_add( const wpnname[],melee = 0,const logname[]="" ); +/* Function will pass damage done by this custom weapon to stats module and other plugins */ +native custom_weapon_dmg( weapon, att, vic, damage, hitplace=0 ); +/* Function will pass info about custom weapon shot to stats module */ +native custom_weapon_shot( weapon,index ); // weapon id , player id + +/* function will return 1 if true */ +native xmod_is_melee_wpn(wpnindex); + +/* Returns weapon name. */ +native xmod_get_wpnname(wpnindex,name[],len); + +/* Returns weapon logname. */ +native xmod_get_wpnlogname(wpnindex,name[],len); + +/* Returns weapons array size */ +native xmod_get_maxweapons(); + +/* Returns stats array size ex. 8 in TS , 9 in DoD */ +native xmod_get_stats_size(); + +/* Returns 1 if true */ +native xmod_is_custom_wpn(wpnindex); + +/************* Shared Natives End ********************************/ + +stock tfc_isgrenade( weapon ){ + switch( weapon ) + { + case TFC_WPN_CALTROP, + TFC_WPN_CONCUSSIONGRENADE, + TFC_WPN_NORMALGRENADE, + TFC_WPN_NAILGRENADE, + TFC_WPN_MIRVGRENADE, + TFC_WPN_NAPALMGRENADE, + TFC_WPN_GASGRENADE, + TFC_WPN_EMPGRENADE: + return 1; + default: return 0; + } + return 0; +} + +native tfc_userkill( index ); + +/* Use this function to set private data offsets if needed +Default offsets: + timer: 932 + sentrygun: 83 +from AssKicR + shells: 53 + bullets: 55 + cells: 57 + rockets: 59 + nade1: 14 + nade2: 15 +*/ +native tfc_setpddata(timer,sentrygun,shells,bullets,cells,rockets,nade1,nade2); + +/*********************************************************************/ + +native tfc_setmodel(index, const Model[], const Skin[]); +native tfc_clearmodel(index); + +/* Get amount of ammo in backpack on a user for a specific weapon */ +/* Ammo Types in tfcconst.inc */ +native tfc_getbammo(index, ammo); + +/* Set amount of ammo in backpack on a user for a specific weapon */ +native tfc_setbammo(index, ammo, value); + +/* Returns amount of ammo in weapon's clip (backpack) */ +/* Weapons list in tfcconst.inc */ +native tfc_getweaponbammo(index, weapon); + +/* Sets amount of ammo in weapon's clip (backpack) */ +native tfc_setweaponbammo(index, weapon, value); + +/* Returns amount of ammo in weapon's clip */ +/* Index must be weapon's entity index */ +native tfc_getweaponammo(index); + +/* Sets amount of ammo in weapon's clip */ +/* Index must be weapon's entity index */ +native tfc_setweaponammo(index, value); + +/* Returns 1 if user is carrying a goal item such as a flag or a keycard, else 0. + * Team is by reference parameter that will be set to owning team(s) of the goal item. + * Use the TFC_GOALITEM_* constants to determine the owning team. + */ +native tfc_get_user_goalitem(index, &team); + +/* Returns 1 if the player is a spy and is currently feigning death */ +native tfc_is_user_feigning(index); + +/* Returns 1 if the two teams are allies, 0 otherwise + * Note: Team must be 1->4 + * Team 0 will always return 0 + * Any other team will result in an error + */ +native tfc_is_team_ally(TeamA,TeamB); diff --git a/bin/compiler/include/time.inc b/bin/compiler/include/time.inc new file mode 100644 index 0000000..34b91f6 --- /dev/null +++ b/bin/compiler/include/time.inc @@ -0,0 +1,100 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Time Specific Functions +// + +#if defined _time_included + #endinput +#endif +#define _time_included + +/* Time unit types for get_time_length() */ +enum +{ + timeunit_seconds = 0, + timeunit_minutes, + timeunit_hours, + timeunit_days, + timeunit_weeks, +}; + +/* Seconds in each time unit */ +#define SECONDS_IN_MINUTE 60 +#define SECONDS_IN_HOUR 3600 +#define SECONDS_IN_DAY 86400 +#define SECONDS_IN_WEEK 604800 + +/** + * Stock by Brad. + * + * @note You must add register_dictionary("time.txt") in plugin_init() + * + * @param id The player whose language the length should be translated to + * @param unitCnt The number of time units you want translated into verbose text + * @param type The type of unit (i.e. seconds, minutes, hours, days, weeks) that you are passing in + * @param output The variable you want the verbose text to be placed in + * @param outputLen The length of the output variable + * + * @noreturn + */ +stock get_time_length(id, unitCnt, type, output[], outputLen) +{ + if (unitCnt > 0) + { + // determine the number of each time unit there are + new weekCnt = 0, dayCnt = 0, hourCnt = 0, minuteCnt = 0, secondCnt = 0; + + switch (type) + { + case timeunit_seconds: secondCnt = unitCnt; + case timeunit_minutes: secondCnt = unitCnt * SECONDS_IN_MINUTE; + case timeunit_hours: secondCnt = unitCnt * SECONDS_IN_HOUR; + case timeunit_days: secondCnt = unitCnt * SECONDS_IN_DAY; + case timeunit_weeks: secondCnt = unitCnt * SECONDS_IN_WEEK; + } + + weekCnt = secondCnt / SECONDS_IN_WEEK; + secondCnt -= (weekCnt * SECONDS_IN_WEEK); + + dayCnt = secondCnt / SECONDS_IN_DAY; + secondCnt -= (dayCnt * SECONDS_IN_DAY); + + hourCnt = secondCnt / SECONDS_IN_HOUR; + secondCnt -= (hourCnt * SECONDS_IN_HOUR); + + minuteCnt = secondCnt / SECONDS_IN_MINUTE; + secondCnt -= (minuteCnt * SECONDS_IN_MINUTE); + + // translate the unit counts into verbose text + new maxElementIdx = -1; + new timeElement[5][33]; + + if (weekCnt > 0) + format(timeElement[++maxElementIdx], charsmax(timeElement[]), "%i %L", weekCnt, id, (weekCnt == 1) ? "TIME_ELEMENT_WEEK" : "TIME_ELEMENT_WEEKS"); + if (dayCnt > 0) + format(timeElement[++maxElementIdx], charsmax(timeElement[]), "%i %L", dayCnt, id, (dayCnt == 1) ? "TIME_ELEMENT_DAY" : "TIME_ELEMENT_DAYS"); + if (hourCnt > 0) + format(timeElement[++maxElementIdx], charsmax(timeElement[]), "%i %L", hourCnt, id, (hourCnt == 1) ? "TIME_ELEMENT_HOUR" : "TIME_ELEMENT_HOURS"); + if (minuteCnt > 0) + format(timeElement[++maxElementIdx], charsmax(timeElement[]), "%i %L", minuteCnt, id, (minuteCnt == 1) ? "TIME_ELEMENT_MINUTE" : "TIME_ELEMENT_MINUTES"); + if (secondCnt > 0) + format(timeElement[++maxElementIdx], charsmax(timeElement[]), "%i %L", secondCnt, id, (secondCnt == 1) ? "TIME_ELEMENT_SECOND" : "TIME_ELEMENT_SECONDS"); + + switch(maxElementIdx) + { + case 0: formatex(output, outputLen, "%s", timeElement[0]); + case 1: formatex(output, outputLen, "%s %L %s", timeElement[0], id, "TIME_ELEMENT_AND", timeElement[1]); + case 2: formatex(output, outputLen, "%s, %s %L %s", timeElement[0], timeElement[1], id, "TIME_ELEMENT_AND", timeElement[2]); + case 3: formatex(output, outputLen, "%s, %s, %s %L %s", timeElement[0], timeElement[1], timeElement[2], id, "TIME_ELEMENT_AND", timeElement[3]); + case 4: formatex(output, outputLen, "%s, %s, %s, %s %L %s", timeElement[0], timeElement[1], timeElement[2], timeElement[3], id, "TIME_ELEMENT_AND", timeElement[4]); + } + } +} diff --git a/bin/compiler/include/tsconst.inc b/bin/compiler/include/tsconst.inc new file mode 100644 index 0000000..b41a2c5 --- /dev/null +++ b/bin/compiler/include/tsconst.inc @@ -0,0 +1,154 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// Copyright (C) 2005 Suzuka. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// TSFUN Constants +// + +#if defined _tsconst_included + #endinput +#endif +#define _tsconst_included + +#define TSMAX_WEAPONS 44 // 37 + throwing knife + brekable + 5 custom weapon slots + +#define TSPWUP_NONE 0 +#define TSPWUP_RANDOM 0 +#define TSPWUP_SLOWMO 1 +#define TSPWUP_INFAMMO 2 +#define TSPWUP_KUNGFU 4 +#define TSPWUP_SLOWPAUSE 8 +#define TSPWUP_DFIRERATE 16 +#define TSPWUP_GRENADE 32 +#define TSPWUP_HEALTH 64 +#define TSPWUP_ARMOR 128 +#define TSPWUP_SUPERJUMP 256 + +#define TSITEM_KUNGFU 1<<0 +#define TSITEM_SUPERJUMP 1<<1 + +#define TSKF_STUNTKILL 1<<0 +#define TSKF_SLIDINGKILL 1<<1 +#define TSKF_DOUBLEKILL 1<<2 +#define TSKF_ISSPEC 1<<3 +#define TSKF_KILLEDSPEC 1<<4 + +#define TSA_SILENCER 1 +#define TSA_LASERSIGHT 2 +#define TSA_FLASHLIGHT 4 +#define TSA_SCOPE 8 + +#define TSMSG_NORMAL 6 +#define TSMSG_WAITING 11 +#define TSMSG_DEAD 1 +#define TSMSG_KILLER 2 +#define TSMSG_DEMOLITION 3 +#define TSMSG_SPECIALIST 4 +#define TSMSG_UNSTOPPABLE 5 +#define TSMSG_THEONE 10 + +#define STUNT_NONE 0 +#define STUNT_DUCK 1 +#define STUNT_ROLL 2 +#define STUNT_DIVE 3 +#define STUNT_GETUP 4 +#define STUNT_FLIP 5 + +enum { + TSW_GLOCK18 = 1, + TSW_UNK1, + TSW_UZI, + TSW_M3, + TSW_M4A1, + TSW_MP5SD, + TSW_MP5K, + TSW_ABERETTAS, + TSW_MK23, + TSW_AMK23, + TSW_USAS, + TSW_DEAGLE, + TSW_AK47, + TSW_57, + TSW_AUG, + TSW_AUZI, + TSW_TMP, + TSW_M82A1, + TSW_MP7, + TSW_SPAS, + TSW_GCOLTS, + TSW_GLOCK20, + TSW_UMP, + TSW_M61GRENADE, + TSW_CKNIFE, + TSW_MOSSBERG, + TSW_M16A4, + TSW_MK1, + TSW_C4, + TSW_A57, + TSW_RBULL, + TSW_M60E3, + TSW_SAWED_OFF, + TSW_KATANA, + TSW_SKNIFE, + TSW_KUNG_FU, + TSW_TKNIFE, +}; + +/* +valid tsweaponid in TS_GiveWeapon + +1: "Glock 18" +3: "Mini Uzi" +4: "Benelli M3" +5: "M4A1" +6: "MP5SD" +7: "MP5K" +8: "Akimbo Berettas" +9: "Socom Mk23" +11: "Usas12" +12: "Desert Eagle" +13: "Ak47" +14: "FiveSeven" +15: "Steyr Aug" +17: "Steyr Tmp" +18: "Barrett M82" +19: "HK Pdw" +20: "Spas12" +21: "Akimbo colts" +22: "Glock 20" +23: "Mac10" +25: "Combat Knife" +26: "Mossberg 500" +27: "M16A4" +28: "Ruger Mk1" +24: "M61 Grenade" +29: "C4" +31: "Raging Bull" +32: "M60" +33: "Sawed off" +34: "Katana" +35: "Seal Knife" + +valid pwuptype in TS_GivePwUp + +0: "Random" +1: "Slow Motion" +2: "Infinite Clip" +4: "Kung Fu" +8: "Slow Pause" +16: "Double Firerate" +32: "Grenade" +64: "Health" +128: "Armor" +256: "Superjump" + +*/ + + diff --git a/bin/compiler/include/tsfun.inc b/bin/compiler/include/tsfun.inc new file mode 100644 index 0000000..c224275 --- /dev/null +++ b/bin/compiler/include/tsfun.inc @@ -0,0 +1,198 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// TSFUN Functions +// + +#if defined _tsxfun_included + #endinput +#endif +#define _tsxfun_included + +#include +#include + +/************* Shared Natives Start ********************************/ + +/* Forward types */ +enum { + XMF_DAMAGE = 0, + XMF_DEATH, +}; + +#pragma reqlib tsfun +#if !defined AMXMODX_NOAUTOLOAD + #pragma loadlib tsfun +#endif + +/************* Shared Natives End ********************************/ + +/* Function is called just before a kung foo attack is done, + * damage and time length may be altered with natives. + * Return PLUGIN_HANDLED to stop attack. + * UNAVAILABLE IN 1.70 + */ +forward Melee_Attack(id,Float:time,Float:damage,UNAVAILABLE); + + +// Returns when someone stunts, after they do it. +//UNAVAILABLE IN 1.70 +forward client_stunt(id,stunttype,UNAVAILABLE); + +/* Function is called when powerups are ran, + * Returns value of powerup. Use TSPWUP_*'s + * to find exactly which one it is. + * UNAVAILABLE IN 1.70 + */ +forward client_powerup(id,powerup,UNAVAILABLE); + +/* weapon logname to weapon name convertion */ +native ts_wpnlogtoname(const logname[],name[],len); + +/* weapon logname to weapon index convertion */ +native ts_wpnlogtoid(const logname[]); + +//UNAVAILABLE IN 1.70 +//native Float:ts_getusertime( index ); //! +//native ts_setusertime( index, Float:time ); //! + +native ts_getusercash( index ); +native ts_setusercash( index, money ); + +native ts_getuserslots( index ); +native ts_setuserslots( index, slots ); + +native ts_getuserstate( index ); +native ts_getuserwpn( index,&clip=0,&ammo=0,&mode=0,&extra=0 ); +native ts_getuserspace( index ); + +native ts_getuserkillflags(killer); +native ts_getkillingstreak( index ); +native ts_getuserlastfrag( index ); + +native ts_giveweapon( index,weapon,clips,extra ); + +native ts_getuserpwup( index ); + +stock ts_has_slowmo(id) { + return (ts_getuserpwup(id) &TSPWUP_SLOWMO); +} + +stock ts_has_infammo(id) { + return (ts_getuserpwup(id) &TSPWUP_INFAMMO); +} + +stock ts_has_slowpause(id) { + return (ts_getuserpwup(id) &TSPWUP_SLOWPAUSE); +} + +stock ts_has_dfirerate(id) { + return (ts_getuserpwup(id) &TSPWUP_DFIRERATE); +} + +stock ts_has_grenade(id) { + return (ts_getuserpwup(id) &TSPWUP_GRENADE); +} + +stock ts_has_health(id) { + return (ts_getuserpwup(id) &TSPWUP_HEALTH); +} + +stock ts_has_armor(id) { + return (ts_getuserpwup(id) &TSPWUP_ARMOR); +} + +/* Function will create pwup entity and return its index (pwupent) */ +native ts_createpwup( pwup ); + +native ts_givepwup( index,pwupent ); + +native ts_setpddata( knifeoffset ); + +// Alters a fu attack. Use with fu forward +// UNAVAILABLE IN 1.70 +// native ts_set_fuattack(id,Float:time,Float:damage); //! + +// Changes board message +native ts_set_message(id,message); + +// Gets the message board message +native ts_get_message(id); + +stock ts_is_normal(id) +{ + new msg = ts_get_message(id); + if( (msg > 11) || (msg > 6 && msg < 10) ) return 1; + return 0; +} + +stock ts_is_waiting(id) { + return (ts_get_message(id) == TSMSG_WAITING); +} + +stock ts_is_dead(id) { + return (ts_get_message(id) == TSMSG_DEAD); +} + +stock ts_is_killer(id) { + return (ts_get_message(id) == TSMSG_KILLER); +} + +stock ts_is_demolition(id) { + return (ts_get_message(id) == TSMSG_DEMOLITION); +} + +stock ts_is_specialist(id) { + return (ts_get_message(id) == TSMSG_SPECIALIST); +} + +stock ts_is_unstoppable(id) { + return (ts_get_message(id) == TSMSG_UNSTOPPABLE); +} + +stock ts_is_theone(id) { + return (ts_get_message(id) == TSMSG_THEONE); +} + +// Return one on true, 0 on false +// UNAVAILABLE IN 1.70 +native ts_has_superjump(id); //! +native ts_has_fupowerup(id); //! +native ts_is_in_slowmo(id); + +// Get and set consecutive frags +//UNAVAILABLE IN 1.70 +//native ts_get_cons_frags(id); +//native ts_set_cons_frags(id,num); + +// Set to see cool bullet trails. Only id will see them. +native ts_set_bullettrail(id,yesorno); + +// Sets fake versions of slow mo and slow pause. Use ts_set_speed for more options. +native ts_set_fakeslowmo(id,Float:time); +native ts_set_fakeslowpause(id,Float:time); + +/* Sets speed artificially. 1.0 is default, Go into fractions and decimals for slower +* and put in higher numbers for higher speeds. Aura is how far things around you are effected +* Time is the time until it wears off. 0.0 for speed will freeze people. Do not use negatives. */ + +native ts_set_speed(id,Float:speed,Float:auradist,Float:time); + +/* Sets physics speed artificially. Things like sparks and sounds will be effected. +* Any negative number will render all physics paused. */ +native ts_set_physics_speed(id,Float:speed); + +// Returns 0 if no powerup is running. Returns the powerup type otherwise. +native ts_is_running_powerup(id); + +// Highly experimental command which overrides powerup types. +// Use if a powerup is already running, or if a powerup is not running. +// Safe to use in powerup forward. +native ts_force_run_powerup(id,PWUP_TYPE); diff --git a/bin/compiler/include/tsstats.inc b/bin/compiler/include/tsstats.inc new file mode 100644 index 0000000..dd2ba60 --- /dev/null +++ b/bin/compiler/include/tsstats.inc @@ -0,0 +1,65 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// TSX Stats Functions +// + +#if defined _tsstats_included + #endinput +#endif +#define _tsstats_included + +/* Gets stats from given weapon index. If wpnindex is 0 +* then the stats are from all weapons. If weapon has not been used function +* returns 0 in other case 1. Fields in stats are: +* 0 - kills +* 1 - deaths +* 2 - headshots +* 3 - teamkilling +* 4 - shots +* 5 - hits +* 6 - damage +* For body hits fields see amxconst.inc. */ +native get_user_wstats(index,wpnindex,stats[STATSX_MAX_STATS],bodyhits[MAX_BODYHITS]); + +/* Gets round stats from given weapon index.*/ +native get_user_wrstats(index,wpnindex,stats[STATSX_MAX_STATS],bodyhits[MAX_BODYHITS]); + +/* Gets life (from spawn to spawn) stats from given weapon index.*/ +native get_user_wlstats(index,wpnindex,stats[STATSX_MAX_STATS],bodyhits[MAX_BODYHITS]); + +/* Gets overall stats which are stored in file on server +* and updated on every respawn or user disconnect. +* Function returns the position in stats by diff. kills to deaths. */ +native get_user_stats(index,stats[STATSX_MAX_STATS],bodyhits[MAX_BODYHITS]); + +/* Gets round stats of player. */ +native get_user_rstats(index,stats[STATSX_MAX_STATS],bodyhits[MAX_BODYHITS]); + +/* Gets stats with which user have killed/hurt his victim. If victim is 0 +* then stats are from all victims. If victim has not been hurt, function +* returns 0 in other case 1. User stats are reset on his respawn. */ +native get_user_vstats(index,victim,stats[STATSX_MAX_STATS],bodyhits[MAX_BODYHITS],wpnname[]="",len=0); + +/* Gets stats with which user have been killed/hurt. If killer is 0 +* then stats are from all attacks. If killer has not hurt user, function +* returns 0 in other case 1. User stats are reset on his respawn. */ +native get_user_astats(index,wpnindex,stats[STATSX_MAX_STATS],bodyhits[MAX_BODYHITS],wpnname[]="",len=0); + +/* Resets life, weapon, victims and attackers user stats. */ +native reset_user_wstats(index); + +/* Gets overall stats which stored in stats.dat file in amx folder +* and updated on every mapchange or user disconnect. +* Function returns next index of stats entry or 0 if no more exists. */ +native get_stats(index,stats[STATSX_MAX_STATS],bodyhits[MAX_BODYHITS],name[],len); + +/* Returns number of all entries in stats. */ +native get_statsnum(); diff --git a/bin/compiler/include/tsx.inc b/bin/compiler/include/tsx.inc new file mode 100644 index 0000000..e9592af --- /dev/null +++ b/bin/compiler/include/tsx.inc @@ -0,0 +1,88 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// TSX Functions +// + +#if defined _tsx_included + #endinput +#endif +#define _tsx_included + +#include + +#pragma reqclass xstats +#if !defined AMXMODX_NOAUTOLOAD + #pragma defclasslib xstats tsx +#endif + +/************* Shared Natives Start ********************************/ + +/* Forward types */ +enum { + XMF_DAMAGE = 0, + XMF_DEATH, +}; + +/* Use this function to register forwards + * DEPRECATED + */ +native register_statsfwd( ftype ); + +/* Function is called after player to player attacks , +* if players were damaged by teammate TA is set to 1 */ +forward client_damage(attacker,victim,damage,wpnindex,hitplace,TA); + +/* Function is called after player death , +* if player was killed by teammate TK is set to 1 */ +forward client_death(killer,victim,wpnindex,hitplace,TK); + +/* Custom Weapon Support */ +/* function will return index of new weapon */ +native custom_weapon_add( const wpnname[],melee = 0,const logname[]="" ); +/* Function will pass damage done by this custom weapon to stats module and other plugins */ +native custom_weapon_dmg( weapon, att, vic, damage, hitplace=0 ); +/* Function will pass info about custom weapon shot to stats module */ +native custom_weapon_shot( weapon,index ); // weapon id , player id + +/* function will return 1 if true */ +native xmod_is_melee_wpn(wpnindex); + +/* Returns weapon name. */ +native xmod_get_wpnname(wpnindex,name[],len); + +/* Returns weapon logname. */ +native xmod_get_wpnlogname(wpnindex,name[],len); + +/* Returns weapons array size */ +native xmod_get_maxweapons(); + +/* Returns stats array size ex. 8 in TS , 9 in DoD */ +native xmod_get_stats_size(); + +/* Returns 1 if true */ +native xmod_is_custom_wpn(wpnindex); + +/************* Shared Natives End ********************************/ + +/* Spawns a Weapon */ +stock ts_weaponspawn(const weaponid[], const duration[], const extraclip[], const spawnflags[], const Float:Origin[3]) +{ + new ent = create_entity("ts_groundweapon"); + + DispatchKeyValue(ent, "tsweaponid", weaponid); + DispatchKeyValue(ent, "wduration", duration); + DispatchKeyValue(ent, "wextraclip", extraclip); + DispatchKeyValue(ent, "spawnflags", spawnflags); + DispatchSpawn(ent); + + entity_set_origin(ent, Origin); + return PLUGIN_HANDLED; +} diff --git a/bin/compiler/include/unixtime.inc b/bin/compiler/include/unixtime.inc new file mode 100644 index 0000000..a406f97 --- /dev/null +++ b/bin/compiler/include/unixtime.inc @@ -0,0 +1,258 @@ + +/* + Unix Time Conversion + by bugsy + v0.3 + + http://forums.alliedmods.net/showthread.php?t=91915 + + TimeZone data: http://www.epochconverter.com/epoch/timezones.php +*/ + +#if defined _file_unixtime_included + #endinput +#endif +#define _file_unixtime_included + +stock const YearSeconds[2] = +{ + 31536000, //Normal year + 31622400 //Leap year +}; + +stock const MonthSeconds[12] = +{ + 2678400, //January 31 + 2419200, //February 28 + 2678400, //March 31 + 2592000, //April 30 + 2678400, //May 31 + 2592000, //June 30 + 2678400, //July 31 + 2678400, //August 31 + 2592000, //September 30 + 2678400, //October 31 + 2592000, //November 30 + 2678400 //December 31 +}; + +enum TimeZones +{ + UT_TIMEZONE_SERVER, + UT_TIMEZONE_MIT, + UT_TIMEZONE_HAST, + UT_TIMEZONE_AKST, + UT_TIMEZONE_AKDT, + UT_TIMEZONE_PST, + UT_TIMEZONE_PDT, + UT_TIMEZONE_MST, + UT_TIMEZONE_MDT, + UT_TIMEZONE_CST, + UT_TIMEZONE_CDT, + UT_TIMEZONE_EST, + UT_TIMEZONE_EDT, + UT_TIMEZONE_PRT, + UT_TIMEZONE_CNT, + UT_TIMEZONE_AGT, + UT_TIMEZONE_BET, + UT_TIMEZONE_CAT, + UT_TIMEZONE_UTC, + UT_TIMEZONE_WET, + UT_TIMEZONE_WEST, + UT_TIMEZONE_CET, + UT_TIMEZONE_CEST, + UT_TIMEZONE_EET, + UT_TIMEZONE_EEST, + UT_TIMEZONE_ART, + UT_TIMEZONE_EAT, + UT_TIMEZONE_MET, + UT_TIMEZONE_NET, + UT_TIMEZONE_PLT, + UT_TIMEZONE_IST, + UT_TIMEZONE_BST, + UT_TIMEZONE_ICT, + UT_TIMEZONE_CTT, + UT_TIMEZONE_AWST, + UT_TIMEZONE_JST, + UT_TIMEZONE_ACST, + UT_TIMEZONE_AEST, + UT_TIMEZONE_SST, + UT_TIMEZONE_NZST, + UT_TIMEZONE_NZDT +} + +stock const TimeZoneOffset[ TimeZones ] = +{ + -1, + -39600, + -36000, + -32400, + -28800, + -28800, + -25200, + -25200, + -21600, + -21600, + -18000, + -18000, + -14400, + -14400, + -12600, + -10800, + -10800, + -3600, + 0, + 0, + 3600, + 3600, + 7200, + 7200, + 10800, + 7200, + 10800, + 12600, + 14400, + 18000, + 19800, + 21600, + 25200, + 28800, + 28800, + 32400, + 34200, + 36000, + 39600, + 43200, + 46800 +}; + +stock TimeZones:TimeZone; +stock const DaySeconds = 86400; +stock const HourSeconds = 3600; +stock const MinuteSeconds = 60; + +stock UnixToTime( iTimeStamp , &iYear , &iMonth , &iDay , &iHour , &iMinute , &iSecond , TimeZones:tzTimeZone=UT_TIMEZONE_UTC ) +{ + new iTemp; + + iYear = 1970; + iMonth = 1; + iDay = 1; + iHour = 0; + + if ( tzTimeZone == UT_TIMEZONE_SERVER ) + tzTimeZone = GetTimeZone(); + + iTimeStamp += TimeZoneOffset[ tzTimeZone ]; + + while ( iTimeStamp > 0 ) + { + iTemp = IsLeapYear(iYear); + + if ( ( iTimeStamp - YearSeconds[iTemp] ) >= 0 ) + { + iTimeStamp -= YearSeconds[iTemp]; + iYear++; + } + else + { + break; + } + } + + while ( iTimeStamp > 0 ) + { + iTemp = SecondsInMonth( iYear , iMonth ); + + if ( ( iTimeStamp - iTemp ) >= 0 ) + { + iTimeStamp -= iTemp; + iMonth++; + } + else + { + break; + } + } + + while ( iTimeStamp > 0) + { + if ( ( iTimeStamp - DaySeconds ) >= 0 ) + { + iTimeStamp -= DaySeconds; + iDay++; + } + else + { + break; + } + } + + while ( iTimeStamp > 0 ) + { + if ( ( iTimeStamp - HourSeconds ) >= 0 ) + { + iTimeStamp -= HourSeconds; + iHour++; + } + else + { + break; + } + } + + iMinute = ( iTimeStamp / 60 ); + iSecond = ( iTimeStamp % 60 ); +} + +stock TimeToUnix( const iYear , const iMonth , const iDay , const iHour , const iMinute , const iSecond , TimeZones:tzTimeZone=UT_TIMEZONE_UTC) +{ + new i , iTimeStamp; + + for ( i = 1970 ; i < iYear ; i++ ) + iTimeStamp += YearSeconds[ IsLeapYear(i) ]; + + for ( i = 1 ; i < iMonth ; i++ ) + iTimeStamp += SecondsInMonth( iYear , i ); + + iTimeStamp += ( ( iDay - 1 ) * DaySeconds ); + iTimeStamp += ( iHour * HourSeconds ); + iTimeStamp += ( iMinute * MinuteSeconds ); + iTimeStamp += iSecond; + + if ( tzTimeZone == UT_TIMEZONE_SERVER ) + tzTimeZone = GetTimeZone(); + + return ( iTimeStamp + TimeZoneOffset[ tzTimeZone ] ); +} + +stock TimeZones:GetTimeZone() +{ + if ( TimeZone ) + return TimeZone; + + new TimeZones:iZone , iOffset , iTime , iYear , iMonth , iDay , iHour , iMinute , iSecond; + date( iYear , iMonth , iDay ); + time( iHour , iMinute , iSecond ); + + iTime = TimeToUnix( iYear , iMonth , iDay , iHour , iMinute , iSecond , UT_TIMEZONE_UTC ); + iOffset = iTime - get_systime(); + + for ( iZone = TimeZones:0 ; iZone < TimeZones ; iZone++ ) + { + if ( iOffset == TimeZoneOffset[ iZone ] ) + break; + } + + return ( TimeZone = iZone ); +} + +stock SecondsInMonth( const iYear , const iMonth ) +{ + return ( ( IsLeapYear( iYear ) && ( iMonth == 2 ) ) ? ( MonthSeconds[iMonth - 1] + DaySeconds ) : MonthSeconds[iMonth - 1] ); +} + +stock IsLeapYear( const iYear ) +{ + return ( ( (iYear % 4) == 0) && ( ( (iYear % 100) != 0) || ( (iYear % 400) == 0 ) ) ); +} diff --git a/bin/compiler/include/vault.inc b/bin/compiler/include/vault.inc new file mode 100644 index 0000000..9982dfb --- /dev/null +++ b/bin/compiler/include/vault.inc @@ -0,0 +1,60 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Vault Functions +// + +#if defined _vault_included + #endinput +#endif +#define _vault_included + + /** + * Reads data from a given key. + * + * + * @param key Key to get the value from + * @param data Buffer to copy the value to + * @param len Buffer size. If len is set to 0 then the function will + * return the value as a number + * + * @return If len is not 0 the function will return the number of characters written. + If len is 0 the function will return the numerical value associated with the key. + */ +native get_vaultdata(const key[], data[] = "", len = 0); + + +/** + * Sets data for a given key. + * + * @param key Key to set the value for + * @param data Data to set for the given key + * + * @noreturn + */ +native set_vaultdata(const key[], const data[] = ""); + +/** + * Removes a key and its data from the vault. + * + * @param key Key to remove + * + * @noreturn + */ +native remove_vaultdata(const key[]); + +/** + * Checks if a key exists in the vault. + * + * @param key Key to check + * + * @return 1 if an entry was found, 0 otherwise. + */ +native vaultdata_exists(const key[]); diff --git a/bin/compiler/include/vector.inc b/bin/compiler/include/vector.inc new file mode 100644 index 0000000..ee76429 --- /dev/null +++ b/bin/compiler/include/vector.inc @@ -0,0 +1,131 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Vector Functions +// + +#if defined _corevector_included + #endinput +#endif +#define _corevector_included + +/** + * Used for angle_vector() + */ +#define ANGLEVECTOR_FORWARD 1 +#define ANGLEVECTOR_RIGHT 2 +#define ANGLEVECTOR_UP 3 + +/** + * Calculates the distance between two input vectors. + * + * @param origin1 The first vector + * @param origin2 The second vector + * + * @return The distance between two input vectors + */ +native get_distance(const origin1[3], const origin2[3]); + +/** + * Calculates the distance between two input float vectors. + * + * @param origin1 The first vector + * @param origin2 The second vector + * + * @return The distance between two input vectors + */ +native Float:get_distance_f(const Float:Origin1[3], const Float:Origin2[3]); + +/** + * Calculates velocity in the direction player is looking. + * + * @param iIndex Client index + * @param iVelocity Multiply vRetValue length by this much + * @param vRetValue Store the calculated velocity in this vector. + * + * @noreturn + * @error If client is not connected or client index is not + * within the range of 1 to MaxClients. + */ +native velocity_by_aim(iIndex, iVelocity, Float:vRetValue[3]); + +/** + * Changes a vector into an angle vector. + * + * @param fVector Input vector + * @param vReturn Output angle vector + * + * @noreturn + */ +native vector_to_angle(const Float:fVector[3], Float:vReturn[3]); + +/** + * Changes an angle vector into a vector. + * + * @param vector Input angle vector + * @param FRU One of the ANGLEVECTOR_* constants + * @param ret Output vector + * + * @noreturn + */ +native angle_vector(const Float:vector[3], FRU, Float:ret[3]); + +/** + * Calculates the length of a vector. + * + * @param vVector Input vector + * + * @return Length of the input vector + */ +native Float:vector_length(const Float:vVector[3]); + +/** + * Calculates the distance between two vectors. + * + * @param vVector The first vector + * @param vVector2 The second vector + * + * @return Distance between two input vectors + */ +native Float:vector_distance(const Float:vVector[3], const Float:vVector2[3]); + +/** + * Converts an integer vector to a floating point vector. + * + * @param IVec Input integer vector + * @param FVec Output float vector + * + * @noreturn + */ +stock IVecFVec(const IVec[3], Float:FVec[3]) +{ + FVec[0] = float(IVec[0]); + FVec[1] = float(IVec[1]); + FVec[2] = float(IVec[2]); + + return 1; +} + +/** + * Converts a floating point vector into an integer vector. + * + * @param FVec Input float vector + * @param IVec Output integer vector + * + * @noreturn + */ +stock FVecIVec(const Float:FVec[3], IVec[3]) +{ + IVec[0] = floatround(FVec[0]); + IVec[1] = floatround(FVec[1]); + IVec[2] = floatround(FVec[2]); + + return 1; +} diff --git a/bin/compiler/include/xs.inc b/bin/compiler/include/xs.inc new file mode 100644 index 0000000..6c4e9b1 --- /dev/null +++ b/bin/compiler/include/xs.inc @@ -0,0 +1,1539 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// Copyright (C) 2004 Pavol "PM" Marko +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +/** + * XS Library + * Version 0.1 + * + * MACROS THAT YOU CAN DEFINE BEFORE INCLUDING XS.INC: + * XS_FLEQ_TOLERANCE: + * Tolerance that is used for XS_FLEQ float nearly-equal comparisions + * DEFAULT: 0.000005 + * XS_DEBUG + * Turn debug logging on + * DEFAULT: 0 + * XS_LOGBUFFER_SIZE + * Buffer size for logging + * DEFAULT: 512 + * XS_TASK_MAXPARAMS + * Maximal parameter count for managed tasks + * DEFAULT: 8 + * XS_TASK_MAXPARAMSIZE + * Maximal size of string parameter for tasks + * Has to be power of 2 and has to be >= 8 + * DEFAULT: 512 + * XS_TASK_MANAGEDIDS + * Number of managed IDs for tasks. + * DEFAULT: 2048 + * XS_REPLACEBUF_SIZE + * DEFAULT: 3072 + * + * NOTES: + * On AMX, VexdUM is required for some math functions + * xs__ / XS__ (2 underscores) stuff is meant to be intern + * untested: never tested + * half-tested: succesfully used in other applications; not extensively tested in xs though + * tested: fully tested + * If you have any useful functions / ideas for functions, please tell me. +*/ + +#if defined _xs_included + #endinput +#endif +#define _xs_included + +// **** CONFIG CHECK + +#if !defined XS_FLEQ_TOLERANCE + #define XS_FLEQ_TOLERANCE 0.000005 +#endif + +#if !defined XS_DEBUG + #define XS_DEBUG 0 +#endif + +#if !defined XS_LOGBUFFER_SIZE + #define XS_LOGBUFFER_SIZE 512 +#endif + +#if !defined XS_TASK_MAXPARAMS + #define XS_TASK_MAXPARAMS 8 +#endif + +#if !defined XS_TASK_MAXPARAMSIZE + #define XS_TASK_MAXPARAMSIZE 512 +#endif + +#if !defined XS_TASK_MANAGEDIDS + #define XS_TASK_MANAGEDIDS 2048 +#endif + +#if !defined XS_REPLACEBUF_SIZE + #define XS_REPLACEBUF_SIZE 3072 +#endif + + +/****** DEBUGGING / LOGING FUNCTIONS ******/ +enum xs_logtypes +{ + xs_debug, + xs_message, + xs_warning, + xs_error, + xs_fatalerror, + xs__assertionfailed, + + // must come last + xs_logtypes_count +} + +stock const xs__logtypenames[xs_logtypes_count][] = {"DEBUG", "", "WARNING", "ERROR", "FATAL ERROR", "DEBUG ASSERTION FAILED"}; + +// tested +stock xs_log(xs_logtypes:logtype, any:...) +{ + // WARNING: Don't try to use assert in here; it uses this func + + // Don't log debug if not in debug mode + #if !XS_DEBUG + if (logtype == xs_debug) + return; + #endif + + new buffer[XS_LOGBUFFER_SIZE+1]; + buffer[XS_LOGBUFFER_SIZE]=0; + format_args(buffer, XS_LOGBUFFER_SIZE, 1 /* go from SECOND argument*/); + new bool:addLogTypeName = strlen(xs__logtypenames[logtype]) ? true : false; + + // Use AMXX's logging system + log_amx("%s%s%s", addLogTypeName ? xs__logtypenames[logtype] : "", + addLogTypeName ? ": " : "", buffer); +} + +// Assertion +// tested +stock xs_assertfunc(any:exp, const desc[]) +{ + // Check exp + if (exp) + return 1; // ok + + // not ok + + // print info + xs_log(xs__assertionfailed, "%s", desc); + + return 0; +} +#define xs_assert(%1,%2) if (!xs_assertfunc(%1,%2)) xs__global_null /= xs__global_null + + +// Assertion; only in debug mode +// untested; logical flow says it should work +#if XS_DEBUG + #define xs_assert_dbg(%1,%2) if (!xs_assertfunc(%1,%2)) xs__global_null /= xs__global_null +#else + #define xs_assert_dbg(%1,%2) +#endif + +new xs__global_null = 0; + +/****** MATH FUNCTIONS ******/ + +/****** BASIC STUFF ******/ + +/** + * Gets the sign of a value. + * + * @param num Number to get the sign from. + * + * @return -1 if the number is negative, + * 0 if the number is equal to 0, + * 1 if the number is positive. + */ +stock xs_sign(num) +{ + return (num < 0) ? -1 : ((num == 0) ? 0 : 1); +} + +/** + * Gets the sign of a float value. + * + * @param num Number to get the sign from. + * + * @return -1 if the number is negative, + * 0 if the number is equal to 0, + * 1 if the number is positive. + */ +stock xs_fsign(Float:num) +{ + return (num < 0.0) ? -1 : ((num == 0.0) ? 0 : 1); +} + +/** + * Gets the absolute value of a number. + * + * @param num Number to get the absolute value from. + * + * @return Absolute value of the input number. + */ +stock xs_abs(num) +{ + return (num < 0) ? -num : num; +} + +/** + * Checks if the number is a power of 2. + * + * @param x Number to check. + * + * @return 1 if it is a power of 2, 0 otherwise. + */ +stock xs_is_2power(x) +{ + return (x!=0) && ((x&(x-1))==0); +} + +/** + * Converts degrees to radians. + * + * @param x Input degrees. + * + * @return Degrees converted to radians. + */ +stock Float:xs_deg2rad(Float:x) +{ + return x * 0.017453292519943; +} + +/** + * Converts radians to degrees. + * + * @param x Input radians. + * + * @return Radians converted to degrees. + */ +stock Float:xs_rad2deg(Float:x) +{ + return x * 57.29577951308232; +} + +/** + * Converts gradians to radians. + * + * @param x Input gradians. + * + * @return Gradians converted to radians. + */ +stock Float:xs_gra2rad(Float:x) +{ + return x * 0.015707963267948; +} + +/** + * Converts radians to gradians. + * + * @param x Input radians. + * + * @return Radians converted to gradians. + */ +stock Float:xs_rad2gra(Float:x) +{ + return x * 63.66197723675813; +} + +/** + * Checks if two floating point values are nearly equal. + * + * @param %1 The first value to compare. + * @param %2 The second value to compare. + * + * @return 1 if they are nearly equal, 0 otherwise. + */ +#define XS_FLEQ(%1,%2) (((%1) <= ((%2) + XS_FLEQ_TOLERANCE)) && ((%1) >= ((%2) - XS_FLEQ_TOLERANCE))) + +/** + * Calculates the reciprocal of the square root of the input value. + * + * @param x The input value. + * + * @return The reciprocal of the square root of the input value. + */ +stock Float:xs_rsqrt(Float:x) +{ + return 1.0 / floatsqroot(x); +} + +/** + * Calculates the square root of the input value. + * + * @note This is an alias for floatsqroot(). + * + * @param x The input value. + * + * @return The square root of the input value. + */ +stock Float:xs_sqrt(Float:x) +{ + return floatsqroot(x); +} + +// These functions generate errors if you use the macros with wrong parameter count. +stock Float:xs_fabs(Float:pa) +{ + #pragma unused pa + new rawr = you_need_one_param_for_fabs; + rawr = warning_below_shows_line_number; + #pragma unused rawr +} +stock Float:xs_asin(Float:pa,Float:pb) +{ + #pragma unused pa,pb + new rawr = you_need_two_params_for_asin; + rawr = warning_below_shows_line_number; + #pragma unused rawr +} +stock Float:xs_sin(Float:pa,Float:pb) +{ + #pragma unused pa,pb + new rawr = you_need_two_params_for_sin; + #pragma unused rawr +} +stock Float:xs_acos(Float:pa,Float:pb) +{ + #pragma unused pa,pb + new rawr = you_need_two_params_for_acos; + rawr = warning_below_shows_line_number; + #pragma unused rawr +} +stock Float:xs_cos(Float:pa,Float:pb) +{ + #pragma unused pa,pb + new rawr = you_need_two_params_for_cos; + rawr = warning_below_shows_line_number; + #pragma unused rawr +} +stock Float:xs_atan(Float:pa,Float:pb) +{ + #pragma unused pa,pb + new rawr = you_need_two_params_for_atan; + rawr = warning_below_shows_line_number; + #pragma unused rawr +} +stock Float:xs_atan2(Float:pa,Float:pb) +{ + #pragma unused pa,pb + new rawr = you_need_two_params_for_atan2; + rawr = warning_below_shows_line_number; + #pragma unused rawr +} +stock Float:xs_tan(Float:pa, Float:pb) +{ + #pragma unused pa,pb + new rawr = you_need_two_params_for_tan; + rawr = warning_below_shows_line_number; + #pragma unused rawr +} + +#define xs_fabs(%1) floatabs(%1) +#define xs_asin(%1,%2) floatasin(%1, %2) +#define xs_sin(%1,%2) floatsin(%1, %2) +#define xs_acos(%1,%2) floatacos(%1, %2) +#define xs_cos(%1,%2) floatcos(%1, %2) +#define xs_atan(%1,%2) floatatan(%1, %2) +#define xs_atan2(%1,%2) floatatan2(%1, %2) +#define xs_tan(%1,%2) floattan(%1, %2) + +/****** RANDOM NUMBERS ******/ +// This routine comes from the book "Inner Loops" by Rick Booth, Addison-Wesley +// (ISBN 0-201-47960-5). This is a "multiplicative congruential random number +// generator" that has been extended to 31-bits + +stock xs__internalseed=0x546875; + +#define XS__IL_RMULT 1103515245 + +/** + * Sets the seed for the random number generation. + * + * @param x The seed to set. + * + * @noreturn + */ +stock xs_seed(seed) +{ + xs__internalseed = seed; +} + +/** + * Retrieves a random integer. + * + * @return A random integer. + */ +stock xs_irand() +{ + new lo, hi, ll, lh, hh, hl; + new result; + + lo = xs__internalseed & 0xffff; + hi = xs__internalseed >> 16; + xs__internalseed = xs__internalseed * XS__IL_RMULT + 12345; + ll = lo * (XS__IL_RMULT & 0xffff); + lh = lo * (XS__IL_RMULT >> 16 ); + hl = hi * (XS__IL_RMULT & 0xffff); + hh = hi * (XS__IL_RMULT >> 16 ); + result = xs_abs(((ll + 12345) >> 16) + lh + hl + (hh << 16)); + return result; +} + +/** + * Retrieves a random float. + * + * @return A random float. + */ +stock Float:xs_frand() +{ + return float(xs_irand()) / float(xs_get_maxnum()); // -1/2 should be the biggest possible positive number +} + +/** + * Retrieves a random integer between the specified values. + * + * @note @pmax has to be greater than @pmin! + * + * @param pmin The minimum value. + * @param pmax The maximum value. + * + * @return A random integer. + */ +stock xs_irand_range(pmin, pmax) +{ + xs_assert_dbg(pmax - pmin >= 0, "xs_irand_range: pmin > pmax"); + new i = pmin + floatround(xs_frand() * float(pmax - pmin)); + if (i > pmax) + i = pmax; + return i; +} + +/****** VECTORS & PLANES ******/ + +// *** vectors + +/** + * Sets vector's components to specified values. + * + * @param vec The vector to set values to. + * @param x The X component to be set. + * @param y The Y component to be set. + * @param z The Z component to be set. + * + * @noreturn + */ +stock xs_vec_set(Float:vec[], Float:x, Float:y, Float:z) +{ + vec[0] = x; + vec[1] = y; + vec[2] = z; +} + +/** + * Adds two vectors. + * + * @param in1 The first vector to add. + * @param in2 The second vector to add. + * @param out The output vector. Can be one of the input vectors. + * + * @noreturn + */ +stock xs_vec_add(const Float:in1[], const Float:in2[], Float:out[]) +{ + out[0] = in1[0] + in2[0]; + out[1] = in1[1] + in2[1]; + out[2] = in1[2] + in2[2]; +} + +/** + * Subtracts one vector from another one. + * + * @param in1 Vector to subtract from. + * @param in2 Vector to subtract from the first one. + * @param out The output vector. Can be one of the input vectors. + * + * @noreturn + */ +stock xs_vec_sub(const Float:in1[], const Float:in2[], Float:out[]) +{ + out[0] = in1[0] - in2[0]; + out[1] = in1[1] - in2[1]; + out[2] = in1[2] - in2[2]; +} + +/** + * Adds the second vector scaled by a scalar to the first. + * + * @param in1 Vector to add to. + * @param in2 Vector to scale and add. + * @param scalar Scalar to scale the second vector with. + * @param out The output vector. Can be one of the input vectors. + * + * @noreturn + */ +stock xs_vec_add_scaled(const Float:in1[], const Float:in2[], Float:scalar, Float:out[]) +{ + out[0] = in1[0] + in2[0] * scalar; + out[1] = in1[1] + in2[1] * scalar; + out[2] = in1[2] + in2[2] * scalar; +} + +/** + * Subtracts the second vector scaled by a scalar from the first one. + * + * @param in1 Vector to subtract from. + * @param in2 Vector to scale and subtract. + * @param scalar Scalar to scale the second vector with. + * @param out The output vector. Can be one of the input vectors. + * + * @noreturn + */ +stock xs_vec_sub_scaled(const Float:in1[], const Float:in2[], Float:scalar, Float:out[]) +{ + out[0] = in1[0] - in2[0] * scalar; + out[1] = in1[1] - in2[1] * scalar; + out[2] = in1[2] - in2[2] * scalar; +} + +/** + * Checks if two vectors are equal. + * + * @note If you need to check if two vectors are nearly equal, + * take a look at xs_vec_nearlyequal(). + * + * @param vec1 The first input vector to check. + * @param vec2 The second input vector to check. + * + * @return 1 if vectors are equal, 0 otherwise. + */ +stock bool:xs_vec_equal(const Float:vec1[], const Float:vec2[]) +{ + return (vec1[0] == vec2[0]) && (vec1[1] == vec2[1]) && (vec1[2] == vec2[2]); +} + +/** + * Checks if two vectors are nearly equal. + * + * @note If you need to check if two vectors are exactly equal, + * take a look at xs_vec_equal(). + * + * @param vec1 The first input vector to check. + * @param vec2 The second input vector to check. + * + * @return 1 if vectors are equal, 0 otherwise. + */ +stock bool:xs_vec_nearlyequal(const Float:vec1[], const Float:vec2[]) +{ + return XS_FLEQ(vec1[0], vec2[0]) && XS_FLEQ(vec1[1], vec2[1]) && XS_FLEQ(vec1[2], vec2[2]); +} + +/** + * Multiply a vector by a scalar value. + * + * @param vec The vector to be multiplied. + * @param scalar The scalar value to multiply the vector with. + * @param out The output vector. Can be the same as the input vector. + * + * @noreturn + */ +stock xs_vec_mul_scalar(const Float:vec[], Float:scalar, Float:out[]) +{ + out[0] = vec[0] * scalar; + out[1] = vec[1] * scalar; + out[2] = vec[2] * scalar; +} + +/** + * Divide a vector by a scalar value. + * + * @param vec The vector to be divided. + * @param scalar The scalar value to divide the vector with. + * @param out The output vector. Can be the same as the input vector. + * + * @noreturn + */ +stock xs_vec_div_scalar(const Float:vec[], Float:scalar, Float:out[]) +{ + new Float:__tmp = 1.0 / scalar; + out[0] = vec[0] * __tmp; + out[1] = vec[1] * __tmp; + out[2] = vec[2] * __tmp; +} + +/** + * Computes the length of a vector. + * + * @param vec The vector to compute the length of. + * + * @return The length of the input vector. + */ +stock Float:xs_vec_len(const Float:vec[]) +{ + return xs_sqrt(vec[0]*vec[0] + vec[1]*vec[1] + vec[2]*vec[2]); +} + +/** + * Computes the length of a 2D vector. + * + * @param vec The vector to compute the length of. + * + * @return The length of the input vector. + */ +stock Float:xs_vec_len_2d(const Float:vec[]) +{ + return xs_sqrt(vec[0]*vec[0] + vec[1]*vec[1]); +} + +/** + * Computes the distance between two vectors (points). + * + * @param vec1 First vector. + * @param vec2 Second vector. + * + * @return The distance between two vectors. + */ +stock Float:xs_vec_distance(const Float:vec1[], const Float:vec2[]) +{ + return xs_sqrt((vec1[0]-vec2[0]) * (vec1[0]-vec2[0]) + + (vec1[1]-vec2[1]) * (vec1[1]-vec2[1]) + + (vec1[2]-vec2[2]) * (vec1[2]-vec2[2])); +} + +/** + * Computes the distance between two 2D vectors (points). + * + * @param vec1 First vector. + * @param vec2 Second vector. + * + * @return The distance between two vectors. + */ +stock Float:xs_vec_distance_2d(const Float:vec1[], const Float:vec2[]) +{ + return xs_sqrt((vec1[0]-vec2[0]) * (vec1[0]-vec2[0]) + + (vec1[1]-vec2[1]) * (vec1[1]-vec2[1])); +} + +/** + * Normalizes a vector. Normalized vector is a vector with the length of 1 unit, + * but with the same direction as the original vector. + * + * @param vec The vector to be normalized. + * @param out The output vector. Can be the same as the input vector. + * + * @noreturn + */ +stock xs_vec_normalize(const Float:vec[], Float:out[]) +{ + new Float:invlen = xs_rsqrt(vec[0]*vec[0] + vec[1]*vec[1] + vec[2]*vec[2]); + out[0] = vec[0] * invlen; + out[1] = vec[1] * invlen; + out[2] = vec[2] * invlen; +} + +/** + * Computes the cross product of two vectors. + * + * @param vec1 The first vector operand of the cross operation. + * @param vec2 The second vector operand of the cross operation. + * @param out The output vector. *Can't* be one of the input vectors. + * + * @noreturn + */ +stock xs_vec_cross(const Float:vec1[], const Float:vec2[], Float:out[]) +{ + out[0] = vec1[1]*vec2[2] - vec1[2]*vec2[1]; + out[1] = vec1[2]*vec2[0] - vec1[0]*vec2[2]; + out[2] = vec1[0]*vec2[1] - vec1[1]*vec2[0]; +} + +/** + * Computes the dot product of two vectors. + * + * @param vec1 The first vector operand of the dot operation. + * @param vec2 The second vector operand of the dot operation. + * + * @return The dot product of two input vectors. + */ +stock Float:xs_vec_dot(const Float:vec1[], const Float:vec2[]) +{ + return vec1[0]*vec2[0] + vec1[1]*vec2[1] + vec1[2]*vec2[2]; +} + +/** + * Negates a vector. + * + * @param vec The vector to negate. + * @param out The output vector. Can be the same as the input vector. + * + * @noreturn + */ +stock xs_vec_neg(const Float:vec[], Float:out[]) +{ + out[0] = -vec[0]; + out[1] = -vec[1]; + out[2] = -vec[2]; +} + +/** + * Copies a vector into another one. + * + * @param vecIn The vector to copy. + * @param vecOut The output vector where to copy the input vector. + * + * @noreturn + */ +stock xs_vec_copy(const Float:vecIn[], Float:vecOut[]) +{ + vecOut[0] = vecIn[0]; + vecOut[1] = vecIn[1]; + vecOut[2] = vecIn[2]; +} + +/** + * Computes the angle between two vectors. + * + * @param vec1 The first vector. + * @param vec2 The second vector. + * + * @return The angle between two input vectors in degrees. + */ +stock Float:xs_vec_angle(const Float:vec1[], const Float:vec2[]) +{ + return xs_rad2deg(xs_acos(xs_vec_dot(vec1, vec2), radian)); +} + +/** + * Reflects a vector about a normal. + * + * @param vec The vector to be reflected. + * @param normal The normal vector about which to reflect. + * @param out The output reflected vector. + * + * @noreturn + */ +stock xs_vec_reflect(const Float:vec[], const Float:normal[], Float:out[]) +{ + // normalize(vec) - (normal * 2.0 * (tmp . normal)) * length(vec) + + new Float:tmp1[3]; + xs_vec_normalize(vec, tmp1); + + // tmp1 - (normal * 2.0 * (tmp . normal)) * length(vec) + + new Float:tmp2[3]; + xs_vec_mul_scalar(normal, 2.0, tmp2); + xs_vec_mul_scalar(tmp2, xs_vec_dot(tmp1, normal), tmp2); + + // tmp1 - tmp2 * length(vec) + xs_vec_mul_scalar(tmp2, xs_vec_len(vec), tmp2); + + // tmp1 - tmp2 + xs_vec_sub(tmp1, tmp2, out); +} + +/** + * Turns a 3D vector into a 2D vector. + * + * @note This function just ignores the Z (3rd) component of a 3D vector. + * + * @param vec A 3D vector to turn into a 2D vector. + * @param out The output 2D vector. + * + * @noreturn + */ +stock xs_vec_make2d(const Float:vec[3], Float:out[2]) +{ + out[0] = vec[0]; + out[1] = vec[1]; +} + +// *** planes + +// normal +#define XS_PLANE_A 0 +#define XS_PLANE_B 1 +#define XS_PLANE_C 2 +// plane shift distance +#define XS_PLANE_D 3 + + +/** + * Sets a plane to the specified values. + * + * @param plane The plane to set the values to. It's a 4D vector. + * @param a The first component of a plane to be set. + * @param b The second component of a plane to be set. + * @param c The third component of a plane to be set. + * @param d The fouth component of a plane to be set. + * + * @noreturn + */ +stock xs_plane_set(Float:plane[], Float:a, Float:b, Float:c, Float:d) +{ + plane[XS_PLANE_A] = a; + plane[XS_PLANE_B] = b; + plane[XS_PLANE_C] = c; + plane[XS_PLANE_D] = d; +} + +/** + * Constructs a plane out of 4 points in space. + * + * @param plane The output plane to store the newly created plane. + * @param p1 The first point of a plane. + * @param p2 The second point of a plane. + * @param p3 The third point of a plane. + * + * @noreturn + */ +stock xs_plane_3p(Float:plane[], const Float:p1[], const Float:p2[], const Float:p3[]) +{ + new Float:normalA[3], Float:normalB[3]; + + // normalA = Normalize(p3 - p1); + normalA[0] = p3[0] - p1[0]; + normalA[1] = p3[1] - p1[1]; + normalA[2] = p3[2] - p1[2]; + xs_vec_normalize(normalA, normalA); + + // normalB = Normalize(p3 - p2); + normalB[0] = p3[0] - p2[0]; + normalB[1] = p3[1] - p2[1]; + normalB[2] = p3[2] - p2[2]; + xs_vec_normalize(normalB, normalB); + + // plane normal = Normalize(normalA cross normalB) + xs_vec_cross(normalA, normalB, plane); + xs_vec_normalize(plane, plane); + + // plane shift distance = (-p1) dot plane normal + new Float:__tmp[3]; + xs_vec_neg(plane, __tmp); + plane[XS_PLANE_D] = xs_vec_dot(__tmp, p1); + +} + +/** + * Checks if two planes are equal. + * + * @note If you have to check if two planes are just nearly equal, + * take a look at xs_plane_nearlyequal(). + * + * @param plane1 The first plane to check. + * @param plane2 The second plane to check. + * + * @return 1 if planes are equal, 0 otherwise. + */ +stock bool:xs_plane_equal(const Float:plane1[], const Float:plane2[]) +{ + if ( (plane1[0] == plane2[0]) && + (plane1[1] == plane2[1]) && + (plane1[2] == plane2[2]) && + (plane1[3] == plane2[3])) + return true; + return false; +} + +/** + * Checks if two planes are nearly equal. + * + * @note If you have to check if two planes are exactly equal, + * take a look at xs_plane_equal(). + * + * @param plane1 The first plane to check. + * @param plane2 The second plane to check. + * + * @return 1 if planes are nearly equal, 0 otherwise. + */ + +stock bool:xs_plane_nearlyequal(const Float:plane1[], const Float:plane2[]) +{ + if(XS_FLEQ(plane1[0], plane2[0]) && XS_FLEQ(plane1[1], plane2[1]) && + XS_FLEQ(plane1[2], plane2[2]) && + XS_FLEQ(plane1[3], plane2[3])) + return true; + return false; +} + +/** + * Computes the distance between a plane and a point. + * + * @param plane The plane to check the distance from. + * @param point The point to check the distance to. + * + * @return The distance between the input plane and point. + */ +stock Float:xs_plane_dst2point(const Float:plane[], const Float:point[]) +{ + // return normal dot point + D + return xs_vec_dot(plane, point) + plane[XS_PLANE_D]; +} + +/** + * Checks whether a plane intersects with the ray starting at @rayStart and + * going to @rayDir direction. + * If it does intersect, outputs the intersection point in @out. + * + * @param plane The plane to check intersection with. + * @param rayStart The starting point of the ray. + * @param rayDir Direction in which the ray is going. + * @param out The vector to copy the intersection point to, if it exists. + * + * @return true if they intersect, false otherwise. + */ +stock bool:xs_plane_rayintersect(const Float:plane[], const Float:rayStart[], const Float:rayDir[], Float:out[]) +{ + new Float:a = xs_vec_dot(plane, rayDir); + + if (a == 0.0) + return false; // ray is parallel to plane + + // if (distance plane<->(rayStart + rayDir) > distance plane<->rayStart) and both have the same sign, the ray + // goes away from the plane + new Float:rsplusrd[3]; + xs_vec_add(rayStart, rayDir, rsplusrd); + new Float:dst1 = xs_plane_dst2point(plane, rsplusrd); + new Float:dst2 = xs_plane_dst2point(plane, rayStart); + if (xs_fabs(dst1) > xs_fabs(dst2) && xs_fsign(dst1) == xs_fsign(dst2)) + return false; + + + // out = rayStart - rayDir * ((distance plane<->rayStart) / a) + new Float:__tmp[3]; + xs_vec_mul_scalar(rayDir, xs_plane_dst2point(plane, rayStart) / a, __tmp); + // out = rayStart - tmp + xs_vec_sub(rayStart, __tmp, out); + + return true; +} + +/** + * Checks if a point is on a specified plane. + * + * @param plane The plane to check. + * @param point The point to check. + * + * @return true if the point is on the plane, false otherwise. + */ +stock bool:xs_point_onplane(const Float:plane[], const Float:point[]) +{ + return XS_FLEQ(xs_plane_dst2point(plane, point), 0.0); +} + +/** + * Projects a point on the plane. Stores the projected point in @out. + * + * @param plane The plane to project the point onto. + * @param point The point to project onto the plane. + * @param out The vector to copy the projected point into. + * + * @noreturn + */ +stock xs_projpoint_onplane(const Float:plane[], const Float:point[], Float:out[]) +{ + new Float:__tmp[3]; + // out = point - (plane normal * distance point<->plane) + xs_vec_copy(plane, __tmp); + xs_vec_mul_scalar(__tmp, xs_plane_dst2point(plane, point), __tmp); + xs_vec_sub(point, __tmp, out); +} + +/** + * Copies a plane. + * + * @param planeIn The plane to copy. + * @param planeOut The plane to store the copy into. + * + * @noreturn + */ +stock xs_plane_copy(const Float:planeIn[], Float:planeOut[]) +{ + planeOut[0] = planeIn[0]; + planeOut[1] = planeIn[1]; + planeOut[2] = planeIn[2]; + planeOut[3] = planeIn[3]; +} + +/****** HL ENGINE SPECIFIC STUFF ******/ + +// angle indexes +#define XS_PITCH 0 // up / down +#define XS_YAW 1 // left / right +#define XS_ROLL 2 // fall over + +/** + * Computes forward, right and up vectors from given angles. + * + * @param angles Angles to compute vectors from. + * @param fwd The vector to store the forward vector into. + * @param right The vector to store the right vector into. + * @param up The vector to store the up vector into. + * + * @noreturn + */ +stock xs_anglevectors(const Float:angles[3], Float:fwd[3], Float:right[3], Float:up[3]) +{ + // sin (s) and cos (c) for yaw (y), pitch (p) and roll (r) + new Float:sr, Float:sp, Float:sy, Float:cr, Float:cp, Float:cy; + + sy = xs_sin(angles[XS_YAW], degrees); + cy = xs_cos(angles[XS_YAW], degrees); + sp = xs_sin(angles[XS_PITCH], degrees); + cp = xs_cos(angles[XS_PITCH], degrees); + sr = xs_sin(angles[XS_ROLL], degrees); + cr = xs_cos(angles[XS_ROLL], degrees); + + fwd[0] = cp*cy; + fwd[1] = cp*sy; + fwd[2] = -sp; + + right[0] = (-1*sr*sp*cy + -1*cr*-sy); + right[1] = (-1*sr*sp*sy + -1*cr*cy); + right[2] = -1*sr*cp; + + up[0] = (cr*sp*cy + -sr*-sy); + up[1] = (cr*sp*sy + -sr*cy); + up[2] = cr*cp; +} +/****** STRING FUNCS *******/ + +/** + * Finds a character in a string and returns its position in the string. + * + * @param str The string to search in. + * @param chr The character to search for in the string. + * + * @return The character position if found, -1 otherwise. + */ +stock xs_strchr(const str[], chr) +{ + for (new i = 0; str[i] != 0; ++i) + { + if (str[i] == chr) + return i; + } + return -1; +} + +/** + * Remove @charstotrim number of characters from @stringtotrim, + * either from the beginning or the end of the string. + * + * @param stringtotrim The string to be trimmed. + * @param charstostrim The number of characters to trim. + * @param fromleft If set to true, the string will be trimmer from the left. + * If false, it will be trimmed from the right. + * + * @noreturn + */ +stock xs_strtrim(stringtotrim[], charstotrim, bool:fromleft = true) +{ + if (charstotrim <= 0) + return; + + if (fromleft) + { + new maxlen = strlen(stringtotrim); + if (charstotrim > maxlen) + charstotrim = maxlen; + + // In format, input and output regions can overlap + format(stringtotrim, maxlen, "%s", stringtotrim[charstotrim]); + } + else + { + new maxlen = strlen(stringtotrim) - charstotrim; + if (maxlen < 0) + maxlen = 0; + + // In format, input and output regions can overlap + format(stringtotrim, maxlen, "%s", stringtotrim); + } +} + +/** + * Copies characters from @oldmsg to @newmsg, starting at @start and ending + * at @end (includes the end character). + * + * @param oldmsg The string to copy from. + * @param newmsg The string to copy to. + * @param start Starting position of the @oldmsg string to copy from. + * @param end Ending position of the @oldmsg string to copy from. + * @param outlen If positive, specifies the maximum number of characters + * to be copied. Otherwise, the function assumes that + * newmsg is at least @end - @start + 1 characters long. + * + * @noreturn + */ +stock xs_strmid(const oldmsg[], newmsg[], start, end, outlen=-1) +{ + new len = strlen(oldmsg); + + if(start < 0) + start = 0; + + ++end; // Include end + + if(end <= start || end > len) + end = len; + + new j = 0, i = start; + for(; (i < end) && (outlen--);) + newmsg[j++] = oldmsg[i++]; + + newmsg[j] = 0; +} + +/** + * "Explodes" a string, breaking it at the @delimeter character and putting + * each exploded part into the @output array. + * + * @param input The input string to be exploded. + * @param output The output array of string where exploded string will be stored. + * @param delimeter The character to break the string at. + * @param maxelems Maximum amount of elements in @output. + * @param elemsize Maximum size of each string in the @output array. + * + * @return The number of strings successfully exploded. + */ +stock xs_explode(const input[], output[][], delimiter, maxelems, elemsize) +{ + new nIdx = 0; + new nLen = 0; + + new copied = 0; + while(nLen < strlen(input) && nIdx < maxelems) + { + copied = copyc(output[nIdx++], elemsize, input[nLen], delimiter); + if (copied == elemsize) + { + // maybe it got force-stopped because of maxsize + // so check whether we have to skip something + if (input[nLen + copied] != delimiter && input[nLen + copied] != 0) + { + new found = xs_strchr(input[nLen + copied], delimiter); + if (found == -1) + break; + copied += found; + } + } + + nLen += copied + 1; // +1: skip delimiter + } + return nIdx; +} + +/** + * The opposite of xs_explode(). Takes an array of strings and puts them together + * in a single string, delimeted by the @delimeter character. + * + * @param output The string to store the impoded string into. + * @param outsize The size of the output buffer. + * @param delimeter The character to put between imploded strings. + * @param input The array of strings to implode. + * @param elemsnum The number of strings in the input array. + * + * @return The number of characters in the final output buffer. + */ +stock xs_implode(output[], outsize, delimiter, const input[][], elemsnum) +{ + new pos = 0; + new copied; + for (new i = 0; i < elemsnum; ++i) + { + copied = copy(output[pos], outsize - pos, input[i]); + pos += copied; + if (pos >= outsize) + return outsize; + // append delimiter + output[pos] = delimiter; + ++pos; + // last check + if (pos >= outsize) + return outsize; + } + + output[--pos] = 0; // The last char would be delimiter, so skip it. + return pos; +} + + +stock xs__replace_buf[XS_REPLACEBUF_SIZE]; + +/** + * Replaces all occurencies of @what in @text with @with. + * + * @param text The text to search in. + * @param len The maximum size of the @text buffer. + * @param what What to search for. + * @param with What to replace occurencies with. + * + * @return Returns the number of replaced items. + */ +stock xs_replace(text[], len, const what[], const with[]) +{ + new occur = 0; + new i = 0; + new bufPos = 0; + new replaceLen = strlen(with); + new whatLen = strlen(what); + for (; text[i]; ++i) + { + if (text[i] == what[0]) + { + new posInWhat=0; + new j; + for (j = i; j-i < replaceLen && text[j]; ++j, ++posInWhat) + { + if (text[j] != what[posInWhat]) + break; + } + if (whatLen == posInWhat) + { + for (new i2 = 0; i2 < replaceLen && bufPos < XS_REPLACEBUF_SIZE; ++i2) + xs__replace_buf[bufPos++] = with[i2]; + i = j - 1; + ++occur; + if (bufPos >= XS_REPLACEBUF_SIZE) + return occur; + continue; + } + } + if (bufPos >= XS_REPLACEBUF_SIZE) + return occur; + xs__replace_buf[bufPos++] = text[i]; + } + xs__replace_buf[bufPos] = 0; + copy(text, len, xs__replace_buf); + return occur; +} + +/** + * Replaces all occurencies of @what character in @text with @with character. + * + * @param text The text to search in. + * @param len The maximum size of the @text buffer. + * @param what What character to search for. + * @param with What charactear to replace occurencies with. + * + * @return The number of replaced characters. + */ +stock xs_replace_char(text[], len, what, with) +{ + // let the xs_replace function do the work + new arr[4]; + arr[0] = what; + arr[1] = 0; + arr[2] = with; + arr[3] = 0; + + return xs_replace(text, len, arr[0], arr[2]); +} + +/****** MISC FUNCS *******/ + +/** + * Retrieves the name of a command identified by its ID. + * + * @param cid The command ID. + * @param namestr The buffer where to store command's name. + * @param namelen The maximum size of the output buffer. + * + * @noreturn + */ +stock xs_concmd_name(cid, namestr[], namelen) +{ + new dummy1; + new dummy2[1]; + get_concmd(cid, namestr, namelen, dummy1, dummy2, 0, 0); +} + +/** + * Checks whether there are at least @num free visible slots. + * + * @param num The number of slots to check. + * + * @return true if there are at least that many free, false otherwise. + */ +stock bool:xs_freevisibleslots(num) +{ + new maxplayers = get_cvar_num("sv_visiblemaxplayers"); + if (maxplayers <= 0) + maxplayers = MaxClients; + + return (get_playersnum(1) <= maxplayers-num) ? true : false; +} + +stock xs__maxnum = 0; + +/** + * Returns the biggest possible positive number. + * + * @return The biggest possible positive number. + */ +stock xs_get_maxnum() +{ + if (!xs__maxnum) + { + // build it + xs__maxnum = ((1 << (cellbits - 2)) - 1 ) | (1 << (cellbits - 2)); + /* + new bits = get_cellsize() * 8 - 1; + for (new i = 0; i < bits; ++i) + xs__maxnum |= 1 << i; + */ + } + return xs__maxnum; +} + +/** + * Returns the smallest possible negative number. + * + * @return The smallest possible negative number. + */ +stock xs_get_minnum() +{ + return xs_get_maxnum() + 1; +} + + +// *** The following two functions were created by Damaged Soul. + +// Max messages reserved by engine (DO NOT MODIFY) +#define XS__MAX_ENGINE_MESSAGES 63 +// Max possible messages for mod, is 255 really the limit? +#define XS__MAX_POSSIBLE_MESSAGES 255 + +// Returns max number of messages for mod +stock xs_get_maxmessages() +{ + new name[2]; + + for (new i = XS__MAX_ENGINE_MESSAGES + 1; i <= XS__MAX_POSSIBLE_MESSAGES; i++) + if (!get_user_msgname(i, name, 1)) + return i - 1; + + return XS__MAX_POSSIBLE_MESSAGES; +} + +// Returns true if msgid is a valid message +stock bool:xs_is_msg_valid(msgid) +{ + new name[2]; + new retval = get_user_msgname(msgid, name, 1); + + if (msgid < 1 || (msgid > XS__MAX_ENGINE_MESSAGES && !retval)) + return false; + + return true; +} + +/****** MANAGED TASKS ******/ + +// ***** managed task ids +stock xs_find_freetaskid() +{ + for (new i = 1; i <= XS_TASK_MANAGEDIDS; ++i) + { + if (!task_exists(i)) + return i; + } + return -1; +} + +// ***** managed tasks +enum xs_paramtypes +{ + xs_invalid = 0, + xs_int, + xs_float, + xs_string +} + +// new task +stock xs__TaskParam[ 1 + // number of parameters + XS_TASK_MAXPARAMS + // parameter types + (XS_TASK_MAXPARAMSIZE char) * XS_TASK_MAXPARAMS]; // space for len + value + +stock Float:xs__TaskInterval = 0.0; +stock xs__TaskFlags[5]; +stock xs__TaskFunc[48]; +stock xs__TaskId; +stock xs__TaskRepeat; + +#define xs__TaskParamCount xs__TaskParam[0] +#define xs__TaskParamType[%1] xs__TaskParam[1 + %1] + +#define xs__TaskParamValue[%1] xs__TaskParam[1 + XS_TASK_MAXPARAMS + (%1 * (XS_TASK_MAXPARAMSIZE char))] + + +// incoming task +stock xs__ITaskParam[ 1 + // number of parameters + XS_TASK_MAXPARAMS + // parameter types + (XS_TASK_MAXPARAMSIZE char) * XS_TASK_MAXPARAMS]; // space for len + value +stock xs__ITaskId; + +#define xs__ITaskParamCount xs__ITaskParam[0] +#define xs__ITaskParamType[%1] xs__ITaskParam[1 + %1] + +#define xs__ITaskParamValue[%1] xs__ITaskParam[1 + XS_TASK_MAXPARAMS + (%1 * (XS_TASK_MAXPARAMSIZE char))] + +// tested +stock xs_task_begin(Float:interval, const func[], id = 0, const flags[] = "", repeat = 0) +{ + xs_assert(xs__TaskInterval == 0.0, "New xs_task_begin called before xs_task_end"); + + xs__TaskInterval = interval; + if (xs__TaskInterval < 0.1) + xs__TaskInterval = 0.1; + + copy(xs__TaskFunc, 47, func); + xs__TaskId = id; + copy(xs__TaskFlags, 4, flags); + xs__TaskRepeat = repeat; + + xs__TaskParamCount = 0; +} + +// tested +stock xs_task_pushint(value, bool:__isfl=false /*internal use only*/) +{ + xs_assert(xs__TaskInterval, "xs_task_push* called without xs_task_begin"); + if (xs__TaskParamCount >= XS_TASK_MAXPARAMS) + return 0; + + xs__TaskParamType[xs__TaskParamCount] = __isfl ? xs_float : xs_int; + xs__TaskParamValue[xs__TaskParamCount] = value; + + ++xs__TaskParamCount; + return 1; +} + +// tested +stock xs_task_pushfl(Float:value) +{ + return xs_task_pushint(_:value, true); +} + +// tested +stock xs_task_pushstr(const value[]) +{ + xs_assert(xs__TaskInterval, "xs_task_push* called without xs_task_begin"); + if (xs__TaskParamCount >= XS_TASK_MAXPARAMS) + return 0; + + xs__TaskParamType[xs__TaskParamCount] = xs_string; + strpack(xs__TaskParamValue[xs__TaskParamCount], value); + ++xs__TaskParamCount; + return 1; +} + +// tested +stock xs_task_end() +{ + xs_assert(xs__TaskInterval, "xs_task_end called without xs_task_begin"); + + // find a task id if needed + if (xs__TaskId == -1) + { + xs__TaskId = xs_find_freetaskid(); + if (xs__TaskId == -1) + { + // not found + xs__TaskInterval = 0.0; + return -1; + } + } + + set_task(xs__TaskInterval, xs__TaskFunc, xs__TaskId, xs__TaskParam, + 1 + xs__TaskParamCount * (XS_TASK_MAXPARAMSIZE char), xs__TaskFlags, xs__TaskRepeat); + + xs__TaskInterval = 0.0; + + return xs__TaskId; +} + + +// tested +#define XS_MAKE_TASKFUNC(%1) public %1(const _xs__taskparam[], _xs__taskid) if(xs__task_setup(_xs__taskparam, _xs__taskid)) + +// tested +stock xs__task_setup(const param[], taskid) +{ + xs__ITaskId = taskid; + new len = 1 + param[0] * (XS_TASK_MAXPARAMSIZE char); + for (new i = 0; i < len; ++i) + xs__ITaskParam[i] = param[i]; + return 1; +} + +// tested +stock xs_task_readid() +{ + return xs__ITaskId; +} + +// tested +stock xs_task_paramcount() +{ + return xs__ITaskParamCount; +} + +// tested +stock xs_paramtypes:xs_task_paramtype(paramid) +{ + if (paramid < 0 || paramid >= xs__ITaskParamCount) + return xs_invalid; + + return xs_paramtypes:xs__ITaskParamType[paramid]; +} + +// tested +stock xs_task_paramint(paramid) +{ + if (paramid < 0 || paramid >= xs__ITaskParamCount) + return 0; + if (xs__ITaskParamType[paramid] != _:xs_int) + return 0; + + return xs__ITaskParamValue[paramid]; +} + +// tested +stock Float:xs_task_paramfl(paramid) +{ + if (paramid < 0 || paramid >= xs__ITaskParamCount) + return 0.0; + if (xs__ITaskParamType[paramid] != _:xs_float) + return 0.0; + + return Float:xs__ITaskParamValue[paramid]; +} + +// tested +stock xs_task_paramstr(paramid, out[], maxlen) +{ + #pragma unused maxlen + + if (paramid < 0 || paramid >= xs__ITaskParamCount) + return 0; + if (xs__ITaskParamType[paramid] != _:xs_string) + return 0; + + strunpack(out, xs__ITaskParamValue[paramid]); + return 1; +} diff --git a/bin/compiler/include/zombieplague43.inc b/bin/compiler/include/zombieplague43.inc new file mode 100644 index 0000000..2809ec3 --- /dev/null +++ b/bin/compiler/include/zombieplague43.inc @@ -0,0 +1,505 @@ +/*================================================================================ + + --------------------------------------- + -*- Zombie Plague 4.3 Includes File -*- + --------------------------------------- + + ~~~~~~~~~~ + - How To - + ~~~~~~~~~~ + + To make use of the Zombie Plague API features in your plugin, just + add the following line at the beginning of your script: + + #include + + ~~~~~~~~~~~ + - Natives - + ~~~~~~~~~~~ + + These work just like any other functions: you may have to pass + parameters and they usually return values. + + Example: + + if ( is_user_alive( id ) && zp_get_user_zombie( id ) ) + { + server_print( "Player %d is alive and a zombie", id ) + } + + ~~~~~~~~~~~~ + - Forwards - + ~~~~~~~~~~~~ + + Forwards get called whenever an event happens during the game. + You need to make a public callback somewhere on your script, + and it will automatically be triggered when the event occurs. + + Example: + + public zp_user_infected_post( id, infector, nemesis ) + { + if ( !infector || nemesis ) + return; + + server_print( "Player %d just got infected by %d!", id, infector ) + } + + Also, take note of cases when there's a suffix: + + * _pre : means the forward will be called BEFORE the event happens + * _post : means it will be called AFTER the event takes place + +=================================================================================*/ + +#if defined _zombieplague_included + #endinput +#endif +#define _zombieplague_included + +/* Teams for zp_register_extra_item() */ +#define ZP_TEAM_ZOMBIE (1<<0) +#define ZP_TEAM_HUMAN (1<<1) +#define ZP_TEAM_NEMESIS (1<<2) +#define ZP_TEAM_SURVIVOR (1<<3) + +/* Game modes for zp_round_started() */ +enum +{ + MODE_INFECTION = 1, + MODE_NEMESIS, + MODE_SURVIVOR, + MODE_SWARM, + MODE_MULTI, + MODE_PLAGUE +} + +/* Winner teams for zp_round_ended() */ +enum +{ + WIN_NO_ONE = 0, + WIN_ZOMBIES, + WIN_HUMANS +} + +/* Custom forward return values */ +#define ZP_PLUGIN_HANDLED 97 + +/** + * Returns whether a player is a zombie. + * + * @param id Player index. + * @return True if it is, false otherwise. + */ +native zp_get_user_zombie(id) + +/** + * Returns whether a player is a nemesis. + * + * @param id Player index. + * @return True if it is, false otherwise. + */ +native zp_get_user_nemesis(id) + +/** + * Returns whether a player is a survivor. + * + * @param id Player index. + * @return True if it is, false otherwise. + */ +native zp_get_user_survivor(id) + +/** + * Returns whether a player is the first zombie. + * + * @param id Player index. + * @return True if it is, false otherwise. + */ +native zp_get_user_first_zombie(id) + +/** + * Returns whether a player is the last zombie. + * + * @param id Player index. + * @return True if it is, false otherwise. + */ +native zp_get_user_last_zombie(id) + +/** + * Returns whether a player is the last human. + * + * @param id Player index. + * @return True if it is, false otherwise. + */ +native zp_get_user_last_human(id) + +/** + * Returns a player's current zombie class ID. + * + * @param id Player index. + * @return Internal zombie class ID, or -1 if not yet chosen. + */ +native zp_get_user_zombie_class(id) + +/** + * Returns a player's next zombie class ID (for the next infection). + * + * @param id Player index. + * @return Internal zombie class ID, or -1 if not yet chosen. + */ +native zp_get_user_next_class(id) + +/** + * Sets a player's next zombie class ID (for the next infection). + * + * @param id Player index. + * @param classid A valid zombie class ID. + * @return True on success, false otherwise. + */ +native zp_set_user_zombie_class(id, classid) + +/** + * Returns a player's ammo pack count. + * + * @param id Player index. + * @return Number of ammo packs owned. + */ +native zp_get_user_ammo_packs(id) + +/** + * Sets a player's ammo pack count. + * + * @param id Player index. + * @param amount New quantity of ammo packs owned. + */ +native zp_set_user_ammo_packs(id, amount) + +/** + * Returns the default maximum health of a zombie. + * + * Note: Takes into account first zombie's HP multiplier. + * + * @param id Player index. + * @return Maximum amount of health points, or -1 if not a normal zombie. + */ +native zp_get_zombie_maxhealth(id) + +/** + * Returns a player's custom flashlight batteries charge. + * + * @param id Player index. + * @return Charge percent (0 to 100). + */ +native zp_get_user_batteries(id) + +/** + * Sets a player's custom flashlight batteries charge. + * + * @param id Player index. + * @param value New charge percent (0 to 100). + */ +native zp_set_user_batteries(id, charge) + +/** + * Returns whether a player has night vision. + * + * @param id Player index. + * @return True if it has, false otherwise. + */ +native zp_get_user_nightvision(id) + +/** + * Sets whether a player has night vision. + * + * @param id Player index. + * @param set True to give, false for removing it. + */ +native zp_set_user_nightvision(id, set) + +/** + * Forces a player to become a zombie. + * + * Note: Unavailable for last human/survivor. + * + * @param id Player index to be infected. + * @param infector Player index who infected him (optional). + * @param silent If set, there will be no HUD messages or infection sounds. + * @param rewards Whether to show DeathMsg and reward frags, hp, and ammo packs to infector. + * @return True on success, false otherwise. + */ +native zp_infect_user(id, infector = 0, silent = 0, rewards = 0) + +/** + * Forces a player to become a human. + * + * Note: Unavailable for last zombie/nemesis. + * + * @param id Player index to be cured. + * @param silent If set, there will be no HUD messages or antidote sounds. + * @return True on success, false otherwise. + */ +native zp_disinfect_user(id, silent = 0) + +/** + * Forces a player to become a nemesis. + * + * Note: Unavailable for last human/survivor. + * + * @param id Player index to turn into nemesis. + * @return True on success, false otherwise. + */ +native zp_make_user_nemesis(id) + +/** + * Forces a player to become a survivor. + * + * Note: Unavailable for last zombie/nemesis. + * + * @param id Player index to turn into survivor. + * @return True on success, false otherwise. + */ +native zp_make_user_survivor(id) + +/** + * Respawns a player into a specific team. + * + * @param id Player index to be respawned. + * @param team Team to respawn the player into (ZP_TEAM_ZOMBIE or ZP_TEAM_HUMAN). + * @return True on success, false otherwise. + */ +native zp_respawn_user(id, team) + +/** + * Forces a player to buy an extra item. + * + * @param id Player index. + * @param itemid A valid extra item ID. + * @param ignorecost If set, item's cost won't be deduced from player. + * @return True on success, false otherwise. + */ +native zp_force_buy_extra_item(id, itemid, ignorecost = 0) + +/** + * Overrides ZP player model with a different custom model. + * + * Note: This will last until player's next infection/humanization/respawn. + * + * Note: Don't call more often than absolutely needed. + * + * @param id Player index. + * @param newmodel Model name. + * @param modelindex Modelindex (optional). + */ +native zp_override_user_model(id, const newmodel[], modelindex = 0) + +/** + * Returns whether the ZP round has started, i.e. first zombie + * has been chosen or a game mode has begun. + * + * @return 0 - Round not started + * 1 - Round started + * 2 - Round starting + */ +native zp_has_round_started() + +/** + * Returns whether the current round is a nemesis round. + * + * @return True if it is, false otherwise. + */ +native zp_is_nemesis_round() + +/** + * Returns whether the current round is a survivor round. + * + * @return True if it is, false otherwise. + */ +native zp_is_survivor_round() + +/** + * Returns whether the current round is a swarm round. + * + * @return True if it is, false otherwise. + */ +native zp_is_swarm_round() + +/** + * Returns whether the current round is a plague round. + * + * @return True if it is, false otherwise. + */ +native zp_is_plague_round() + +/** + * Returns number of alive zombies. + * + * @return Zombie count. + */ +native zp_get_zombie_count() + +/** + * Returns number of alive humans. + * + * @return Human count. + */ +native zp_get_human_count() + +/** + * Returns number of alive nemesis. + * + * @return Nemesis count. + */ +native zp_get_nemesis_count() + +/** + * Returns number of alive survivors. + * + * @return Survivor count. + */ +native zp_get_survivor_count() + +/** + * Registers a custom item which will be added to the extra items menu of ZP. + * + * Note: The returned extra item ID can be later used to catch item + * purchase events for the zp_extra_item_selected() forward. + * + * Note: ZP_TEAM_NEMESIS and ZP_TEAM_SURVIVOR can be used to make + * an item available to Nemesis and Survivors respectively. + * + * @param name Caption to display on the menu. + * @param cost Ammo packs to be deducted on purchase. + * @param teams Bitsum of teams it should be available for. + * @return An internal extra item ID, or -1 on failure. + */ +native zp_register_extra_item(const name[], cost, teams) + +/** + * Registers a custom class which will be added to the zombie classes menu of ZP. + * + * Note: The returned zombie class ID can be later used to identify + * the class when calling the zp_get_user_zombie_class() natives. + * + * @param name Caption to display on the menu. + * @param info Brief description of the class. + * @param model Player model to be used. + * @param clawmodel Claws model to be used. + * @param hp Initial health points. + * @param speed Maximum speed. + * @param gravity Gravity multiplier. + * @param knockback Knockback multiplier. + * @return An internal zombie class ID, or -1 on failure. + */ +native zp_register_zombie_class(const name[], const info[], const model[], const clawmodel[], hp, speed, Float:gravity, Float:knockback) + +/** + * Returns an extra item's ID. + * + * @param name Item name to look for. + * @return Internal extra item ID, or -1 if not found. + */ +native zp_get_extra_item_id(const name[]) + +/** + * Returns a zombie class' ID. + * + * @param name Class name to look for. + * @return Internal zombie class ID, or -1 if not found. + */ +native zp_get_zombie_class_id(const name[]) + +/** + * Returns a zombie class' description (passed by reference). + * + * @param classid Internal zombie class ID. + * @param info The buffer to store the string in. + * @param len Character size of the output buffer. + * @return True on success, false otherwise. + */ +native zp_get_zombie_class_info(classid, info[], len) + +/** + * Called when the ZP round starts, i.e. first zombie + * is chosen or a game mode begins. + * + * @param gamemode Mode which has started. + * @param id Affected player's index (if applicable). + */ +forward zp_round_started(gamemode, id) + +/** + * Called when the round ends. + * + * @param winteam Team which has won the round. + */ +forward zp_round_ended(winteam) + +/** + * Called when a player gets infected. + * + * @param id Player index who was infected. + * @param infector Player index who infected him (if applicable). + * @param nemesis Whether the player was turned into a nemesis. + */ +forward zp_user_infected_pre(id, infector, nemesis) +forward zp_user_infected_post(id, infector, nemesis) + +/** + * Called when a player turns back to human. + * + * @param id Player index who was cured. + * @param survivor Whether the player was turned into a survivor. + */ +forward zp_user_humanized_pre(id, survivor) +forward zp_user_humanized_post(id, survivor) + +/** + * Called on a player infect/cure attempt. You can use this to block + * an infection/humanization by returning ZP_PLUGIN_HANDLED in your plugin. + * + * Note: Right now this is only available after the ZP round starts, since some + * situations (like blocking a first zombie's infection) are not yet handled. + */ +forward zp_user_infect_attempt(id, infector, nemesis) +forward zp_user_humanize_attempt(id, survivor) + +/** + * Called when a player buys an extra item from the ZP menu. + * + * Note: You can now return ZP_PLUGIN_HANDLED in your plugin to block + * the purchase and the player will be automatically refunded. + * + * @param id Player index of purchaser. + * @param itemid Internal extra item ID. + */ +forward zp_extra_item_selected(id, itemid) + +/** + * Called when a player gets unfrozen (frostnades). + * + * @param id Player index. + */ +forward zp_user_unfrozen(id) + +/** + * Called when a player becomes the last zombie. + * + * Note: This is called for the first zombie too. + * + * @param id Player index. + */ +forward zp_user_last_zombie(id) + +/** + * Called when a player becomes the last human. + * + * @param id Player index. + */ +forward zp_user_last_human(id) + + +/** + * @deprecated - Do not use! + * For backwards compatibility only. + */ +#define ZP_TEAM_ANY 0 diff --git a/changelog.txt b/changelog.txt index 74d0a3f..3e0693b 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,27 +1,36 @@ +v4.4 (4410) +New: AMXX-Uncompress; Rewritten in Python and improved. +New: Default Profile, now includes a compiler to allow having a default profile. +New: New color-scheme and popup css. +Improved: Style selection. +Improved: Profile selection. +Improved: About command. +Improved: Changelog. + v4.4 (4400) -New: When pasting within a string, special characters are escaped. -New: When creating variables, you can define the 'auto:' tag or simply '::', which will be replaced by the corresponding tag during the compilation stage. -New: When typing '@', function autocomplete is displayed if inside a string; otherwise, tag autocomplete is shown. +New: Special characters are now escaped automatically when pasting inside a string. +New: You can now define variables using the `auto:` tag or simply `::`, which will be replaced by the corresponding tag during compilation. +New: When typing `@`, function autocomplete is displayed if inside a string; otherwise, tag autocomplete is shown. Fix: The tab key did not work correctly between brackets and braces when autocomplete was active. Syntax: Improved compatibility with default color schemes. Syntax: Support for multiline define. Syntax: Improved switch case structure. -Syntax: Removed support for multiline '\' in single-line comments '//', pawn doesn't have that feature. -Syntax: Added styling for pre-defined constants (true, false, __DATE__, __TIME__, __LINE__, __BINARY__, __FILE__). +Syntax: Removed support for multiline `\` in single-line comments `//`, pawn doesn't have that feature. +Syntax: Added styling for pre-defined constants (`true`, `false`, `__DATE__`, `__TIME__`, `__LINE__`, `__BINARY__`, `__FILE__`). Syntax: Various optimizations and minor bug fixes. Analyzer: New method for handling comments and strings during code analysis. -Analyzer: Support for multiline '#define'. -Analyzer: Fixed issue with '#if' and '#else' (only one block is analyzed, and the others are ignored). +Analyzer: Support for multiline `#define`. +Analyzer: Fixed issue with `#if` and `#else` (only one block is analyzed, and the others are ignored). Analyzer: Improved tag analysis, including creating a list of related functions for each tag. Analyzer: Improved analysis of constants/enums. Comments are now used as documentation. Analyzer: Various optimizations and minor bug fixes. Tooltip: Improved Param-Inspector. Tooltip: Tooltips added for constants and tags. -Tooltip: WIKI button for 'SVC_' and 'get_user_msgid' Game Events +Tooltip: WIKI button for `SVC_` and `get_user_msgid` Game Events Improved: Cache autocomplete items. Improved: Update-check system. -Improved: Added 'debug_log_flags'. +Improved: Added `debug_log_flags`. Improved: Param-Inspector. General: Error tracking, now sending reports to Rollbar when an error occurs. General: Code available on GitHub. @@ -48,12 +57,12 @@ New: New color scheme format (.sublime-color-scheme). New: Ability to choose style for the output console. New: Ability to choose style for the tooltip popup. New: More settings for autocomplete. -New: Autocomplete for '#include'. -New: Autocomplete for '#emit'. -New: Autocomplete for '#pragma'. -New: 'Find/Replace' across all includes. -New: 'Functions List' across all includes. -New: 'Includes Tree'. +New: Autocomplete for `#include`. +New: Autocomplete for `#emit`. +New: Autocomplete for `#pragma`. +New: `Find/Replace` across all includes. +New: `Functions List` across all includes. +New: `Includes Tree`. New: Rewritten pawnparse code: -- Basic live check of invalid syntax. -- Autocomplete local variables. @@ -62,7 +71,7 @@ New: Rewritten pawnparse code: v2.2 Fix: Issue on Linux. New: Menu to select color scheme. -New: 'Mistrick' color scheme. +New: `Mistrick` color scheme. Improved: Auto-update check. @@ -72,9 +81,9 @@ Fix: Bug fixes. v2.0 Fix: Bug fixes. New: Auto-increment version/build when compiling. -New: 'Twilight' color scheme. -New: 'Atomic' color scheme. -New: 'Notepad++' color scheme. +New: `Twilight` color scheme. +New: `Atomic` color scheme. +New: `Notepad++` color scheme. v1.9 Fix: Bug fixes. @@ -97,7 +106,7 @@ Fix: Details in tooltip popup position. v1.5 Improved: Optimized configuration. Improved: Optimized analyzer. -New: 'White-pawn' color scheme. +New: `White-pawn` color scheme. v1.4 Fix: Improved function and define analyzer. @@ -112,8 +121,8 @@ v1.2 Fix: Issue in the analyzer. New: Function information. New: Go to function definition. -New: 'New plugin' option. -New: 'Dark-pawn' color scheme. +New: `New plugin` option. +New: `Dark-pawn` color scheme. v1.1 Fix: Fix syntax. diff --git a/changelog_es.txt b/changelog_es.txt index 154da80..8073de5 100644 --- a/changelog_es.txt +++ b/changelog_es.txt @@ -1,26 +1,35 @@ +v4.4 (4410) +New: AMXX-Uncompress; Re-escrito en python y mejorado. +New: Default Profile, ahora se incluye un compilador para poder tener un perfil por defecto. +New: Nuevos `color-scheme` y `popup css`. +Improved: Selecion de estilos. +Improved: Selecion de perfiles. +Improved: About command. +Improved: Changelog. + v4.4 (4400) -New: Al usar "pegar" dentro de un string, se escapan los caracteres especiales. -New: Al crear variables, se puede definir el tag 'auto:' o simplemente '::', el cual se reemplazará por el tag correspondiente al iniciar la compilación. -New: Al escribir @, se muestra el autocompletado de tags o de funciones si se está dentro de un string. +New: Los caracteres especiales ahora se escapan automáticamente al pegar dentro de una cadena. +New: Ahora puedes definir variables usando el tag `auto:` o simplemente `::`, el cual se reemplazará por el tag correspondiente al iniciar la compilación. +New: Al escribir `@`, se muestra el autocompletado de tags, o de funciones si se está dentro de un string. Fix: La tecla tab no funcionaba correctamente entre corchetes y llaves cuando el autocompletado estaba activo. Syntax: Mejorada la compatibilidad con los color-schemes por defecto. Syntax: Soporte para define multilínea. Syntax: Se mejoró la estructura switch case. -Syntax: Eliminado el soporte para multilínea '\' en comentarios de una sola línea '//', no existe esa caracteristica en pawn. -Syntax: Agregado estilo para constantes pre-definidas (true, false, __DATE__, __TIME__, __LINE__, __BINARY__, __FILE__). +Syntax: Eliminado el soporte para multilínea `\` en comentarios de una sola línea `//`, no existe esa caracteristica en pawn. +Syntax: Agregado estilo para constantes pre-definidas (`true`, `false`, `__DATE__`, `__TIME__`, `__LINE__`, `__BINARY__`, `__FILE__`). Syntax: Varias optimizaciones y corrección de pequeños errores. Analyzer: Nuevo método para tratar con los comentarios y strings al analizar el código. -Analyzer: Soporte para #define multilínea. -Analyzer: Solucionado el problema con #if y #else (solo se analiza un bloque y se ignoran los demás). +Analyzer: Soporte para `#define` multilínea. +Analyzer: Solucionado el problema con `#if` y `#else` (solo se analiza un bloque y se ignoran los demás). Analyzer: Mejorado análisis de tags, incluyendo la creación de una lista de funciones relacionadas para cada tag. Analyzer: Mejorado el análisis de constantes/enums. Ahora los comentarios son utilizados como documentación. Analyzer: Varias optimizaciones y corrección de pequeños errores. Tooltip: Mejorado el inspector de parametros. Tooltip: Se agregaron tooltip para constantes y tags. -Tooltip: Boton WIKI para SVC_ y get_user_msgid Game Events. +Tooltip: Boton WIKI para `SVC_` y `get_user_msgid` Game Events. Improved: Cache del autocompletado. -Improved: Cambios en la configuracion 'debug_flags' y nuevo 'debug_log_flags'. +Improved: Cambios en la configuracion `debug_flags` y nuevo `debug_log_flags`. Improved: Mejorado el sistema de actualización. General: Seguimiento de errores, ahora al ocurrir un error se envía un reporte a Rollbar. General: Código disponible en GitHub. @@ -35,6 +44,7 @@ New: Perfil de compilación (posibilidad de cambiar rápidamente entre configura New: Inspector de parámetros en tooltips. Fix: Eliminados tags de autocompletado en parámetros. + v3.0 Fix: Bug menor en el selector de color-schemes. Fix: Error en tiempo de ejecución en update_check(). @@ -49,18 +59,19 @@ New: Más configuraciones para el autocompletado. New: Autocompletado para #include. New: Autocompletado para #emit. New: Autocompletado para #pragma. -New: "Buscar/Reemplazar" en todos los includes. -New: "Lista de funciones" en todos los includes. -New: "Árbol de includes". +New: `Buscar/Reemplazar` en todos los includes. +New: `Lista de funciones` en todos los includes. +New: `Árbol de includes`. New: Código de pawnparse reescrito: Comprobación básica en vivo de sintaxis inválida. Autocompletado de variables locales. 35% menos uso de CPU. + v2.2 Fix: Problema en Linux. New: Menú para seleccionar color-scheme. -New: Color-scheme "Mistrick". +New: Color-scheme `Mistrick`. General: Verificación automática de actualizaciones. v2.1 @@ -69,9 +80,9 @@ Fix: Corrección de bugs. v2.0 Fix: Corrección de bugs. New: Auto incremento de versión/build al compilar. -New: Color-scheme "Twilight". -New: Color-scheme "Atomic". -New: Color-scheme "Notepad++". +New: Color-scheme `Twilight`. +New: Color-scheme `Atomic`. +New: Color-scheme `Notepad++`. v1.9 Fix: Corrección de bugs. @@ -94,7 +105,7 @@ Fix: Detalles en la posición del popup del tooltip. v1.5 Mejorado: Configuración optimizada. Mejorado: Analizador optimizado. -New: Color-scheme "White-pawn". +New: Color-scheme `White-pawn`. v1.4 Fix: Mejorado el analizador de funciones y defines. @@ -109,11 +120,11 @@ v1.2 Fix: Error en el analizador. New: Información de funciones. New: Ir a la definición de una función. -New: Opción "Nuevo plugin". -New: Color-scheme "Dark-pawn". +New: Opción `Nuevo plugin`. +New: Color-scheme `Dark-pawn`. v1.1 Fix: Sintaxis. v1.0 -Publicación inicial. \ No newline at end of file +Publicación inicial. diff --git a/check_version.txt b/check_version.txt index 8ae4733..9de93e2 100644 --- a/check_version.txt +++ b/check_version.txt @@ -1,5 +1,7 @@ -4.4-4403 +4.4-4410 News: -- New: asd -- Fix: asd +- New: AMXX-Uncompress; Rewritten in Python and improved. +- New: Default Profile, now includes a compiler to allow having a default profile. +- New: New color-scheme and popup css. +... \ No newline at end of file diff --git a/debug.log b/debug.log new file mode 100644 index 0000000..e69de29 diff --git a/default.inc b/default.inc index 8330caa..bbd10ce 100644 --- a/default.inc +++ b/default.inc @@ -1,4 +1,4 @@ -/* Sublime AMXX Editor v4.2 */ +/* Sublime AMXX-Editor v4.4 */ #if defined _example_included #endinput diff --git a/default.sma b/default.sma index 2e05f55..4c77583 100644 --- a/default.sma +++ b/default.sma @@ -1,4 +1,4 @@ -/* Sublime AMXX Editor v4.2 */ +/* Sublime AMXX-Editor v4.4 */ #include // #include diff --git a/styles/editor/AMXXStudio.pawn-editor.sublime-color-scheme b/styles/editor/AMXXStudio.pawn-editor.sublime-color-scheme index fe1e012..c75f06a 100644 --- a/styles/editor/AMXXStudio.pawn-editor.sublime-color-scheme +++ b/styles/editor/AMXXStudio.pawn-editor.sublime-color-scheme @@ -10,12 +10,7 @@ "amxxeditor": { "default_popup": "AMXXStudio", - "default_console": "AMXXStudio", - "syntax_settings": - { - // Custom settings... - //"font_face": "" - } + "default_console": "AMXXStudio" }, "variables": { @@ -77,17 +72,23 @@ }, { "name": "Pawn Define Constant - Pawn Include Path - Pawn Define/Include", - "scope": "entity.name.constant.preprocessor, meta.preprocessor.include.path, meta.preprocessor", + "scope": "meta.preprocessor", "foreground": "#FF8040" }, { "name": "Pawn control - Pawn operator - Pawn coma - Function parens - Parens", - "scope": "keyword, parens, punctuation.separator", + "scope": "keyword, punctuation.section.group, punctuation.separator", "foreground": "#007700" }, + { + "name": "Pawn Define Constant2 - Pawn Include Path - Pawn Define/Include", + "scope": "meta.preprocessor", + "foreground": "#FF8040" + }, + { "name": "Pawn Vars Types", "scope": "storage.type.vars, storage.modifier", diff --git a/styles/editor/Ayu (mirage).pawn-editor.sublime-color-scheme b/styles/editor/Ayu (mirage).pawn-editor.sublime-color-scheme new file mode 100644 index 0000000..d2d2659 --- /dev/null +++ b/styles/editor/Ayu (mirage).pawn-editor.sublime-color-scheme @@ -0,0 +1,180 @@ +{ + "name": "AMXXEditor: Ayu Mirage", + "author": "Destro (Modified with Ayu Mirage colors)", + "amxxeditor": + { + "default_popup": "default", + "default_console": "default" + }, + "variables": + { + // Ayu Mirage color palette + "main-foreground": "#CCCAC2", // Ayu Mirage foreground + "main-background": "#1F2430", // Ayu Mirage background + "selection-bg": "#33415E", + "comment-color": "#5C6773", + "cyan": "#95E6CB", + "blue": "#5CCFE6", + "purple": "#D4BFFF", + "green": "#BAE67E", + "coral": "#FFA759", + "red": "#FF3333", + "yellow": "#FFD580", + "orange": "#FFA759", + "invalid-red": "#FF3333", + + // Additional Ayu Mirage colors + "light-blue": "#73D0FF", + "pink": "#F28779", + "tag-gray": "#607080", + "guide-gray": "#383E4C", + "accent-blue": "#399EE6" + }, + "globals": + { + "foreground": "var(main-foreground)", + "background": "var(main-background)", + "caret": "var(accent-blue)", + + "selection": "var(selection-bg)", + "selection_border": "var(selection-bg)", + "invisibles": "var(comment-color)", + + "highlight": "var(accent-blue)", + "find_highlight": "var(selection-bg)", + "find_highlight_foreground": "var(main-foreground)", + + "brackets_foreground": "var(light-blue)", + "brackets_options": "underline", + "bracket_contents_foreground": "var(light-blue)", + "bracket_contents_options": "underline", + + "guide": "var(guide-gray)", + "stack_guide": "var(tag-gray)", + "active_guide": "var(accent-blue)", + + "gutter": "var(main-background)", + "gutter_foreground": "var(comment-color)", + "line_highlight": "var(guide-gray)" + }, + "rules": + [ + { + "name": "Comment", + "scope": "comment", + "foreground": "var(comment-color)", + "font_style": "italic" + }, + { + "name": "Number", + "scope": "constant.numeric", + "foreground": "var(pink)" + }, + { + "name": "Number Float", + "scope": "constant.numeric.float", + "foreground": "var(pink)", + "font_style": "italic" + }, + { + "name": "Built-in constant / Bool", + "scope": "constant.language", + "foreground": "var(purple)", + "font_style": "bold" + }, + { + "name": "Function Definition", + "scope": "support.function", + "foreground": "var(blue)" + }, + { + "name": "Function Call", + "scope": "variable.function", + "foreground": "var(blue)" + }, + { + "name": "Define Constant", + "scope": "entity.name.constant.preprocessor", + "foreground": "var(orange)" + }, + { + "name": "Include path", + "scope": "meta.preprocessor.include.path", + "foreground": "var(green)" + }, + { + "name": "Preprocessor", + "scope": "meta.preprocessor", + "foreground": "var(orange)" + }, + { + "name": "Define Multiline Block", + "scope": "meta.preprocessor.define.multiline", + "foreground": "var(main-foreground)", + "background": "var(guide-gray)" + }, + { + "name": "Define Group", + "scope": "meta.preprocessor.group", + "foreground": "var(light-blue)" + }, + { + "name": "Control", + "scope": "keyword.control", + "foreground": "var(accent-blue)" + }, + { + "name": "Operator", + "scope": "keyword.operator", + "foreground": "var(light-blue)" + }, + { + "name": "Punctuations '().,;[]{}'", + "scope": "punctuation.section, punctuation.separator", + "foreground": "var(tag-gray)" + }, + { + "name": "Function Types", + "scope": "storage.modifier.function", + "foreground": "var(purple)" + }, + { + "name": "Vars Types", + "scope": "storage.type.vars", + "foreground": "var(purple)" + }, + { + "name": "Tag", + "scope": "storage.modifier.tag", + "foreground": "var(yellow)", + "font_style": "italic" + }, + { + "name": "String", + "scope": "string", + "foreground": "var(green)" + }, + { + "name": "String Escape", + "scope": "string constant", + "foreground": "var(orange)" + }, + { + "name": "Constant Vars", + "scope": "constant.vars", + "foreground": "#fff", + "background": "#00000001" + }, + { + "name": "Fix Constant on selection", + "scope": "fixselection", + "background": "#00000001" + }, + { + "name": "Invalid – Illegal", + "scope": "invalid.illegal", + "foreground": "var(main-foreground)", + "background": "var(invalid-red)" + } + ] +} \ No newline at end of file diff --git a/styles/editor/Dracula.pawn-editor.sublime-color-scheme b/styles/editor/Dracula.pawn-editor.sublime-color-scheme new file mode 100644 index 0000000..1eb9449 --- /dev/null +++ b/styles/editor/Dracula.pawn-editor.sublime-color-scheme @@ -0,0 +1,171 @@ +{ + "name": "AMXXEditor: Dracula Pro", + "author": "Destro (Modified with Dracula Pro colors)", + "amxxeditor": + { + "default_popup": "default", + "default_console": "default" + }, + "variables": + { + "main-foreground": "hsl(60, 30%, 96%)", + "main-background": "hsl(231, 15%, 18%)", + "red": "hsl(10, 100%, 75%)", + "orange": "hsl(35, 100%, 75%)", + "yellow": "hsl(60, 100%, 75%)", + "green": "hsl(115, 100%, 75%)", + "cyan": "hsl(170, 100%, 75%)", + "blue": "hsl(210, 100%, 75%)", + "pink": "hsl(330, 100%, 75%)", + "purple": "hsl(250, 100%, 75%)", + "comment": "hsl(225, 27%, 51%)", + "selection": "color(var(main-background) s(15%) l(30%))" + }, + "globals": + { + "foreground": "var(main-foreground)", + "background": "var(main-background)", + "caret": "var(main-foreground)", + + "selection": "var(selection)", + "selection_border": "var(selection)", + "invisibles": "var(comment)", + + "highlight": "var(yellow)", + "find_highlight": "var(yellow)", + "find_highlight_foreground": "var(main-background)", + + + /* Highlight active brackets */ + "brackets_foreground": "#f00", + "brackets_options": "foreground", + "bracket_contents_foreground": "#aaa", + "bracket_contents_options": "underline", + + + "guide": "color(var(comment) a(50%))", + "stack_guide": "color(var(comment) a(75%))", + "active_guide": "var(comment)", + + "gutter": "var(main-background)", + "gutter_foreground": "color(var(comment) a(50%))", + "line_highlight": "color(var(main-background) s(25%) l(25%))" + }, + "rules": + [ + { + "name": "Comment", + "scope": "comment", + "foreground": "var(comment)", + "font_style": "italic" + }, + { + "name": "Number", + "scope": "constant.numeric", + "foreground": "var(purple)" + }, + { + "name": "Number Float", + "scope": "constant.numeric.float", + "foreground": "var(purple)", + "font_style": "italic" + }, + { + "name": "Built-in constant / Bool", + "scope": "constant.language", + "foreground": "var(purple)", + "font_style": "italic bold" + }, + { + "name": "Function Definition", + "scope": "support.function", + "foreground": "var(green)" + }, + { + "name": "Function Call", + "scope": "variable.function", + "foreground": "var(green)" + }, + { + "name": "Define Constant", + "scope": "entity.name.constant.preprocessor", + "foreground": "var(purple)" + }, + { + "name": "Include path", + "scope": "meta.preprocessor.include.path", + "foreground": "var(pink)" + }, + { + "name": "Preprocessor", + "scope": "meta.preprocessor", + "foreground": "var(orange)" + }, + { + "name": "Define Multiline Block", + "scope": "meta.preprocessor.define.multiline", + "foreground": "var(main-foreground)", + "background": "color(var(selection) a(50%))" + }, + { + "name": "Define Group", + "scope": "meta.preprocessor.group", + "foreground": "var(pink)" + }, + { + "name": "Control", + "scope": "keyword.control", + "foreground": "var(pink)" + }, + { + "name": "Operator", + "scope": "keyword.operator", + "foreground": "var(pink)" + }, + { + "name": "Function Types", + "scope": "storage.modifier.function", + "foreground": "var(cyan)", + "font_style": "italic" + }, + { + "name": "Vars Types", + "scope": "storage.type.vars", + "foreground": "var(cyan)", + "font_style": "italic" + }, + { + "name": "Tag", + "scope": "storage.modifier.tag", + "foreground": "var(yellow)", + "font_style": "italic" + }, + { + "name": "String", + "scope": "string", + "foreground": "var(yellow)" + }, + { + "name": "String Escape", + "scope": "string constant", + "foreground": "var(green)" + }, + { + "name": "Constant Vars", + "scope": "constant.vars", + "foreground": "color(var(main-foreground) a(75%))", + "background": "#00000001" + }, + { + "name": "Fix Constant on selection", + "scope": "fixselection", + "background": "#00000001" + }, + { + "name": "Invalid – Illegal", + "scope": "invalid.illegal", + "foreground": "var(main-foreground)", + "background": "color(var(red) blend(#000000 75%))" + } + ] +} \ No newline at end of file diff --git a/styles/editor/Monokai Pro.pawn-editor.sublime-color-scheme b/styles/editor/Monokai Pro.pawn-editor.sublime-color-scheme new file mode 100644 index 0000000..3c6f9d4 --- /dev/null +++ b/styles/editor/Monokai Pro.pawn-editor.sublime-color-scheme @@ -0,0 +1,173 @@ +{ + "name": "AMXXEditor: Monokai Pro", + "author": "Destro (Modified with Monokai Pro colors)", + "amxxeditor": + { + "default_popup": "default", + "default_console": "default" + }, + "variables": + { + // Monokai Pro color palette + "main-foreground": "#FCF6FF", // Monokai Pro foreground + "main-background": "#2D2A2E", // Monokai Pro background + "selection-bg": "#6E6B7420", + "comment-color": "#727072", + "cyan": "#78DCE8", + "blue": "#AB9DF2", + "purple": "#FF6188", + "green": "#A9DC76", + "coral": "#FC9867", + "red": "#FF6188", + "yellow": "#FFD866", + "orange": "#FC9867", + "invalid-red": "#FF6188" + }, + "globals": + { + "foreground": "var(main-foreground)", + "background": "var(main-background)", + "caret": "var(cyan)", + + "selection": "var(selection-bg)", + "selection_border": "var(selection-bg)", + "invisibles": "var(comment-color)", + + "highlight": "var(cyan)", + "find_highlight": "var(selection-bg)", + "find_highlight_foreground": "var(main-foreground)", + + "brackets_foreground": "var(cyan)", + "brackets_options": "underline", + "bracket_contents_foreground": "var(cyan)", + "bracket_contents_options": "underline", + + "guide": "color(var(comment-color) a(40%))", + "stack_guide": "color(var(comment-color) a(65%))", + "active_guide": "var(comment-color)", + + "gutter": "var(main-background)", + "gutter_foreground": "color(var(comment-color) a(50%))", + "line_highlight": "#403E41" + }, + "rules": + [ + { + "name": "Comment", + "scope": "comment", + "foreground": "var(comment-color)", + "font_style": "italic" + }, + { + "name": "Number", + "scope": "constant.numeric", + "foreground": "var(coral)" + }, + { + "name": "Number Float", + "scope": "constant.numeric.float", + "foreground": "var(coral)", + "font_style": "italic" + }, + { + "name": "Built-in constant / Bool", + "scope": "constant.language", + "foreground": "var(coral)", + "font_style": "bold" + }, + { + "name": "Function Definition", + "scope": "support.function", + "foreground": "var(green)" + }, + { + "name": "Function Call", + "scope": "variable.function", + "foreground": "var(green)" + }, + { + "name": "Define Constant", + "scope": "entity.name.constant.preprocessor", + "foreground": "var(orange)" + }, + { + "name": "Include path", + "scope": "meta.preprocessor.include.path", + "foreground": "var(red)" + }, + { + "name": "Preprocessor", + "scope": "meta.preprocessor", + "foreground": "var(orange)" + }, + { + "name": "Define Multiline Block", + "scope": "meta.preprocessor.define.multiline", + "foreground": "var(main-foreground)", + "background": "color(var(selection-bg) a(30%))" + }, + { + "name": "Define Group", + "scope": "meta.preprocessor.group", + "foreground": "var(red)" + }, + { + "name": "Control", + "scope": "keyword.control", + "foreground": "var(purple)" + }, + { + "name": "Operator", + "scope": "keyword.operator", + "foreground": "var(purple)" + }, + { + "name": "Punctuations '().,;[]{}'", + "scope": "punctuation.section, punctuation.separator", + "foreground": "#F8F8F2" + }, + { + "name": "Function Types", + "scope": "storage.modifier.function", + "foreground": "var(purple)" + }, + { + "name": "Vars Types", + "scope": "storage.type.vars", + "foreground": "var(purple)" + }, + { + "name": "Tag", + "scope": "storage.modifier.tag", + "foreground": "var(cyan)", + "font_style": "italic" + }, + { + "name": "String", + "scope": "string", + "foreground": "var(yellow)" + }, + { + "name": "String Escape", + "scope": "string constant", + "foreground": "var(coral)" + }, + { + "name": "Constant Vars", + "scope": "constant.vars", + "foreground": "color(var(cyan) a(75%))", + "background": "#00000001" + }, + { + "name": "Fix Constant on selection", + "scope": "fixselection", + "background": "#00000001" + }, + { + "name": "Invalid – Illegal", + "scope": "invalid.illegal", + "foreground": "var(main-foreground)", + "background": "var(invalid-red)" + } + ] +} \ No newline at end of file diff --git a/styles/editor/Nord.pawn-editor.sublime-color-scheme b/styles/editor/Nord.pawn-editor.sublime-color-scheme new file mode 100644 index 0000000..207148d --- /dev/null +++ b/styles/editor/Nord.pawn-editor.sublime-color-scheme @@ -0,0 +1,180 @@ +{ + "name": "AMXXEditor: Nord", + "author": "Destro (Modified with Nord colors)", + "amxxeditor": + { + "default_popup": "default", + "default_console": "default" + }, + "variables": + { + // Nord color palette + "main-foreground": "#D8DEE9", // Nord foreground + "main-background": "#2E3440", // Nord background + "selection-bg": "#434C5E", + "comment-color": "#616E88", + "cyan": "#88C0D0", + "blue": "#81A1C1", + "purple": "#B48EAD", + "green": "#A3BE8C", + "coral": "#D08770", + "red": "#BF616A", + "yellow": "#EBCB8B", + "orange": "#D08770", + "invalid-red": "#BF616A", + + // Additional Nord colors + "light-blue": "#5E81AC", + "frost1": "#8FBCBB", + "nord1": "#3B4252", + "nord2": "#434C5E", + "nord3": "#4C566A" + }, + "globals": + { + "foreground": "var(main-foreground)", + "background": "var(main-background)", + "caret": "var(cyan)", + + "selection": "var(selection-bg)", + "selection_border": "var(selection-bg)", + "invisibles": "var(comment-color)", + + "highlight": "var(cyan)", + "find_highlight": "var(selection-bg)", + "find_highlight_foreground": "var(main-foreground)", + + "brackets_foreground": "var(cyan)", + "brackets_options": "underline", + "bracket_contents_foreground": "var(cyan)", + "bracket_contents_options": "underline", + + "guide": "var(nord1)", + "stack_guide": "var(nord2)", + "active_guide": "var(nord3)", + + "gutter": "var(main-background)", + "gutter_foreground": "var(comment-color)", + "line_highlight": "var(nord1)" + }, + "rules": + [ + { + "name": "Comment", + "scope": "comment", + "foreground": "var(comment-color)", + "font_style": "italic" + }, + { + "name": "Number", + "scope": "constant.numeric", + "foreground": "var(purple)" + }, + { + "name": "Number Float", + "scope": "constant.numeric.float", + "foreground": "var(purple)", + "font_style": "italic" + }, + { + "name": "Built-in constant / Bool", + "scope": "constant.language", + "foreground": "var(coral)", + "font_style": "bold" + }, + { + "name": "Function Definition", + "scope": "support.function", + "foreground": "var(blue)" + }, + { + "name": "Function Call", + "scope": "variable.function", + "foreground": "var(blue)" + }, + { + "name": "Define Constant", + "scope": "entity.name.constant.preprocessor", + "foreground": "var(purple)" + }, + { + "name": "Include path", + "scope": "meta.preprocessor.include.path", + "foreground": "var(green)" + }, + { + "name": "Preprocessor", + "scope": "meta.preprocessor", + "foreground": "var(purple)" + }, + { + "name": "Define Multiline Block", + "scope": "meta.preprocessor.define.multiline", + "foreground": "var(main-foreground)", + "background": "var(nord1)" + }, + { + "name": "Define Group", + "scope": "meta.preprocessor.group", + "foreground": "var(red)" + }, + { + "name": "Control", + "scope": "keyword.control", + "foreground": "var(cyan)" + }, + { + "name": "Operator", + "scope": "keyword.operator", + "foreground": "var(cyan)" + }, + { + "name": "Punctuations '().,;[]{}'", + "scope": "punctuation.section, punctuation.separator", + "foreground": "var(frost1)" + }, + { + "name": "Function Types", + "scope": "storage.modifier.function", + "foreground": "var(cyan)" + }, + { + "name": "Vars Types", + "scope": "storage.type.vars", + "foreground": "var(cyan)" + }, + { + "name": "Tag", + "scope": "storage.modifier.tag", + "foreground": "var(yellow)", + "font_style": "italic" + }, + { + "name": "String", + "scope": "string", + "foreground": "var(green)" + }, + { + "name": "String Escape", + "scope": "string constant", + "foreground": "var(orange)" + }, + { + "name": "Constant Vars", + "scope": "constant.vars", + "foreground": "var(frost1)", + "background": "#00000001" + }, + { + "name": "Fix Constant on selection", + "scope": "fixselection", + "background": "#00000001" + }, + { + "name": "Invalid – Illegal", + "scope": "invalid.illegal", + "foreground": "var(main-foreground)", + "background": "var(invalid-red)" + } + ] +} \ No newline at end of file diff --git a/styles/editor/Notepad++.pawn-editor.sublime-color-scheme b/styles/editor/Notepad++.pawn-editor.sublime-color-scheme index fb3453a..28b7f93 100644 --- a/styles/editor/Notepad++.pawn-editor.sublime-color-scheme +++ b/styles/editor/Notepad++.pawn-editor.sublime-color-scheme @@ -10,12 +10,7 @@ "amxxeditor": { "default_popup": "Notepad++", - "default_console": "MS-DOS", - "syntax_settings": - { - // Custom settings... - //"font_face": "" - } + "default_console": "MS-DOS" }, "variables": { @@ -89,13 +84,6 @@ "scope": "variable.function", "foreground": "#600000" }, - { - "name": "Pawn Function parens", - "scope": "function.parens", - "foreground": "#505090", - "font_style": "bold" - }, - { "name": "Pawn Define Constant", "scope": "entity.name.constant.preprocessor", @@ -113,7 +101,7 @@ }, { "name": "Pawn Define Multiline Block", - "scope": "meta.preprocessor.define.multiline.pawn", + "scope": "meta.preprocessor.define.multiline", "foreground": "var(main-foreground)", "background": "color(var(main-background) blend(var(main-foreground) 97%))" }, @@ -134,7 +122,7 @@ "scope": "keyword.operator", "foreground": "#111" }, - + { "name": "Pawn Brackets", "scope": "meta.brackets", @@ -143,13 +131,13 @@ }, { "name": "Pawn Parens", - "scope": "parens", + "scope": "punctuation.section.group", "foreground": "#111", "font_style": "bold" }, { "name": "Pawn Braces", - "scope": "keyword.brace", + "scope": "punctuation.section.block", "foreground": "#111" }, { diff --git a/styles/editor/One Dark.pawn-editor.sublime-color-scheme b/styles/editor/One Dark.pawn-editor.sublime-color-scheme new file mode 100644 index 0000000..0a969ae --- /dev/null +++ b/styles/editor/One Dark.pawn-editor.sublime-color-scheme @@ -0,0 +1,169 @@ +{ + "name": "AMXXEditor: One Dark", + "author": "Destro (Modified with One Dark colors)", + "amxxeditor": + { + "default_popup": "default", + "default_console": "default" + }, + "variables": + { + "main-foreground": "#abb2bf", + "main-background": "#2B303B", + }, + "globals": + { + "foreground": "var(main-foreground)", + "background": "var(main-background)", + "caret": "#528bff", + + /* Text Selection */ + "selection": "#bbccf51b", + "selection_border": "#bbccf51b", + "invisibles": "#747369", + + + /* Find Highlight */ + "highlight": "#528bff80", + "find_highlight": "#314365", + "find_highlight_foreground": "#528bff", + + /* Highlight active brackets */ + "brackets_foreground": "#528bff", + "brackets_options": "foreground", + "bracket_contents_foreground": "#528bff", + "bracket_contents_options": "underline", + + /* Indentation guides */ + "guide": "#464c55", + "stack_guide": "#464c55", + "active_guide": "#464c55", + + /* Line numbers */ + "gutter": "#2B303B", + "gutter_foreground": "#636d8388", + "line_highlight": "#8cc2fc0b", + }, + + "rules": + [ + { + "name": "Comment", + "scope": "comment", + "foreground": "#5f697a", + "font_style": "italic" + }, + { + "name": "Number", + "scope": "constant.numeric", + "foreground": "#db9d63" + }, + { + "name": "Number Float", + "scope": "constant.numeric.float", + "foreground": "#db9d63", + "font_style": "italic" + }, + { + "name": "Built-in constant / Bool", + "scope": "constant.language", + "foreground": "#cd74e8", + "font_style": "bold" + }, + { + "name": "Function Definition", + "scope": "support.function", + "foreground": "#5cb3fa" + }, + { + "name": "Function Call", + "scope": "variable.function", + "foreground": "#5cb3fa" + }, + { + "name": "Pawn Define Constant", + "scope": "entity.name.constant.preprocessor", + "foreground": "#db9d63" + }, + { + "name": "Pawn Include path", + "scope": "meta.preprocessor.include.path", + "foreground": "#eb6772" + }, + { + "name": "Pawn Preprocessor", + "scope": "meta.preprocessor", + "foreground": "#db9d63" + }, + { + "name": "Pawn Define Multiline Block", + "scope": "meta.preprocessor.define.multiline", + "foreground": "var(main-foreground)", + "background": "color(var(main-background) blend(var(main-foreground) 97%))" + }, + { + "name": "Pawn Define Group", + "scope": "meta.preprocessor.group", + "foreground": "#eb6772" + }, + + { + "name": "Pawn Control", + "scope": "keyword.control", + "foreground": "#cd74e8" + }, + { + "name": "Pawn Operator", + "scope": "keyword.operator", + "foreground": "#56b6c2" + }, + { + "name": "Pawn Function Types", + "scope": "storage.modifier.function", + "foreground": "#cd74e8" + }, + { + "name": "Pawn Vars Types", + "scope": "storage.type.vars", + "foreground": "#cd74e8" + }, + { + "name": "Pawn Tag", + "scope": "storage.modifier.tag", + "foreground": "#f0c678", + "font_style": "italic" + }, + { + "name": "Pawn String", + "scope": "string", + "foreground": "#9acc76" + }, + { + "name": "Pawn String Escape", + "scope": "string constant", + "foreground": "#eb6772" + }, + { + "name": "Pawn Constant Vars", + "scope": "constant.vars", + "foreground": "#fff", + + // Fix bug, reverse foreground/background + "background": "#00000001" + + }, + { + /* Fix selection highlight */ + "name": "Fix Constant on selection", + "scope": "fixselection", + "background": "#00000001", + }, + + { + "name": "Invalid – Illegal", + "scope": "invalid.illegal", + "foreground": "#ffffff", + "background": "#e05252" + } + ] +} \ No newline at end of file diff --git a/styles/editor/VS Material.pawn-editor.sublime-color-scheme b/styles/editor/VS Material.pawn-editor.sublime-color-scheme new file mode 100644 index 0000000..e1b04de --- /dev/null +++ b/styles/editor/VS Material.pawn-editor.sublime-color-scheme @@ -0,0 +1,175 @@ +{ + "name": "AMXXEditor: VS Material", + "author": "Destro (Modified with Material Theme vscode)", + "amxxeditor": + { + "default_popup": "defaut", + "default_console": "defaut" + }, + "variables": + { + // Material Theme color palette + "main-foreground": "#EEFFFF", // Material foreground + "main-background": "#263238", // Material background + "selection-bg": "#80CBC420", + "comment-color": "#546E7A", + "cyan": "#89DDFF", + "blue": "#82AAFF", + "purple": "#C792EA", + "green": "#C3E88D", + "coral": "#F78C6C", + "red": "#FF5370", + "yellow": "#FFCB6B", + "orange": "#F78C6C", + "invalid-red": "#FF5370" + }, + "globals": + { + "foreground": "var(main-foreground)", + "background": "var(main-background)", + "caret": "var(cyan)", + + "selection": "var(selection-bg)", + "selection_border": "var(selection-bg)", + "invisibles": "var(comment-color)", + + "highlight": "var(cyan)", + "find_highlight": "var(selection-bg)", + "find_highlight_foreground": "var(main-foreground)", + + /* Highlight active brackets */ + "brackets_foreground": "#c00", + "brackets_options": "foreground", + "bracket_contents_foreground": "var(cyan)", + "bracket_contents_options": "underline", + + "guide": "color(var(comment-color) a(40%))", + "stack_guide": "color(var(comment-color) a(65%))", + "active_guide": "var(comment-color)", + + "gutter": "var(main-background)", + "gutter_foreground": "color(var(comment-color) a(50%))", + "line_highlight": "#00000050" + }, + "rules": + [ + { + "name": "Comment", + "scope": "comment", + "foreground": "var(comment-color)", + "font_style": "italic" + }, + { + "name": "Number", + "scope": "constant.numeric", + "foreground": "var(coral)" + }, + { + "name": "Number Float", + "scope": "constant.numeric.float", + "foreground": "var(coral)", + "font_style": "italic" + }, + { + "name": "Built-in constant / Bool", + "scope": "constant.language", + "foreground": "var(coral)", + "font_style": "bold" + }, + { + "name": "Function Definition", + "scope": "support.function", + "foreground": "var(blue)" + }, + { + "name": "Function Call", + "scope": "variable.function", + "foreground": "var(blue)" + }, + { + "name": "Define Constant", + "scope": "entity.name.constant.preprocessor", + "foreground": "var(orange)" + }, + { + "name": "Include path", + "scope": "meta.preprocessor.include.path", + "foreground": "var(red)" + }, + { + "name": "Preprocessor", + "scope": "meta.preprocessor", + "foreground": "var(orange)" + }, + { + "name": "Define Multiline Block", + "scope": "meta.preprocessor.define.multiline", + "foreground": "var(main-foreground)", + "background": "color(var(selection-bg) a(30%))" + }, + { + "name": "Define Group", + "scope": "meta.preprocessor.group", + "foreground": "var(red)" + }, + { + "name": "Control", + "scope": "keyword.control", + "foreground": "var(purple)" + }, + { + "name": "Operator", + "scope": "keyword.operator", + "foreground": "var(cyan)" + }, + { + "name": "Punctuations '().,;[]{}'", + "scope": "punctuation.section, punctuation.separator", + "foreground": "var(cyan)", + }, + { + "name": "Function Types", + "scope": "storage.modifier.function", + "foreground": "var(purple)" + }, + { + "name": "Vars Types", + "scope": "storage.type.vars", + "foreground": "var(purple)" + }, + { + "name": "Tag", + "scope": "storage.modifier.tag", + "foreground": "var(yellow)", + "font_style": "italic" + }, + { + "name": "String", + "scope": "string", + "foreground": "var(green)" + }, + { + "name": "String Escape", + "scope": "string constant", + "foreground": "#709900" + }, + { + "name": "Constant Vars", + "scope": "constant.vars", + //"foreground": "var(main-foreground)", + "foreground": "color(var(cyan) a(75%))", + "background": "#00000001" + }, + { + "name": "Fix Constant on selection", + "scope": "fixselection", + "background": "#00000001" + }, + { + "name": "Invalid – Illegal", + "scope": "invalid.illegal", + "foreground": "var(main-foreground)", + "background": "var(invalid-red)" + } + ] +} \ No newline at end of file diff --git a/styles/editor/atomic.pawn-editor.sublime-color-scheme b/styles/editor/atomic.pawn-editor.sublime-color-scheme index 15baf8a..6ac4586 100644 --- a/styles/editor/atomic.pawn-editor.sublime-color-scheme +++ b/styles/editor/atomic.pawn-editor.sublime-color-scheme @@ -8,16 +8,11 @@ "amxxeditor": { "default_popup": "BasicBlack", - "default_console": "SmallFonts-Terminal", - "syntax_settings": - { - // Custom settings... - //"font_face": "" - } + "default_console": "SmallFonts-Terminal" }, "variables": { - "main-foreground": "#999", + "main-foreground": "#bbb", "main-background": "#111111", }, "globals": @@ -29,7 +24,7 @@ /* Text Selection */ "selection": "#DDF0FF33", "selection_border": "#DDF0FF33", - "invisibles": "#444", // TAB / SPACE + "invisibles": "#555", // TAB / SPACE /* Find Highlight */ @@ -44,9 +39,9 @@ "bracket_contents_options": "underline", /* Indentation guides */ - "guide": "#bbb", - "stack_guide": "#ddd", - "active_guide": "#666", + "guide": "#666", + "stack_guide": "#666", + "active_guide": "#444", /* Line numbers */ "gutter": "#222", @@ -59,7 +54,7 @@ { "name": "Comment", "scope": "comment", - "foreground": "#2e3b66" + "foreground": "#4c5987" }, { "name": "Number", @@ -87,13 +82,6 @@ "scope": "variable.function", "foreground": "#C97616" }, - { - "name": "Pawn Function parens", - "scope": "function.parens", - "foreground": "#1f1", - "font_style": "bold" - }, - { "name": "Pawn Define Constant", "scope": "entity.name.constant.preprocessor", @@ -109,6 +97,12 @@ "scope": "meta.preprocessor", "foreground": "#FFA60D" }, + { + "name": "Define Multiline Block", + "scope": "meta.preprocessor.define.multiline", + "foreground": "var(main-foreground)", + "background": "color(var(main-background) l(+ 5%))" + }, { "name": "Pawn Define Group", "scope": "meta.preprocessor.group", @@ -119,40 +113,24 @@ { "name": "Pawn Control", "scope": "keyword.control", - "foreground": "#12a200" + "foreground": "#5da713" }, { "name": "Pawn Operator", "scope": "keyword.operator", - "foreground": "#8b469b" + "foreground": "#9acd68" }, { - "name": "Pawn Brackets", - "scope": "meta.brackets", - "foreground": "#A6B5C5", - "font_style": "bold" - }, - { - "name": "Pawn Parens", - "scope": "parens", - "foreground": "#A6B5C5", - "font_style": "bold" - }, - { - "name": "Pawn Brace", - "scope": "keyword.brace", - "foreground": "#A6B5C5" - }, - { - "name": "Pawn Coma", - "scope": "punctuation.separator", - "foreground": "#A6B5C5" + "name": "Pawn Brackets, Parens, Brace, Coma", + "scope": "meta.brackets, punctuation.section, punctuation.separator", + "foreground": "#fff", }, + { "name": "Pawn Function Types", "scope": "storage.modifier.function", - "foreground": "#3790E7", + "foreground": "#A35AED", "font_style": "bold" }, { @@ -181,7 +159,7 @@ { "name": "Pawn Constant Vars", "scope": "constant.vars", - "foreground": "#366d85", + "foreground": "#eee", "font_style": "italic", // Fix bug, reverse foreground/background diff --git a/styles/editor/dark.pawn-editor.sublime-color-scheme b/styles/editor/dark.pawn-editor.sublime-color-scheme index 5b2ad08..584dfbf 100644 --- a/styles/editor/dark.pawn-editor.sublime-color-scheme +++ b/styles/editor/dark.pawn-editor.sublime-color-scheme @@ -8,12 +8,7 @@ "amxxeditor": { "default_popup": "BasicBlack", - "default_console": "DarkColorize", - "syntax_settings": - { - // Custom settings... - //"font_face": "" - } + "default_console": "DarkColorize" }, "variables": { @@ -89,21 +84,14 @@ "scope": "variable.function", "foreground": "#3880D1" }, - { - "name": "Pawn Function parens", - "scope": "function.parens.pawn", - "foreground": "#575A7D", - "font_style": "bold" - }, - { "name": "Pawn Define Constant", - "scope": "entity.name.constant.preprocessor.pawn", + "scope": "entity.name.constant.preprocessor", "foreground": "#CF8506" }, { "name": "Pawn Include path", - "scope": "meta.preprocessor.include.path.pawn", + "scope": "meta.preprocessor.include.path", "foreground": "#B4DE0D" }, { @@ -131,19 +119,19 @@ { "name": "Pawn Brackets", - "scope": "meta.brackets.pawn", + "scope": "meta.brackets", "foreground": "#575A7D", "font_style": "bold" }, { "name": "Pawn Parens Group", - "scope": "parens.pawn", + "scope": "punctuation.section.group", "foreground": "#575A7D", "font_style": "bold" }, { "name": "Pawn Brace", - "scope": "keyword.brace.pawn", + "scope": "punctuation.section.block", "foreground": "#575A7D" }, { @@ -153,13 +141,13 @@ }, { "name": "Pawn Function Types", - "scope": "storage.modifier.function.pawn", + "scope": "storage.modifier.function", "foreground": "#5BC718", "font_style": "bold" }, { "name": "Pawn Vars Types", - "scope": "storage.type.vars.pawn", + "scope": "storage.type.vars", "foreground": "#5BC718" }, { @@ -182,7 +170,7 @@ { "name": "Pawn Constant Vars", - "scope": "constant.vars.pawn", + "scope": "constant.vars", "foreground": "#7F98BA", "font_style": "italic", diff --git a/styles/editor/twlight.pawn-editor.sublime-color-scheme b/styles/editor/twlight.pawn-editor.sublime-color-scheme index 8c9d087..4ffc043 100644 --- a/styles/editor/twlight.pawn-editor.sublime-color-scheme +++ b/styles/editor/twlight.pawn-editor.sublime-color-scheme @@ -1,65 +1,54 @@ -/************************************************************ -* Guide: -* https://www.sublimetext.com/docs/3/color_schemes.html -*************************************************************/ { - "name": "AMXXEditor: Twlight", + "name": "AMXXEditor: Twilight", "author": "Destro", - "amxxeditor": - { + "amxxeditor": { "default_popup": "BasicBlack", - "default_console": "SmallFonts-Terminal", - "syntax_settings": - { - // Custom settings... - //"font_face": "" - } + "default_console": "SmallFonts-Terminal" + }, + "variables": { + "main-foreground": "#8797B0", + "main-background": "#151515", + "selection-color": "#DDF0FF", + "highlight-color": "#BCE617", + "comment-color": "#555", }, - "variables": - { - "main-foreground": "#8797B0", - "main-background": "#151515", - }, - "globals": - { + "globals": { "foreground": "var(main-foreground)", "background": "var(main-background)", - "caret": "#10B2E8", + "caret": "#b5af0b", /* Text Selection */ - "selection": "#DDF0FF33", - "selection_border": "#DDF0FF33", - "invisibles": "#CAE2FB3D", // TAB / SPACE - + "selection": "color(var(selection-color) a(20%))", + "selection_border": "color(var(selection-color) a(20%))", + "invisibles": "color(var(main-foreground) a(25%))", // TAB / SPACE /* Find Highlight */ "highlight": "#000", - "find_highlight": "#BCE617", + "find_highlight": "var(highlight-color)", "find_highlight_foreground": "#000", /* Highlight active brackets */ "brackets_foreground": "#a00", "brackets_options": "foreground", - "bracket_contents_foreground": "#fff", + "bracket_contents_foreground": "#FFF", "bracket_contents_options": "underline", /* Indentation guides */ - "guide": "#bbb", - "stack_guide": "#ddd", - "active_guide": "#666", + "guide": "color(var(comment-color) a(35%))", + "stack_guide": "color(var(comment-color) a(70%))", + "active_guide": "var(comment-color)", /* Line numbers */ - "gutter": "#222", - "gutter_foreground": "#aaa", - "line_highlight": "#333", + "gutter": "var(main-background)", + "gutter_foreground": "color(var(main-foreground) a(50%))", + "line_highlight": "color(var(main-background) a(50%))" }, - "rules": - [ + "rules": [ { "name": "Comment", "scope": "comment", - "foreground": "#555", + "foreground": "var(comment-color)", "font_style": "italic" }, { @@ -90,112 +79,102 @@ "foreground": "#3B7BB3" }, { - "name": "Pawn Function parens", - "scope": "function.parens", - "foreground": "#aaa", - "font_style": "bold" - }, - - { - "name": "Pawn Define Constant", + "name": "Define Constant", "scope": "entity.name.constant.preprocessor", "foreground": "#CF8506" }, { - "name": "Pawn Include path", + "name": "Include path", "scope": "meta.preprocessor.include.path", "foreground": "#B4DE0D" }, { - "name": "Pawn Preprocessor", + "name": "Preprocessor", "scope": "meta.preprocessor", "foreground": "#FFA60D" }, { - "name": "Pawn Define Group", + "name": "Define Multiline Block", + "scope": "meta.preprocessor.define.multiline", + "foreground": "var(main-foreground)", + "background": "color(var(main-background) l(+ 5%))" + }, + { + "name": "Define Group", "scope": "meta.preprocessor.group", "foreground": "#B4DE0D" }, - - { - "name": "Pawn Control", + "name": "Control", "scope": "keyword.control", "foreground": "#C9A34F" }, { - "name": "Pawn Operator", + "name": "Operator", "scope": "keyword.operator", "foreground": "#E0BD5C" }, - { - "name": "Pawn Brackets", + "name": "Brackets", "scope": "meta.brackets", "foreground": "#aaa", "font_style": "bold" }, { - "name": "Pawn Parens", - "scope": "parens", + "name": "Parens", + "scope": "punctuation.section.group", "foreground": "#aaa", "font_style": "bold" }, { - "name": "Pawn Brace", - "scope": "keyword.brace", + "name": "Brace", + "scope": "punctuation.section.block", "foreground": "#aaa" }, { - "name": "Pawn Coma", + "name": "Coma", "scope": "punctuation.separator", "foreground": "#aaa" }, { - "name": "Pawn Function Types", + "name": "Function Types", "scope": "storage.modifier.function", "foreground": "#EAED91", "font_style": "bold" }, { - "name": "Pawn Vars Types", + "name": "Vars Types", "scope": "storage.type.vars", "foreground": "#D3D66F" }, { - "name": "Pawn Tag", + "name": "Tag", "scope": "storage.modifier.tag", "foreground": "#B5B861", "font_style": "italic" }, { - "name": "Pawn String", + "name": "String", "scope": "string", - "foreground": "#84A364", - "font_style": "" + "foreground": "#84A364" }, { - "name": "Pawn String Escape", + "name": "String Escape", "scope": "string constant", "foreground": "#9FC748" }, - { - "name": "Pawn Constant Vars", + "name": "Constant Vars", "scope": "constant.vars", "foreground": "#8B6AAD", "font_style": "italic", - - // Fix bug, reverse foreground/background "background": "#00000001" }, { - /* Fix selection highlight bug*/ "name": "Fix Constant on selection", "scope": "fixselection", - "background": "#00000001", + "background": "#00000001" }, - { "name": "Invalid – Illegal", "scope": "invalid.illegal", @@ -203,4 +182,4 @@ "background": "#ff2D5699" } ] -} \ No newline at end of file +} diff --git a/styles/popup/AMXXStudio.pawn-popup.css b/styles/popup/AMXXStudio.pawn-popup.css index 93bbc31..a402a7e 100644 --- a/styles/popup/AMXXStudio.pawn-popup.css +++ b/styles/popup/AMXXStudio.pawn-popup.css @@ -1,5 +1,29 @@ +/* Sublime Text MiniHTML docs -> http://www.sublimetext.com/docs/minihtml.html */ + +/* + Sublime Text Vars: + var(--background) + var(--foreground) + var(--accent) + var(--redish) + var(--orangish) + var(--yellowish) + var(--greenish) + var(--cyanish) + var(--bluish) + var(--purplish) + var(--pinkish) + + AMXX-Editor: + var(--micro-size) + var(--small-size) + var(--normal-size) + var(--large-size) +*/ + html { font-family: Tahoma; + font-size: var(--normal-size); color: #111; } @@ -8,6 +32,7 @@ body { background-color: #fff; } + .top { padding: 4px 10px 7px 10px; border-radius: 5; @@ -16,8 +41,8 @@ body { } .content { - background-color: #fff; padding: 5px 10px 5px 10px; + background-color: #fff; } .bottom { @@ -25,24 +50,42 @@ body { } -.separator { padding: 0px 5px 0px 5px } -.customLink { color: #000; font-weight: bold;} -.incInfo { color: #000; font-weight: bold;} -.incPath { color: #ff8040; font-weight: bold;} +/********************************/ -.pawnDefaultColor { color: #000080; font-family: Verdana; } -.pawnFunction { color: #e00; } -.pawnString { color: #f00; } -.pawnKeyword { color: #007700; } -.pawnConstant { color: #007700; } -.pawnNumber { color: #000080; } -.pawnTag { color: #007700; font-style: italic; } -.pawnTag a { color: #007700; text-decoration: none; } +/* Popup top */ +.top a { color: #000; font-weight: bold;} +.top .separator { + padding: 0px 5px 0px 5px; +} + + +/* Tooltip function */ +.tooltip-function .inspectorTitle { color: #000; font-weight: bold; margin-top: 8px; } +.tooltip-function .inspectorBlock { color: #444; } + + +/* Tooltip include */ +.tooltip-include .info { + margin: 0px; + font-weight: bold; +} +.tooltip-include .path { + color: #D20A0A; +} + + +/* Tooltip tags */ +.tooltip-tag div.itemrow { + margin: 2px; +} + +.tooltip-tag a.funcname { + padding-left: 4px; +} -.inspectorTitle { color: #000; font-weight: bold;} -.inspectorBlock { color: #000; } +/* Document comments Block */ .code { font-family: monospace; background-color: #f5f5f5; @@ -52,14 +95,45 @@ body { } .code b { - color: #000; + color: #666; } -.doct2 { - color: #333; +.doc2 { + color: #111; } -.doct1 { - color: #666; +.doc1 { + color: #444; font-style: italic; -} \ No newline at end of file +} + + +/* Buttons */ +.btn { + font-size: var(--small-size); + text-decoration: none; + border-radius: 4px; + padding-right: 3px; + padding-left: 3px; +} + +.btn.go { + background-color: #4fd154; + color: #fff; +} + +.btn.copy { + background-color: #4fd154; + color: #fff; +} + + +/* Syntax style ( setting 'tooltip_style_mode' = 0 */ +.pawnDefaultColor { color: #000080; font-family: Verdana; } +.pawnFunction { color: #e00; } +.pawnString { color: #f00; } +.pawnOperator { color: #007700; } +.pawnType { color: #007700; } +.pawnNumber { color: #000080; } +.pawnTag { color: #007700; font-style: italic; } +.pawnTag a { color: #007700; text-decoration: none; } diff --git a/styles/popup/BasicBlack.pawn-popup.css b/styles/popup/BasicBlack.pawn-popup.css index b7e5f77..2a9c057 100644 --- a/styles/popup/BasicBlack.pawn-popup.css +++ b/styles/popup/BasicBlack.pawn-popup.css @@ -1,14 +1,38 @@ +/* Sublime Text MiniHTML docs -> http://www.sublimetext.com/docs/minihtml.html */ + +/* + Sublime Text Vars: + var(--background) + var(--foreground) + var(--accent) + var(--redish) + var(--orangish) + var(--yellowish) + var(--greenish) + var(--cyanish) + var(--bluish) + var(--purplish) + var(--pinkish) + + AMXX-Editor: + var(--micro-size) + var(--small-size) + var(--normal-size) + var(--large-size) +*/ + html { font-family: Tahoma; - color: #ccc; + font-size: var(--normal-size); + color: #fff; } - body { margin: 0px; background-color: #000; } + .top { padding: 4px 10px 7px 10px; border-radius: 5; @@ -24,39 +48,84 @@ body { } -.separator { color: #000; padding: 0px 5px 0px 5px } -.customLink { color: #fff; font-weight: bold;} -.incInfo { color: #fff; font-weight: bold;} -.incPath { color: #ff8040; font-weight: bold;} +/********************************/ + +/* Popup top */ +.top a { color: #fff; font-weight: bold;} +.top .separator { + padding: 0px 5px 0px 5px; +} + + +/* Tooltip function */ +.tooltip-function .inspectorTitle { color: #fff; font-weight: bold; margin-top: 8px; } +.tooltip-function .inspectorBlock { color: #ccc; } + + +/* Tooltip include */ +.tooltip-include .info { + margin: 0px; + font-weight: bold; +} +.tooltip-include .path { + color: #D20A0A; +} + + +/* Tooltip tags */ +.tooltip-tag div.itemrow { + margin: 2px; +} -.pawnDefaultColor { color: #999; font-family: Verdana; } -.pawnFunction { color: #e00; } -.pawnString { color: #a69a28; } -.pawnKeyword { color: #00cc00; } -.pawnConstant { color: #00cc00; } -.pawnNumber { color: #0764ba; } -.pawnTag { color: #00cc00; font-style: italic; } -.pawnTag a { color: #00cc00; text-decoration: none; } +.tooltip-tag a.funcname { + padding-left: 4px; +} -.inspectorTitle { color: #fff; font-weight: bold;} -.inspectorBlock { color: #eee; } +/* Document comments Block */ .code { font-family: monospace; - background-color: #444; + background-color: #333; padding: 4px; border-radius: 2px; margin: 5px; } .code b { - color: #eee; + } -.doct2 { +.doc2 { + color: #1f1; } -.doct1 { +.doc1 { + color: #44f; font-style: italic; -} \ No newline at end of file +} + + +/* Buttons */ +.btn { + font-size: var(--small-size); + text-decoration: none; + border-radius: 4px; + padding-right: 3px; + padding-left: 3px; +} + +.btn.go { + background-color: #4fd154; + color: #fff; +} + +.btn.copy { + background-color: #4fd154; + color: #fff; +} + + +/* Syntax style ( setting 'tooltip_style_mode' = 0 */ +.pawnDefaultColor { color: #f00; font-family: Verdana; } + diff --git a/styles/popup/GreenNotepad++.pawn-popup.css b/styles/popup/GreenNotepad++.pawn-popup.css index 47cafb0..1cb5126 100644 --- a/styles/popup/GreenNotepad++.pawn-popup.css +++ b/styles/popup/GreenNotepad++.pawn-popup.css @@ -1,11 +1,34 @@ +/* Sublime Text MiniHTML docs -> http://www.sublimetext.com/docs/minihtml.html */ + +/* + Sublime Text Vars: + var(--background) + var(--foreground) + var(--accent) + var(--redish) + var(--orangish) + var(--yellowish) + var(--greenish) + var(--cyanish) + var(--bluish) + var(--purplish) + var(--pinkish) + + AMXX-Editor: + var(--micro-size) + var(--small-size) + var(--normal-size) + var(--large-size) +*/ + html { font-family: Tahoma; + font-size: var(--normal-size); color: #111; } body { margin: 0px; - } .top { @@ -25,32 +48,45 @@ body { padding: 2px; } -.separator { padding: 0px 0px 0px 0px } -.customLink { - color: #fff; +/********************************/ + + +/* Popup top */ +.top a { + color: #fff; font-weight: bold; - text-decoration: none; - background-color: #c84f52 ; - padding: 1px 3px 2px 3px; - border-radius: 3px; +} +.top .separator { + padding: 0px 5px 0px 5px; } +/* Tooltip function */ +.tooltip-function .inspectorTitle { color: #000; font-weight: bold; margin-top: 5px; } +.tooltip-function .inspectorBlock { color: #555; } -.incInfo { color: #000; font-weight: bold;} -.incPath { color: #000; font-weight: bold;} -.pawnDefaultColor { color: #111; font-family: Verdana; } -.pawnFunction { color: #875A8F; font-weight: bold;} -.pawnString { color: #808080; } -.pawnKeyword { color: #111; } -.pawnConstant { color: #0000ff; font-weight: normal; } -.pawnNumber { color: #ff8000; font-style: italic; } -.pawnTag { color: #3366CC; font-style: italic; } -.pawnTag a { color: #3366CC; text-decoration: none; } +/* Tooltip include */ +.tooltip-include .info { + margin: 0px; + font-weight: bold; +} +.tooltip-include .path { + color: #c84f52; +} + + + +/* Tooltip tags */ +.tooltip-tag div.itemrow { + margin: 2px; +} + +.tooltip-tag a.funcname { + padding-left: 4px; +} -.inspectorTitle { color: #000; font-weight: bold;} -.inspectorBlock { color: #555; } +/* Document comments Block */ .code { font-family: monospace; background-color: #f5f5f5; @@ -60,14 +96,44 @@ body { } .code b { - color: #a5cd60; + color: #666; } -.doct2 { +.doc2 { color: #111; } -.doct1 { +.doc1 { color: #444; font-style: italic; -} \ No newline at end of file +} + + +/* Buttons */ +.btn { + font-size: var(--small-size); + text-decoration: none; + border-radius: 4px; + padding-right: 3px; + padding-left: 3px; +} + +.btn.go { + background-color: #4fd154; + color: #fff; +} + +.btn.copy { + background-color: #4fd154; + color: #fff; +} + + +/* Syntax style ( setting 'tooltip_style_mode' = 0 */ +.pawnDefaultColor { color: #111; font-family: Verdana; } +.pawnFunction { color: #875A8F; font-weight: bold; } +.pawnString { color: #808080; } +.pawnOperator { color: #111; } +.pawnType { color: #0000ff; font-weight: normal; } +.pawnNumber { color: #ff8000; font-style: italic; } +.pawnTag { color: #3366CC; font-style: italic; text-decoration: none; font-family: Verdana; } diff --git a/styles/popup/Notepad++.pawn-popup.css b/styles/popup/Notepad++.pawn-popup.css index 7f1a66a..7bc2e41 100644 --- a/styles/popup/Notepad++.pawn-popup.css +++ b/styles/popup/Notepad++.pawn-popup.css @@ -1,7 +1,7 @@ /* Sublime Text MiniHTML docs -> http://www.sublimetext.com/docs/minihtml.html */ /* - Predefine Vars: + Sublime Text Vars: var(--background) var(--foreground) var(--accent) @@ -53,16 +53,16 @@ body { /* Tooltip function */ -.tooltip-function .inspectorTitle { color: #000; font-weight: bold;} +.tooltip-function .inspectorTitle { color: #000; font-weight: bold; margin-top: 5px; } .tooltip-function .inspectorBlock { color: #555; } /* Tooltip include */ -.tooltip-include b.info { +.tooltip-include .info { margin: 0px; - font-size: var(--large-size); + font-weight: bold; } -.tooltip-include b.path { +.tooltip-include .path { color: #D20A0A; } @@ -77,7 +77,7 @@ body { } -/* Doct Block */ +/* Document comments Block */ .code { font-family: monospace; background-color: #f5f5f5; @@ -90,11 +90,11 @@ body { color: #666; } -.doct2 { +.doc2 { color: #111; } -.doct1 { +.doc1 { color: #444; font-style: italic; } @@ -120,11 +120,11 @@ body { } -/* Syntax style ****************************************/ +/* Syntax style ( setting 'tooltip_style_mode' = 0 */ .pawnDefaultColor { color: #111; font-family: Verdana; } .pawnFunction { color: #875A8F; font-weight: bold; } .pawnString { color: #808080; } -.pawnKeyword { color: #111; } -.pawnConstant { color: #0000ff; font-weight: normal; } +.pawnOperator { color: #111; } +.pawnType { color: #0000ff; font-weight: normal; } .pawnNumber { color: #ff8000; font-style: italic; } .pawnTag { color: #3366CC; font-style: italic; text-decoration: none; font-family: Verdana; } diff --git a/styles/popup/default.pawn-popup.css b/styles/popup/default.pawn-popup.css new file mode 100644 index 0000000..7257a59 --- /dev/null +++ b/styles/popup/default.pawn-popup.css @@ -0,0 +1,131 @@ +/* Sublime Text MiniHTML docs -> http://www.sublimetext.com/docs/minihtml.html */ + +/* + Sublime Text Vars: + var(--background) + var(--foreground) + var(--accent) + var(--redish) + var(--orangish) + var(--yellowish) + var(--greenish) + var(--cyanish) + var(--bluish) + var(--purplish) + var(--pinkish) + + AMXX-Editor: + var(--micro-size) + var(--small-size) + var(--normal-size) + var(--large-size) +*/ + +html { + --fg-title: color(var(--foreground) s(- 100%)); + + font-family: Tahoma; + font-size: var(--normal-size); + color: var(--fg-title); +} + +body { + margin: 0px; +} + + +.top { + padding: 4px 10px 7px 10px; + border-radius: 5; + font-family: Verdana; +} + +.content { + padding: 5px 10px 5px 10px; +} + +.bottom { + + +} + + +/********************************/ + +/* Popup top */ +.top a { color: var(--fg-title); font-weight: bold;} +.top .separator { + padding: 0px 5px 0px 5px; +} + + +/* Tooltip function */ +.tooltip-function .inspectorTitle { color: var(--fg-title); font-weight: bold; margin-top: 8px; } +.tooltip-function .inspectorBlock { color: var(--fg-title); } + + +/* Tooltip include */ +.tooltip-include .info { + margin: 0px; + font-weight: bold; +} +.tooltip-include .path { + color: var(--redish); +} + + +/* Tooltip tags */ +.tooltip-tag div.itemrow { + margin: 2px; +} + +.tooltip-tag a.funcname { + padding-left: 4px; +} + + +/* Document comments Block */ +.code { + font-family: monospace; + background-color: var(--background); + padding: 4px; + border-radius: 2px; + margin: 5px; +} + +.code b { + +} + +.doc2 { + color: var(--yellowish); +} + +.doc1 { + color: var(--orangish); + font-style: italic; +} + + +/* Buttons */ +.btn { + font-size: var(--small-size); + text-decoration: none; + border-radius: 4px; + padding-right: 3px; + padding-left: 3px; +} + +.btn.go { + background-color: #4fd154; + color: #fff; +} + +.btn.copy { + background-color: #4fd154; + color: #fff; +} + + +/* Syntax style ( setting 'tooltip_style_mode' = 0 */ +.pawnDefaultColor { color: var(--foreground); font-family: Verdana; }