Changed add_tag to set_flag on commands

This commit is contained in:
Cooldude2606
2019-04-09 16:16:05 +01:00
parent cbde97e7b0
commit e9a4382277
8 changed files with 19 additions and 19 deletions

View File

@@ -14,7 +14,7 @@ Commands.new_command('teleport','Teleports a player to another player.')
:add_param('from_player',false,'player-alive') -- player that will be teleported, must be alive
:add_param('to_player',false,'player-online') -- player to teleport to, must be online (if dead goes to where they died)
:add_alias('tp')
:add_tag('admin_only',true)
:set_flag('admin_only',true)
:register(function(player,from_player,to_player,raw)
if from_player.index == to_player.index then
-- return if attempting to teleport to self
@@ -28,7 +28,7 @@ end)
Commands.new_command('bring','Teleports a player to you.')
:add_param('player',false,'player-alive') -- player that will be teleported, must be alive
:add_tag('admin_only',true)
:set_flag('admin_only',true)
:register(function(player,from_player,raw)
if from_player.index == player.index then
-- return if attempting to teleport to self
@@ -43,7 +43,7 @@ end)
Commands.new_command('goto','Teleports you to a player.')
:add_param('player',false,'player-online') -- player to teleport to, must be online (if dead goes to where they died)
:add_alias('tp-me','tpme')
:add_tag('admin_only',true)
:set_flag('admin_only',true)
:register(function(player,to_player,raw)
if to_player.index == player.index then
-- return if attempting to teleport to self