2021-01-18 13:34:00 -05:00
|
|
|
-----------------------------------
|
2016-07-29 08:35:15 -06:00
|
|
|
-- func: entityVisual
|
2014-10-31 19:06:13 -06:00
|
|
|
-- desc: push entityVisual packet to 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 = {}
|
2014-10-31 19:06:13 -06:00
|
|
|
|
2023-09-02 07:01:35 -04:00
|
|
|
commandObj.cmdprops =
|
2014-10-31 19:06:13 -06:00
|
|
|
{
|
|
|
|
|
permission = 1,
|
2023-08-28 21:02:28 -04:00
|
|
|
parameters = 's'
|
2020-02-19 21:40:57 -08:00
|
|
|
}
|
2014-10-31 19:06:13 -06: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('!entityvisual <animation string>')
|
2020-02-19 21:40:57 -08:00
|
|
|
end
|
2017-08-04 13:50:26 -04:00
|
|
|
|
2023-09-02 07:01:35 -04:00
|
|
|
commandObj.onTrigger = function(player, visualstring)
|
2017-08-04 13:50:26 -04:00
|
|
|
-- validate visualstring
|
2022-11-04 10:44:34 -04:00
|
|
|
if visualstring == nil then
|
2023-08-28 21:02:28 -04:00
|
|
|
error(player, 'You must enter a valid animation string.')
|
2020-02-19 21:40:57 -08:00
|
|
|
return
|
2014-10-31 19:06:13 -06:00
|
|
|
end
|
2017-08-04 13:50:26 -04:00
|
|
|
|
|
|
|
|
-- push visual packet to player
|
2020-02-19 21:40:57 -08:00
|
|
|
player:entityVisualPacket(visualstring)
|
2020-03-19 18:41:42 -07:00
|
|
|
end
|
2023-09-02 07:01:35 -04:00
|
|
|
|
|
|
|
|
return commandObj
|