Author Topic: ulx cloak hook?  (Read 2626 times)

0 Members and 2 Guests are viewing this topic.

Offline kulcris

  • Newbie
  • *
  • Posts: 28
  • Karma: 0
ulx cloak hook?
« on: April 28, 2014, 05:11:59 PM »
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

Offline Stickly Man!

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 1270
  • Karma: 164
  • What even IS software anymore?
    • XGUI
Re: ulx cloak hook?
« Reply #1 on: April 28, 2014, 08:09:44 PM »
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.
Join our Team Ulysses community discord! https://discord.gg/gR4Uye6

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: ulx cloak hook?
« Reply #2 on: April 28, 2014, 09:11:05 PM »
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.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming