Get Server variable inside clientside LUA

You know them noobs that ask annoying questions for help because they simply don’t understand how it works?

Well thats me.
In a normal gamemode thing you get the cl_init, the init, and the shared.
Does the engine automatically see them and make sure that the cl_init goes to the client, the init goes to the server?

If so how would i get the cl_init code to read some variables on the server(init)?

For example:
Server: “ply.lol = true”
Client: “ply:ChatPrint(ply.lol)”

Would this work?
Thanks in advance

EDIT:
Heyy, care to give me a simple rundown on the fundamentals of this client and server thing that i can’t seem to comprehend? :wink:

[lua]
– Server:
ply:SetNWBool(“lol”,true)
– Client:
ply:GetNWBool(“lol”)[/lua]

Have a look at this

Thanks MakeR, that helped a bit, still confusing but I guess i’ll get the hang of it eventually.

If you are trying to share data on a SEnt then i suggest you use DataTables, else NWVars should do what you want to.