Problems with performing draw.RoundedBox in net.Receive
2 replies, posted
In my init.lua I'm running this function:
PrintMessage(HUD_PRINTCONSOLE, "Normal Round Started!")
--those 2 lines are unrelated ^^
In cl_init.lua I'm receiving it here:
draw.RoundedBox(2, 20, 20, 20, 20, Color(0, 0, 0, 125))
draw.DrawText("Round Thingy", "DermaLarge", 20, 20, Color(255, 255, 255, 255), TEXT_ALIGN_CENTER)
print("I received it!")
It successfully receives the print, as I see "I received it!" in console, but doesn't seem to want to draw anything. Any ideas as to why? Thanks.
You can't use draw functions inside of a net.Receive
As the wiki says:
You should create a variable on the client file and set it whenever the client receives the message, and with that variable you should draw the text
Thank you, that fixed my problem.
Sorry, you need to Log In to post a reply to this thread.