├── stream ├── _manifest.ymf ├── changer_ring.ydr ├── changer_ring.ytd ├── fightclub.ymap ├── changer_ring.ytyp └── changer_stage.ydr ├── fxmanifest.lua ├── server.lua ├── ReadMe.md └── client.lua /stream/_manifest.ymf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cadburry6969/cad-fightring/HEAD/stream/_manifest.ymf -------------------------------------------------------------------------------- /stream/changer_ring.ydr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cadburry6969/cad-fightring/HEAD/stream/changer_ring.ydr -------------------------------------------------------------------------------- /stream/changer_ring.ytd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cadburry6969/cad-fightring/HEAD/stream/changer_ring.ytd -------------------------------------------------------------------------------- /stream/fightclub.ymap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cadburry6969/cad-fightring/HEAD/stream/fightclub.ymap -------------------------------------------------------------------------------- /stream/changer_ring.ytyp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cadburry6969/cad-fightring/HEAD/stream/changer_ring.ytyp -------------------------------------------------------------------------------- /stream/changer_stage.ydr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cadburry6969/cad-fightring/HEAD/stream/changer_stage.ydr -------------------------------------------------------------------------------- /fxmanifest.lua: -------------------------------------------------------------------------------- 1 | fx_version 'adamant' 2 | games { 'gta5' } 3 | 4 | this_is_a_map 'yes' 5 | 6 | client_scripts { 7 | -- Polyzones 8 | '@PolyZone/client.lua', 9 | '@PolyZone/BoxZone.lua', 10 | '@PolyZone/EntityZone.lua', 11 | '@PolyZone/CircleZone.lua', 12 | '@PolyZone/ComboZone.lua', 13 | 14 | 'client.lua', 15 | } 16 | 17 | server_script "server.lua" -------------------------------------------------------------------------------- /server.lua: -------------------------------------------------------------------------------- 1 | local QBCore = exports['qb-core']:GetCoreObject() 2 | 3 | GlobalState.IsFightClubStarted = false 4 | 5 | QBCore.Commands.Add('fightclub', 'Toggle Fightclub Event', {}, false, function(source, args) 6 | if GlobalState.IsFightClubStarted then 7 | GlobalState.IsFightClubStarted = false 8 | TriggerClientEvent("QBCore:Notify", source, "Boxing Event Ended", "error") 9 | else 10 | GlobalState.IsFightClubStarted = true 11 | TriggerClientEvent("QBCore:Notify", source, "Boxing Event Started", "success") 12 | end 13 | end, 'admin') 14 | 15 | RegisterNetEvent("fightclub:removebuff", function() 16 | local src = source 17 | local Player = QBCore.Functions.GetPlayer(src) 18 | exports["ps-buffs"]:RemoveBuff(Player.PlayerData.citizenid, "super-health") 19 | end) -------------------------------------------------------------------------------- /ReadMe.md: -------------------------------------------------------------------------------- 1 | This is a fightclub resource where you gain certain buffs while you are in ring and loose them as soon as you leave the ring. 2 | 3 | # Location: 4 | `vector3(-506.56, -1709.31, 22.7)` 5 | 6 | # Preview: 7 | ![fightring](https://user-images.githubusercontent.com/72443203/212089379-dda6e857-cad3-44a1-bbe8-333744f2186d.png) 8 | 9 | # Dependencies 10 | * qb-core ([Github](https://github.com/qbcore-framework/qb-core)) 11 | * ps-buffs ([Github](https://github.com/Project-Sloth/ps-buffs)) 12 | * qb-ambulancejob ([Github](https://github.com/qbcore-framework/qb-ambulancejob)) 13 | * Ring MLO (Included) ([Credits](https://www.gta5-mods.com/maps/fight-ring-add-on-sp-oiv-fivem)) 14 | 15 | # Install Guide 16 | ```lua 17 | -- Add this in `qb-ambulancejob/client/dead.lua` in line 145 before `if isDead then` and after `EnableControlAction(0, 47, true)` 18 | TriggerEvent("playerDeadTriggeredEvent") 19 | ``` 20 | 21 | Note: I dont own the assets of boxing ring, the location was only modified by us and all the credits for the model creation goes to [changer](https://www.gta5-mods.com/maps/fight-ring-add-on-sp-oiv-fivem) 22 | -------------------------------------------------------------------------------- /client.lua: -------------------------------------------------------------------------------- 1 | local QBCore = exports['qb-core']:GetCoreObject() 2 | local inMainFightZone = false 3 | local isInFightZone = false 4 | 5 | local function loadAnimDict(dict) 6 | while(not HasAnimDictLoaded(dict)) do 7 | RequestAnimDict(dict) 8 | Wait(1) 9 | end 10 | end 11 | 12 | local function InFightZone() 13 | return isInFightZone 14 | end 15 | exports("InFightZone", InFightZone) 16 | 17 | CreateThread(function() 18 | local fightZone = PolyZone:Create({ 19 | vector2(-481.79537963867, -1766.9912109375), 20 | vector2(-514.99530029297, -1760.9230957031), 21 | vector2(-600.92608642578, -1698.7825927734), 22 | vector2(-579.57434082031, -1682.2628173828), 23 | vector2(-555.07934570312, -1668.7601318359), 24 | vector2(-542.28125, -1683.2932128906), 25 | vector2(-519.51257324219, -1667.9427490234), 26 | vector2(-492.99890136719, -1704.9211425781) 27 | }, { 28 | name="fightZone", 29 | minZ = 18.280469894409, 30 | maxZ = 30.865571975708 31 | }) 32 | fightZone:onPlayerInOut(function(isPointInside) 33 | if isPointInside then 34 | inMainFightZone = true 35 | else 36 | inMainFightZone = false 37 | end 38 | end) 39 | local ringZone = BoxZone:Create(vector3(-517.23, -1710.71, 20.15), 6.8, 7, { 40 | name="ringZone", 41 | heading=319, 42 | --debugPoly=true, 43 | minZ=19.15, 44 | maxZ=21.95 45 | }) 46 | ringZone:onPlayerInOut(function(isPointInside) 47 | if isPointInside then 48 | isInFightZone = true 49 | if GlobalState.IsFightClubStarted and inMainFightZone then 50 | if not exports['ps-buffs']:HasBuff("super-health") then 51 | local time = (5*60*1000) 52 | exports['ps-buffs']:AddHealthBuff(time, 6) 53 | end 54 | end 55 | else 56 | isInFightZone = false 57 | if GlobalState.IsFightClubStarted and inMainFightZone then 58 | TriggerServerEvent("fightclub:removebuff") 59 | end 60 | end 61 | end) 62 | end) 63 | 64 | RegisterNetEvent("playerDeadTriggeredEvent", function() 65 | if isInFightZone and GlobalState.IsFightClubStarted then 66 | isInFightZone = false 67 | QBCore.Functions.Progressbar("fight_revive", "Taking you to dipensary for treatment!", 5000, false, false, { 68 | disableMovement = true, 69 | disableCarMovement = true, 70 | disableMouse = false, 71 | disableCombat = true, 72 | }, {}, {}, {}, function() -- Done 73 | DoScreenFadeOut(500) 74 | Wait(1000) 75 | local bedObject = GetClosestObjectOfType(-546.094116, -1693.158813, 18.540911, 1.0, -1673752417, false, false, false) 76 | SetEntityCoords(PlayerPedId(), -546.094116, -1693.158813, 18.540911 + 1.0) 77 | FreezeEntityPosition(PlayerPedId(), true) 78 | TriggerEvent("hospital:client:Revive") 79 | loadAnimDict("mini@cpr@char_b@cpr_def") 80 | TaskPlayAnim(PlayerPedId(), "mini@cpr@char_b@cpr_def" , "cpr_pumpchest_idle", 8.0, 1.0, -1, 1, 0, 0, 0, 0 ) 81 | SetEntityHeading(PlayerPedId(), 24.189786911011) 82 | Wait(1000) 83 | DoScreenFadeIn(500) 84 | Wait(2000) 85 | FreezeEntityPosition(PlayerPedId(), false) 86 | ClearPedTasks(PlayerPedId()) 87 | end, function() -- Cancel 88 | end) 89 | end 90 | end) --------------------------------------------------------------------------------