diff options
| author | navewindre <nw@moneybot.cc> | 2023-11-13 14:28:08 +0100 |
|---|---|---|
| committer | navewindre <nw@moneybot.cc> | 2023-11-13 14:28:08 +0100 |
| commit | da518fdc0f32839730ccdee8098b59c6f842d93f (patch) | |
| tree | d6f856a6148c0b4d5819f88f068b7287b8044513 /sourcemod/scripting/include/smlib/debug.inc | |
| parent | bc678b10830cdaef64bcc592ca2524ebe0fcdc45 (diff) | |
ya
Diffstat (limited to 'sourcemod/scripting/include/smlib/debug.inc')
| -rw-r--r-- | sourcemod/scripting/include/smlib/debug.inc | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/sourcemod/scripting/include/smlib/debug.inc b/sourcemod/scripting/include/smlib/debug.inc new file mode 100644 index 0000000..6a416ed --- /dev/null +++ b/sourcemod/scripting/include/smlib/debug.inc @@ -0,0 +1,28 @@ +#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. + */ +stock void Debug_FloatArray(const float[] array, int size=3) +{ + char output[64] = ""; + + for (int 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); +} |
