mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-27 11:35:22 +09:00
Added /tp /bring and /goto and some comments
This commit is contained in:
@@ -464,14 +464,14 @@ function Commands._prototype:register(callback)
|
||||
end
|
||||
self.description = description
|
||||
-- registers the command under its own name
|
||||
commands.add_command(self.name,description..' '..self.help,function(command_event)
|
||||
commands.add_command(self.name,{'expcore-commands.command-help',description,self.help},function(command_event)
|
||||
local success, err = pcall(Commands.run_command,command_event)
|
||||
if not success then log('[ERROR] command/'..self.name..' :: '..err) end
|
||||
end)
|
||||
-- adds any aliases that it has
|
||||
for _,alias in pairs(self.aliases) do
|
||||
if not commands.commands[alias] and not commands.game_commands[alias] then
|
||||
commands.add_command(alias,description..' '..self.help,function(command_event)
|
||||
commands.add_command(alias,{'expcore-commands.command-help',description,self.help},function(command_event)
|
||||
command_event.name = self.name
|
||||
local success, err = pcall(Commands.run_command,command_event)
|
||||
Commands.internal_error(success,self.name,err)
|
||||
|
||||
@@ -114,7 +114,7 @@ end)
|
||||
Commands.add_parse('player-alive',function(input,player,reject)
|
||||
local input_player = Commands.parse('player-online',input,player,reject)
|
||||
if not input_player then return end -- nil check
|
||||
if not input_player.character or not input_player.character.health > 0 then
|
||||
if not input_player.character or not input_player.character.health or input_player.character.health <= 0 then
|
||||
return reject{'expcore-commands.reject-player-alive'}
|
||||
else
|
||||
return input_player
|
||||
|
||||
@@ -11,6 +11,7 @@ reject-force=Invaild Force Name
|
||||
reject-surface=Invaild surface Name
|
||||
invalid-inputs=Invalid Input, /__1__ __2__
|
||||
invalid-param=Invalid Param "__1__"; __2__
|
||||
command-help=__1__ - __2__
|
||||
command-ran=Command Complete
|
||||
command-fail=Command failed to run: __1__
|
||||
command-error-log-format=[ERROR] command/__1__ :: __2__
|
||||
Reference in New Issue
Block a user