HexscriptsVersion 4.0FFA
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, es, fr, it, nl, pl, pt, tr, ar
Config.Framework = 'automatic' -- automatic, esx, qbcore, standalone
Config.ServerName = 'HEXSCRIPTS'
Config.CommandName = 'quitffa'
Config.PedInfinityAmmoClip = false
Config.PedInfiniteAmmo = true
Config.Position = {
coords = vector3(733.6722, 2523.3159, 73.2239),
leaveLobby = vector4(733.9486, 2525.9854, 73.3319, 271.8479),
marker = {
enabled = true,
type = 31,
drawDistance = 50.0,
scale = vector3(1.0, 1.0, 1.0),
color = {
red = 255,
green = 46,
blue = 58,
alpha = 100
},
moveUpAndDown = false,
rotate = true
},
lobbysVehicleMarker = {
enabled = true,
type = 36,
drawDistance = 50.0,
scale = vector3(1.0, 1.0, 1.0),
color = {
red = 255,
green = 46,
blue = 58,
alpha = 100
},
moveUpAndDown = false,
rotate = true
},
blip = {
enabled = true,
sprite = 84,
scale = 0.8,
color = 37,
display = 4,
shortRange = true,
text = 'FFA - Paintball'
}
}
Config.Positions = {
['ffa'] = {
{
name = "Markt Platz",
label = "only Pistol",
maxPlayers = 10,
center = vector3(383.8309, -339.3008, 46.8099),
size = 100.0,
sphere = {
enabled = true,
red = 255,
green = 46,
blue = 58,
alpha = 0.5
},
dimension = 1000,
imgUrl = "https://cdn.resync.me/attachments/scripts/ffa/market2.png",
xpForKill = 2,
ownWeapons = false,
weapons = {
"weapon_pistol",
"weapon_pistol50"
},
spawns = {
vector4(361.8524, -291.3102, 53.8677, 180.0),
vector4(400.4957, -313.1645, 49.8660, 180.0),
vector4(442.2439, -325.8990, 48.1187, 180.0),
vector4(420.3872, -357.1692, 47.2169, 180.0),
vector4(394.1068, -378.9253, 46.9550, 180.0),
vector4(370.5730, -380.3284, 46.5562, 180.0),
vector4(376.1372, -322.5521, 50.2008, 180.0),
vector4(373.9258, -340.6835, 47.4043, 180.0),
vector4(412.4160, -338.5406, 46.9777, 180.0),
vector4(358.3083, -339.3065, 46.7395, 180.0)
}
},
{
name = "Friedhof",
label = "Only Machinepistols",
maxPlayers = 20,
center = vector3(2386.367, 3082.089, 48.19027),
size = 100.0,
sphere = {
enabled = true,
red = 255,
green = 46,
blue = 58,
alpha = 0.5
},
dimension = 1001,
imgUrl = "https://cdn.resync.me/attachments/scripts/ffa/airport_dead.png",
xpForKill = 2,
ownWeapons = false,
weapons = {
"weapon_pistol",
"weapon_pistol50",
"weapon_machinepistol"
},
spawns = {
vector4(2360.073, 3129.041, 48.20869, 0.0),
vector4(2428.039, 3124.009, 48.14234, 0.0),
vector4(2435.5923, 3087.9827, 48.1533, 0.0),
vector4(2409.702, 3033.869, 48.16072, 0.0),
vector4(2355.944, 3038.585, 48.16628, 0.0),
vector4(2382.8660, 3027.2449, 48.1576, 0.0),
vector4(2400.7046, 3028.7883, 48.1526, 0.0),
vector4(2431.8601, 3046.2708, 48.1524, 0.0),
vector4(2378.8662, 3160.5381, 48.2112, 0.0),
vector4(2338.9009, 3110.5952, 48.2089, 0.0)
}
},
{
name = "Baustelle",
label = "only Pistol",
maxPlayers = 20,
center = vector3(-160.0956, -983.2939, 256.2072),
size = 100.0,
sphere = {
enabled = true,
red = 255,
green = 46,
blue = 58,
alpha = 0.5
},
dimension = 1002,
imgUrl = "https://cdn.resync.me/attachments/scripts/ffa/building.png",
xpForKill = 2,
ownWeapons = false,
weapons = {
"weapon_pistol",
"weapon_pistol50"
},
spawns = {
vector4(-140.1919, -953.3641, 254.1314, 0.0),
vector4(-156.8964, -949.6334, 254.1314, 0.0),
vector4(-156.7630, -1021.6153, 254.1315, 0.0),
vector4(-145.6263, -948.2170, 269.1350, 0.0),
vector4(-189.7213, -1010.8111, 254.3521, 0.0),
vector4(-166.5982, -974.7396, 259.2296, 0.0),
vector4(-133.9850, -958.3747, 264.1339, 0.0),
vector4(-136.1249, -946.9573, 259.1328, 0.0),
vector4(-164.1968, -974.4492, 259.2292, 0.0),
vector4(-162.1042, -953.7418, 269.2273, 0.0),
vector4(-146.5233, -950.3701, 259.1329, 0.0)
}
},
{
name = "Prison",
label = "Only Machinepistols",
maxPlayers = 20,
center = vector3(1691.8304, 2533.8486, 61.3355),
size = 150.0,
sphere = {
enabled = true,
red = 255,
green = 46,
blue = 58,
alpha = 0.5
},
dimension = 1003,
imgUrl = "https://cdn.resync.me/attachments/scripts/ffa/prison.png",
xpForKill = 2,
ownWeapons = false,
weapons = {
"weapon_pistol",
"weapon_pistol50",
"weapon_machinepistol"
},
spawns = {
vector4(1714.3136, 2495.2021, 45.5648, 0.0),
vector4(1659.6914, 2495.8630, 45.5648, 0.0),
vector4(1617.4119, 2553.6433, 45.5648, 0.0),
vector4(1698.7802, 2560.3872, 45.5581, 0.0),
vector4(1763.9585, 2558.1360, 45.5501, 0.0),
vector4(1709.2572, 2531.8989, 45.5636, 0.0),
vector4(1692.7716, 2469.9475, 45.6234, 0.0),
vector4(1664.1854, 2487.2678, 45.5649, 0.0),
vector4(1666.0358, 2569.0559, 45.5648, 0.0),
vector4(1752.4668, 2518.2371, 45.5772, 0.0)
}
}
},
['private'] = {
{
name = "Casino Dach",
label = "only Pistol",
center = vector3(477.2156, 165.6349, 110.6342),
size = 40.0,
sphere = {
enabled = true,
red = 255,
green = 46,
blue = 58,
alpha = 0.5
},
imgUrl = "https://cdn.resync.me/attachments/scripts/ffa/dach.png",
xpForKill = 2,
ownWeapons = false,
weapons = {
"weapon_pistol",
"weapon_pistol50"
},
spawns = {
vector4(459.9673, 190.6121, 110.5958, 0.0),
vector4(495.8133, 173.7899, 110.6555, 0.0),
vector4(481.6616, 142.1372, 110.6527, 0.0),
vector4(444.0501, 140.7654, 110.5998, 0.0),
vector4(456.5244, 163.0720, 110.6062, 0.0),
vector4(459.9013, 179.3582, 110.6026, 0.0)
}
},
{
name = "Hotel dach",
label = "only Pistol",
center = vector3(-1391.2218, 292.1165, 95.0961),
size = 40.0,
sphere = {
enabled = true,
red = 255,
green = 46,
blue = 58,
alpha = 0.5
},
imgUrl = "https://cdn.resync.me/attachments/scripts/ffa/dach2.png",
xpForKill = 2,
ownWeapons = false,
weapons = {
"weapon_pistol",
"weapon_pistol50",
"weapon_machinepistol"
},
spawns = {
vector4(-1385.4042, 302.2655, 89.8643, 0.0),
vector4(-1400.2317, 307.9985, 89.8644, 0.0),
vector4(-1402.4832, 293.5674, 89.8644, 0.0),
vector4(-1393.0367, 267.0098, 89.8644, 0.0),
vector4(-1379.0585, 265.5733, 89.8643, 0.0),
vector4(-1372.2655, 271.3719, 89.8643, 0.0)
}
},
{
name = "Observatorium",
label = "only Pistol",
center = vector3(-419.6210, 1153.2267, 326.8732),
size = 100.0,
sphere = {
enabled = true,
red = 255,
green = 46,
blue = 58,
alpha = 0.5
},
imgUrl = "https://cdn.resync.me/attachments/scripts/ffa/obsi.png",
xpForKill = 2,
ownWeapons = false,
weapons = {
"weapon_pistol",
"weapon_pistol50",
"weapon_machinepistol"
},
spawns = {
vector4(-395.1815, 1104.2329, 325.8436, 0.0),
vector4(-386.5791, 1186.0540, 325.6815, 0.0),
vector4(-415.6097, 1202.6626, 325.6418, 0.0),
vector4(-431.6885, 1207.7985, 325.7583, 0.0),
vector4(-473.1340, 1128.6034, 325.8687, 0.0),
vector4(-413.7414, 1097.9293, 332.5338, 0.0),
vector4(-450.2201, 1108.0962, 332.5313, 0.0)
}
},
{
name = "Hafen",
label = "only Pistol",
center = vector3(1140.9429, -3008.4753, 5.8998),
size = 65.0,
sphere = {
enabled = true,
red = 255,
green = 46,
blue = 58,
alpha = 0.5
},
imgUrl = "https://cdn.resync.me/attachments/scripts/ffa/hafen.png",
xpForKill = 2,
ownWeapons = false,
weapons = {
"weapon_pistol",
"weapon_pistol50",
"weapon_machinepistol"
},
spawns = {
vector4(1149.2280, -3026.5112, 5.9010, 0.0),
vector4(1164.8007, -3007.2209, 5.9012, 0.0),
vector4(1178.2251, -2981.6621, 5.9007, 0.0),
vector4(1135.2928, -2983.0776, 5.8982, 0.0),
vector4(1097.0931, -2999.2546, 5.7576, 0.0),
vector4(1103.3077, -3034.2813, 5.8842, 0.0)
}
}
}
}
Config.Levels = {
[1] = 0,
[2] = 3000,
}
Citizen.CreateThread(function()
local old = 3000
for i = 3, 100 do
old = 3000 * i
Config.Levels[i] = old
end
end)
Config.Shops = {
[1] = {
{
weaponName = 'WEAPON_PISTOL',
name = 'suppressor',
xp = 1000
},
{
weaponName = 'WEAPON_PISTOL',
name = 'flashlight',
xp = 1000
},
{
weaponName = 'WEAPON_PISTOL',
name = 'clip_extended',
xp = 1000
},
{
weaponName = 'WEAPON_PISTOL50',
name = 'flashlight',
xp = 1000
}
},
[2] = {
{
weaponName = 'WEAPON_PISTOL50',
name = 'suppressor',
xp = 1000
},
{
weaponName = 'WEAPON_PISTOL50',
name = 'clip_extended',
xp = 1000
},
{
weaponName = 'WEAPON_MACHINEPISTOL',
name = 'suppressor',
xp = 1000
},
{
weaponName = 'WEAPON_MACHINEPISTOL',
name = 'clip_extended',
xp = 1000
}
},
[3] = {
{
weaponName = 'WEAPON_MACHINEPISTOL',
name = 'clip_drum',
xp = 1000
},
{
weaponName = 'WEAPON_MICROSMG',
name = 'scope',
xp = 1000
},
{
weaponName = 'WEAPON_MICROSMG',
name = 'clip_extended',
xp = 1000
},
{
weaponName = 'WEAPON_MICROSMG',
name = 'flashlight',
xp = 1000
}
},
[4] = {
{
weaponName = 'WEAPON_MICROSMG',
name = 'suppressor',
xp = 1000
}
}
}
Config.SpawnVehicleServerSide = true
Config.Lobbys = {
{
name = 'Mirrorpark',
imgUrl = 'https://cdn.resync.me/attachments/scripts/ffa/ffa_lobby_mirrorpark.png',
defaultRounds = 5,
defaultWeapons = {'SNS Pistol', 'Pistol MK2'},
defaultVehicles = {'Revolter'},
vehicles = {'Revolter', 'BF400'},
rounds = {1, 3, 5, 11, 21},
weapons = {
{ name = 'WEAPON_SNSPISTOL', label = 'SNS Pistol' },
{ name = 'WEAPON_COMBATPISTOL', label = 'Combat Pistol' },
{ name = 'WEAPON_PISTOL', label = 'OG Pistol' },
{ name = 'WEAPON_PISTOL50', label = 'Pistol 50er' },
{ name = 'WEAPON_PISTOL_MK2', label = 'Pistol MK2' }
},
spawnsA = vector4(1195.7647705078125, -1067.07666015625, 41.42668151855469, 26.61553955078125),
spawnsB = vector4(967.396484375, -128.6649932861328, 74.38890075683594, 144.82432556152344),
vehicleA = {
npc = vector4(1188.8443603515625, -1054.4346923828125, 42.28484344482422, 208.75978088378906),
spawn = vector4(1180.4951171875, -1057.4644775390625, 42.22751998901367, 15.174979209899902)
},
vehicleB = {
npc = vector4(957.058349609375, -137.81166076660156, 74.4759521484375, 325.9009094238281),
spawn = vector4(958.52685546875, -142.28631591796875, 74.50738525390625, 148.21197509765625)
}
},
{
name = 'China Denkmal',
imgUrl = 'https://cdn.resync.me/attachments/scripts/ffa/ffa_lobby_china.png',
defaultRounds = 5,
defaultWeapons = {'SNS Pistol', 'Pistol MK2'},
defaultVehicles = {},
vehicles = {'Revolter', 'BF400'},
rounds = {1, 3, 5, 11, 21},
weapons = {
{ name = 'WEAPON_SNSPISTOL', label = 'SNS Pistol' },
{ name = 'WEAPON_COMBATPISTOL', label = 'Combat Pistol' },
{ name = 'WEAPON_PISTOL', label = 'OG Pistol' },
{ name = 'WEAPON_PISTOL50', label = 'Pistol 50er' },
{ name = 'WEAPON_PISTOL_MK2', label = 'Pistol MK2' }
},
spawnsA = vector4(-1540.205078125, -405.0218811035156, 41.98950958251953, 318.869873046875),
spawnsB = vector4(-610.0924682617188, -1000.6344604492188, 21.786752700805664, 82.83573150634766),
vehicleA = {
npc = vector4(-1531.7523193359375, -399.99810791015625, 41.894283294677734, 57.103485107421875),
spawn = vector4(-1523.4427490234375, -385.52960205078125, 42.02206039428711, 223.77810668945312)
},
vehicleB = {
npc = vector4(-620.2099609375, -993.7545166015625, 21.149206161499023, 171.80020141601562),
spawn = vector4(-623.4678955078125, -997.6932373046875, 21.01541519165039, 80.86925506591797)
}
},
{
name = 'Sandy Flughafen',
imgUrl = 'https://cdn.resync.me/attachments/scripts/ffa/ffa_lobby_sandyairstrip.png',
defaultRounds = 5,
defaultWeapons = {'SNS Pistol', 'Pistol MK2'},
defaultVehicles = {},
vehicles = {'Revolter', 'BF400'},
rounds = {1, 3, 5, 11, 21},
weapons = {
{ name = 'WEAPON_SNSPISTOL', label = 'SNS Pistol' },
{ name = 'WEAPON_COMBATPISTOL', label = 'Combat Pistol' },
{ name = 'WEAPON_PISTOL', label = 'OG Pistol' },
{ name = 'WEAPON_PISTOL50', label = 'Pistol 50er' },
{ name = 'WEAPON_PISTOL_MK2', label = 'Pistol MK2' }
},
spawnsA = vector4(2016.027587890625, 3301.75439453125, 45.75815200805664, 110.04808807373047),
spawnsB = vector4(525.5606079101562, 3058.197998046875, 40.003631591796875, 255.04144287109375),
vehicleA = {
npc = vector4(2007.356689453125, 3293.3798828125, 45.570621490478516, 9.328032493591309),
spawn = vector4(2001.180419921875, 3299.92529296875, 45.71699905395508, 118.7499771118164)
},
vehicleB = {
npc = vector4(531.1446533203125, 3050.05810546875, 40.08529281616211, 342.9843444824219),
spawn = vector4(540.5479125976562, 3052.794189453125, 40.08641815185547, 265.8564758300781)
}
},
{
name = '5001',
imgUrl = 'https://cdn.resync.me/attachments/scripts/ffa/ffa_lobby_5001.png',
defaultRounds = 5,
defaultWeapons = {'SNS Pistol', 'Pistol MK2'},
defaultVehicles = {},
vehicles = {'Revolter', 'BF400'},
rounds = {1, 3, 5, 11, 21},
weapons = {
{ name = 'WEAPON_SNSPISTOL', label = 'SNS Pistol' },
{ name = 'WEAPON_COMBATPISTOL', label = 'Combat Pistol' },
{ name = 'WEAPON_PISTOL', label = 'OG Pistol' },
{ name = 'WEAPON_PISTOL50', label = 'Pistol 50er' },
{ name = 'WEAPON_PISTOL_MK2', label = 'Pistol MK2' }
},
spawnsA = vector4(7.609410762786865, 1880.61865234375, 209.7193603515625, 76.92738342285156),
spawnsB = vector4(-195.6410369873047, 1925.4208984375, 197.74208068847656, 269.7229309082031),
vehicleA = {
npc = vector4(0.9261321425437927, 1885.1639404296875, 210.60484313964844, 334.2749938964844),
spawn = vector4(-2.6371538639068604, 1883.999755859375, 210.72686767578125, 91.49947357177734)
},
vehicleB = {
npc = vector4(-194.633544921875, 1929.506591796875, 197.99810791015625, 248.67910766601562),
spawn = vector4(-189.80999755859375, 1919.4051513671875, 197.36849975585938, 228.13970947265625)
}
},
{
name = 'Pferderanch',
imgUrl = 'https://cdn.resync.me/attachments/scripts/ffa/ffa_lobby_ranch.png',
defaultRounds = 5,
defaultWeapons = {'SNS Pistol', 'Pistol MK2'},
defaultVehicles = {},
vehicles = {'Revolter', 'BF400'},
rounds = {1, 3, 5, 11, 21},
weapons = {
{ name = 'WEAPON_SNSPISTOL', label = 'SNS Pistol' },
{ name = 'WEAPON_COMBATPISTOL', label = 'Combat Pistol' },
{ name = 'WEAPON_PISTOL', label = 'OG Pistol' },
{ name = 'WEAPON_PISTOL50', label = 'Pistol 50er' },
{ name = 'WEAPON_PISTOL_MK2', label = 'Pistol MK2' }
},
spawnsA = vector4(1466.3668212890625, 1012.12353515625, 114.76642608642578, 355.2437744140625),
spawnsB = vector4(1464.3421630859375, 1232.6954345703125, 112.89971923828125, 172.92298889160156),
vehicleA = {
npc = vector4(1460.550048828125, 1009.7103881835938, 114.71879577636719, 3.5676045417785645),
spawn = vector4(1452.0576171875, 1012.5099487304688, 114.4552993774414, 5.716118812561035)
},
vehicleB = {
npc = vector4(1473.3863525390625, 1232.482421875, 112.78384399414062, 178.64341735839844),
spawn = vector4(1472.453125, 1221.212646484375, 113.66017150878906, 176.49200439453125)
}
},
}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)
elseif GetResourceState('hex_finalhud_v2') == 'started' then
exports['hex_finalhud_v2']:HelpNotify(message)
elseif GetResourceState('hex_genesis_hud') == 'started' then
exports['hex_genesis_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)
elseif GetResourceState('hex_finalhud_v2') == 'started' then
exports['hex_finalhud_v2']:Notify(title, message, notifyType, timeout)
elseif GetResourceState('hex_genesis_hud') == 'started' then
exports['hex_genesis_hud']:Notify(title, message, notifyType, timeout)
else
print(('Notify: %s, %s, %s, %s'):format(title, message, notifyType, timeout))
end
end
function GiveWeapon(ped, data)
if not HasPedGotWeapon(ped, data.name) then
TriggerEvent('cc_anticheat:weapons:check')
GiveWeaponToPed(ped, data.name, 9999, true, false)
if Config.PedInfiniteAmmo then
SetPedInfiniteAmmo(ped, true, data.name)
end
for k, v in pairs(data.components) do
GiveWeaponComponentToPed(ped, data.name, v)
end
end
SetAmmoInClip(ped, data.name, 999)
end
function HealthPlayer(refill)
local ped = PlayerPedId()
SetEntityHealth(ped, 200)
if refill then
SetPedArmour(ped, 100)
end
end
function weaponWheel(state)
if GetResourceState('ox_inventory') == 'started' then
exports['ox_inventory']:weaponWheel(state)
LocalPlayer.state.invBusy = state
elseif GetResourceState('qs-inventory') == 'started' then
exports['qs-inventory']:WeaponWheel(state)
elseif GetResourceState('jaksam_inventory') == 'started' then
exports['jaksam_inventory']:setWeaponWheel(state)
end
end
function SpawnedVehicle(vehicle, team, tryAgain)
SetVehicleEngineOn(vehicle, true, true, false)
SetVehRadioStation(vehicle, 'OFF')
SetVehicleNumberPlateText(vehicle, "TEAM" .. team)
if not tryAgain then
SetPedIntoVehicle(PlayerPedId(), vehicle, -1)
end
SetVehicleFuelLevel(vehicle, 100.0)
SetVehicleCustomPrimaryColour(vehicle, team == 'A' and 255 or 0, 0, team == 'A' and 0 or 255)
SetVehicleCustomSecondaryColour(vehicle, team == 'A' and 255 or 0, 0, team == 'A' and 0 or 255)
SetVehicleModKit(vehicle, 0)
SetVehicleMod(vehicle, 11, 3)
SetVehicleMod(vehicle, 13, 2)
SetVehicleMod(vehicle, 15, 3)
ToggleVehicleMod(vehicle, 18, true)
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