#qb-weaponhud

1 messages · Page 1 of 1 (latest)

versed sigil
#

Check what weapon the client has. If it's fists, send a NUI message to toggle the UI visibility (off). If it's anything else, toggle it on.

versed sigil
#

What do you mean?

severe tiger
#

Like where do I check what weapon the client has

#

Im sorry im kinda confused im new to coding

#

this is all I see in the client

#

would it be WEAPON_UNARMED?

versed sigil
#

Yup, the check is already in there for you.

severe tiger
#

so now what do I do with that

versed sigil
#

Send a NUI message to toggle the UI visibility off.

severe tiger
#

what do I write

#

and where

versed sigil
#

I've given you all the information you need. I really don't like spoon-feeding, it means you don't actually learn anything.

severe tiger
#

ok thanks anyway ill try to do it

versed sigil
#

You'll need to add an event listener in the js for it, as it doesn't seem to have one.

severe tiger
#

like this?

#

now what do i put in it

severe tiger
#

ok so im guessing here is where I would toggle the ui off

#

with the template

versed sigil
#

You're getting there. Obviously all that is going to do so far is print in the console.

severe tiger
#

Yea I would have the replace the things

#

how would I toggle the event to turn the ui off

#

I think thats all I need now

#

what about this

versed sigil
severe tiger
#

Yea i tried it didnt work