General > Developers Corner

Question

(1/1)

antahz:
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?

Timmy:
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: ---if ply:GetTable().invis then
  -- cloaked
else
  -- not cloaked
end
--- End code ---

Edit: clarification :P

JamminR:
Ulx use of it
here

Navigation

[0] Message Index

Go to full version