Some questions about variables and players

How would I go about storing player related variables and accessing them for display on panels? For example, I plan to read the ammo count of a weapon which a player is holding and print it to a panel.
Also, how to store variables “on” a player for the duration while the server is running?

local ply = Entity(1)

ply.somevalue = “stuff”
ply.sometable = {stuff1 = “1”, stuff2 = “2”}


When setting up the panel, set the text and stuff to the LocalPlayer()'s current weapon ammo.

LocalPlayer():GetActiveWeapon():Clip1() or something. I don’t remember.