Spend Resource
public void SpendResource(string id, int amount)
This method removes the given amount of the resource identified by id from the player (use resourceData.GetResourceId() to get a resource’s id).
Example
[Inject] PlayersService players;
// this example code can be run from any script
players.LocalPlayer.SpendResource(moneyResourceId, 500); // removes 500 of the given resource from the local player