Can anyone Help.
Ich would like to have the command installed I get a weapon, a SMG.
Client:
function TestVGUI( )
local Frame = vgui.Create( "Frame" );
Frame:SetSize( 200, 200 );
Frame:SetPos( 100, 100 );
Frame:SetVisible( true );
Frame:MakePopup( ); //Make the frame
Frame:PostMessage( "SetTitle", "text", "This is the title" );
local Button = vgui.Create( "Button", Frame );
Button:SetText( "SMG on" );
Button:SetPos( 30, 5 );
Button:SetWide( 100 );
function Button:DoClick()
RunConsoleCommand( "givemesmg" )
surface.PlaySound( "buttons/button15.wav" )
self:SetText( "SMG off" );
end
end
concommand.Add( "TestVGUI", TestVGUI );
Server:
function giveSMG( ply, cmd, args )
Funktion welche Spieler SMG gibt
end
concommand.Add|>( "givemesmg", giveSMG )