From 775083816f009813b1242d036d366be16c285ef3 Mon Sep 17 00:00:00 2001 From: OciXCrom Date: Wed, 12 Sep 2018 19:21:42 +0200 Subject: [PATCH] Constify defines and fix min/max values for cvars --- plugins/imessage.sma | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/imessage.sma b/plugins/imessage.sma index 18ab00d6..6e83f476 100755 --- a/plugins/imessage.sma +++ b/plugins/imessage.sma @@ -14,8 +14,8 @@ #include #include -#define MAX_MSG_LEN 384 -#define TASK_MSG 12345 +const MAX_MSG_LEN = 384; +const TASK_MSG = 12345; enum _:MessageInfo { @@ -52,7 +52,7 @@ public plugin_init() bind_pcvar_float(create_cvar("amx_freq_imessage", "180", _, "Frequency in seconds of info messages", true, 0.0), g_amx_freq_imessage); bind_pcvar_float(create_cvar("amx_imessage_x_pos", "-1.0", _, "X position for info messages", true, -1.0, true, 1.0), g_amx_imessage_x_pos); bind_pcvar_float(create_cvar("amx_imessage_y_pos", "0.2", _, "Y position for info messages", true, -1.0, true, 1.0), g_amx_imessage_y_pos); - bind_pcvar_float(create_cvar("amx_imessage_holdtime", "12.0", _, "Hold time for info messages", true, -1.0, true, 1.0), g_amx_imessage_holdtime); + bind_pcvar_float(create_cvar("amx_imessage_holdtime", "12.0", _, "Hold time for info messages", true, 0.0), g_amx_imessage_holdtime); bind_pcvar_string(get_cvar_pointer("hostname"), g_hostname, charsmax(g_hostname)); new lastinfo[8];