mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-28 20:05:22 +09:00
Added Kill Command
This commit is contained in:
18
modules/ExpGamingCommands/kill/kill.lua
Normal file
18
modules/ExpGamingCommands/kill/kill.lua
Normal 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)
|
||||
23
modules/ExpGamingCommands/kill/softmod.json
Normal file
23
modules/ExpGamingCommands/kill/softmod.json
Normal file
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"name": "kill",
|
||||
"version": "4.0.0",
|
||||
"type": "Module",
|
||||
"description": "Adds a command which can be used to kill a player or yourself.",
|
||||
"location": "<blank>",
|
||||
"keywords": [
|
||||
"Command",
|
||||
"ExpGaming",
|
||||
"Kill",
|
||||
"Death",
|
||||
"Admin",
|
||||
"Tool"
|
||||
],
|
||||
"author": "Cooldude2606",
|
||||
"contact": "Discord: Cooldude2606#5241",
|
||||
"license": "https://github.com/explosivegaming/scenario/blob/master/LICENSE",
|
||||
"dependencies": {
|
||||
"ExpGamingCore.Commands": "^4.0.0",
|
||||
"ExpGamingCore.Ranking": "^4.0.0",
|
||||
"FactorioStdLib.Game": "^0.8.0"
|
||||
}
|
||||
}
|
||||
17
modules/ExpGamingCommands/softmod.json
Normal file
17
modules/ExpGamingCommands/softmod.json
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"name": "ExpGamingCommands",
|
||||
"version": "4.0.0",
|
||||
"type": "Collection",
|
||||
"description": "A Collection of all of the custom commands used on ExpGaming servers.",
|
||||
"location": "<blank>",
|
||||
"keywords": [
|
||||
"Commands",
|
||||
"ExpGaming",
|
||||
"Admin",
|
||||
"Tools"
|
||||
],
|
||||
"author": "Cooldude2606",
|
||||
"contact": "Discord: Cooldude2606#5241",
|
||||
"license": "https://github.com/explosivegaming/scenario/blob/master/LICENSE",
|
||||
"submodules": {}
|
||||
}
|
||||
Reference in New Issue
Block a user