txAdmin
txAdmin copied to clipboard
[FEATURE]: playerKicked event
Scope
Developer API
Feature Description
Hey there, just wanted to request that the txAdmin:events:playerKicked event is called before the player is kicked so you can at least check their player name. Right now only thing you can see is the player id but because the player is kicked first and then the event is emitted you can't get their player name
Use Case
Imma just use my case. I want to create a script logging all txAdmin actions in discord but I cant get the player name out of the event
Proposed Solution
Call event first, then kick player. Maybe like 10ms wait in between
Additional Info
No response
Although I don't like the use case, I still think this is a reasonable request.
Whats wrong about my use case :o
One day I'll still write an entire docs page on why webhook-like usage of discord is absolutely stupid :)
uh aight
One day I'll still write an entire docs page on why webhook-like usage of discord is absolutely stupid :)
I know I've never commented or made a PR here, but thank you for stating that fact. Coming from a SysOps background where I'm used to do AI log analysis, log mining and alerting, it is an absolute nightmare with the fact that everything is logged to Discord. It's impossible to maintain, you can't do ANYTHING with the data but use Discord's subpar search, and that's ONLY if you were smart enough to put a keyword in the log event to search for it later. It's rate limited. It's slow. It's taxing.
But for this usecase, what's wrong with using the built-in CFX event? I use this to track crashes, player's name, character name, etc. As long as your framework keeps a table of active players and their player data... its never failed.
AddEventHandler('playerDropped', function(reason)
--TriggerClientEvent('chatMessage', -1, '', { 255, 255, 255 }, '^2* ' .. GetPlayerName(source) ..' left (' .. reason .. ')')
end)
But for this usecase, what's wrong with using the built-in CFX event? I use this to track crashes, player's name, character name, etc. As long as your framework keeps a table of active players and their player data... its never failed.
I just want the message to be logged when the player is kicked, not when he disconnects, crashes or anything else.
Planned v5.0
Actually not planed.
But i'll think about it.