Only 3 weapons allowed

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 **[Player.Give

http://wiki.garrysmod.com/favicon.ico](http://wiki.garrysmod.com/?title=Player.Give)** 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

You like saying lol, huh? :v:

Actually I do say it alot when I feel stupid :slight_smile:

So you feel stupid a lot? :v: