Added Teleport Commands

This commit is contained in:
Cooldude2606
2018-06-24 19:46:12 +01:00
parent cf6e2838ca
commit be78abfefe
4 changed files with 59 additions and 31 deletions

View File

@@ -0,0 +1,18 @@
--- A full ranking system for factorio.
-- @module ExpGamingCommands.kill
-- @author Cooldude2606
-- @license https://github.com/explosivegaming/scenario/blob/master/LICENSE
local Game = require('FactorioStdLib.Game')
--- Kills a player of a lower rank
-- @command kill
-- @param player the player to be killed
commands.add_command('kill', 'Kills a player. No player name kills yourself.', {
['player']={false,'player-rank-alive'}
}, function(event,args)
local _player = Game.get_player(event)
local player = args.player
if player then player.character.die()
else _player.character.die() end
end)