General > Developers Corner

ulx cloak hook?

(1/1)

kulcris:
does ulx have a hook for if someone is cloaked? (might be using the wrong term) so can i do something like

if not ply.cloak then

im going to edit the way darkrp shows the name so that the cloaking actually removes the floating name as well

and a suggestion i dont know if its possible. is there a way to remove the shadow the cloak causes when someone flashlights you while you are cloaked

Stickly Man!:
I don't believe there's a way to tell if a user is cloaked or not- Megiddo would know for sure :P

Otherwise, you can look into the ULibPostTranslatedCommand hook, which gets called any time a ulx command is run. If you check to see if the "commandName" is "ulx cloak", you can then check "translated_args" to see the target player and whether they were cloaked/uncloaked, then you can keep track of it yourself.

JamminR:
Ulib.invisible
I tracked the ulx cloak command, overall, it uses Ulib.invisible.
Sets a player table item of ply.invis.vis and ply.invis.wep.
Think statement updates DrawShadow to false every frame.
It's possible your gamemode/other addon is over-riding it in some way, OR, it's just not working the way it's supposed to anymore.

Navigation

[0] Message Index

Go to full version