Fearless is looking for developers
#31
(12-02-2013, 07:15 PM)Hidayat Wrote: START TO LEARN NOW! Cheese http://maurits.tv/data/garrysmod/wiki/wi...x7a06.html

Quote:
Quote:print("Hello world");
You're done! Wasn't that easy? It should have been.

[...] [...]

Quote:In cl_init.lua add
function set_team()

local frame = vgui.Create( "DFrame" )
frame:SetPos( ScrW() / 2, ScrH() / 2 ) --Set the window in the middle of the players screen/game window
frame:SetSize( 200, 210 ) --Set the size
frame:SetTitle( "Change Team" ) --Set title
frame:SetVisible( true )
frame:SetDraggable( false )
frame:ShowCloseButton( true )
frame:MakePopup()

team_1 = vgui.Create( "DButton", frame )
team_1:SetPos( frame:GetTall() / 2, 5 ) --Place it half way on the tall and 5 units in horizontal
team_1:SetSize( 50, 100 )
team_1:SetText( "Team 1" )
team_1.DoClick = function() --Make the player join team 1
RunConsoleCommand( "team_1" )
end

team_2 = vgui.Create( "DButton", frame )
team_2:SetPos( frame:GetTall() / 2, 105 ) --Place it next to our previous one
team_2:SetSize( 50, 100 )
team_2:SetText( "Team 2" )
team_2.DoClick = function() --Make the player join team 2
RunConsoleCommand( "team_2" )
end

end
concommand.Add( "team_menu", set_team )

Now we have made a simple VGUI window that can be used to change team.

I am fine, thanks.

Goes to show the type of Sh*t Temar has to deal with voluntarily. Serious props to you, Temar.


Messages In This Thread
RE: Fearless is looking for developers - by Rain - 12-01-2013, 10:36 PM
RE: Fearless is looking for developers - by Wood - 12-01-2013, 12:51 PM
RE: Fearless is looking for developers - by Narc - 12-01-2013, 12:58 PM
RE: Fearless is looking for developers - by Jan - 12-01-2013, 01:04 PM
RE: Fearless is looking for developers - by Temar - 12-01-2013, 07:00 PM
RE: Fearless is looking for developers - by Glade - 12-01-2013, 07:05 PM
RE: Fearless is looking for developers - by Temar - 12-01-2013, 10:51 PM
RE: Fearless is looking for developers - by yarrrs - 12-03-2013, 03:03 AM
RE: Fearless is looking for developers - by equal - 12-03-2013, 06:51 AM
RE: Fearless is looking for developers - by Wood - 12-03-2013, 07:13 AM
RE: Fearless is looking for developers - by Jan - 12-03-2013, 04:52 PM
RE: Fearless is looking for developers - by Grub - 12-03-2013, 09:07 PM
RE: Fearless is looking for developers - by Rain - 12-03-2013, 09:26 PM
RE: Fearless is looking for developers - by Wood - 12-03-2013, 06:22 PM
RE: Fearless is looking for developers - by Fultz - 12-03-2013, 10:34 PM
RE: Fearless is looking for developers - by Criks - 01-01-2014, 08:53 PM
RE: Fearless is looking for developers - by Snapz - 01-23-2014, 07:20 PM

Forum Jump:


Users browsing this thread: 2 Guest(s)