Add PrintToConsoleAll (#601)
This commit is contained in:
parent
e880471296
commit
a36dafb906
@ -210,6 +210,28 @@ native void PrintToServer(const char[] format, any ...);
|
|||||||
*/
|
*/
|
||||||
native void PrintToConsole(int client, const char[] format, any ...);
|
native void PrintToConsole(int client, const char[] format, any ...);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sends a message to every client's console.
|
||||||
|
*
|
||||||
|
* @param format Formatting rules.
|
||||||
|
* @param ... Variable number of format parameters.
|
||||||
|
*/
|
||||||
|
stock void PrintToConsoleAll(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);
|
||||||
|
PrintToConsole(i, "%s", buffer);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reples to a message in a command.
|
* Reples to a message in a command.
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user