roflmuffin / CounterStrikeSharp

CounterStrikeSharp allows you to write server plugins in C# for Counter-Strike 2/Source2/CS2

Home Page:https://docs.cssharp.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Player's money not updating on HUD

WeirdPhrog opened this issue · comments

Hi, when I give a player some money during freeze time, the player doesn't see any changes on HUD until freeze time ends. Please help.

I tried Utilities.SetStateChanged(playerPawn!, "CCSPlayerController_InGameMoneyServices", "m_iAccount"); but nothing changed.

v 204

Do this instead, it needs to be done on the controller not the pawn, and the item to mark as state changed should be the whole reference to money services.

SetStateChanged(controller, "CCSPlayerController", "m_pInGameMoneyServices");

Thank you!