Storing players values on an entity

Hello facepunch,

Im wondering if someone could help me with the issue I can’t get my head around. Could someone tell me the best way to store a players value on an entity.

This is for my gamemode, people have a currency called points and they should be able to deposit them into a bank, but how should I go about storing their deposits?

I.e if I deposit 500points it should only show for me in my bank that I have 500 and for others it’ll show there bank account.

If someone could give me some key points I’d appreciate this a lot, thank you.

SetNWInt is shared for clients too. SetNWString there are many so you can store values easily.



ent[ply:GetSteam64ID] = value


You should save it to data file though, otherwise, it won’t persist.

Thank you.

He means



ent[ply:GetSteamID64()] = value


Yes I do. The code isn’t for copy and paste though regardless, it’s there to give him the idea. Thanks for the fix.