Skip to content

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.

function OnPlayerExitCart(pid, id, seat)
-- ...
end
Parameter Type
pid number the player
id number the cart
seat number the seat they sat on

nothing

function OnPlayerExitCart(pid, id, seat)
if seat == 0 then Log(GetPlayerName(pid) .. " left cart " .. id .. " at " .. table.concat({GetEntityPos(id)}, " ")) end
end

OnPlayerEnterCart · RemovePlayerFromCart · the Carts group of the index