Hats spawned from server.

Hi.
I am having issues with spawning a hat from server. What i want is so ply:hats == 1 then they get a hat, but
how do you spawn a hat from the client, with permission from the server?

usermessages

Or sendlua if you are on steroids.

Could I get an example or something? I’m not very familiar with umsg. Also how do I make the client spawn an entity?

Here is a detailed article on user messages and as specified on the page of **[Ents.Create

http://wiki.garrysmod.com/favicon.ico](wiki.garrysmod.com/?title=Ents.Create)** it is available both serverside and clientside.