Working with net. Variables

Hey dear readers, im currently working on the slasher modification and found an interesting github repo from one user.

He splits out the killers get select by map.

I tried to make net.receive using to make it so: If the player is admin he gets another killer than the normal killer on a map.

But the net functions are new to me and idk if its work.

Here is the repo:

You have to look in these files:

and the killer

So how is it possible to run a net function to run the killer function into the map.lua and how is it possible to make a if check to run the net function for killer one if player is admin and run the net when the user is not killer.

Maybe u know what i mean

have a nice day

You better take a look at the Net Library usage page on the wiki

yeah i already looked up… but i really messed up i guess its kinda hard to communicate some vars are server side some vars client side.

Network those vars with either the net.Send and just send those vars, or use NWBool, NWInt, NWEntity etc etc etc

You need to properly understand Lua and the concept of the Client and Server instances. In case you don’t, i’d recommend you taking a look at tutorials online for both.

Yeah ure right… but the video tutorials are just for messaging. i need something special… its must be possible to run this whole lua file as net.library because if u include it its not possible to make a command to change the killer.