Discord
Steam
/
Garry's Mod
/
Developers
/
Have i used va..
Login/Join
Event Log
Have i used variables correctly my script?
3 replies, posted
Search
In This Thread
[CODE]local servername = enterservernamehere local server1 = entergamemodehere local server1ip = enterserveriphere -- Do not edit below this line. local DrawServerJoiner = vgui.Create( "DFrame" ) Frame:SetTitle( servername .. "Server Changer!" ) Frame:SetSize( 300, 300 ) Frame:Center() Frame:MakePopup() Frame.Paint = function( self, w, h ) draw.RoundedBox( 0, 0, 0, w, h, Color( 231, 76, 60, 150 ) ) end local Button = vgui.Create( "DButton", Frame ) Button:SetText( "Join our" .. server1 ) Button:SetTextColor( Color( 255, 255, 255 ) ) Button:SetPos( 100, 100 ) Button:SetSize( 100, 30 ) Button.Paint = function( self, w, h ) draw.RoundedBox( 0, 0, 0, w, h, Color( 41, 128, 185, 250 ) ) -- Draw a blue button end Button.DoClick = function() Msg( .. v:Nick() .. "Changing server now!" ) coroutine.wait(3) JoinServer( .. server1ip ..) end[/CODE] This is my code, will this work or not? im running it on the client.
Run it, if it shows errors, then it doesn't work. [code]JoinServer( .. server1ip ..)[/code] Not sure what are you trying to do here, but looks fancy.
JoinServer isn't available in the client state.
Sorry, you need to
Log In
to post a reply to this thread.