Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Config = {}
- Config.Debug = true
- --This is for more advanced debug
- Config.AdvancedDebug = false
- --Possible: ESX, QBCORE
- Config.FrameWork = "ESX"
- --Only If you use custom esx prefix
- Config.CustomESXPrefixEvents = "esx"
- Config.InitServer = function()
- if Config.FrameWork == "ESX" then
- ESX = nil
- TriggerEvent("esx:getSharedObject", function(obj) ESX = obj end)
- else
- QBCore = exports["qb-core"]:GetCoreObject()
- end
- end
- Config.InitClient = function()
- if Config.FrameWork == "ESX" then
- ESX = nil
- TriggerEvent("esx:getSharedObject", function(obj) ESX = obj end)
- else
- QBCore = exports["qb-core"]:GetCoreObject()
- end
- end
- Config.ServerName = "Dein Server"
- Config.SavePlayerTime = 60000 --Saves player data every minute, if player is in a zone
- --https://docs.fivem.net/docs/game-references/controls/
- Config.OpenMenuKey = 38
- Config.OpenTimeout = 100 --Prevent database spamming / miliseconds
- --https://i.imgur.com/zpLJp98.png
- Config.RespawnScreen = true
- Config.RespawnCountdown = 4 --Seconds!
- Config.RespawnInstant = false
- --Prevents respawning in the same coords two times in a row
- Config.SameRespawnCoords = false
- --https://i.imgur.com/nqU6H5t.png
- Config.OutZoneScreen = true
- Config.OutZoneCountdown = 5 --Seconds!
- Config.OutZoneRespawnInstant = false
- --https://i.imgur.com/9XV34Sy.png
- Config.IngameHud = true
- Config.QuitCommand = "quitffa"
- --https://i.imgur.com/gU9RdcG.png
- --Sets the player options on player register
- Config.DefaultPlayerOptions = {
- notifications = true,
- anonym = false,
- hud = true,
- fullplaytime = true,
- crosshair = false,
- hitmarker = false
- }
- --Here you can decide if you want to show the crosshair all the time or only when player is aiming
- Config.AlwaysShowCrosshair = true
- Config.NametagDistance = 30
- Config.LeaderboardMaxPlayers = 99
- --If this is false the player gets the money on the hand (cash)
- Config.GiveMoneyOnKillToBank = false
- --If this is false then the cash from the player will be removed otherwise the from the bank
- Config.RemoveMoneyFromBankOnJoin = false
- -----------------------------------------------------------------------------------------
- --Because a few people had problems with the give item function due to their
- --inventory system, I have now packed the function in the config so that everyone
- --can customize the function for his inventory :)
- --This is for giving weapons for server side
- --Its mostly used if you have a anticheat and your anticheat is banning the players
- --when using the default functions
- Config.QSInventory = false --esx only
- Config.GiveWeaponsServerSide = false
- Config.GiveWeaponsServerSideFrameWork = "esx" --Possible: esx, qbcore
- Config.GiveWeaponServerSideEvent = function(source, weapon, ammo) --Server Side
- if Config.GiveWeaponsServerSideFrameWork == "esx" then
- local xPlayer = ESX.GetPlayerFromId(source)
- --You might need to change this if you are using QS Inventory
- xPlayer.triggerEvent('esx:addWeapon', weapon, ammo)
- xPlayer.triggerEvent('esx:addInventoryItem', weapon, false, true)
- -- xPlayer.addWeapon(weapon, ammo) <-- This might now work correctly
- else
- --Qbcore
- QBCore = exports['qb-core']:GetCoreObject()
- local Player = QBCore.Functions.GetPlayer(source)
- Wait(50)
- Player.Functions.AddItem(weapon, 1)
- TriggerClientEvent('inventory:client:ItemBox', src, QBCore.Shared.Items[weapon], "add")
- end
- end
- --This is the function for giving weapons ON LEAVE!!
- Config.GiveWeaponFunctionONLEAVE = function(weaponlist) --Client Side
- Config.ClearInventoryFunction()
- Wait(50)
- if not weaponlist or string.find(json.encode(weaponlist), "CLEAR") or string.find(json.encode(weaponlist), "EMPTY") then return end
- if Config.GiveWeaponsServerSide then
- --This basically triggers "Config.GiveWeaponServerSideEvent"!!!!
- TriggerServerEvent('ffa:idleloadout', weaponlist, Config.LeaveAmmo)
- else
- for k,v in pairs(weaponlist) do
- GiveWeaponToPed(PlayerPedId(), GetHashKey(v))
- SetPedAmmo(PlayerPedId(), GetHashKey(v), Config.LeaveAmmo)
- end
- end
- end
- --This will be triggered if the player left the server while in ffa
- --This gives the player his old loadout back on join
- --This will also be triggered after the script has been restarted
- Config.GiveWeaponFunctionONSERVERJOINorRESTART = function(weaponlist) --Client Side
- Config.ClearInventoryFunction()
- Wait(50)
- if not weaponlist or string.find(json.encode(weaponlist), "CLEAR") or string.find(json.encode(weaponlist), "EMPTY") then return end
- if Config.GiveWeaponsServerSide then
- --This basically triggers "Config.GiveWeaponServerSideEvent"!!!!
- TriggerServerEvent('ffa:idleloadout', weaponlist, Config.LeaveAmmo)
- else
- for k,v in pairs(weaponlist) do
- GiveWeaponToPed(PlayerPedId(), GetHashKey(v))
- SetPedAmmo(PlayerPedId(), GetHashKey(v), Config.LeaveAmmo)
- end
- end
- end
- --This is the function for giving weapons when a player spawns in a ffa zone
- Config.GiveWeaponFunctionONSPAWN = function(weaponlist) --Client Side
- Config.ClearInventoryFunction()
- Wait(50)
- if not weaponlist or string.find(json.encode(weaponlist), "CLEAR") or string.find(json.encode(weaponlist), "EMPTY") then return end
- if Config.GiveWeaponsServerSide then
- --This basically triggers "Config.GiveWeaponServerSideEvent"!!!!
- TriggerServerEvent('ffa:idleloadout', weaponlist, Config.WeaponAmmo)
- else
- for k,v in pairs(weaponlist) do
- GiveWeaponToPed(PlayerPedId(), GetHashKey(v))
- SetPedAmmo(PlayerPedId(), GetHashKey(v), Config.WeaponAmmo)
- end
- end
- end
- Config.ClearInventoryFunction = function()
- if Config.QSInventory then
- TriggerServerEvent('ffa:clearQSInventory')
- else
- RemoveAllPedWeapons(PlayerPedId())
- end
- end
- Config.GiveWeapon1TimeOnSpawn = true
- --Sets the weapon ammo on spawn zone
- Config.WeaponAmmo = 5000
- --Sets the weapon ammo on leave
- Config.LeaveAmmo = 200
- -----------------------------------------------------------------------------------------
- --GLOBALE VARIABLES: streak, scriptinit, gamemodedata, zonedata, inGame, isDeath, killer, incombat
- Config.Notification = function(text)
- TriggerEvent("esx:showNotification", text)
- end
- Config.AntiCombat = true
- Config.AntiCombatTimeout = 3000
- --If player is in combat and tries to leave ffa
- Config.inCombat = function()
- TriggerEvent("esx:showNotification", Config.Locals.anticombat)
- end
- --If you want to use another notification then usual when you get a killstreak. For example send a announce
- Config.KillStreakNotification = function(streak)
- TriggerEvent("esx:showNotification", "KILLSTREAK: " .. streak)
- --You can give the player a weapon for example
- if streak == 12 then
- GiveWeaponToPed(PlayerPedId(), GetHashKey("WEAPON_ASSAULTRIFLE"))
- end
- end
- --Can be used for example spawn protection
- Config.onSpawn = function()
- SetPedArmour(PlayerPedId(), 100)
- SetEntityHealth(PlayerPedId(), 100.0)
- if Config.FrameWork == "ESX" then
- StopScreenEffect("DeathFailOut")
- TriggerServerEvent("esx_ambulancejob:setDeathStatus", false)
- TriggerServerEvent("esx:onPlayerSpawn")
- TriggerEvent("esx:onPlayerSpawn")
- TriggerEvent("playerSpawned")
- else
- StopScreenEffect("DeathFailOut")
- TriggerServerEvent("hospital:server:SetDeathStatus", false)
- TriggerServerEvent("hospital:server:SetLaststandStatus", false)
- TriggerEvent("hospital:client:Revive")
- end
- SetPlayerInvincible(PlayerId(), true)
- Wait(2000)
- SetPlayerInvincible(PlayerId(), false)
- TriggerEvent("esx:showNotification", Config.Locals.spawnprotection)
- end
- --You can trigger you own events on kill or death
- Config.onKill = function()
- SetPedArmour(PlayerPedId(), 100)
- SetEntityHealth(PlayerPedId(), 100.0)
- --Example add another reward besides the Config.Gamemode.KillReward
- end
- Config.onDeath = function()
- if Config.FrameWork == "ESX" then
- TriggerServerEvent("esx_ambulancejob:setDeathStatus", false)
- else
- TriggerServerEvent("hospital:server:SetDeathStatus", false)
- end
- if gamemodedata.Name == "Hardcore" then
- TriggerServerEvent("ffa:removeMoney", "all", "bank")
- --TriggerServerEvent("ffa:removeMoney", "1000", "bank") <- You can use "bank" or "cash"
- --Its RECOMMEND to use your own event!!
- end
- end
- Config.onQuit = function()
- TriggerEvent("esx:showNotification", Config.Locals.quitffa)
- end
- --Replace with your "open menu notification"
- Config.showInfoBar = function(text)
- SetTextComponentFormat("STRING")
- AddTextComponentString(text)
- DisplayHelpTextFromStringLabel(0, 0, 1, -1)
- end
- --Simply sends the Config.KillStreakNotification notification when you get a killstreak
- Config.KillStreak = {
- 3,
- 6,
- 12,
- 18,
- 24,
- 30,
- 36,
- 42,
- 48,
- 54,
- 60,
- }
- Config.HitMarkerColor = {120, 0, 0}
- --You can also play a sound on hit if you want to
- Config.OnHitmarker = function()
- --Please notice that you need to install https://forum.cfx.re/t/release-play-custom-sounds-for-interactions/8282 to use this event!
- --TriggerEvent("InteractSound_CL:PlayOnOne", "hitmarker", 1)
- end
- -----------------------------------------------------------------------------------------
- Config.Locals = {
- quitffa = "Erfolgreich ffa verlassen!",
- spawnprotection = "Spawn schutz abgelaufen!",
- notenoughmoney = "Nicht genug Geld dabei!",
- zonefull = "Zone ist voll!",
- anticombat = "You are currently in combat, please wait a few seconds!",
- killed = "You have killed [name]"
- }
- -----------------------------------------------------------------------------------------
- Config.FFAMarker = {
- FFA1 = {
- ShowMarker = true,
- ShowBlip = true,
- UseJob = false,
- Jobname = "police",
- --https://docs.fivem.net/docs/game-references/markers/
- Marker = {
- Coords = vector3(-420.356, 1142.452, 324.8536),
- DrawDistance = 20.0,
- Scale = vector3(1.5, 1.5, 1.0),
- Colour = {r = 102, g = 102, b = 204},
- Alpha = 100,
- Type = 1,
- MSG = "Drücke ~INPUT_CONTEXT~ um das Menü zu öffnen",
- },
- --https://docs.fivem.net/docs/game-references/blips/
- Blip = {
- Coords = vector3(-420.356, 1142.452, 324.8536),
- Sprite = 175,
- Display = 4,
- Scale = 1.0,
- Colour = 2,
- Name = "FFA",
- },
- },
- FFA2 = {
- ShowMarker = true,
- ShowBlip = true,
- UseJob = false,
- Jobname = "police",
- --https://docs.fivem.net/docs/game-references/markers/
- Marker = {
- Coords = vector3(208.00997924805, -922.00244140625, 30.691999435425),
- DrawDistance = 20.0,
- Scale = vector3(1.5, 1.5, 1.0),
- Colour = {r = 102, g = 102, b = 204},
- Alpha = 100,
- Type = 1,
- MSG = "Drücke ~INPUT_CONTEXT~ um das Menü zu öffnen"
- },
- --https://docs.fivem.net/docs/game-references/blips/
- Blip = {
- Coords = vector3(208.00997924805, -922.00244140625, 30.691999435425),
- Sprite = 175,
- Display = 4,
- Scale = 1.0,
- Colour = 2,
- Name = "FFA",
- },
- },
- }
- Config.Zones = {
- Zone0 = {
- Name = "Only Pistol",
- Desc = "Wähle mit dieser Karte aus, dass du in der Only Pistole Zone FFA spielen möchtest.",
- AddedDate = "29.06.2022",
- MaxPlayers = 10,
- --OneSync must be set to "infnity" in server settings!
- Dimension = true,
- DimensionID = 10000, --IMPORT TO CHANGE WHEN CREATING A NEW ZONE! <<<<<<--------
- ShowZone = true,
- ZoneHeight = 25,
- ZoneAlpha = 90,
- ZoneColor = {r = 69, g = 255, b = 141},
- ZoneCoords = {
- {-154.50605773926, -937.58984375, 253.3971862793},
- {-157.92643737793, -948.24786376953, 252.89315795898},
- {-162.26533508301, -946.7685546875, 252.89315795898},
- {-168.97314453125, -964.44616699219, 253.3971862793},
- {-176.78015136719, -961.36590576172, 253.3971862793},
- {-196.49926757813, -1013.7241821289, 253.3971862793},
- {-151.77670288086, -1030.2932128906, 253.33418273926},
- {-132.67620849609, -977.74255371094, 253.33418273926},
- {-137.07427978516, -976.23345947266, 253.33418273926},
- {-129.50109863281, -955.68560791016, 253.33418273926},
- {-135.46151733398, -953.85028076172, 253.33418273926},
- {-132.71960449219, -945.95690917969, 253.33418273926},
- },
- Spawnpoints = {
- {-159.85989379883, -990.80316162109, 254.13130187988},
- {-185.45248413086, -1008.3400268555, 254.33544921875},
- {-149.4659576416, -946.77642822266, 254.14801025391},
- {-145.21778869629, -947.94635009766, 269.11868286133},
- {-154.05239868164, -980.57952880859, 269.21032714844},
- {-147.44667053223, -992.9580078125, 261.84518432617},
- },
- OwnWeapons = false,
- --https://wiki.rage.mp/index.php?title=Weapons
- Weapons = {
- "WEAPON_PISTOL",
- "WEAPON_PISTOL_MK2",
- "WEAPON_COMBATPISTOL",
- "WEAPON_PISTOL50",
- "WEAPON_SNSPISTOL",
- "WEAPON_SNSPISTOL_MK2",
- "WEAPON_HEAVYPISTOL",
- "WEAPON_VINTAGEPISTOL",
- },
- },
- Zone1 = {
- Name = "Würfelpark",
- Desc = "Wähle mit dieser Karte aus, dass du in der Würfelpark Zone FFA spielen möchtest.",
- AddedDate = "19.07.2021",
- MaxPlayers = 20,
- --OneSync must be set to "infnity" in server settings!
- Dimension = true,
- DimensionID = 10001, --IMPORT TO CHANGE WHEN CREATING A NEW ZONE! <<<<<<--------
- ShowZone = true,
- ZoneHeight = 10,
- ZoneAlpha = 90,
- ZoneColor = {r = 255, g = 255, b = 141},
- ZoneCoords = {
- {107.23777770996, -1003.2484130859, 29.40472984314},
- {170.03587341309, -819.34228515625, 31.176509857178},
- {290.53610229492, -858.66943359375, 29.24479675293},
- {225.74273681641, -1038.6241455078, 29.359869003296},
- },
- Spawnpoints = {
- {236.90498352051, -879.6025390625, 30.492111206055},
- {173.76466369629, -919.04986572266, 30.670347213745},
- {229.20983886719, -956.81567382813, 29.337562561035},
- {202.58497619629, -998.02258300781, 30.108287811279},
- {133.78994750977, -990.29925537109, 29.348255157471},
- {150.9521484375, -963.29431152344, 30.098808288574},
- {261.30218505859, -874.74243164063, 29.177373886108},
- {187.93125915527, -853.60638427734, 31.369457244873},
- },
- OwnWeapons = false,
- --https://wiki.rage.mp/index.php?title=Weapons
- Weapons = {
- "WEAPON_PISTOL",
- "WEAPON_ASSAULTRIFLE",
- },
- },
- Zone2 = {
- Name = "Observatorium",
- Desc = "Wähle mit dieser Karte aus, dass du in der Observatorium Zone FFA spielen möchtest.",
- AddedDate = "19.07.2021",
- MaxPlayers = 20,
- --OneSync must be set to "infnity" in server settings!
- Dimension = true,
- DimensionID = 10002, --IMPORT TO CHANGE WHEN CREATING A NEW ZONE! <<<<<<--------
- ShowZone = true,
- ZoneHeight = 10,
- ZoneAlpha = 50,
- ZoneColor = {r = 255, g = 255, b = 141},
- --Credits: https://github.com/prefech/JD_SafeZone
- ZoneCoords = {
- {-484.13290405273, 1099.4439697266, 325.44760131836},
- {-403.48867797852, 1079.1002197266, 325.44760131836},
- {-367.90661621094, 1230.1385498047, 325.44760131836},
- {-442.13290405273, 1255.0555419922, 325.44760131836},
- },
- Spawnpoints = {
- {-414.14004516602, 1135.4301757813, 325.9045715332},
- {-435.78497314453, 1138.2543945313, 325.9045715332},
- {-413.11117553711, 1233.4633789063, 325.90438842773},
- {-375.32080078125, 1228.6291503906, 325.90438842773},
- {-437.88909912109, 1208.4266357422, 325.90438842773},
- {-397.75546264648, 1128.2397460938, 322.97259521484},
- },
- OwnWeapons = false,
- --https://wiki.rage.mp/index.php?title=Weapons
- Weapons = {
- "WEAPON_PISTOL",
- "WEAPON_ASSAULTRIFLE",
- },
- },
- }
- Config.Gamemode = {
- Gamemode1 = {
- Name = "Hardcore",
- Desc = "Es gelten die selben Regeln wie im normalen Spielmodus, stirbst du, verlierst du <span>ALL</span> dein <span>GELD</span> was du dabei hast! Für jede Eliminierung die du erzielst, erhälst du <span>$90,000</span> auf deinem Konto gut geschrieben!",
- Death = "Alles Geld Verlieren",
- JoinPrice = 20000,
- KillReward = 90000,
- },
- Gamemode2 = {
- Name = "Normal",
- Desc = "Es gelten die typischen FFA Regeln! Du kannst durch das spielen von FFA auszeichnungen erhalten. Durch das erbringen von Auszeichnungen erhälst du weitere Belohnungen!",
- Death = "Garnichts :)",
- JoinPrice = 10000,
- KillReward = 35000,
- },
- }
Advertisement
Add Comment
Please, Sign In to add comment