• GetActiveWeapon() == "Gravity Gun" ???
    3 replies, posted
So i'm working on the ammo for my hud and i want the hud hidden if the camera or gravity gun is out, i used this code for the camera and it worked perfectly: [CODE]client:GetActiveWeapon() == "Camera"[/CODE] but if i do the same for the gravity gun: [CODE]client:GetActiveWeapon() == "Gravity Gun"[/CODE] It doesnt work, any input would be appreciated.
[QUOTE=SnappyCo;52572465]So i'm working on the ammo for my hud and i want the hud hidden if the camera or gravity gun is out, i used this code for the camera and it worked perfectly: [CODE]client:GetActiveWeapon() == "Camera"[/CODE] but if i do the same for the gravity gun: [CODE]client:GetActiveWeapon() == "Gravity Gun"[/CODE] It doesnt work, any input would be appreciated.[/QUOTE] Try printing the results from client:GetActiveWeapon() to get the name it uses
[CODE] client:GetActiveWeapon():GetClass() == "weapon_physcannon" [/CODE]
[QUOTE=Synix28;52572495][CODE] client:GetActiveWeapon():GetClass() == "weapon_physcannon" [/CODE][/QUOTE] Thank you :)
Sorry, you need to Log In to post a reply to this thread.