Links
🔫

Airsoft

Documentation relating to the kd_airsoft.

1. Installation

AIRSOFT is a standalone script. So you don't need a specific framework to use it. It's also mean it works with all framework (Esx, QBCore, VRP, DRP, …).
  • Drag and drop this 3 resources in your resources folder
    • kd_appmenu
    • kd_hud-event
    • kd_airsoft
  • Add this 3 ensures in your server.cfg
    • ensure kd_appmenu
    • ensure kd_hud-event
    • ensure kd_airsoft
  • Congratulation, the AIRSOFT script is ready to be use !

2. Usage

Airsoft script is very friendly. Just go in the maker visible on the map and create a new lobby to start game.
A few options are available to custom the lobby :
  • Different maps
  • Duration of the game in minute
  • Number of player
  • Number of live by player (team life = Number of player * Number of life/player)
When the lobby is created, other players can join it by finding it in the list of lobby. Players can switch between the team A or the team B. If necessary, the creator of the lobby can still change the game options after created it.
The game will be over in once of this two conditions :
  • One of team lost all those lives : Other team wins !
  • The duration of the game is over : the team with the most of live wins !

3. Config.lua

-- Location of marker in the maps
Location = {
Marker = {x = 452.675, y = -3072.087, z = 5.099}
}
-- Configuration of maps
Maps = {
{ nom = "Hangar", -- Name of the map
Sortie = {x = 452.675, y = -3072.087, z = 5.099}, -- Location where player will be teleported after the end of the game
PlayZone = {x1 = 470.466, y1 = -3066.779, z1 = 4.0, x2 = 447.143, y2 = -3117.098, z2 = 100.0}, -- Area of the map
ExitZones = {
{x1 = 458.179, y1 = -3078.651, z1 = 5.169, x2 = 445.698, y2 = -3065.715, z2 = 100.0}, -- Blacklist zone in the area
},
-- Teams gear configurations
EquipeA = {
Casque = {id = 125,couleur = 6}, -- Helmet
Gilet = {idH = 22,idF=20,couleur = 2}, -- Bulletproof
Veste = {idH = 34,idF=3,couleurH = 0, couleurF = 1 }, -- Vest
Haut = {idH = 15,idF=4,couleurH = 0, couleurF = 0 }, -- Shirt
Pantalon = {idH = 130,idF=30,couleurH = 1, couleurF = 0}, -- Pant
Chaussure = {idH = 24,idF=25,couleurH = 0, couleurF = 0}, -- Shoes
Main = {idH = 171,idF=212,couleurH = 0, couleurF = 0}, -- Gloves
Marker = {r=100,g=100,b=255}, -- Marker color
Spawn = {x = 464.645, y = -3069.921, z = 5.1,a= 208.241}, -- Spawn position
},
EquipeB = {
Casque = {id = 125,couleur = 4}, -- Helmet
Gilet = {idH = 22,idF=20,couleur = 0}, -- Bulletproof
Veste = {idH = 34,idF=3,couleurH = 0, couleurF = 1 }, -- Vest
Haut = {idH = 15,idF=4,couleurH = 0, couleurF = 0 }, -- Shirt
Pantalon = {idH = 130,idF=30,couleurH = 1, couleurF = 0}, -- Pant
Chaussure = {idH = 24,idF=25,couleurH = 0, couleurF = 0}, -- Shoes
Main = {idH = 171,idF=212,couleurH = 0, couleurF = 0}, -- Gloves
Marker = {r=0,g=255,b=0}, -- Marker color
Spawn = {x = 450.338, y = -3110.851, z = 5.1,a= 185.616}, -- Spawn position
},
WeaponChoisi = GetHashKey("WEAPON_ADVANCEDRIFLE") -- Weapon for the game
},
-- Same for other maps
{
nom = "Aircraft carrier",
Sortie = {x = 452.675, y = -3072.087, z = 5.099},
PlayZone = {x1 = 3140., y1 = -4819., z1 = -10., x2 = 2911., y2 = -4502., z2 = 50.},
ExitZones = {},
EquipeA = {
Casque = {id = 125,couleur = 6},
Gilet = {idH = 22,idF=20,couleur = 2},
Veste = {idH = 34,idF=3,couleurH = 0, couleurF = 1 },
Haut = {idH = 15,idF=4,couleurH = 0, couleurF = 0 },
Pantalon = {idH = 130,idF=30,couleurH = 1, couleurF = 0},
Chaussure = {idH = 24,idF=25,couleurH = 0, couleurF = 0},
Main = {idH = 171,idF=212,couleurH = 0, couleurF = 0},
Marker = {r=100,g=100,b=255},
Spawn = { x = 3076.443, y = -4647.22, z = 5.076, a= 136.154},
},
EquipeB = {
Casque = {id = 125,couleur = 4},
Gilet = {idH = 22,idF=20,couleur = 0},
Veste = {idH = 34,idF=3,couleurH = 0, couleurF = 1 },
Haut = {idH = 15,idF=4,couleurH = 0, couleurF = 0 },
Pantalon = {idH = 130,idF=30,couleurH = 1, couleurF = 0},
Chaussure = {idH = 24,idF=25,couleurH = 0, couleurF = 0},
Main = {idH = 171,idF=212,couleurH = 0, couleurF = 0},
Marker = {r=0,g=255,b=0},
Spawn = {x = 3100.021, y = -4802.58, z = 1.036, a= 11.352},
},
WeaponChoisi = GetHashKey("WEAPON_ADVANCEDRIFLE")
}
}

4. Add a new map

You can add as many maps as you want. Copy a default map and edit the configuration.
Example :
{
nom = "Quarry",
Sortie = {x = 1452.675, y = -122.087, z = 15.099},
PlayZone = {x1 = 1240., y1 = -1819., z1 = -30., x2 = 1911., y2 = -4502., z2 = 50.},
ExitZones = {},
EquipeA = {
Casque = {id = 125,couleur = 6},
Gilet = {idH = 22,idF=20,couleur = 2},
Veste = {idH = 34,idF=3,couleurH = 0, couleurF = 1 },
Haut = {idH = 15,idF=4,couleurH = 0, couleurF = 0 },
Pantalon = {idH = 130,idF=30,couleurH = 1, couleurF = 0},
Chaussure = {idH = 24,idF=25,couleurH = 0, couleurF = 0},
Main = {idH = 171,idF=212,couleurH = 0, couleurF = 0},
Marker = {r=100,g=100,b=255},
Spawn = { x = 3076.443, y = -4647.22, z = 5.076, a= 136.154},
},
EquipeB = {
Casque = {id = 125,couleur = 4},
Gilet = {idH = 22,idF=20,couleur = 0},
Veste = {idH = 34,idF=3,couleurH = 0, couleurF = 1 },
Haut = {idH = 15,idF=4,couleurH = 0, couleurF = 0 },
Pantalon = {idH = 130,idF=30,couleurH = 1, couleurF = 0},
Chaussure = {idH = 24,idF=25,couleurH = 0, couleurF = 0},
Main = {idH = 171,idF=212,couleurH = 0, couleurF = 0},
Marker = {r=0,g=255,b=0},
Spawn = {x = 3100.021, y = -4802.58, z = 1.036, a= 11.352},
},
WeaponChoisi = GetHashKey("WEAPON_ADVANCEDRIFLE")
}
Last modified 9mo ago