[DiscordArchive] does **PLAYER_EVENT_ON_COMMAND** only fire on failed commands?
[DiscordArchive] does **PLAYER_EVENT_ON_COMMAND** only fire on failed commands?
Archived author: 0xCiBeR • Posted: 2023-02-14T03:22:57.894000+00:00
Original source
does **PLAYER_EVENT_ON_COMMAND** only fire on failed commands?
Archived author: Anchy • Posted: 2023-02-14T03:59:07.584000+00:00
Original source
it should fire for all commands
Archived author: 0xCiBeR • Posted: 2023-02-14T04:00:50.397000+00:00
Original source
seems to not be firing for default commands when sent correctly
Archived author: Anchy • Posted: 2023-02-14T04:03:50.690000+00:00
Original source
is it firing at all
Archived author: 0xCiBeR • Posted: 2023-02-14T04:04:28.284000+00:00
Original source
it is for failed commands(not typed correctly)
Archived author: Anchy • Posted: 2023-02-14T04:06:02.182000+00:00
Original source
whats your hook look like
Archived author: 0xCiBeR • Posted: 2023-02-14T04:06:06.430000+00:00
Original source
```lua
local PLAYER_EVENT_ON_COMMAND = 42 --(event, player, command)
local webhook = "https://discord.com/api/webhooks/..."
local function sendLog(event,player,command)
--if not player then return end
print(command)
local name = player:GetName()
local guid = player:GetGUIDLow()
HttpRequest("POST", webhook, '{"content": "LOG: **'..name..'(GUID:'..guid..')** | Comando: '..command..'"}', "application/json", function(status, body, headers)
print(body)
end)
end
RegisterPlayerEvent(PLAYER_EVENT_ON_COMMAND, sendLog)```
Archived author: Anchy • Posted: 2023-02-14T04:07:13.954000+00:00
Original source
does it still only fire on failed commands without the httprequest
Archived author: 0xCiBeR • Posted: 2023-02-14T04:07:23.211000+00:00
Original source
let me try
Archived author: 0xCiBeR • Posted: 2023-02-14T04:08:42.291000+00:00
Original source
yes, same result