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.
[QUOTE=Chickengbs;51486119]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.[/QUOTE]
[CODE]
ent[ply:GetSteam64ID] = value
[/CODE]
You should save it to data file though, otherwise, it won't persist.
Thank you.
[QUOTE=FlyPiggyBanks;51487769][CODE]
ent[ply:GetSteam64ID] = value
[/CODE]
You should save it to data file though, otherwise, it won't persist.[/QUOTE]
He means
[code]
ent[ply:GetSteamID64()] = value
[/code]
[QUOTE=Apickx;51490996]He means
[code]
ent[ply:GetSteamID64()] = value
[/code][/QUOTE]
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.
Sorry, you need to Log In to post a reply to this thread.