Disclaimer : i do not support this project anymore. this was just a hobby for me and now i’m busy with other things.
Hello
as The Title Says This is a Full Gamemode ( it means you don’t need anything like esx_policejob for it ) written in Lua for ESX framework 1.2
The Idea of this gamemode is like my old attempt in C# ( Link )
The Concept is similar to the C# version. but it has so many features beside it and way optimized for a Server ( we tested it 16v16 ) its BETA version now.
its playable but expect bugs.
i wrote 95% of this project.
things that i don’t take the credits for
- Compass system ( i did some changing to it ) : LInk to the owner
- Crouch And Prone ( i didn’t find fivem forum post ) : Link to the github
- Flashbang ( I just used the model provided by the script and i wrote a lua version of it with some modification ) : Link to the post
- Ped Models. Vehicle Skins . Russia Mapping ( I didn’t find anything related to the author of them )
Some Screenshots before the details
The basic Concept of this gamemode is Military death match and it has 2 teams:
Russia And USA
Each team has its own Advantage and Disadvantage. Teams Should Chose the best Strategy to Win The Capture. The Strategy is the most important thing in the game.
Capture system Uses ESX Server Side Coordinate for its uses.
Like the previous release there is 6 basic divisions + 2 Squad commanders ( restricted by steam identifier ) :
- Commando Rifle
- Commando Artilerry
- Commando Shotgun
- Commando Sniper
- Aircraft Pilot
- Ground Pilot
- Ground Squad Commander
- Aircraft Squad Commander
Config File Details :
i Wrote this gamemode very config based. almost everything can be changed in config file
-
Global Configs
-
AntiOtherPedTimer : Every X ms it will check the player peds and change them ( if they are not ) to the right ped
-
Update Blip Interval : Every X MS player blips will get updated ( 30second is enough ! )
-
Freeze time night : it keep the time to night
-
Blackout Distance : If player reaches within the X distance of the capture point Blackout will be set to true ( blackout will turn off all the lights )
-
HideAI : it will prevent peds and cars from spawning
-
EnableSupply : It will enable supply system ( Brickade and Cargobob vehicles )
-
EnableCompass : it will enable the comppas above the screen
-
EnbaleCustomSound : Custom Sounds When Throwing Grenade/Flashbang/Smoke
-
LocalSoundRadius : Distance for sending sounds ( smoke/flashbang/grenade )
-
PreventFromSpawningDouble: it will prevent vehilces from spawning double in spawn points
-
RestrictVehicle : It will prevent players to ride the vehicles that they are not supposed to
-
MumbleVoice : it will set the Radio restriction for each team ( 1,2,3,4,5 for usa| 6,7,8,9,10 for russia )
-
ShowNameAboveHead : it will use mpgamertag to show the player names above their head( currently has some issues )
-
EnableDelayForSupply : it will prevent players from spamming the supply vehicle
-
EnableMedKit : it will enable the usage of medkit in battle field ( players can respawn their team mates if they have med kit for it )
-
LocalSupportCallc : Hotkey for opening the local support menu ( rush to enemy, enemey engage, request backup , destroy enemy vehicle, going to capture point, enemy spotted )
-
GlobalSupportRequestc : Hotkey for opening the global support menu ( request aircraft bombard , request supply delivery , request ground unit backup, request transport to battle)
-
Capture Configs
-
FirstGameWaiting : Wait time for the first automatic capture start loop when server starts
-
CaptureMANUAL : can someone start capture manually with command?
-
OnlyAdminStart : if manual is true. should we restrict manual command to admins?
-
CaptureAUTOMAT : capture will start automatic
-
MinimumPlayer : Minimum players for both team to start the capture
-
DelayBetweenGames : After Capture ends how many seconds should we wait for starting the next one?
-
WaitTimeBeforeMatch : Wait time before match ( its like warmup. teams can select their division and spawn car but they cannot exit their base )
-
ShowMatchTimeForPlayers : should we show players how many seconds left ?
-
MatchTime : MATCH TIME!!
-
MatchReward : Not DONE! its just in config file i didn’t implant anything related to this
-
CaptureDistance: Distance for Capture
-
CapturePoint : Capture points . should be a vector table
-
CapturePointMarkerType : Marker type of the capture point
-
CapturePointBlipSprite : blip sprite of the capture point
-
PreventFromGoing : Prevent players when match start to go to the enemy bases and prevent them to exit their base when Warmup is up
-
PreventDistance : Distance to trigger the teleport
-
Weapon And Damage Config
-
WeaponsTintIndex : uses ESX Tint index for weapons
-
EnableRecoil : Recoil for guns
-
WeaponRecoil : Recoil for each gun usable in game
-
AimingRecoilDecrease : How much of the recoil should we decrease if player is aiming and not free shooting
-
CoverMultiplier : how much of the recoil should we decrease if player is shooting from a cover
-
ProneRecoilMultiplier : how much of the recoil should we decrease if player is shooting while proned
-
WalkingRecoilMultiplier : how much should we add to recoil if player is walking and shooting
-
SprintRecoilMultiplier : how much should we add to recoil if player is sprinting and shooting
-
CustomDamageMultipilier : enable custom damage modifier for guns
-
WeaponAmmo : Max Ammo and starter ammo when they get the gun
other parts are obvious and they are related to the base location of the teams
Gamemode Mechanics:
- Death: when player dies they can hold Delete For respawn or they can wait for an ally to revive them with Med Kit
- Capture : Its Very Simple Concept of capture and win mechanic. Players should stay in capture point in order to get the points
- Request Support : Players can request support from their team mates with the Given hotkeys in config file. when the menu is open they can use ( number1,2,3,4,5 and … ) to do it faster ( like csgo )
- Supply System : Players can Refill their ammo/Health/Armor if they are near the Supply vehicle ( Cargobob For Russia. Brickade for USA )
- USA Radar System : it will track Russian aircrafts! ( not fully tested )
- Flash Bang : Players will get also a custom flashbang . when they throw it if any players within 20.0 distance of the object ( can be changed in flashbang resource config ) is looking at it they will get blinded ( not fully but they cannot shoot )
- ShowAmmo : its basic DrawText for drawing the Ammo in the magazine of the player but very larger
i was planning to run a fivem server with this project but i don’t have time and effort for it.
95% of the project is fully tested and are without bugs. i will not fix minor bugs that are created because of wrong use of config or …
currently i have many update ideas for this script but i don’t have the time to do them so don’t ask for it!
NOTE : DO NOT USE ANY OTHER ESX SCRIPTS . because ITS on ESX Framework it doesn’t maen its compatible with all esx scripts. its a gamemode not a simple esx script that you use for RP servers
Github Link :
Ways To Improve:
- In Server.lua : Change xPlayer.getCords() to Fivem Own Server side GetEntityCoords for Better Performance and Faster Status Change for Teams.
PM Me If You Have Any Other Ways to Improve the Script it self( i will try to add them but i will also add it to here so other developers can see)