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:
[URL="https://github.com/LPDaVinci/Slasher-Modified/tree/dev"]https://github.com/LPDaVinci/Slasher-Modified/tree/dev[/URL]
You have to look in these files:
[URL="https://github.com/LPDaVinci/Slasher-Modified/blob/dev/gamemode/maps/slash_highschool.lua"]https://github.com/LPDaVinci/Slasher-Modified/blob/dev/gamemode/maps/slash_highschool.lua[/URL]
and the killer
[URL="https://github.com/LPDaVinci/Slasher-Modified/blob/dev/gamemode/killers/ghostface.lua"]https://github.com/LPDaVinci/Slasher-Modified/blob/dev/gamemode/killers/ghostface.lua[/URL]
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
[QUOTE=Sodak;52569509]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:
[URL="https://github.com/LPDaVinci/Slasher-Modified/tree/dev"]https://github.com/LPDaVinci/Slasher-Modified/tree/dev[/URL]
You have to look in these files:
[URL="https://github.com/LPDaVinci/Slasher-Modified/blob/dev/gamemode/maps/slash_highschool.lua"]https://github.com/LPDaVinci/Slasher-Modified/blob/dev/gamemode/maps/slash_highschool.lua[/URL]
and the killer
[URL="https://github.com/LPDaVinci/Slasher-Modified/blob/dev/gamemode/killers/ghostface.lua"]https://github.com/LPDaVinci/Slasher-Modified/blob/dev/gamemode/killers/ghostface.lua[/URL]
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[/QUOTE]
[video=youtube;ODlGyS6lR1M]https://www.youtube.com/watch?v=ODlGyS6lR1M[/video]
You better take a look at the [URL="http://wiki.garrysmod.com/page/Net_Library_Usage"]Net Library usage[/URL] 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.
[QUOTE=Sodak;52569590]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.[/QUOTE]
Network those vars with either the net.Send and just send those vars, or use NWBool, NWInt, NWEntity etc etc etc
[QUOTE=Sodak;52569590]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.[/QUOTE]
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.
[QUOTE=geferon;52569613]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.[/QUOTE]
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.
[QUOTE=geferon;52569579]You better take a look at the [URL="http://wiki.garrysmod.com/page/Net_Library_Usage"]Net Library usage[/URL] page on the wiki[/QUOTE]
Sorry, you need to Log In to post a reply to this thread.