OnPlayerExitCart
A player left their seat in a cart.
Their own dismount, RemovePlayerFromCart, a teleport (SetPlayerPos), a death, leaving the server, or the cart
destroyed - they are out by now (GetPlayerCart answers nil). A driver letting go of the reins leaves the free cart
standing where it is.
Syntax
Section titled “Syntax”function OnPlayerExitCart(pid, id, seat) -- ...end| Parameter | Type | |
|---|---|---|
pid |
number | the player |
id |
number | the cart |
seat |
number | the seat they sat on |
Returns
Section titled “Returns”nothing
Example
Section titled “Example”function OnPlayerExitCart(pid, id, seat) if seat == 0 then Log(GetPlayerName(pid) .. " left cart " .. id .. " at " .. table.concat({GetEntityPos(id)}, " ")) endendSee also
Section titled “See also”OnPlayerEnterCart · RemovePlayerFromCart · the Carts group of the index
