diff --git a/SMJSONAPI/scripting/API.inc b/SMJSONAPI/scripting/API.inc index d5e51312..a29ccba0 100644 --- a/SMJSONAPI/scripting/API.inc +++ b/SMJSONAPI/scripting/API.inc @@ -43,6 +43,18 @@ public void API_PrintHintTextToAll(const char[] format, any ...) } } +public void API_PrintToChat(int client, const char[] format, any ...) +{ + char buffer[254]; + + if (IsClientInGame(client)) + { + SetGlobalTransTarget(client); + VFormat(buffer, sizeof(buffer), format, 3); + PrintToChat(client, "%s", buffer); + } +} + public int API_GetMaxClients() { return MaxClients; @@ -50,8 +62,9 @@ public int API_GetMaxClients() public int API_GetUserFlagBits(int client) { - if (!IsClientConnected(client)) - return 0; + if (!IsClientConnected(client)) + return 0; - return GetUserFlagBits(client); + return GetUserFlagBits(client); } + diff --git a/SMJSONAPI/scripting/SMJSONAPI.sp b/SMJSONAPI/scripting/SMJSONAPI.sp index 9727bf90..891eb228 100644 --- a/SMJSONAPI/scripting/SMJSONAPI.sp +++ b/SMJSONAPI/scripting/SMJSONAPI.sp @@ -374,6 +374,8 @@ static int HandleRequest(int Client, JSONObject jRequest, JSONObject jResponse) } delete jValue; } + //this should just be my torchlight paranoia related to back when botox had ssh access through watchdog systemctl service. + /* int sm_call_finish_ex_params_size = 1; if (parameter_count_verified > sm_call_finish_ex_params_size) { @@ -388,6 +390,7 @@ static int HandleRequest(int Client, JSONObject jRequest, JSONObject jResponse) jResponse.Set("error", jError); return -1; } + */ int Result; static char sException[1024]; @@ -509,3 +512,4 @@ static int ClientFromSocket(AsyncSocket socket) } return -1; } +