Fight Club Script

Thank you, it’s way more fun to play it than what it looks like in the video. I couldn’t get a good video preview at that time I recorded.

2 Likes

Heat :fire::fire:

1 Like

nice work bro

2 Likes

Thank you!



3 Likes

what are the dependencies?

2 Likes

MLO & ox_lib You can also set the config to use ESX, QB, ND, or any other framework.

ND:

NDCore = exports["ND_Core"]:GetCoreObject()

config = {
    winPrize = 10000,
    playPrice = 2500,

    pay = function(self, source)
        local player = NDCore.Functions.GetPlayer(source) -- get player info
        if player.cash >= self.playPrice then -- check if can pay
            NDCore.Functions.DeductMoney(self.playPrice, source, "cash") -- pay cash
            return true -- can pay
        end
        return false -- can't pay
    end,

    win = function(self, source)
        NDCore.Functions.AddMoney(self.winPrize, source, "cash")
    end
}

ESX:

ESX = exports["es_extended"]:getSharedObject()

config = {
    winPrize = 10000,
    playPrice = 2500,

    pay = function(self, source)
        local xPlayer = ESX.GetPlayerFromId(source)
        local PlayerMoney = xPlayer.getMoney()
        if PlayerMoney >= self.playPrice then
            xPlayer.removeMoney(self.playPrice)
            return true
        end
        return false
    end,

    win = function(self, source)
        local xPlayer = ESX.GetPlayerFromId(source)
        if xPlayer then
            xPlayer.addMoney(self.winPrize)
        end
    end
}

QB:

QBCore = exports["qb-core"]:GetCoreObject()

config = {
    winPrize = 10000,
    playPrice = 2500,

    pay = function(self, source)
        local Player = QBCore.Functions.GetPlayer(source)
        local cash = Player.PlayerData.money["cash"]
        if cash >= self.playPrice then
            Player.Functions.RemoveMoney("cash", self.playPrice)
            return true
        end
        return false
    end,

    win = function(self, source)
        local Player = QBCore.Functions.GetPlayer(source)
        if Player then
            Player.Functions.AddMoney("cash", self.winPrize)
        end
    end
}
4 Likes

This is awesome, and free! I’ll be using this!

3 Likes

Thank you :grinning:

3 Likes

Good job sir. :heart:

1 Like

Gonna customize for my fight club interior and see if I can get it working for it as we do fight clubs in a few spots in my state. Hopefully people enjoy! Looks great

this system can be really great for player vs player… in this illegal room with same system of stamina

I’m working on PVP, it will be updated very soon.

nice i wait for it ^^ good job mate

I highly suggest adding

RemoveAllPedWeapons

But that wont stop them from equipping again. Makes it slightly more inconvenient as I have added it and it will remove their weapons each round. But cannot stop them from just pulling one out again and shooting ped.

Ideas?

Just like with the ATM script, people boost so much to get free money because of how easy it can be.
Because people are cheatin’ sons a bishes. Haha.

I will be adding a feature to set the opponents weapon just like the players, and if people are boosting on your server then you shouldn’t make these things high reward. Make them low reward and just in there for fun.

One other concern/question when one series of rounds is complete the ped just sits there (dead or alive) and then when someone else wants to do a round they end up having to fight both and it glitches out of course. Perhaps have a way to add where the ped despawns after a few seconds if it wins or the round series is completed.

Anyways heres some shots - loving it so far! :slight_smile:






2 Likes

i love this gloves :slight_smile: can you share it ? because i try to add it… but no way xD

its saying an error when using qbcore for some reason

i can’t enter the place

1 Like

Hey!
It seems you left my discord, it’s going to be hard for me to help you.