All pastes #424013 Raw Edit

Unnamed

public lua v1 · immutable
·published 2007-04-04 14:58 UTC
rendered paste body
if SERVER then        local function GiveSomeWeapons( ply, command, arguments )             ply:Give("pb_angel")         endconcommand.Add( "pb_angel", GiveSomeWeapons )		local function GiveDM4Weapon( ply, command, arguments )             ply:Give("pb_dm4")         endconcommand.Add( "pb_dm4", GiveDM4Weapon )endGMPBWeaponsSelect = [[ "resource/ui/gmpb_weapons.res"{	"vgui_hello"	{		"ControlName"		"Frame"		"fieldName"		"vgui_hello"		"xpos"		"500"		"ypos"		"850"		"zpos"		"290"		"wide"		"347"		"tall"		"130"		"autoResize"		"0"		"pinCorner"		"0"		"visible"		"1"		"enabled"		"1"		"tabPosition"		"0"		"settitlebarvisible"		"1"		"title"		"#Garry's Mod Paintball Weapon Selection"		"sizable"		"1"	}	"frame_topGrip"	{		"ControlName"		"Panel"		"fieldName"		"frame_topGrip"		"xpos"		"8"		"ypos"		"0"		"wide"		"331"		"tall"		"5"		"autoResize"		"0"		"pinCorner"		"0"		"visible"		"1"		"enabled"		"1"		"tabPosition"		"0"	}	"frame_bottomGrip"	{		"ControlName"		"Panel"		"fieldName"		"frame_bottomGrip"		"xpos"		"8"		"ypos"		"125"		"wide"		"321"		"tall"		"5"		"autoResize"		"0"		"pinCorner"		"0"		"visible"		"1"		"enabled"		"1"		"tabPosition"		"0"	}	"frame_leftGrip"	{		"ControlName"		"Panel"		"fieldName"		"frame_leftGrip"		"xpos"		"0"		"ypos"		"8"		"wide"		"5"		"tall"		"114"		"autoResize"		"0"		"pinCorner"		"0"		"visible"		"1"		"enabled"		"1"		"tabPosition"		"0"	}	"frame_rightGrip"	{		"ControlName"		"Panel"		"fieldName"		"frame_rightGrip"		"xpos"		"342"		"ypos"		"8"		"wide"		"5"		"tall"		"104"		"autoResize"		"0"		"pinCorner"		"0"		"visible"		"1"		"enabled"		"1"		"tabPosition"		"0"	}	"frame_tlGrip"	{		"ControlName"		"Panel"		"fieldName"		"frame_tlGrip"		"xpos"		"0"		"ypos"		"0"		"wide"		"8"		"tall"		"8"		"autoResize"		"0"		"pinCorner"		"0"		"visible"		"1"		"enabled"		"1"		"tabPosition"		"0"	}	"frame_trGrip"	{		"ControlName"		"Panel"		"fieldName"		"frame_trGrip"		"xpos"		"339"		"ypos"		"0"		"wide"		"8"		"tall"		"8"		"autoResize"		"0"		"pinCorner"		"0"		"visible"		"1"		"enabled"		"1"		"tabPosition"		"0"	}	"frame_blGrip"	{		"ControlName"		"Panel"		"fieldName"		"frame_blGrip"		"xpos"		"0"		"ypos"		"122"		"wide"		"8"		"tall"		"8"		"autoResize"		"0"		"pinCorner"		"0"		"visible"		"1"		"enabled"		"1"		"tabPosition"		"0"	}	"frame_brGrip"	{		"ControlName"		"Panel"		"fieldName"		"frame_brGrip"		"xpos"		"329"		"ypos"		"112"		"wide"		"18"		"tall"		"18"		"autoResize"		"0"		"pinCorner"		"0"		"visible"		"1"		"enabled"		"1"		"tabPosition"		"0"	}	"frame_caption"	{		"ControlName"		"Panel"		"fieldName"		"frame_caption"		"xpos"		"0"		"ypos"		"0"		"wide"		"337"		"tall"		"23"		"autoResize"		"0"		"pinCorner"		"0"		"visible"		"1"		"enabled"		"1"		"tabPosition"		"0"	}	"frame_minimize"	{		"ControlName"		"Button"		"fieldName"		"frame_minimize"		"xpos"		"0"		"ypos"		"0"		"wide"		"18"		"tall"		"18"		"autoResize"		"0"		"pinCorner"		"0"		"visible"		"0"		"enabled"		"1"		"tabPosition"		"0"		"labelText"		"0"		"textAlignment"		"north-west"		"dulltext"		"0"		"brighttext"		"0"		"wrap"		"0"		"Default"		"0"	}	"frame_maximize"	{		"ControlName"		"Button"		"fieldName"		"frame_maximize"		"xpos"		"0"		"ypos"		"0"		"wide"		"18"		"tall"		"18"		"autoResize"		"0"		"pinCorner"		"0"		"visible"		"0"		"enabled"		"1"		"tabPosition"		"0"		"labelText"		"1"		"textAlignment"		"north-west"		"dulltext"		"0"		"brighttext"		"0"		"wrap"		"0"		"Default"		"0"	}	"frame_mintosystray"	{		"ControlName"		"Button"		"fieldName"		"frame_mintosystray"		"xpos"		"0"		"ypos"		"0"		"wide"		"18"		"tall"		"18"		"autoResize"		"0"		"pinCorner"		"0"		"visible"		"0"		"enabled"		"1"		"tabPosition"		"0"		"labelText"		"o"		"textAlignment"		"north-west"		"dulltext"		"0"		"brighttext"		"0"		"wrap"		"0"		"Command"		"MinimizeToSysTray"		"Default"		"0"	}	"frame_close"	{		"ControlName"		"Button"		"fieldName"		"frame_close"		"xpos"		"322"		"ypos"		"8"		"wide"		"18"		"tall"		"18"		"autoResize"		"0"		"pinCorner"		"0"		"visible"		"1"		"enabled"		"1"		"tabPosition"		"0"		"labelText"		"r"		"textAlignment"		"north-west"		"dulltext"		"0"		"brighttext"		"0"		"wrap"		"0"		"Default"		"0"	}	"frame_menu"	{		"ControlName"		"FrameSystemButton"		"fieldName"		"frame_menu"		"xpos"		"5"		"ypos"		"5"		"wide"		"16"		"tall"		"16"		"autoResize"		"0"		"pinCorner"		"0"		"visible"		"1"		"enabled"		"1"		"tabPosition"		"0"		"textAlignment"		"west"		"dulltext"		"0"		"brighttext"		"0"		"wrap"		"0"		"Default"		"0"	}	"Button4"	{		"ControlName"		"Button"		"fieldName"		"Button4"		"xpos"		"15"		"ypos"		"35"		"zpos"		"290"		"wide"		"64"		"tall"		"24"		"autoResize"		"0"		"pinCorner"		"0"		"visible"		"1"		"enabled"		"1"		"tabPosition"		"0"		"labelText"		"Angel"		"textAlignment"		"west"		"dulltext"		"0"		"brighttext"		"0"		"wrap"		"0"		"Command"		"pb_angel"		"Default"		"0"	}	"Button0"	{		"ControlName"		"Button"		"fieldName"		"Button0"		"xpos"		"15"		"ypos"		"65"		"zpos"		"290"		"wide"		"64"		"tall"		"24"		"autoResize"		"0"		"pinCorner"		"0"		"visible"		"1"		"enabled"		"1"		"tabPosition"		"0"		"labelText"		"DM4"		"textAlignment"		"west"		"dulltext"		"0"		"brighttext"		"0"		"wrap"		"0"		"Command"		"pb_dm4"		"Default"		"1"	}	"Button1"	{		"ControlName"		"Button"		"fieldName"		"Button1"		"xpos"		"185"		"ypos"		"95"		"wide"		"64"		"tall"		"24"		"autoResize"		"0"		"pinCorner"		"0"		"visible"		"1"		"enabled"		"1"		"tabPosition"		"0"		"labelText"		"Impulse"		"textAlignment"		"west"		"dulltext"		"0"		"brighttext"		"0"		"wrap"		"0"		"Command"		"pb_impulse"		"Default"		"1"	}	"Button2"	{		"ControlName"		"Button"		"fieldName"		"Button2"		"xpos"		"270"		"ypos"		"35"		"wide"		"64"		"tall"		"24"		"autoResize"		"0"		"pinCorner"		"0"		"visible"		"1"		"enabled"		"1"		"tabPosition"		"0"		"labelText"		"Excalibur"		"textAlignment"		"west"		"dulltext"		"0"		"brighttext"		"0"		"wrap"		"0"		"Command"		"pb_excal"		"Default"		"1"	}	"Button5"	{		"ControlName"		"Button"		"fieldName"		"Button5"		"xpos"		"185"		"ypos"		"35"		"wide"		"64"		"tall"		"24"		"autoResize"		"0"		"pinCorner"		"0"		"visible"		"1"		"enabled"		"1"		"tabPosition"		"0"		"labelText"		"E-Mag"		"textAlignment"		"west"		"dulltext"		"0"		"brighttext"		"0"		"wrap"		"0"		"Command"		"pb_emag"		"Default"		"1"	}	"Button6"	{		"ControlName"		"Button"		"fieldName"		"Button6"		"xpos"		"270"		"ypos"		"65"		"wide"		"64"		"tall"		"24"		"autoResize"		"0"		"pinCorner"		"0"		"visible"		"1"		"enabled"		"1"		"tabPosition"		"0"		"labelText"		"Sniper"		"textAlignment"		"west"		"dulltext"		"0"		"brighttext"		"0"		"wrap"		"0"		"Command"		"pb_sniper"		"Default"		"1"	}	"Button7"	{		"ControlName"		"Button"		"fieldName"		"Button7"		"xpos"		"185"		"ypos"		"65"		"wide"		"64"		"tall"		"24"		"autoResize"		"0"		"pinCorner"		"0"		"visible"		"1"		"enabled"		"1"		"tabPosition"		"0"		"labelText"		"Mag"		"textAlignment"		"west"		"dulltext"		"0"		"brighttext"		"0"		"wrap"		"0"		"Command"		"pb_mag"		"Default"		"1"	}	"Button8"	{		"ControlName"		"Button"		"fieldName"		"Button8"		"xpos"		"100"		"ypos"		"95"		"wide"		"64"		"tall"		"24"		"autoResize"		"0"		"pinCorner"		"0"		"visible"		"1"		"enabled"		"1"		"tabPosition"		"0"		"labelText"		"A51"		"textAlignment"		"west"		"dulltext"		"0"		"brighttext"		"0"		"wrap"		"0"		"Command"		"pb_a51"		"Default"		"1"	}	"Button9"	{		"ControlName"		"Button"		"fieldName"		"Button9"		"xpos"		"100"		"ypos"		"35"		"wide"		"64"		"tall"		"24"		"autoResize"		"0"		"pinCorner"		"0"		"visible"		"1"		"enabled"		"1"		"tabPosition"		"0"		"labelText"		"Bush"		"textAlignment"		"west"		"dulltext"		"0"		"brighttext"		"0"		"wrap"		"0"		"Command"		"pb_bush"		"Default"		"1"	}	"Button10"	{		"ControlName"		"Button"		"fieldName"		"Button10"		"xpos"		"100"		"ypos"		"65"		"wide"		"64"		"tall"		"24"		"autoResize"		"0"		"pinCorner"		"0"		"visible"		"1"		"enabled"		"1"		"tabPosition"		"0"		"labelText"		"Blazer"		"textAlignment"		"west"		"dulltext"		"0"		"brighttext"		"0"		"wrap"		"0"		"Command"		"pb_blazer"		"Default"		"1"	}	"Button11"	{		"ControlName"		"Button"		"fieldName"		"Button11"		"xpos"		"15"		"ypos"		"95"		"wide"		"64"		"tall"		"24"		"autoResize"		"0"		"pinCorner"		"0"		"visible"		"1"		"enabled"		"1"		"tabPosition"		"0"		"labelText"		"Cocker"		"textAlignment"		"west"		"dulltext"		"0"		"brighttext"		"0"		"wrap"		"0"		"Command"		"pb_cocker"		"Default"		"1"	}	"Button12"	{		"ControlName"		"Button"		"fieldName"		"Button12"		"xpos"		"270"		"ypos"		"95"		"wide"		"64"		"tall"		"24"		"autoResize"		"0"		"pinCorner"		"0"		"visible"		"1"		"enabled"		"1"		"tabPosition"		"0"		"labelText"		"98 Custom"		"textAlignment"		"west"		"dulltext"		"0"		"brighttext"		"0"		"wrap"		"0"		"Command"		"pb_m98"		"Default"		"1"	}	"BuildModeDialog"	{		"ControlName"		"BuildModeDialog"		"fieldName"		"BuildModeDialog"		"xpos"		"0"		"ypos"		"0"		"wide"		"420"		"tall"		"534"		"autoResize"		"0"		"pinCorner"		"0"		"visible"		"1"		"enabled"		"1"		"tabPosition"		"0"		"settitlebarvisible"		"1"		"title"		"#Frame_Untitled"		"sizable"		"1"	}} ]]if CLIENT then    local Window = nil    local function GMPBWeapons()     if ( Window ) then Window:SetVisible( true ) return end     Window = vgui.Create( "Frame" )    Window:SetName( "vgui_hello" )     local button = vgui.Create( "Button", Window, "Button4" )    button:SetActionFunction( GiveWeapon )    Window:LoadControlsFromString( "GMPBWeaponsSelect" )    Window:SetKeyBoardInputEnabled( true )    Window:SetMouseInputEnabled( true )     Window:SetPos( (ScrW() - 400) / 2, ScrH() - 200 )    Window:SetVisible( true )endconcommand.Add( "gmpb_weapons", GMPBWeapons ) 	function GiveWeapon()            LocalPlayer():ConCommand("pb_angel\n")    endend