ULX

Author Topic: Question  (Read 2495 times)

0 Members and 1 Guest are viewing this topic.

Offline antahz

  • Newbie
  • *
  • Posts: 2
  • Karma: 0
Question
« on: July 03, 2019, 12:30:47 PM »
Hello, im making a script, what is the name of the cloak function? Example: "if ply:IsCloaked then"
What is the name of the cloak function?

Offline Timmy

  • Ulysses Team Member
  • Sr. Member
  • *****
  • Posts: 252
  • Karma: 168
  • Code monkey
Re: Question
« Reply #1 on: July 03, 2019, 07:54:55 PM »
There is no cloak function in the GLua standard library.

If you have ULib installed, you can use ULib.invisible in your own scripts.

This is how ULib makes a player invisible: https://github.com/TeamUlysses/ulib/blob/v2.63/lua/ulib/server/player.lua#L363

Checking if a player is cloaked by ULib:
Code: [Select]
if ply:GetTable().invis then
  -- cloaked
else
  -- not cloaked
end

Edit: clarification :P
« Last Edit: July 03, 2019, 09:54:54 PM by Timmy »

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Question
« Reply #2 on: July 03, 2019, 08:34:28 PM »
Ulx use of it
here
« Last Edit: July 03, 2019, 08:36:41 PM by JamminR »
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming