[STANDALONE] Pizza Delivery Job

A script by Qotrek

No reviews yet.
[STANDALONE] Pizza Delivery Job main image

Full Description

Standalone Pizza Delivery Minigame :pizza::rocket:

Enhance your game with our Pizza Delivery Minigame, designed to bring dynamic and immersive gameplay to your server. Perfect for roleplay and open-world environments, this standalone script is fully optimized and easy to set up!

Features:

  • Intuitive and clean HUD – A user-friendly interface for smooth navigation.
  • Dynamic gameplay mechanics – Engage players with interactive deliveries.
  • Fully configurable – Customize settings to fit your server’s needs.
  • Optimized for performance – Runs efficiently without lag.
  • Easy installation – Quick and hassle-free setup.
  • Synchronized animation - Beautiful animation giving a pizza

Exposed functions:

  • AddPlayerMoney
  • PunishPlayer - possible cheater
  • Notify
  • RegisterVehicleInteractions
  • UnregisterVehicleInteractions
  • Marker Check
  • RegisterJobInteractions

Config

Config = Config or {}

Config.Blip = {
    label = 'Pizza Delivery',
    sprite = 889,
    colour = 17,
}

Config.NPCs = {
    {
        model = 'U_M_Y_Mani',
        position = vec4(-322.205, 6231.28, 31.527, 228.85),
        scenario = 'PROP_HUMAN_STAND_IMPATIENT',
        locationSet = 1,
        -- skipBlip = true
    },
    {
        model = 'A_F_M_SouCent_02',
        position = vec4(1950.881, 3845.257, 32.175, 296.08),
        scenario = 'PROP_HUMAN_STAND_IMPATIENT',
        locationSet = 2,
    },
    {
        model = 'S_M_M_Migrant_01',
        position = vec4(1675.232, 4878.638, 42.062, 91.553),
        scenario = 'PROP_HUMAN_STAND_IMPATIENT',
        locationSet = 3,
    },
}

Config.DeliveryLocationsSets = {
    [1] = {
        vec4(-227.116, 6377.422, 31.759, 224.766),
        vec4(-26.455, 6597.132, 31.861, 229.619),
        vec4(-280.524, 6350.646, 32.601, 223.895),
        vec4(-302.212, 6326.909, 32.887, 215.973),
        vec4(-360.302, 6260.679, 31.9, 134.486),
        vec4(-407.266, 6314.195, 28.941, 45.972),
        vec4(-245.985, 6414.5, 31.461, 311.556),
        vec4(-229.63, 6445.556, 31.197, 320.689),
        vec4(-105.659, 6528.591, 30.168, 141.933),
        vec4(31.068, 6596.7, 32.821, 44.233),
        vec4(11.558, 6578.351, 33.07, 46.043),
        vec4(-15.335, 6557.319, 33.24, 135.141),
        vec4(35.435, 6663.221, 32.19, 346.521),
        vec4(-9.686, 6654.181, 31.703, 24.652),
        vec4(-368.261, 6341.704, 29.844, 37.015),
        vec4(-130.775, 6551.859, 29.872, 45.66),
        vec4(-188.848, 6409.676, 32.297, 226.155),
        vec4(-159.845, 6432.66, 31.916, 315.5),
        vec4(1.746, 6612.525, 32.081, 214.031),
        vec4(-65.826, 6506.358, 31.536, 356.912),
        vec4(-85.014, 6362.472, 31.576, 40.242),
        vec4(-96.687, 6323.969, 31.576, 134.779),
        vec4(-146.225, 6303.5, 31.557, 133.952),
        vec4(-247.566, 6370.154, 31.846, 224.413),
        vec4(-329.317, 6150.257, 32.313, 317.411)
    },
    [2] = {
        vec4(1932.895, 3804.938, 32.91, 301.091),
        vec4(1925.026, 3824.693, 32.44, 33.779),
        vec4(1830.751, 3737.851, 33.962, 119.118),
        vec4(1777.283, 3738.258, 34.655, 301.341),
        vec4(1746.139, 3788.209, 34.835, 301.238),
        vec4(1733.568, 3808.721, 35.124, 221.218),
        vec4(1661.355, 3819.821, 35.47, 129.118),
        vec4(1639.204, 3731.385, 35.068, 135.171),
        vec4(1532.76, 3722.286, 34.814, 206.368),
        vec4(1435.312, 3657.115, 34.43, 118.771),
        vec4(1691.885, 3865.813, 34.908, 219.313),
        vec4(1728.543, 3851.83, 34.784, 36.255),
        vec4(1756.453, 3871.356, 34.871, 121.836),
        vec4(1744.247, 3887.006, 35.547, 28.32),
        vec4(1781.641, 3911.241, 34.91, 203.307),
        vec4(1808.916, 3907.972, 33.735, 20.263),
        vec4(1838.7, 3907.365, 33.461, 279.721),
        vec4(1880.486, 3920.5, 33.213, 286.094),
        vec4(1936.477, 3891.671, 32.967, 28.13),
        vec4(1898.972, 3875.791, 32.747, 27.417),
        vec4(1857.77, 3854.777, 33.102, 15.756),
        vec4(1813.644, 3854.066, 34.354, 205.588),
        vec4(1834.47, 3863.414, 34.297, 289.336),
        vec4(1777.552, 3799.912, 34.523, 299.556),
        vec4(1763.974, 3823.615, 34.768, 215.342),
        vec4(1894.56, 3715.306, 32.752, 300.157)
    },
    [3] = {
        vec4(1744.332, 4602.916, 41.19, 314.082),
        vec4(1724.169, 4632.421, 43.932, 305.106),
        vec4(1678.163, 4658.544, 43.71, 3.982),
        vec4(1710.922, 4670.697, 43.528, 270.693),
        vec4(1682.207, 4688.808, 43.688, 90.617),
        vec4(1713.068, 4735.167, 42.43, 287.19),
        vec4(1670.287, 4752.398, 43.313, 112.773),
        vec4(1663.762, 4775.91, 42.404, 100.619),
        vec4(1655.669, 4836.997, 42.657, 97.166),
        vec4(1650.135, 4872.584, 43.512, 12.139),
        vec4(1700.31, 4780.02, 43.023, 192.572),
        vec4(1654.615, 4858.431, 42.376, 11.32)
    }
}

