I know you guys don’t like beginners but whatever. I don’t have anyone else I can ask about this so bear with me.
I have a HUD element (ammo counter) and I need it to only show when holding either weapon_pistol or weapon_smg1.
The problem is that adding 1 string (weapon) works, but adding 2 doesn’t. I’m not sure how to add two of them.
If I add two - it either NEVER shows the ammo counter or always shows it, depends on whether I use != or ==.
I tried at least five different methods (that are probably so stupid that I won’t even post them) and nothing worked.
local playerwep = LocalPlayer():GetActiveWeapon():GetClass(); if playerwep != "weapon_pistol" or playerwep != "weapon_smg1" then return end
This is the closest I got to it working, except the thing is I need SMG in there too, not just pistol.
local playerwep = LocalPlayer():GetActiveWeapon():GetClass(); if playerwep != "weapon_pistol" then return end
Also, when the player dies it shows the “Tried to use NULL entity” error because there is no weapon when the player is dead? How should I fix that? if Player:Alive()?
[editline]28th August 2015[/editline]
Damn, didn’t see the “problems that don’t need their own thread” thread.