--[[ ╔══════════════════════════════════════════════════[ www.novacapital.gg ]═════════════════════════════════════════════════════════════╗ _ _ _____ _ _ _ | \ | | / __ \ (_)| | | | | \| | ___ __ __ __ _ | / \/ __ _ _ __ _ | |_ __ _ | | | . ` | / _ \ \ \ / / / _` | | | / _` || '_ \ | || __| / _` || | | |\ || (_) | \ V / | (_| | | \__/\| (_| || |_) || || |_ | (_| || | \_| \_/ \___/ \_/ \__,_| \____/ \__,_|| .__/ |_| \__| \__,_||_| | | |_| ╚══════════════════════════════════════════════════[ www.novacapital.gg ]═════════════════════════════════════════════════════════════╝ --]] function Assento1() --[[ if (isPedInVehicle(localPlayer)) then local veh = getPedOccupiedVehicle(localPlayer) if (not getVehicleOccupant(veh, 0) and not exports['nc_safezone']:checkP1(veh, localPlayer)) then local vehicleInfos = getElementData(veh, 'vehicle:infos') or false if vehicleInfos and vehicleInfos.ownerID and vehicleInfos.ownerElement and not vehicleInfos.ownerOrganization then if vehicleInfos.ownerID ~= getElementData(localPlayer, 'ID') or vehicleInfos.ownerElement ~= localPlayer then return exports['infobox']:dxDrawNotification(localPlayer, 'Você não é o dono deste veículo.', 'error') end end triggerServerEvent('warpPed', resourceRoot, localPlayer, veh, 0) end end]] if (isPedInVehicle(localPlayer)) then local veh = getPedOccupiedVehicle(localPlayer) if (not getVehicleOccupant(veh, 0)) then local vehicleInfos = (getElementData(veh, 'vehicle:infos') or getElementData(veh, "dealership:vehicleData") or false) if (vehicleInfos and vehicleInfos.ownerOrganization and not getElementData(localPlayer,'player:inService')) then return exports['infobox']:dxDrawNotification('Você não pode trocar de assento em veículos de organização.', 'error') end if (vehicleInfos and vehicleInfos.ownerID and not vehicleInfos.ownerOrganization) then local playerId = getElementData(localPlayer, 'ID') local isOwner = (vehicleInfos.ownerID == playerId) local hasKey = (vehicleInfos.Keys and vehicleInfos.Keys[playerId]) if not (isOwner or hasKey) then return exports['infobox']:dxDrawNotification('Você não tem permissão para entrar nesse veículo-2.', 'error') end end triggerServerEvent('warpPed', resourceRoot, localPlayer, veh, 0) end end end addCommandHandler("p1", Assento1) function Assento2() if (isPedInVehicle(localPlayer)) then local veh = getPedOccupiedVehicle(localPlayer) if (not getVehicleOccupant(veh, 1)) then triggerServerEvent('warpPed', resourceRoot, localPlayer, veh, 1) end end end addCommandHandler("p2", Assento2) function Assento3() if (isPedInVehicle(localPlayer)) then local veh = getPedOccupiedVehicle(localPlayer) if (not getVehicleOccupant(veh, 2)) then triggerServerEvent('warpPed', resourceRoot, localPlayer, veh, 2) end end end addCommandHandler("p3", Assento3) function Assento4() if (isPedInVehicle(localPlayer)) then local veh = getPedOccupiedVehicle(localPlayer) if (not getVehicleOccupant(veh, 3)) then triggerServerEvent('warpPed', resourceRoot, localPlayer, veh, 3) end end end addCommandHandler("p4", Assento4)