Config.ParkingLocationSets = {
    [1] = {
        vec4(-342.311, 6239.937, 30.972, 40.571),
        vec4(-341.004, 6241.022, 30.979, 46.31),
        vec4(-339.876, 6241.983, 30.978, 41.485),
        vec4(-338.603, 6243.207, 30.985, 39.228),
    },
    [2] = {
        vec4(1947.06, 3849.538, 31.67, -69.765),
        vec4(1946.255, 3851.121, 31.661, -68.628),
        vec4(1945.487, 3852.734, 31.651, -62.319),
        vec4(1944.653, 3854.518, 31.645, -69.068),
    },
    [3] = {
        vec4(1672.993, 4875.204, 41.476, 7.757),
        vec4(1673.662, 4870.602, 41.472, 7.522),
        vec4(1674.258, 4866.717, 41.464, 7.162),
        vec4(1674.79, 4862.928, 41.458, 6.654),
    }
}

Config.NPCModels = {
    'a_f_m_downtown_01',
    'a_f_m_eastsa_01',
    'a_f_m_eastsa_02',
    'a_f_m_fatbla_01',
    'a_f_m_fatwhite_01',
    'a_f_m_soucentmc_01',
    'a_f_y_epsilon_01',
    'a_f_y_eastsa_03',
    'a_f_y_hiker_01',
    'a_f_y_rurmeth_01',
    'a_f_y_tourist_02',
    'a_f_y_vinewood_01',
    'a_f_y_gencaspat_01',
    'a_m_m_afriamer_01',
    'a_m_m_fatlatin_01',
    'a_m_m_farmer_01',
    'a_m_m_genfat_01',
    'a_m_m_genfat_02',
    'a_m_m_hasjew_01',
    'a_m_m_hillbilly_01',
    'a_m_m_mexlabor_01',
    'a_m_m_mexcntry_01',
    'a_m_m_polynesian_01',
    'a_m_m_rurmeth_01',
    'a_m_m_salton_02',
    'a_m_m_skater_01',
    'a_m_m_stlat_02',
    'a_m_m_tourist_01',
    'a_m_y_beach_02',
    'a_m_y_cyclist_01',
    'a_m_y_epsilon_01',
    'a_m_y_hipster_03',
    'a_m_y_soucent_02',
    'a_f_m_salton_01',
    'a_f_m_tramp_01',
    'a_f_o_salton_01',
    'u_f_o_carol',
    'u_f_y_beth',
    'a_f_o_genstreet_01',
    'a_f_y_clubcust_03',
    'a_f_y_soucent_01',
    'a_f_y_vinewood_04',
    'csb_jenettee',
    'csb_maude_02',
    'ig_bountytarget_01',
    'ig_bountytarget_03',
    'ig_bountytarget_05',
    'ig_jenettee',
    'ig_bountytarget_06',
    'ig_mechanic_03',
    's_m_m_bailoffice_01'
}

