I’d like to make some convenience functions for a gamemode I’m starting but I’m not sure how to write them out in a way that will make them work or where to place them (shared.lua if I had to guess). The functions I’d like to make would work something like this
ply:GetCookies() + num
//and work like this
//ply now has 50 cookies
not sure how good of an example this is, but it’s the best I could think of.
The primary issue, I think, would be getting gmod to know what “ply” is (I mean in functions like PlayerSpawn() ply is already defined but I don’t know how to define “ply” in GiveCookies())