Skip to content

Commit

Permalink
Add reason to seat disabled message
Browse files Browse the repository at this point in the history
  • Loading branch information
thecraftianman committed Oct 13, 2024
1 parent 0767562 commit b7d99c0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lua/acf/contraption/seats_sv.lua
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,11 @@ hook.Add("CanPlayerEnterVehicle", "ACF_SeatLegality", function(Player, Entity)
if not Entity.ACF then return end

if not Entity.ACF.LegalSeat then
ACF.SendNotify(Player, false, "[ACF] Seat is not legal and is currently disabled.")
local IsLegal, Reason = ACF.IsLegal(Entity)
Reason = not IsLegal and Reason or "Reason not found."

ACF.SendNotify(Player, false, "[ACF] Seat is not legal and is currently disabled. (" .. Reason .. ")")

return false
end
end)

0 comments on commit b7d99c0

Please sign in to comment.