Wiki

Clone wiki

EFLC-MP LUA / onPlayerLeft

Description

This function is triggered once the player disconnects

Parameters

Int playerId, Int disconnectType
Int playerId

Int disconnectType: 0: player user /q, 1: player lost connection

Return values


Example

#!lua
function onPlayerLeft(playerid, reason)
    print("Player " .. getPlayerName(playerid) .. "(" .. playerid .. ") left, reason: " .. reason)
end
registerEvent("onPlayerLeft", "onPlayerLeft")

Updated