π₯οΈCode Snippets
Prevent player from exiting while their seatbelt is on
function HasSeatbeltOn()
return seatbeltOn
end
exports("HasSeatbeltOn", HasSeatbeltOn)Prevent car theft alerts when player enters the taxi
-- If the player has a taxi dispatched, dont trigger this alert
-- as they are likely entering the taxi that was dispatched
if exports["wp-ai-taxi"]:isTaxiDispatched() then return end---@param witnesses table | Array of Ped IDs that witnessed the event
---@param jacker number | The Ped ID of the jacker
AddEventHandler('CEventPedJackingMyVehicle', function(witnesses, jacker)
-- If AutoAlerts are disabled, don't trigger
if not Config.Enable['Autotheft'] then return end
-- If the player has a taxi dispatched, dont trigger this alert as they are likely entering the taxi that was dispatched
if exports["wp-ai-taxi"]:isTaxiDispatched() then return end
...
end)Last updated