Contracts
This file represents the Contracts configuration file (sh_contracts.lua)
Settings
Config.Contracts.Settings = {
maxContractsActive = 3, -- The maximum amount of contracts available at the same time (It includes started and non started contracts),
generationInterval = {min = 5000, max = 15000}, -- The time between new contracts appearing in ms.
startInterval = {min = 1000, max = 1500} -- The time the contract takes to start after being generated.
}Contracts
Structure
This is the base structure of a contract will various possible values
["ID OF THE CONTRACT"] = { -- ID of the contract
title = "NAME OF THE CONTRACT", -- Title of the contract
description = "DESCRIPTION OF THE CONTRACTS", -- Description of the contract
gangsRequired = 1, -- The amount of joined gangs required to start. (If not enough joined gangs will get their coins refunded).
policeRequired = 0, -- The amount of police online for the contract to generate (The count will also be checked when it starts and if it isn't reached the joined gangs will get their coins refunded).
price = 0, -- The price of gang coins to join.
requiredReputation = { -- Required reputation of various dealers to join the contract.
-- ["dealer_name"] = requiredDealerReputation,
},
requiredTasks = { -- Required completed tasks of various dealers to join the contract.
-- ["dealer_name"] = { list of needed tasks }
},
timeToComplete = 600000, --TIME TO COMPLETE THE CONTRACT IN MS
steps = { -- Steps and their data.
-- init and finish steps are crucial, without both of these steps the contract will break and the script will have issues.
["init"] = { stepData here }, --Look at the step structure
["finish"] = { stepData here } --Look at the step structure
}
}Steps
This displays all possible values for steps. Notice: Finish step only takes clearEntities and clearBlips and doesn't execute any other values.
Blips
These are all possible values for blips and they should go in the steps blips field.
Vehicles
There are all possible values for vehicles and they should go in the steps vehicles field.
Keeping the same ID but changing the values in steps after the entity is spawned will change some of these values, you can use this to modify currently existing entities without having to re-create new ones.
Entities
These are all possible values on an entities and should go to the steps entities field
Peds
These are all possible values for peds. These should go in the steps peds field.
Target
These are all posible values for target data for entities. This can be used with all of the entities, vehicles and peds. This should go in the selected peds target field.
To clear out active targets when a step is initialized add clearTargets = true to the entity.
Customizing the experience
This requires knowladge of LUA and programming, but you can always ask us for help implementing your ideas.
Modyfing Existing Entities
To modify already existing entities, use the same structure and specifiy the same ID. If the entity is available the script will override the entities options with newly passed ones. Keep in mind that some options like model can't be overwritten, and a new entity will have to be created.
Example
Accessing Entity Handles
You might have to access the entities script-wise to call native values and them. To do that you can follow this example:
Last updated