HexscriptsVersion 3.0Lifeinvader
Configurations
Here you will get all configurations & open source files that are included within this script.
Config Files
Config = {}
Config.Debug = false -- Set to true to enable debug messages in the console
Config.Locale = 'automatic' -- automatic, en, de
Config.Framework = 'automatic' -- automatic, esx, qbcore, standalone
Config.ServerName = 'HEXSCRIPTS'
-- positions of lifeinvaders (you can add more than one)
Config.Positions = {
{
coords = vector4(-1081.9200, -247.7137, 37.7632, 209.1815),
ped = {
enabled = true,
distance = 1.0,
renderDistance = 50.0,
model = joaat('CS_FBISuit_01'),
data = {
animation = {
scenario = 'WORLD_HUMAN_CLIPBOARD',
-- dict = '',
-- anim = ''
},
speakData = {
voiceName = 'a_m_m_business_01_white_full_01',
speechName = 'GENERIC_HI',
speechParam = 'SPEECH_PARAMS_FORCE',
distance = 3.0
}
}
},
marker = {
enabled = false,
type = 0,
drawDistance = 50.0,
scale = vector3(0.5, 0.5, 0.5),
color = {
red = 255,
green = 46,
blue = 58,
alpha = 100
},
moveUpAndDown = false,
rotate = true
},
blip = {
enabled = true,
coords = vector3(-1081.9200, -247.7137, 37.7632),
sprite = 77,
scale = 0.8,
color = 1,
display = 4,
shortRange = true,
text = 'Lifeinvader'
}
}
}
Config.Cooldown = 300 -- Cooldown in seconds between ads
Config.LifeinvaderTimeout = 12500 -- Time in milliseconds the lifeinvader notification is visible
Config.MaxAds = 100 -- Maximum number of ads stored
Config.Price = { -- Price settings
minLetter = 15,
maxLetter = 200,
price = 2500,
perLetter = true,
pricePerLetter = 100
}Client Open Source Files
if Config.Framework == 'automatic' then
if GetResourceState('es_extended') == 'started' then
Config.Framework = 'esx'
elseif GetResourceState('qb-core') == 'started' then
Config.Framework = 'qbcore'
else
Config.Framework = 'standalone'
end
end
function DrawHelpNotify(message)
if GetResourceState('hex_final_hud') == 'started' then
exports['hex_final_hud']:HelpNotify(message)
elseif GetResourceState('hex_2_hud') == 'started' then
exports['hex_2_hud']:HelpNotify(message)
elseif GetResourceState('hex_future_hud') == 'started' then
exports['hex_future_hud']:HelpNotify(message)
elseif GetResourceState('hex_1_hud') == 'started' then
exports['hex_1_hud']:HelpNotify(message)
elseif GetResourceState('hex_hud_prem') == 'started' then
exports['hex_hud_prem']:HelpNotify(message)
elseif GetResourceState('hex_4_hud') == 'started' then
exports['hex_4_hud']:HelpNotify(message)
else
SetTextComponentFormat('STRING')
AddTextComponentString(message)
DisplayHelpTextFromStringLabel(0, 0, 1, -1)
end
end
function Notify(title, message, notifyType, timeout)
if timeout == nil then timeout = 5000 end
if notifyType == nil then notifyType = 'info' end
if GetResourceState('hex_final_hud') == 'started' then
exports['hex_final_hud']:Notify(title, message, notifyType, timeout)
elseif GetResourceState('hex_2_hud') == 'started' then
exports['hex_2_hud']:Notify(title, message, notifyType, timeout)
elseif GetResourceState('hex_future_hud') == 'started' then
exports['hex_future_hud']:Notify(title, message, notifyType, timeout)
elseif GetResourceState('hex_1_hud') == 'started' then
exports['hex_1_hud']:Notify(title, message, notifyType, timeout)
elseif GetResourceState('hex_hud_prem') == 'started' then
exports['hex_hud_prem']:Notify(title, message, notifyType, timeout)
elseif GetResourceState('hex_hud') == 'started' then
exports['hex_hud']:Notify(title, message, notifyType, timeout)
elseif GetResourceState('hex_4_hud') == 'started' then
exports['hex_4_hud']:Notify(title, message, notifyType, timeout)
else
print(('Notify: %s, %s, %s, %s'):format(title, message, notifyType, timeout))
end
end
function NotifyLifeinvader(rpName, phone_number, message, timeout)
TriggerEvent('hex_3_lifeinvader:lifeinvaderNotify', rpName, phone_number, message, timeout)
endServer Open Source Files
if Config.Framework == 'automatic' then
if GetResourceState('es_extended') == 'started' then
Config.Framework = 'esx'
elseif GetResourceState('qb-core') == 'started' then
Config.Framework = 'qbcore'
else
Config.Framework = 'standalone'
end
end