landsandboat/scripts/commands/cs.lua

35 lines
838 B
Lua
Raw Permalink Normal View History

-----------------------------------
-- func: cs
2016-01-16 01:26:33 -05:00
-- desc: Starts the given event for the player.
-----------------------------------
---@type TCommand
local commandObj = {}
2016-01-16 01:26:33 -05:00
commandObj.cmdprops =
2016-01-16 01:26:33 -05:00
{
permission = 1,
parameters = 'iiiiiiiiii'
}
2016-01-16 01:26:33 -05:00
local function error(player, msg)
player:printToPlayer(msg)
player:printToPlayer('!cs <csID> (op1) (op2) (op3) (op4) (op5) (op6) (op7) (op8) (texttable)')
end
commandObj.onTrigger = function(player, csid, op1, op2, op3, op4, op5, op6, op7, op8, texttable)
-- validate csid
if csid == nil then
error(player, 'You must enter a cutscene id.')
return
2016-01-16 01:26:33 -05:00
end
-- play cutscene
if op1 == nil then
player:startEvent(csid)
2018-05-19 13:05:52 -04:00
else
player:startEvent(csid, op1, op2, op3, op4, op5, op6, op7, op8, texttable)
end
end
return commandObj