• PL:Give Menu Function
    0 replies, posted
Currently, I'm developing a gamemode. It's a deathmatch gamemode and I have a working team selection menu I made which gives the player a loadout and when changing class, takes away the old loadout and gives them the new one. I achieved this by using the [CODE]ply:Give("weapon_name")[/CODE] code snippet and I made a new menu for loadouts, this new menu is supposed to give the player a weapon when the buttons are pressed, currently it gives out an error. Example code: [CODE]DButton9 = vgui.Create('DButton') DButton9:SetParent(DPanel2) DButton9:SetSize(144, 25) DButton9:SetPos(10, 79) DButton9:SetText('Semtex') DButton9.DoClick = function() ply:Give("weapon_smg1") end[/CODE] Now, the menu works of course. It's just spawning the weapon doesn't. So if anyone could help me fixing this, it'd be greatly appreciated. This is currently the only barrier I have in releasing a thread on my new gamemode.
Sorry, you need to Log In to post a reply to this thread.