# Horse

```lua
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


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://doc.var-fivem.com/casino/configuration/horse.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
