Ulysses
Home
Help
Ulysses
»
General
»
Developers Corner
»
Ulx fancylogadmin is appearing for opposite command.
« previous next »
Print
Pages: [
1
]
Go Down
Author
Topic: Ulx fancylogadmin is appearing for opposite command. (Read 4290 times)
0 Members and 1 Guest are viewing this topic.
MelonShooter
Newbie
Posts: 3
Karma: 0
Ulx fancylogadmin is appearing for opposite command.
«
on:
June 08, 2016, 08:16:26 pm »
So the title says my problem. Here's my code. Ask me if you need clarification.
Code: Lua
function
ulx
.
physgunban
(
calling_ply
,
target_plys
,
seconds
,
should_pardon
)
for
i
=
1
,
#
target_plys
do
if
not
should_pardon
and
ulx
.
getExclusive
(
target_plys
[
i
]
,
calling_ply
)
then
ULib
.
tsayError
(
calling_ply
,
ulx
.
getExclusive
(
target_plys
[
i
]
,
calling_ply
)
,
true
)
else
local
v
=
target_plys
[
i
]
if
not
should_pardon
then
v
.
physgunbanned
=
true
v
:
StripWeapon
(
"weapon_physgun"
)
ulx
.
setExclusive
(
v
,
"already banned from using a physgun."
)
table.insert
(
playerphyslist
,
v
)
timer
.
Create
(
"melonphysgunban"
..
v
:
EntIndex
(
)
,
seconds
,
1
,
function
(
)
if
v
:
HasWeapon
(
"weapon_physgun"
)
then
v
.
physgunbanned
=
nil
ulx
.
clearExclusive
(
v
)
table.remove
(
playerphyslist
,
table
.
KeyFromValue
(
playerphyslist
,
v
)
)
else
v
:
Give
(
"weapon_physgun"
)
ulx
.
clearExclusive
(
v
)
v
.
physgunbanned
=
nil
end
end
)
else
if
v
:
HasWeapon
(
"weapon_physgun"
)
then
v
.
physgunbanned
=
nil
else
v
:
Give
(
"weapon_physgun"
)
ulx
.
clearExclusive
(
v
)
v
.
physgunbanned
=
nil
end
end
end
end
if
not
should_pardon
and
ulx
.
getExclusive
(
target_plys
[
i
]
,
calling_ply
)
then
ulx
.
fancyLogAdmin
(
calling_ply
,
"#A banned #T from using his/her physgun for #i seconds."
,
target_plys
,
seconds
)
else
ulx
.
fancyLogAdmin
(
calling_ply
,
"#A pardoned #T from his/her physgun ban."
,
affected_plys
)
end
end
Logged
MelonShooter
Newbie
Posts: 3
Karma: 0
Re: Ulx fancylogadmin is appearing for opposite command.
«
Reply #1 on:
June 08, 2016, 08:19:48 pm »
Oh well. Shoot me because this problem is really obvious.
Logged
Print
Pages: [
1
]
Go Up
« previous next »
Ulysses
»
General
»
Developers Corner
»
Ulx fancylogadmin is appearing for opposite command.