[PAID] [ESX] Sport Betting 2.0 | MK-Services

A script by Pain1435

No reviews yet.
[PAID] [ESX] Sport Betting 2.0 | MK-Services main image

Full Description

This resource is compatible with ESX v1.1 / ESX 1.2 (v1 Final) / ESX Legacy (v1.3 - v1.9.5)/ Extendedmode.

Description

This is an unique script for sportbetting with api automation. You can create sportgames with random results because a smart algorithm or manage goals manually

UI

UI Preview




UPDATE 2.0 Features

  • Integrated free API
  • Live Sync feature - automatic pulling of games
  • Results & odds over an api
  • Game statistics will update in real time

Features

  • (NEW v1.1) When creating you can now choose between manual results or random results for the game
  • (NEW v1.1) Admin groups can now manually control a game
  • Fully configurable sport betting system
  • Configurable game times
  • An algorithmus calculates random results based on used quotes
  • Fancy sport betting UI with management features
  • Fully customizable blips, markers & peds
  • Customizable maximum amount of tickets
  • Customizable max bet amount
  • Bet tickets will be stored in database
  • Configurable logs (game creation & ticket redeem)
  • Adjustable notification event
  • Protected from weapon exploits
  • ESX events and prefix customizable
  • Low performance consumption (0.00ms - 0.03ms)

Updated Showcase 2.0: Click me
Old Showcase 1.1: Click me
Old Showcase: Click me
Buy on Tebex: Click me (Secured by FiveM Escrow System)

Config Snippets:

MK = MK or {}

-- By default 'en' and 'de' are supported.
-- You can modify or add new translations in the translations.lua file
MK.Language = 'en'

-- Using for debug reasons
MK.DebugMode = false

MK.UseNewESX = false
MK.ESXResourceName = 'es_extended'

MK.ESXSharedObject = 'esx:getSharedObject'
MK.ESXPlayerLoadedEvent = 'esx:playerLoaded'

-- Please set your local timezone
-- This is needed that the API datetimes get converted correctly
MK.Timezone = 'Europe/Berlin'

-- Maximum betting price (use -1 to disable it)
MK.MaxBetPrice = 500

-- Sets the maximum amount of bet tickets per player
MK.MaxTicketsPerPlayer = 5

MK.BaseTicketPrice = 300

-- How long a game will take in minutes
MK.GameTime = 20

-- Command to open the betting menu (use nil or '' to disable it)
MK.MenuCommand = ''

-- Hotkey to open the betting menu
MK.MenuHotkey = {
  Description = 'Open the sport betting menu',
  DefaultKey = '' -- default hotkey (use nil or '' to disable it)
}

MK.Locations = {
  {
    Position = { x = -255.8164, y = -1887.045, z = 27.755298, h = 319.88006 },
    Blip = {
      Enabled = true,
      Sprite = 792,
      Color = 1,
      Size = 0.8
    },
    Marker = {
      Enabled = false,
      Type = 1,
      Size = { x = 6.0, y = 6.0, z = 0.5 },
      Color = { r = 255, g = 255, b = 255 }
    },
    Ped = {
      Enabled = true,
      Ped = 'cs_movpremmale'
    },
    Target = {
      Enabled = false
      --Ped needs to be true when using Target
    }
  }
}

MK.ShowHelpNotification = function(message)
  ESX.ShowHelpNotification(message)
end

TargetFunction = function(ent) 
  exports.ox_target:addLocalEntity(ent,{
    {
        name = 'sportbetting',
        event = 'mk_sportbetting:client:openUI',
        icon = 'fa-solid fa-male',
        label = 'Tipico öffnen',
        canInteract = function(entity, distance, coords, name, bone)
            return distance < 2
        end
    }
  })
end

MK.Notify = function(type, message)
  if type == 'success' then
      TriggerEvent('esx:showNotification', message)
  elseif type == 'warning' then
      TriggerEvent('esx:showNotification', message)
  elseif type == 'error' then
      TriggerEvent('esx:showNotification', message)
  elseif type == 'info' then
      TriggerEvent('esx:showNotification', message)
  end
end
Code is accessible No
Subscription-based No
Lines (approximately) LUA: ~3000 UI: ~1500
Support Yes