mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-29 20:16:38 +09:00
Move files to exp_legacy
This commit is contained in:
19
exp_legacy/module/modules/commands/friendly-fire.lua
Normal file
19
exp_legacy/module/modules/commands/friendly-fire.lua
Normal file
@@ -0,0 +1,19 @@
|
||||
--[[-- Commands Module - Toggle Friendly Fire
|
||||
- Adds a command that toggle all friendly fire
|
||||
@commands Toggle Friendly Fire
|
||||
]]
|
||||
|
||||
local Commands = require 'expcore.commands' --- @dep expcore.commands
|
||||
require 'config.expcore.command_general_parse'
|
||||
|
||||
-- For Modded Server Use
|
||||
Commands.new_command('toggle-friendly-fire', {'expcom-ff.description'}, 'Toggle friendly fire')
|
||||
:add_param('force', true, 'force')
|
||||
:set_defaults{force=function(player)
|
||||
return player.force
|
||||
end}
|
||||
:register(function(player, force)
|
||||
force.friendly_fire = not force.friendly_fire
|
||||
game.print{'expcom-ff.ff', player.name, force.friendly_fire}
|
||||
return Commands.success
|
||||
end)
|
||||
Reference in New Issue
Block a user