New GLua YouTube tutor

Hello guys, wanted to let you know about an new GLua tutor, who makes Up-To-Date tutorial videos, He does Gamemode scripting, but the tutorials can be applied to normal addons too.
He did stuff like EXP/Leveling system, Shop menu, Money, Ammo dispenser and more.
Since I am bad with posting actually, I just say you check out the guy for yourself! He’s already in the stickies, but since you’re -probably- lazy, heres the GLua playlist of him:

Looks great, one suggestion could you possibly cover creating a custom base gamemode? i.e Custom Player Class, VGUI, etc.

I aint the person! x3 You should contact him instead.

Using NWInts.

I’m done.

Better than nothing, right?

Yeah - and that was my 5000th post :stuck_out_tongue:

Gratz >w< I need 5K posts + 2 years(I think) to get gold member :c

Just curious, what is wrong with them? Is it because it goes to all clients from the server, compared to .net? Which is single client to server?

Surely using one or two NW’s for basic things that will not come up that often will be alright?

Its exploitable, since it makes the money & exp system handled by client too.


Really? Never really hear about that.

Also, I have not watched the videos.

SetNW<> is shared apparently, but the client can’t make changes to it.

Well then, I am dumb, never really needed to use those.

NWInts are just a bad solution.

Net library is well more organized, you can store all your variables in one table… say “rpg”.
You can store it on player by doing

[lua]ply.rpg = {}
ply.rpg.level = 1
ply.rpg.exp = 300[/lua]

Then you can send whole rpg table via:

[lua]net.WriteTable( ply.rpg )[/lua]

Or send values separately and it’ll be way more efficient than NWInt

Ahh right, makes sense. - Cheers

Don’t use WriteTable if you know table structure, goddammit.

I am curious what would you use then?

That’s what I meant - you can send everything separately.
It’s pointless to send whole table if one variable changed.

Write each element separately depending on the type, like WriteString or WriteInt. If there’s an unpredicted amount of elements, write an int for the table size. If there are unpredicted types, use WriteTable.

Manually write values from table.

ply.rpg = {}
ply.rpg.level = 1
ply.rpg.exp = 300


net.WriteInt(ply.rpg.level, 32)
net.WriteInt(ply.rpg.exp, 32)

EDIT: Ninja’d.