Ulysses
Home
Help
Ulysses
»
General
»
Developers Corner
»
Jailbreak AFK command has no effect.
« previous next »
Print
Pages: [
1
]
Go Down
Author
Topic: Jailbreak AFK command has no effect. (Read 4449 times)
0 Members and 1 Guest are viewing this topic.
jakej78b
Newbie
Posts: 26
Karma: 4
Jailbreak AFK command has no effect.
«
on:
June 10, 2014, 11:37:23 pm »
I can't.. for the goodness of me figure out why this command does nothing. Also, what is the default ULib access for user? I just used "user" but I saw that things like admin had defaultAccess( ULib.ACCESS_ADMIN )
Code: Lua
function
ulx
.
afk
(
target_ply
)
if
target_ply
.
NextAFK
>
CurTime
(
)
and
target_ply
.
NextAFK
~=
nil
then
ULib
.
tsayError
(
target_ply
,
"You can only use AFK once a minute!"
,
true
)
else
if
not
target_ply
.
AFK
then
target_ply
:
StripWeapons
(
)
target_ply
:
KillSilent
(
)
timer
.
Simple
(
0.1
,
function
(
)
target_ply
:
SetTeam
(
TEAM_SPECTATOR
)
target_ply
:
Spectate
(
OBS_MODE_ROAMING
)
ulx
.
fancyLogAdmin
(
calling_ply
,
"#A went AFK."
,
target_ply
)
end
)
else
target_ply
:
SetTeam
(
TEAM_PRISONER_DEAD
)
ulx
.
fancyLogAdmin
(
calling_ply
,
"#A came back from being AFK."
,
target_ply
)
end
target_ply
.
NextAFK
=
CurTime
(
)
+
60
target_ply
.
AFK
=
not
target_ply
.
AFK
end
end
local
afk
=
ulx
.
command
(
"Jailbreak"
,
"ulx afk"
,
ulx
.
afk
,
"!afk"
)
afk
:
defaultAccess
(
"user"
)
afk
:
help
(
"Become (un)AFK."
)
Logged
Decicus
Hero Member
Posts: 552
Karma: 81
Re: Jailbreak AFK command has no effect.
«
Reply #1 on:
June 11, 2014, 05:17:32 am »
"defaultAccess" isn't a string. For user it would be "ULib.ACCESS_ALL" without the quotes. That's probably why it doesn't do anything.
For future reference, these are the access levels:
ULib.ACCESS_ALL
ULib.ACCESS_ADMIN
ULib.ACCESS_SUPERADMIN
Logged
Contact information:
E-mail: alex@thomassen.xyz.
You can also send a PM.
Print
Pages: [
1
]
Go Up
« previous next »
Ulysses
»
General
»
Developers Corner
»
Jailbreak AFK command has no effect.