ULX

Author Topic: Hiding (drawPlayerInfo) Above Head HUD with a Command  (Read 1305 times)

0 Members and 1 Guest are viewing this topic.

Offline LegoMyEgo247

  • Newbie
  • *
  • Posts: 2
  • Karma: 0
Hiding (drawPlayerInfo) Above Head HUD with a Command
« on: March 14, 2016, 03:22:54 PM »
I was just wondering if there is a way you can remove the HUD over someone who is (ulx cloak) cloaked.

Function:
Quote
drawPlayerInfo: Draws player info above a player's head (name,health, and job)

If you can disable/enable this function while ulx cloaking, I would love that edited command.


Original ULX Cloak:
Code: Lua
  1. ------------------------------ Cloak ------------------------------
  2. function ulx.cloak( calling_ply, target_plys, amount, should_uncloak )
  3.         if not target_plys[ 1 ]:IsValid() then
  4.                 Msg( "You are always invisible.\n" )
  5.                 return
  6.         end
  7.  
  8.         amount = 255 - amount
  9.  
  10.         for i=1, #target_plys do
  11.                 ULib.invisible( target_plys[ i ], not should_uncloak, amount )
  12.         end
  13.  
  14.         if not should_uncloak then
  15.                 ulx.fancyLogAdmin( calling_ply, "#A cloaked #T by amount #i", target_plys, amount )
  16.         else
  17.                 ulx.fancyLogAdmin( calling_ply, "#A uncloaked #T", target_plys )
  18.         end
  19. end
  20. local cloak = ulx.command( CATEGORY_NAME, "ulx cloak", ulx.cloak, "!cloak" )
  21. cloak:addParam{ type=ULib.cmds.PlayersArg, ULib.cmds.optional }
  22. cloak:addParam{ type=ULib.cmds.NumArg, min=0, max=255, default=255, hint="amount", ULib.cmds.round, ULib.cmds.optional }
  23. cloak:addParam{ type=ULib.cmds.BoolArg, invisible=true }
  24. cloak:defaultAccess( ULib.ACCESS_ADMIN )
  25. cloak:help( "Cloaks target(s)." )
  26. cloak:setOpposite( "ulx uncloak", {_, _, _, true}, "!uncloak" )
  27.  
  28.  

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6210
  • Karma: 394
  • Project Lead
Re: Hiding (drawPlayerInfo) Above Head HUD with a Command
« Reply #1 on: March 14, 2016, 05:15:14 PM »
In general, we don't add things for specific gamemodes. And DarkRP being one of the worst offenders for bad coding, we doubly can't support that. But, you've given me an idea on how to implement this in the next major ULX revision.
Experiencing God's grace one day at a time.

Offline LegoMyEgo247

  • Newbie
  • *
  • Posts: 2
  • Karma: 0
Re: Hiding (drawPlayerInfo) Above Head HUD with a Command
« Reply #2 on: March 16, 2016, 04:20:57 PM »
In general, we don't add things for specific gamemodes. And DarkRP being one of the worst offenders for bad coding, we doubly can't support that. But, you've given me an idea on how to implement this in the next major ULX revision.
Alright, the only reason I wanted to suggest this is because I've heard of a lot people wanting this and I thought it would be useful for a lot of people.