• Only 3 weapons allowed
    7 replies, posted
I don't ask for help much but im literally in a pickle. Alright so im creating my first actual gamemode that wasn't based on someone elses code, Theres 3 types of weapons 1. Melee 2. Handgun 3. Rifle And I was wondering how exactly would I be able to determine what the weapon is and allow only 1 of each type of weapon. I've been at this all day and cant figure it out lol..
You could compare the holdtypes?
Well that could work I suppose, I just went for a different approch. Overriding [b][url=http://wiki.garrysmod.com/?title=Player.Give]Player.Give [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] to check for the weapon class to see if its got "_rifle_", "_melee_", "_pistol_" and it appears to work. But still cant figure out how to limit it to only one of the types EDIT: ....Wow im pretty damn sure I answered my own question...
Well make an if statement when you're giving the player the item if you are still wondering.
Lol no I got it. Lol after busting my ass trying to figure it out I finally got it. Lol your suggestion somehow made me think. Dunno why...Lol thanks
[QUOTE=Netsurfers;33808304]Lol no I got it. Lol after busting my ass trying to figure it out I finally got it. Lol your suggestion somehow made me think. Dunno why...Lol thanks[/QUOTE] You like saying lol, huh? :v:
Actually I do say it alot when I feel stupid :)
So you feel stupid a lot? :v:
Sorry, you need to Log In to post a reply to this thread.