🏇Horse

Shared.Horse.MaxBet = 2000
Shared.Horse.StartingTimer = 5 -- In second
Shared.Horse.PedStartGame = true -- If true one of the players must go towards the foot to start the game once the bets have started ; If false it launch automatically every 2.30 if bets are made
Shared.Horse.TimerCountdown = 5 -- Timer if bets are made and if Shared.Horse.PedStartGame = false
Shared.Horse.PedCoords = vec3(1106.070312, 263.221985, -51.841064)

if Shared.Horse.PedStartGame then
    table.insert(Shared.PedSpawn, { model = "s_m_y_casino_01", pos = Shared.Horse.PedCoords, heading = 130.393707, name = "Jason",  anim = {"s_m_y_casino_01^1_dual-24", "mpcas_int-24"} })
end

-- The parameter "luck" corresponds to the odds betting on the horse.

Shared.HorseList = {
    {
        name = "Swift",
        luck = math.random(1, 10) / 10.0
    },
    {
        name = "Lightning",
        luck = math.random(1, 10) / 10.0
    },				
    {
        name = "Midnight",
        luck = math.random(1, 10) / 10.0
    },
    {
        name = "Storm",
        luck = math.random(1, 10) / 10.0
    },
    {
        name = "Thunder",
        luck = math.random(1, 10) / 10.0
    },
    {
        name = "Blaze",
        luck = math.random(1, 10) / 10.0
    }
}

The chances of victory are completely random; the only parameter that plays a role is luck, which plays a small role in the horse's victory.

If Shared.Horse.PedStartGame is activated then the game can only be started when a person has made a bet and initiates a race with the ped, however if it is not activated as soon as a player initiates a bet the countdown is spear

Last updated