Respown
Gold Elite
Hi guys, this is a simple to use "proximity system" script. I hope you like it, it's completely open source and can be easily embedded into basically any script!
This script is “standalone” but will require ESX / QB-Core to authorize!
Example usage:
This includes all parameters, you can not write the ones you don't care about and it will just use the default value!
Code:
Promotional Video:
This script is “standalone” but will require ESX / QB-Core to authorize!
Example usage:
This includes all parameters, you can not write the ones you don't care about and it will just use the default value!
Code:
Code:
exports["zerio-proximityprompt"]:AddNewPrompt({
name = "testprompt", -- unique name, like some kind of "id"
job = "police", -- If you want to set an occupation restriction. Remove if you want everyone to see it.
objecttext = "World", -- Parent title
actiontext = "Interact with something", -- Text
holdtime = 5000, -- the amount of time in milliseconds you need to hold the action to perform
key = "E", -- Key to press
position = vector3(0.0, 0.0, 0.0), -- Position
params = {"test", "data"}, -- this is passed to the usage callback as shown below
usage = function(data) -- function that executes when you use the affinity prompt
print("Proximity prompt used, following paragraphs passed: " .. json.encode(data))
end,
drawdist = 3, -- max distance to see prompt
usagedist = 1.5 -- max distance to see prompt
})
Promotional Video: