Added Lots of Commands

This commit is contained in:
Cooldude2606
2018-01-05 13:10:10 +00:00
parent b1165cfa00
commit 45d7323e55
7 changed files with 139 additions and 1 deletions

22
Addons/Commands/kill.lua Normal file
View File

@@ -0,0 +1,22 @@
--[[
Explosive Gaming
This file can be used with permission but this and the credit below must remain in the file.
Contact a member of management on our discord to seek permission to use our code.
Any changes that you may make to the code are yours but that does not make the script yours.
Discord: https://discord.gg/r6dC2uK
]]
--Please Only Edit Below This Line-----------------------------------------------------------
commands.add_command('kill', 'Kills a player, must be either yourself (/kill self) or a person of a lower rank.', {'player'}, function(event,args)
local _player = Game.get_player(event)
local player = Game.get_player(args.player)
if args.player ~= 'self' and not player then player_return({'commands.invalid-player',args.player}) return commands.error end
if _player.name == player.name or args.player == 'self' then
if _player.connected then else player_return({'commands.offline-player'}) return commands.error end
if _player.character then _player.character.die() else player_return({'commands.dead-player'}) return commands.error end
elseif Ranking.get_rank(player).power > Ranking.get_rank(_player).power then
if player.connected then else player_return({'commands.offline-player'}) return commands.error end
if player.character then player.character.die() else player_return({'commands.dead-player'}) return commands.error end
else player_return({'commands.unauthorized'}) return commands.error end
end)