PeppSess

Config of fnx_death-system-v2

Mar 20th, 2022 (edited)
850
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 8.22 KB | None | 0 0
  1. Config = {
  2.     ESX = {
  3.         Enable      = true, -- if you use esx or not
  4.         Trigger     = "esx:getSharedObject",
  5.         RespawnTime = 0.5 , -- minutes
  6.         TempRespawn = true, -- if you able a respawn time
  7.         PressKeyForReviveinInjuredMode = true, -- if you able a heal when the player are knocked down
  8.  
  9.         EventLoaded     = 'esx:playerLoaded',                           -- player loaded event
  10.         BandageItemName = "bandage",                                    -- bandage item
  11.  
  12.         YourPhone = 'gcphone',                                          -- gksphone, quasarphone or gcphone
  13.        
  14.         EnableRespawnTimeWithBandage = false,                           -- allow time to respawn with bandage
  15.         RespawnWithBandageTime = 15000,                                 -- if you want a delay for heal with bandage in knocked down, in msec
  16.  
  17.  
  18.         Item = {
  19.             {   -- Here you can create any item you want, be default we have the medikit and the bandage
  20.                 name = "medikit",                               -- item name
  21.                 healt = 200,                                    -- heal value
  22.                 revive = true,                                  -- if revive
  23.                 removeitem = true,                              -- if the item will be removed after use
  24.                 forcejobusage = true,                           -- if you what that only job can use this item
  25.                 usenonearbyplayers = false,                     -- if you want that work only if there are player nearby
  26.                 animation = {
  27.                     enable = true,                              -- if you able the animation or change it
  28.                     lib = "anim@heists@narcotics@funding@gang_idle",
  29.                     anim = "gang_chatting_idle01",
  30.                 }
  31.             },
  32.             {
  33.                 name = "bandage",
  34.                 healt = 75,
  35.                 revive = false,
  36.                 removeitem = true,
  37.                 forcejobusage = false,
  38.                 usenonearbyplayers = true,
  39.                 animation = {
  40.                     enable = true,
  41.                     lib = "anim@heists@narcotics@funding@gang_idle",
  42.                     anim = "gang_chatting_idle01",
  43.                 }
  44.             }
  45.         }
  46.     },
  47.  
  48.     UseProgressbar = false,
  49.     PorgressbarTriggerForCancel = "progressbar:client:cancel",
  50.  
  51.     UseRProgress = true,
  52.  
  53.     RProgress = {               -- Config of the rprogress
  54.         Async = false,
  55.         canCancel = false,      -- Allow cancelling
  56.         cancelKey = 178,        -- Custom cancel key
  57.         x = 0.5,                -- Position on x-axis
  58.         y = 0.5,                -- Position on y-axis
  59.         From = 0,               -- Percentage to start from
  60.         To = 100,               -- Percentage to end
  61.         Duration = 60000,        -- Duration of the progress
  62.         Radius = 60,            -- Radius of the dial
  63.         Stroke = 10,            -- Thickness of the progress dial
  64.         Cap = 'butt',           -- or 'round'
  65.         Padding = 0,            -- Padding between the progress dial and the background dial
  66.         MaxAngle = 360,         -- Maximum sweep angle of the dial in degrees
  67.         Rotation = 0,           -- 2D rotation of the dial in degrees
  68.         Width = 300,            -- Width of bar in px if Type = 'linear'
  69.         Height = 40,            -- Height of bar in px if Type = 'linear'
  70.         ShowTimer = true,       -- Shows the timer countdown within the radial dial
  71.         ShowProgress = false,   -- Shows the progress % within the radial dial    
  72.         Easing = "easeLinear",
  73.         Label = "Death",        -- Label of your rbare
  74.         LabelPosition = "right", --
  75.         Color = "rgba(34, 211, 246, 1.0)",
  76.         BGColor = "rgba(0, 0, 0, 0.4)",
  77.         Animation = {},
  78.         DisableControls = {},    
  79.         onStart = function()end,
  80.         onComplete = function(cancelled)
  81.             killedbytime = true
  82.         end
  83.     },
  84.  
  85.     Progressbar = {
  86.         name = "wait_time",
  87.         duration = 60000,
  88.         label = "Death",
  89.         useWhileDead = false,
  90.         canCancel = false,
  91.         controlDisables = {
  92.             disableMovement = true,
  93.             disableCarMovement = true,
  94.             disableMouse = false,
  95.             disableCombat = true,
  96.         },
  97.     },
  98.  
  99.  
  100.  
  101.     Command = {
  102.         ["revive"] = {
  103.             revive = true
  104.         },
  105.     },
  106.  
  107.     HealtReviveInjeredMode = 150,   -- how many healt must be givved to the knocked out player
  108.     identifier  = 'license:',       -- you can change to steam or other, we reccomande the license
  109.     CoordsRespawn = vector3(330.52990722656,-594.82952880859,43.284061431885),  -- Coords to respawn when the death count down end
  110.     Using_fnx_killfeed = false,         -- integration with our other release https://forum.cfx.re/t/free-kd-system-and-killfeed/4825010/4
  111.     Using_mxm_kd_sistem = false,        -- integration with our other release https://forum.cfx.re/t/free-kd-system-and-killfeed/4825010/4
  112.     NotRpServer = {
  113.         StartScreenEffect                    = true,    -- screeen effect like black screen
  114.         SetPlayerHealthRechargeMultiplier    = true,    -- life recharges faster
  115.         TaskPlayAnimland_fall                = true,    -- animation from the dead
  116.         SetEntityCompletelyDisableCollision  = false,   -- disable player collisions
  117.         SetEntityVisible                     = false,   -- whether the player should be visible or not
  118.         SetEntityLocallyVisible              = false,   -- same as the previous one but for the client
  119.         SetEntityAlpha                       = false,   -- dont change
  120.         SetBlockingOfNonTemporaryEvents      = false,   -- dont change
  121.     },
  122. }
  123.  
  124.  
  125. -- Emergency Call Function for GCPHONE or ZTH_PHONE
  126. Config.StartEmergencyCall = function(coords)
  127.     TriggerServerEvent("esx_addons_gcphone:startCall","ambulance","Aiuto sono ferito, Ecco la mia posizione",coords,coords)
  128. end
  129.  
  130. -- Emergency Call Function for GKS Phone
  131. Config.StartGKSEmergency = function(myPos, GPS)
  132.     ESX.TriggerServerCallback('gksphone:namenumber', function(Races)
  133.         local name = Races[2].firstname .. ' ' .. Races[2].lastname
  134.         TriggerServerEvent('gksphone:gkcs:jbmessage', name, Races[1].phone_number, 'Emergency aid notification', '', GPS, 'ambulance')
  135.     end)
  136. end
  137.  
  138. -- Emergency Call Function for Quasar Phone
  139. Config.StartQuasarEmergency = function(playerPed, coords)
  140.     TriggerServerEvent('qs-smartphone:server:AddJobMessage', {
  141.         type = 'message',
  142.         message = 'Injured person.'
  143.     })
  144.     Wait(300)
  145.     TriggerServerEvent('qs-smartphone:server:AddJobMessage', {
  146.         type = 'location',
  147.         message = json.encode({
  148.             x = coords.x,
  149.             y = coords.y,
  150.         })
  151.     })
  152. end
  153.  
  154.  
  155. -- here you can configure your Text settings
  156. Config.TextSettings = function(txt)
  157.     SetTextFont(4)
  158.     SetTextScale(0.0, 0.5)
  159.     SetTextColour(255, 255, 255, 255)
  160.     SetTextDropshadow(0, 0, 0, 0, 255)
  161.     SetTextDropShadow()
  162.     SetTextOutline()
  163.     SetTextCentre(true)
  164.     SetTextEntry('STRING')
  165.     AddTextComponentString(txt)
  166.     DrawText(0.5, 0.8)
  167. end
  168.  
  169. -- translate here in your language
  170. Lang = {
  171.     ["start_call"]                          = "You called the doctors. You will be able to call the doctors back in 5 minutes",
  172.     ["no_start_call"]                       = "You've already called the doctors, wait before you can call back",
  173.     ["press_E_or_R"]                        = " Press ~b~[E]~w~ to revive yourself \nPress ~r~[R]~w~ to Respawnare",
  174.     ["press_Call_and_respawn_temp1"]        = " Press ~b~[E]~w~ to call for help,  \nYou will be able to respawn in ",
  175.     ["press_Call_and_respawn_temp_second"]  = " seconds",
  176.     ["press_Call_and_respawn_temp_min"]     = " minutes",
  177.     ["press_E_to_respawn"]                  = " Press ~r~[R]~w~ to respawn",
  178.     ["no_player_nearby"]                    = "No players nearby",
  179.     ["press_key_for_revive"]                = "Press ~b~[E]~w~ to heal yourself with a bandage",
  180.     ['no-bandage']                          = "You don't have any bandages with you.",
  181.     ['wait-bandage']                        = "You will healed in a few seconds",
  182. }
  183.  
  184.  
  185.  
Add Comment
Please, Sign In to add comment