mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-27 03:25:23 +09:00
Quick fix for player physical position
This commit is contained in:
@@ -58,7 +58,27 @@ function Commands.get_disabled_commands()
|
||||
return table.get_keys(disabled_commands)
|
||||
end
|
||||
|
||||
--- If a command has the flag "admin_only" then only admins can use the command#
|
||||
--- If a command has the flag "character_only" then the command can only be used outside of remote view
|
||||
authorities.character_only =
|
||||
add(function(player, command)
|
||||
if command.flags.character_only and player.controller_type ~= defines.controllers.character then
|
||||
return deny{ "exp-commands-permissions.character-only" }
|
||||
else
|
||||
return allow()
|
||||
end
|
||||
end)
|
||||
|
||||
--- If a command has the flag "remote_only" then the command can only be used inside of remote view
|
||||
authorities.remote_only =
|
||||
add(function(player, command)
|
||||
if command.flags.character_only and player.controller_type ~= defines.controllers.remote then
|
||||
return deny{ "exp-commands-permissions.remote-only" }
|
||||
else
|
||||
return allow()
|
||||
end
|
||||
end)
|
||||
|
||||
--- If a command has the flag "admin_only" then only admins can use the command
|
||||
authorities.admin_only =
|
||||
add(function(player, command)
|
||||
if command.flags.admin_only and not player.admin then
|
||||
|
||||
@@ -30,6 +30,8 @@ surface=Invalid Surface Name.
|
||||
color=Invalid Color Name.
|
||||
|
||||
[exp-commands-permissions]
|
||||
character-only=This command can not be used in remote view.
|
||||
remote-only=This command can only be used in remote view.
|
||||
admin-only=This command is for game admins only.
|
||||
system-only=This command can not be ran by players.
|
||||
disabled=This command is currently disabled.
|
||||
|
||||
Reference in New Issue
Block a user