TPG.ACE.GetPlayerPoints(ply, refresh)Description
Total ACE points across everything a player owns. refresh decides whether we force ACE to bring its numbers up to date first. Leave it off for anything periodic. ACE's point system is deliberately lazy: a split, merge, armor change or vehicle unfreeze only marks the contraption dirty, and nothing rebuilds until a reader actually needs the value. Polling it on a timer defeats that design -- it turns "rebuild when someone asks" into "rebuild everything, forever" -- and combat re-dirties contraptions constantly (every destroyed component splits one), so the rebuild is rarely a no-op while a fight is happening. Each rebuild also fires ACE_OnContraptionPointsRecalculated, which runs TPG's own re-bill listener (tpg.economy). This is the one thing TPG asks of ACE that plain sandbox+ACE never does, which makes it the first suspect for "same tanks, but only laggy under TPG."
Parameters
| Name | Type | Description |
|---|---|---|
ply | Player | |
refresh? | boolean | Force a rebuild before reading.(default: false) |
Returns
| Type | Description |
|---|---|
number |
Examples
No examples available.
Used In
No usages found in the codebase.