Config File
```lua
Config = {}
Config.Blip = {
activate = true,
x = 2024.54,
y = 2847.05,
id = 110,
color = 17,
scale = 1.0,
name = 'Softair'
}
Config.Arena = {
--non aggiungere altre arene se non sai configurarle / don't add more arenas if you don't know how to set them up
["Arena PVP"] = {
['join'] = vec3(2024.6185, 2844.2256, 50.2819),
['exit'] = {x = 2024.6185, y = 2844.2256, z = 50.2819, h = 1.7046},
['clone'] = {
coords = vec3(2023.3037, 2843.9968, 49.2914),
heading = 2.2084,
text = vec3(2023.3037, 2843.9968, 51.7)
},
['ped'] = {
coords = vec3(2025.9458, 2843.9258, 49.2781),
heading = 2.2084,
text = vec3(2025.9458, 2843.9258, 51.55)
},
['zone'] = { -- usa le zone di ox_lib / use the ox_lib's zones
name = 'softair',
coords = vec3(2028.0, 2785.5, 50.0),
radius = 68.0
}
},
}
Config.WelcomePed = 'cs_orleans'
Config.Weapon = 'WEAPON_PISTOL_MK2'
Config.MaxAmmo = 250 --limite massimo = 250 / upper limit = 250
Config.reloadCommand = 'rr' -- comando per ricaricare le munizioni se si esauriscono / command to reload ammo if it runs out
Config.exitCommand = 'exit' -- comando per uscire / command for exit
Config.KDcommand = 'kd' -- comando per visualizzare le proprie statistiche / command to view your stats
Config.TextUI = {
position = "top-center",
icon = 'hand',
style = {
borderRadius = 8,
backgroundColor = '#ff8c00',
color = 'white'
}
}
Config.libProgress = false -- attiva se usi la progress di ox_lib nel sistema morte / active if you use ox_lib's progress in death system
Config.ReviveTrigger = function()
TriggerEvent('esx_ambulancejob:revive') -- trigger per rianimare un giocatore / trigger to revive a player
end
Config.CreateMarker = function()
for k, v in pairs(Config.Arena) do
local enter = lib.points.new({
coords = v.join,
distance = 10,
})
function enter:onExit()
lib.hideTextUI()
end
function enter:nearby()
DrawMarker(22, v.join.x, v.join.y, v.join.z, 0, 0, 0, 0, 0, 0, 0.7, 0.7, 0.7, 255, 140, 0, 50, false, true, 2, false, nil, nil, false)
if self.currentDistance < 2 then
lib.showTextUI(Lang.ForEnter, Config.TextUI)
else
lib.hideTextUI()
end
if self.currentDistance < 2 and IsControlJustReleased(0, 38) then
local input = lib.inputDialog('Softair', {
{ type = 'select', label = Lang.choose, options = {
{ value = '1', label = 'Lobby 1'},
{ value = '2', label = 'Lobby 2'},
{ value = '3', label = 'Lobby 3'},
}},
})
if input then
if input[1] == '1' then
AvviaSoftAir(1)
elseif input[1] == '2' then
AvviaSoftAir(2)
elseif input[1] == '3' then
AvviaSoftAir(3)
end
end
end
end
end
end
Config.PosizioniSpawn = function()
for k, v in pairs(Config.Arena) do
local ped = cache.ped
if k == 'Arena PVP' then
local punto = math.random(1,5)
if punto == 1 then
SetEntityCoords(ped, 2004.8229, 2765.2520, 50.3058)
elseif punto == 2 then
SetEntityCoords(ped, 2031.4027, 2736.3420, 50.1641)
elseif punto == 3 then
SetEntityCoords(ped, 2061.6450, 2765.5466, 50.3045)
elseif punto == 4 then
SetEntityCoords(ped, 2008.9590, 2831.2202, 50.2533)
elseif punto == 5 then
SetEntityCoords(ped, 1978.7518, 2806.2576, 50.1925)
end
end
end
end
Lang = {
help = '/'..Config.exitCommand..' for exit'..' \n /'..Config.reloadCommand..' for reload',
left = 'You exited the lobby',
notPlay = 'You\'re not playing softair',
invincible = 'You are invincible for 5 seconds',
stats = '~o~Your Stats: ~w~',
welcome = '~o~Welcome\n~w~In the Softair Arena of\n~y~Server Name',
notGodmode = 'You can\'t do this in godmode',
inferior = 'Your KD is less than 0',
choose = 'Choose the Lobby',
ForEnter = 'Press [E] for enter',
deaths = 'Deaths',
kd = 'KD',
kills = 'Kills'
}
```Last updated