I’m attempting to check a players weapons by ply:GetWeapons() and I try to check with
for k, v in pairs(ply:GetWeapons()) do if v == "weapon_zm_rifle" then ply:StripWeapon(v:GetPrintName()) end end
However, it does not work. I receive a “GetPrintName()” is a nil value.
I can see the weapons are printed as so:
1 = Weapon [weapon_zm_carry] 2 = Weapon [weapon_zm_improvised] 3 = Weapon [weapon_ttt_unarmed] 4 = Weapon [weapon_zm_rifle]
How would I go about checking against the weapons? I assumed checking a string (such as "weapon_zm_rifle) would work but it doesn’t. Kinda clueless as to what to do. I’ve searched around to no avail. Any help will be appreciated.