Ulysses
Home
Help
Ulysses
»
General
»
Developers Corner
»
Help me. I needed a function for checking mut?
« previous next »
Print
Pages: [
1
]
Go Down
Author
Topic: Help me. I needed a function for checking mut? (Read 6939 times)
0 Members and 1 Guest are viewing this topic.
Aimatt
Newbie
Posts: 5
Karma: 0
Help me. I needed a function for checking mut?
«
on:
October 04, 2019, 03:14:45 am »
Hello! Here I decided to make a short admin menu made functions, but I need to make a button with mute and gag at the same position, for this I need to do:
if <the check function> then
mute
else
unmute
end
In the likeness of this.
Logged
Timmy
Ulysses Team Member
Sr. Member
Posts: 252
Karma: 168
Code monkey
Re: Help me. I needed a function for checking mut?
«
Reply #1 on:
October 04, 2019, 05:47:32 am »
Assuming you use ULX to perform the muting/gagging.
ULX sets a networked boolean (NWBool) when a player is
muted
or
gagged
. You can use this to test if the restriction is active.
Code: Lua
if
ply
:
GetNWBool
(
"ulx_muted"
)
then
-- ply is muted
else
-- ply not muted
end
Code: Lua
if
ply
:
GetNWBool
(
"ulx_gagged"
)
then
-- ply is gagged
else
-- ply not gagged
end
Logged
Print
Pages: [
1
]
Go Up
« previous next »
Ulysses
»
General
»
Developers Corner
»
Help me. I needed a function for checking mut?