add SMJSONAPI

This commit is contained in:
BotoX
2018-08-07 22:22:27 +02:00
parent ab4e9de4a4
commit 2262559464
8 changed files with 2014 additions and 0 deletions
+49
View File
@@ -0,0 +1,49 @@
public void API_PrintToChatAll(const char[] format, any ...)
{
char buffer[254];
for (int i = 1; i <= MaxClients; i++)
{
if (IsClientInGame(i))
{
SetGlobalTransTarget(i);
VFormat(buffer, sizeof(buffer), format, 2);
PrintToChat(i, "%s", buffer);
}
}
}
public void API_PrintCenterTextAll(const char[] format, any ...)
{
char buffer[254];
for (int i = 1; i <= MaxClients; i++)
{
if (IsClientInGame(i))
{
SetGlobalTransTarget(i);
VFormat(buffer, sizeof(buffer), format, 2);
PrintCenterText(i, "%s", buffer);
}
}
}
public void API_PrintHintTextToAll(const char[] format, any ...)
{
char buffer[254];
for (int i = 1; i <= MaxClients; i++)
{
if (IsClientInGame(i))
{
SetGlobalTransTarget(i);
VFormat(buffer, sizeof(buffer), format, 2);
PrintHintText(i, "%s", buffer);
}
}
}
public int API_GetMaxClients()
{
return MaxClients;
}