[DiscordArchive] how do i show a frame with a command?
[DiscordArchive] how do i show a frame with a command?
![[Image: image.png?ex=690c61ab&is=690b102b&hm=08b...bf82aaa75&]](https://cdn.discordapp.com/attachments/448835144564867094/1107228793036361738/image.png?ex=690c61ab&is=690b102b&hm=08b94bc62a0a66d81d0438c01c6dab7ca7e2d4e987fd1c4f27ece1fbf82aaa75&)
Archived author: Chaz • Posted: 2023-05-14T08:51:55.654000+00:00
Original source
![[Image: image.png?ex=690c61ab&is=690b102b&hm=08b...bf82aaa75&]](https://cdn.discordapp.com/attachments/448835144564867094/1107228793036361738/image.png?ex=690c61ab&is=690b102b&hm=08b94bc62a0a66d81d0438c01c6dab7ca7e2d4e987fd1c4f27ece1fbf82aaa75&)
Archived author: Chaz • Posted: 2023-05-14T08:53:41.568000+00:00
Original source
```
local ChatPrefix = ".shop"
local function ChatSystem(event, player, msg, _, lang)
if (msg:find(ChatPrefix) == 1) then
AIO.Handle(player, "STORE_CLIENT", "ToggleFrame")
end
end
RegisterPlayerEvent(18, ChatSystem)
```
Archived author: Roboto • Posted: 2023-05-14T09:11:48.735000+00:00
Original source
Don't ping people randomly.
Archived author: Roboto • Posted: 2023-05-14T09:11:58.903000+00:00
Original source
<https://www.lua.org/pil/20.1.html>
Archived author: Foe • Posted: 2023-05-14T09:14:20.965000+00:00
Original source
Don't use a chat hook, use the proper command hook
Archived author: Chaz • Posted: 2023-05-14T09:14:56.838000+00:00
Original source
i tried that same issue :/
Archived author: Chaz • Posted: 2023-05-14T09:15:01.154000+00:00
Original source
```
local function OnCommand(event, player, msg, Type, lang)
if (msg == ".shop") then
AIO.Handle(player, "STORE_CLIENT", "ToggleFrame")
end
end
RegisterPlayerEvent(4, OnCommand)
```
Archived author: Foe • Posted: 2023-05-14T09:15:44.432000+00:00
Original source
That's not correct, check the documentation
Archived author: Foe • Posted: 2023-05-14T09:16:13.111000+00:00
Original source
Event 4 is on spell cast, not on command
Archived author: Chaz • Posted: 2023-05-14T09:16:48.260000+00:00
Original source
oh so the number represents the command