Config.MaxDeliveryLocations = 5
Config.ChanceForAgrresivePed = 60

Config.PizzaPrice = 12
Config.MaxTip = 8

Open LUA files

-----------------
-- CLIENT SIDE --
-----------------

--- @param message string
--- @param msgType 'success' | 'error' | 'info' | 'warning'
--- @param duration integer Milliseconds
function Notify(message, msgType, duration)
    lib.notify({
        title = 'Pizza Delivery',
        description = message,
        type = msgType,
        duration = duration
    })
end

--- @param vehicleNet integer
function RegisterVehicleInteractions(vehicleNet)
    exports.ox_target:addEntity(vehicleNet, {
        {
            label = 'Take out pizza',
            icon = 'fa-solid fa-pizza-slice',
            distance = 1.5,
            canInteract = function()
                if not isDeliveryActive then return false end
                if isHoldingPizza then return false end

                return true
            end,
            onSelect = function()
                TakePizza()
            end
        },
        {
            label = 'Store pizza',
            icon = 'fa-solid fa-pizza-slice',
            distance = 1.5,
            canInteract = function()
                if not isDeliveryActive then return false end
                if not isHoldingPizza then return false end

                return true
            end,
            onSelect = function()
                DropPizza()
            end
        }
    })
end

--- @param vehicleNet integer
function UnregisterVehicleInteractions(vehicleNet)
    exports.ox_target:removeEntity(vehicleNet)
end

--- @return boolean canDelivery
function MarkerCheck()
    return (not IsPedInAnyVehicle(PlayerPedId(), false))
end

--- @param entity integer
--- @param npcData { name: string, model: string, position: vector4, scenario: string, locationSet: integer, skipBlip: boolean, i: integer }
function RegisterJobInteractions(entity, npcData)
    exports.ox_target:addLocalEntity(entity, {
        {
            label = 'Start delivery',
            icon = 'fa-solid fa-pizza-slice',
            distance = 1.5,
            payload = { locationSetIndex = npcData.locationSet, npcName = npcData.name, npcIndex = npcData.i },
            canInteract = function()
                if isDeliveryActive then return false end

                return true
            end,
            onSelect = function(data)
                StartJob(data.payload)
            end
        },
        {
            label = 'End delivery',
            icon = 'fa-solid fa-calendar-xmark',
            distance = 1.5,
            canInteract = function()
                if not isDeliveryActive then return false end
                if activeNPCIndex ~= npcData.i then return false end

                return true
            end,
            onSelect = function()
                FinishDelivery()
            end
        }
    })
end



-----------------
-- SERVER SIDE --
-----------------

--- @param source integer
--- @param amount integer
function AddPlayerMoney(source, amount)
    print('Adding money to player ' .. source .. ' amount: ' .. amount)

    exports.ox_inventory:AddItem(source, 'money', amount)
end

--- Possible cheater
--- @param source integer
--- @param extra string
function PunishPlayer(source, extra)
    DropPlayer(tostring(source), '[bl-pizza-delivery] ' .. extra)
end

Interface

More screenshots


Preview video :movie_camera:

Any questions? Contact us on our Discord

Price: $10 + TAX

BUY NOW (TEBEX)

Add a fun and interactive job to your server today! :rocket::pizza:

Code is accessible No
Subscription-based No
Lines 2400+
Requirements 3258 game build
Support Yes

Config Merger
Have you tried Config Merger? Merge your configs easily