MCPcopy Create free account
hub / github.com/alliedmodders/sourcemod / ClientConsolePrint

Function ClientConsolePrint

core/PlayerManager.cpp:959–984  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

957}
958
959void ClientConsolePrint(edict_t *e, const char *fmt, ...)
960{
961 char buffer[512];
962
963 va_list ap;
964 va_start(ap, fmt);
965 size_t len = vsnprintf(buffer, sizeof(buffer), fmt, ap);
966 va_end(ap);
967
968 if (len >= sizeof(buffer) - 1)
969 {
970 buffer[sizeof(buffer) - 2] = '\n';
971 buffer[sizeof(buffer) - 1] = '\0';
972 } else {
973 buffer[len++] = '\n';
974 buffer[len] = '\0';
975 }
976
977 CPlayer *pPlayer = g_Players.GetPlayerByIndex(IndexOfEdict(e));
978 if (!pPlayer)
979 {
980 return;
981 }
982
983 pPlayer->PrintToConsole(buffer);
984}
985
986void ListExtensionsToClient(CPlayer *player, const CCommand &args)
987{

Callers 4

ListExtensionsToClientFunction · 0.85
ListPluginsToClientFunction · 0.85
OnClientCommandMethod · 0.85
OnMenuSelectMethod · 0.85

Calls 3

IndexOfEdictFunction · 0.85
GetPlayerByIndexMethod · 0.80
PrintToConsoleMethod · 0.80

Tested by

no test coverage detected