#Mod mode.

1 messages · Page 1 of 1 (latest)

atomic field
#

Hey, I know i have some weird points in the skript however it works. All I need help with is in this line of code

#

command /spec [<player>]:
aliases: /mod, /spectate
permission: skript.spec
permission message: "&4You are not allowed to run this command! :<"
trigger:
set {_spot} to player's location
set {mod::%player%} to true
set player's gamemode to spectator
teleport player to arg-1
send actionbar "&a&lMod Mode has been enabled." to player

command /unspec [<player>]:
aliases: /unmod, /unspectate
permission: skript.spec
permission message: "&4You are not allowed to run this command! :<"
trigger:
if {mod::%player%} is true:
teleport %player% to {_spot}
set player's gamemode to survival
send actionbar "&a&lMod Mode has been disabled." to player
else:
send actionbar "&b&lYou did not turn on Mod mode yet." to player

#

(i mean the

#

teleport %player% to _spot

#

any idea how to fix that maybe?

#

because thats the last thing i have to do to complete that command

toxic apex
#

arg-1 > %player%

atomic field
#

so i do

#

teleport arg-1 to {_spot} ?

toxic apex
#

yes

atomic field
#

wont arg-1 be the [<player>] ?

#

im new to skript but im not sure

#

cuz i want the person that ran the command spectate the player thats in [<player>] and then when they run /unmod then teleport the player to the position that they were at before they did /mod

#

not sure if thats understandable

#

but okay ima try

#

i need to wait cuz my server is in queue so

toxic apex
#

then just use player instead of %player%

#

itll default to the player who sent the commans

atomic field
#

oh okay ty

#

doesnt teleport me back sadly

#

any more ideas?

atomic smelt
#

because thats a local variable