2021-01-18 13:34:00 -05:00
|
|
|
-----------------------------------
|
2016-07-29 08:35:15 -06:00
|
|
|
-- func: cs2
|
2016-01-16 01:26:33 -05:00
|
|
|
-- desc: Starts the given event for the player.
|
2021-01-18 13:34:00 -05:00
|
|
|
-----------------------------------
|
2024-08-25 10:54:45 -04:00
|
|
|
---@type TCommand
|
2023-09-02 07:01:35 -04:00
|
|
|
local commandObj = {}
|
2016-01-16 01:26:33 -05:00
|
|
|
|
2023-09-02 07:01:35 -04:00
|
|
|
commandObj.cmdprops =
|
2016-01-16 01:26:33 -05:00
|
|
|
{
|
|
|
|
|
permission = 1,
|
2023-08-28 21:02:28 -04:00
|
|
|
parameters = 'issssiiiiiiii'
|
2020-02-19 21:40:57 -08:00
|
|
|
}
|
2016-01-16 01:26:33 -05:00
|
|
|
|
2023-09-02 07:01:35 -04:00
|
|
|
local function error(player, msg)
|
2023-12-09 23:54:00 +00:00
|
|
|
player:printToPlayer(msg)
|
|
|
|
|
player:printToPlayer('!cs2 <csID> (string1) (string2) (string3) (string4) (op1) (op2) (op3) (op4) (op5) (op6) (op7) (op8)')
|
2020-02-19 21:40:57 -08:00
|
|
|
end
|
2017-08-03 12:31:51 -04:00
|
|
|
|
2023-09-02 07:01:35 -04:00
|
|
|
commandObj.onTrigger = function(player, csid, string1, string2, string3, string4, op1, op2, op3, op4, op5, op6, op7, op8)
|
2017-08-03 12:31:51 -04:00
|
|
|
-- validate csid
|
2022-10-30 10:31:18 -04:00
|
|
|
if csid == nil then
|
2023-08-28 21:02:28 -04:00
|
|
|
error(player, 'You must enter a cutscene id.')
|
2020-02-19 21:40:57 -08:00
|
|
|
return
|
2016-01-16 01:26:33 -05:00
|
|
|
end
|
2020-03-19 18:41:42 -07:00
|
|
|
|
2017-08-03 12:31:51 -04:00
|
|
|
-- play cs
|
2020-02-19 21:40:57 -08:00
|
|
|
player:startEventString(csid, string1, string2, string3, string4, op1, op2, op3, op4, op5, op6, op7, op8)
|
2020-03-19 18:41:42 -07:00
|
|
|
end
|
2023-09-02 07:01:35 -04:00
|
|
|
|
|
|
|
|
return commandObj
|