• Client and Server give me a Weapon!
    2 replies, posted
Can anyone Help. Ich would like to have the command installed I get a weapon, a SMG. Client: [CODE] 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 ); [/CODE] Server: [CODE] function giveSMG( ply, cmd, args ) Funktion welche Spieler SMG gibt end concommand.Add|>( "givemesmg", giveSMG ) [/CODE]
Wait. First you should write verything here in English. Second. I dont no really what do you want from us.
[QUOTE=Razerds;16332652]Can anyone Help. ... Server: [CODE] function giveSMG( ply, cmd, args ) Funktion welche Spieler SMG gibt end concommand.Add|>( "givemesmg", giveSMG ) [/CODE][/QUOTE] [lua] function giveSMG(pl, cmd, args) pl:Give("weapon_smg") end concommand.Add("giveSMG", giveSMG)[/lua]
Sorry, you need to Log In to post a reply to this thread.