Skip to content
Snippets Groups Projects

"PlayerQuit" Lua Hook

Merged Prisima the Fox requested to merge PrisimaTF/SRB2:Playerquit_hook into next

This is my "PlayerQuit" Lua hook that is called when a player leaves.

Example:

addHook("PlayerQuit", function(player, reason)
 print(player.name)
 if (reason == KR_KICK) then
  print("was kicked.")
 end
end)

Reasons and their meanings:

KR_KICK (1) - Kicked intentionally by a server/admin

KR_PINGLIMIT (2) - Broke ping limit

KR_SYNCH (3) - Synch faliure

KR_TIMEOUT (4) - Connection timeout

KR_BAN (5) - Ban

KR_LEAVE (6) - Player quit

Edited by Monster Iestyn

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
Please register or sign in to reply
Loading