• egh, networking questions.
    2 replies, posted
first question, in the wiki ([url]http://wiki.garrysmod.com/page/net/Receive[/url]) it says function callback is "The function to be called if the specified message was received." what does this mean, do i put in a function here or do i put in the name of a function, or am i confusing it with string names [editline]29th September 2016[/editline] secondly, im going to have a text entry in a dframe, already got that, and you type the targets name in it and it is sent to the server, which then converts the name as a string to where the next net message will be sent. [editline]29th September 2016[/editline] or, how i make a dropdown list of the players. idk how to do that...ima try that...
net.Receive accepts a function as its second argument: [code]net.Receive( "MyNetName", function( _, pPlayer ) -- code end ) -- or local function MyFunction( _, ply ) -- code end net.Receive( "MyNetName", MyFunction )[/code]
is it [URL]http://wiki.garrysmod.com/page/Category:DScrollPanel?[/URL] idk cause i went to test it and 14 addons i was installing kept failing to extract and it got thrown into a loop of failure. so sad. [editline]29th September 2016[/editline] [QUOTE=code_gs;51130204]net.Receive accepts a function as its second argument: [code]net.Receive( "MyNetName", function( _, pPlayer ) -- code end ) -- or local function MyFunction( _, ply ) -- code end net.Receive( "MyNetName", MyFunction )[/code][/QUOTE] you mean a function, as in [CODE]function ur mom LOL print (correct print format) end[/CODE] oh hey tupac is looking at my thread. im confused though. im trying to code it myself, but i dont really do networking. [editline]29th September 2016[/editline] heres a picture to help you, if it does. [URL]http://imgur.com/CeFGUd5[/URL]
Sorry, you need to Log In to post a reply to this thread.