• Derma weapon menu
    8 replies, posted
Im making a game mode in fretta and i want it to be so that a when a player spawns they can press f3 to open up a window with some buttons like primary and secondary. when they click the primary or secondary it opens another window displaying a few guns that it they click they check a bool and if its false they get a gun and set the bool to true.
oh sorry. lol kinda goofed up there anyway im trying to make concaommands that the buttons run but anytime i do it seems that it just breaks the gamemode ive got it to open the window with f3 but the buttin which is set to run a concommand thats just Give("weapon_smg1") isn't working.
[QUOTE=??????;18947901]oh sorry. lol kinda goofed up there anyway im trying to make concaommands that the buttons run but anytime i do it seems that it just breaks the gamemode ive got it to open the window with f3 but the buttin which is set to run a concommand thats just Give("weapon_smg1") isn't working.[/QUOTE] "Oh sorry, haha, I kind of goofed up there. Anyways, I'm trying to make concommands that the buttons of the menu will run but when I try it seems to just break the gamemode. I've gotten it to open the window with F3 but the button that runs the concommand, simply Player:Give("weapon_smg1"), isn't working." You're welcome.
I feel like I'm almost translating another language.
[QUOTE=Gbps;18948258]I feel like I'm almost translating another language.[/QUOTE] Kind of a mixture between 4chan and thirteen year olds. (then again, is there a difference?)
[QUOTE=iRzilla;18948134]Oh thank god for gbps. Serverside: [lua] function GimmeWeapons(ply, cmd, args) if args[1] == "SMG" then ply:Give("weapon_smg") end if args[1] == "PISTOLE" then ply:Give("weapon_pistole") end end concommand.Add("GimmeWeapons", GimmeWeapons) [/lua] Clientside: [lua] DermaButton.DoClick = function() RunConsoleCommand("GimmeWeapons", "SMG") end [/lua][/QUOTE] how work the args ?
[url]http://wiki.garrysmod.com/?title=Concommand.Add[/url] Or just do a PrintTable, and you will figure it out...
Sorry, you need to Log In to post a reply to this thread.