diff --git a/src/commands.cpp b/src/commands.cpp index ec2470c3..42d07940 100644 --- a/src/commands.cpp +++ b/src/commands.cpp @@ -390,6 +390,18 @@ CON_COMMAND_CHAT(myuid, "test") ClientPrint(player, HUD_PRINTTALK, CHAT_PREFIX "Your userid is %i, slot: %i, retrieved slot: %i", g_pEngineServer2->GetPlayerUserId(iPlayer).Get(), iPlayer, g_playerManager->GetSlotFromUserId(g_pEngineServer2->GetPlayerUserId(iPlayer).Get())); } +CON_COMMAND_CHAT(color, "Set player's hud color") { + if (!player) + return; + + if (args.ArgC() < 2){ + ClientPrint(player, HUD_PRINTTALK, CHAT_PREFIX "Usage .color <1-5>"); + return; + } + + player->m_iCompTeammateColor = atoi(args[1]) % 5; +} + bool match_paused = false; bool ct_ready = true; bool t_ready = true; diff --git a/src/cs2_sdk/entity/ccsplayercontroller.h b/src/cs2_sdk/entity/ccsplayercontroller.h index 8f71f256..b3e18036 100644 --- a/src/cs2_sdk/entity/ccsplayercontroller.h +++ b/src/cs2_sdk/entity/ccsplayercontroller.h @@ -33,6 +33,7 @@ class CCSPlayerController : public CBasePlayerController SCHEMA_FIELD(CCSPlayerController_InGameMoneyServices*, m_pInGameMoneyServices) SCHEMA_FIELD(CCSPlayerController_ActionTrackingServices*, m_pActionTrackingServices) SCHEMA_FIELD(CUtlSymbolLarge, m_szClan) + SCHEMA_FIELD(int32_t , m_iCompTeammateColor); SCHEMA_FIELD(bool, m_bPawnIsAlive); SCHEMA_FIELD(CHandle, m_hPlayerPawn);