diff options
| author | aura <nw@moneybot.cc> | 2026-02-17 23:42:09 +0100 |
|---|---|---|
| committer | aura <nw@moneybot.cc> | 2026-02-17 23:42:09 +0100 |
| commit | 5e2eb7d67ae933b7566f1944d0bb7744da03d586 (patch) | |
| tree | 054acff1113270a9cd07933df760f3768c1b6853 /source/sourcemod-1.5-dev/scripting/include/smlib/debug.inc | |
| parent | 341db13a008dc12bb22ceb50452d93d01476308c (diff) | |
move source stuff to its own folder
Diffstat (limited to 'source/sourcemod-1.5-dev/scripting/include/smlib/debug.inc')
| -rw-r--r-- | source/sourcemod-1.5-dev/scripting/include/smlib/debug.inc | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/source/sourcemod-1.5-dev/scripting/include/smlib/debug.inc b/source/sourcemod-1.5-dev/scripting/include/smlib/debug.inc new file mode 100644 index 0000000..d0bc141 --- /dev/null +++ b/source/sourcemod-1.5-dev/scripting/include/smlib/debug.inc @@ -0,0 +1,30 @@ +#if defined _smlib_debug_included + #endinput +#endif +#define _smlib_debug_included + +#include <sourcemod> + +/** + * Prints the values of a static Float-Array to the server console. + * + * @param array Static Float-Array. + * @param size Size of the Array. + * @noreturn + */ +stock Debug_FloatArray(const Float:array[], size=3) +{ + new String:output[64] = ""; + + for (new i=0; i < size; ++i) { + + if (i > 0 && i < size) { + StrCat(output, sizeof(output), ", "); + + } + + Format(output, sizeof(output), "%s%f", output, array[i]); + } + + PrintToServer("[DEBUG] Vector[%d] = { %s }", size, output); +} |
