Créer son propre job

Créer son propre job

Je vous ai mis des lignes de codes ici pour un job livreur, vous avez juste à modifier les valeurs dedans.

Config.Jobs.truckdriver = {

    BlipInfos = {
        Sprite = 237,
        Color = 4
    },

    Vehicles = {

        Truck = {
            Spawner = 1,
            Hash = "phantom",
            Trailer = "trailers",
            HasCaution = true
        }

    },

    Zones = {

        CloakRoom = {
            Pos = {x = 1200.63, y = -1276.87, z = 34.38},
            Size = {x = 3.0, y = 3.0, z = 1.0},
            Color = {r = 204, g = 204, b = 0},
            Marker = 1,
            Blip = true,
            Name = _U("lj_locker_room"),
            Type = "cloakroom",
            Hint = _U("cloak_change")
        },

        Cargo = {
            Pos = {x = -534.32, y = 5373.79, z = 69.50},
            Size = {x = 3.0, y = 3.0, z = 1.0},
            Color = {r = 204, g = 204, b = 0},
            Marker = 1,
            Blip = true,
            Name = _U("lj_mapblip"),
            Type = "work",
            Item = {
                {
                    name = _U("td_cargo"),
                    db_name = "cargo",
                    time = 500,
                    max = 100,
                    add = 1,
                    remove = 1,
                    requires = "nothing",
                    requires_name = "Nothing",
                    drop = 100
                }
            },
            Hint = _U("lj_pickup")
        },

        VehicleSpawner = {
            Pos = {x = 1191.96, y = -1261.77, z = 34.17},
            Size = {x = 3.0, y = 3.0, z = 1.0},
            Color = {r = 204, g = 204, b = 0},
            Marker = 1,
            Blip = false,
            Name = _U("spawn_veh"),
            Type = "vehspawner",
            Spawner = 1,
            Hint = _U("spawn_veh_button"),
            Caution = 2000
        },
VehicleSpawnPoint = {
            Pos = {x = 1194.62, y = -1286.95, z = 34.12},
            Size = {x = 3.0, y = 3.0, z = 1.0},
            Marker = -1,
            Blip = false,
            Name = _U("service_vh"),
            Type = "vehspawnpt",
            Spawner = 1,
            Heading = 264.40
        },

        VehicleDeletePoint = {
            Pos = {x = 1216.89, y = -1229.23, z = 34.40},
            Size = {x = 5.0, y = 5.0, z = 1.0},
            Color = {r = 255, g = 0, b = 0},
            Marker = 1,
            Blip = false,
            Name = _U("return_vh"),
            Type = "vehdelete",
            Hint = _U("return_vh_button"),
            Spawner = 1,
            Caution = 2000,
            GPS = 0,
            Teleport = 0
        },

        Delivery = {
            Pos = {x = 1201.35, y = -1327.51, z = 34.22},
            Color = {r = 204, g = 204, b = 0},
            Size = {x = 5.0, y = 5.0, z = 3.0},
            Marker = 1,
            Blip = true,
            Name = _U("delivery_point"),
            Type = "delivery",
            Spawner = 1,
            Item = {
                {
                    name = _U("delivery"),
                    time = 500,
                    remove = 1,
                    max = 100, -- if not present, probably an error at itemQtty >= item.max in esx_jobs_sv.lua
                    price = 35,
                    requires = "cargo",
                    requires_name = _U("td_cargo"),
                    drop = 100
                }
            },
            Hint = _U("lj_deliver_button")
        }

    }
}

Important : Avec ses ligne de codes vous pouvez config n’importe quel job