OnurBoyla 1
OnurBoyla
noisiv 1
noisiv
Manwe Work 1
Manwe Work
farkmt2official 1
farkmt2official
mavzermete 1
mavzermete
dreamstone 1
dreamstone
Hikaye Ekle

RDR2 bcc-minigames

  • Konuyu başlatan Konuyu başlatan Nizam-ı Alem
  • Başlangıç tarihi Başlangıç tarihi
  • Cevaplar Cevaplar 2
  • Görüntüleme Görüntüleme 76

HERAKLES Otomatik Avlı kalıcı sunucu. 19 Haziran'da açılıyor. Atius & Wizard güvencesiyle hemen kayıt ol, ön kayıt ödülleri aktif. HEMEN TIKLA!



BCC Mini Oyunları​

RedM projelerine eğlenceli mini oyunlar eklemek isteyen geliştiriciler için bu betik harika bir seçenektir. Taş kağıt makas, kilit açma ve beceri kontrolleri gibi API tabanlı oyunların bir koleksiyonunu içerir ve bunlar RedM projenize kolayca entegre edilebilir. Bu mini oyunlar projenize fazladan bir etkileşim ve eğlence katmanı ekleyebilir ve kullanıcılarınızın yeni ve heyecan verici şekillerde etkileşim kurmasına yardımcı olabilir. Deneyin ve geliştirme sürecinizi nasıl iyileştirebileceğini görün!

Özellikler​

  1. Taş kağıt makas
  2. Kilit açma
  3. beceri kontrolü
  4. ÇekiçZamanı
  5. Sütçü
  6. 3d Zar Atışı

Kurulum​

  1. En son sürümü bcc-minigames.zipşu adresten indirin
  2. Çıkarın ve klasörünüze minigamesyerleştirinresources
  3. ensure bcc-minigamesDosyanıza ekleyinserver.cfg
  4. Sunucunuzu yeniden başlatın (her gece yeniden başlatma yapmadığınız sürece)

API Belgeleri​


Örnek: Notions: Notation argümanı aşağıdaki yuvarlama biçimlerini kabul edebilir

  • Basit dize gösterimi 'zar sayısı' + 'd' + 'zardaki yüz sayısı' olarak tanımlanır. Örneğin: 5d6Beş tane altı yüzlü zar atar.
  • dize gösteriminden oluşan bir dizi. örneğin:{'2d10','2d6'}
  • Yukarıda açıklandığı gibi bir Roll Nesnesi. örneğin:{qty = 5, sides = 10}
  • bir dizi Roll Nesnesi. örneğin:{{qty = 2, sides = 10},{qty = 1, sides = 6}}
  • Roll Nesneleri ve dize gösteriminin karışık bir dizisi. Örneğin:{{qty = 2, sides = 10},'2d8'}
Desteklenen Zarlar "d4","d6","d8","d10","d12","d20","d100"

Kod:
local MiniGame = exports['bcc-minigames'].initiate()

RegisterCommand('rollDice', function(args, rawCommand)
    local cfg = {
        focus = false,  -- Should minigame take nui focus
        cursor = false, -- Should minigame have cursor  (required for lockpick)
        type = 'roll',
        options = {
            notation = { '4d20', '1d6' }, --options:
            autoClear = {
                active = true,
                time = 1000
            }
        }
    }

    MiniGame.Start('diceroller', cfg, function(result)
        print("Results", result.data)
        print("type", result.type)

        -- Result.type is a string of the callback type (options: rollComplete, beforeRoll, dieComplete, removeComplete)

    end)
end)

RegisterCommand('addDice', function(args, rawCommand)
    local cfg = {
        type = 'add',
        options = {
            notation = { '4d20', '1d6' },
            autoClear = {
                active = false,
                time = 1000
            }
        }
    }

    MiniGame.Trigger('diceroller', cfg)
end)

RegisterCommand('removeDice', function(args, rawCommand)
    local cfg = {
        type = 'remove',
        options = {
            notation = { rollId = 2 }
        }
    }

    MiniGame.Trigger('diceroller', cfg)
end)

RegisterCommand('rerollDice', function(args, rawCommand)
    -- The notation argument here requires an roll object or an array of roll objects identifying the roll group groupId and die rollId you wish to reroll. Die result objects from previous rolls are valid arguments and can be passed in to trigger a reroll.

    local cfg = {
        type = 'reroll',
        options = {
            notation = {
                dieType = "d20",
                groupId = 0,
                rollId = 0,
                sides = 20,
                theme = "default",
                themeColor = "#33ddff",
                value = 9
            }
        }
    }

    MiniGame.Trigger('diceroller', cfg)
end)

RegisterCommand('clearDice', function(args, rawCommand)
    MiniGame.Trigger('diceroller', { type = 'clear' })
end)

Çekiç Zamanı​

Tahtaya çivi çakmanıza olanak sağlayan mini oyun

Örnek:

Kod:
local MiniGame = exports['bcc-minigames'].initiate()

RegisterCommand('playgame', function(args, rawCommand)
    local cfg = {
        focus = true, -- Should minigame take nui focus (required)
        cursor = true, -- Should minigame have cursor  (required)
        nails = 15, -- How many nails to be hammered
        type = 'dark-wood' -- What color wood to display (light-wood, medium-wood, dark-wood)
    }

    MiniGame.Start('hammertime', cfg, function(result)
        print("Done!", result.result) -- true/false
    end)
end)

Kilit açma​

Örnek:

Kod:
local MiniGame = exports['bcc-minigames'].initiate()

RegisterCommand('playgame', function(args, rawCommand)
    local cfg = {
        focus = true, -- Should minigame take nui focus
        cursor = true, -- Should minigame have cursor  (required for lockpick)
        maxattempts = 3, -- How many fail attempts are allowed before game over
        threshold = 10, -- +- threshold to the stage degree (bigger number means easier)
        hintdelay = 500, --milliseconds delay on when the circle will shake to show lockpick is in the right position.
        stages = {
            {
                deg = 25 -- 0-360 degrees
            },
            {
                deg = 0 -- 0-360 degrees
            },
            {
                deg = 300 -- 0-360 degrees
            }
        }
        
    }


    MiniGame.Start('lockpick', cfg, function(result)
        print("Unlocked?", result.unlocked) -- true/false
    end)
end)

Beceri Kontrolü​


[CODE title="ÖRNEK"]local MiniGame = exports['bcc-minigames'].initiate()

RegisterCommand('playgame', function(args, rawCommand)
local cfg = {
focus = true, -- Should minigame take nui focus (required)
cursor = false, -- Should minigame have cursor
maxattempts = 3, -- How many fail attempts are allowed before game over
type = 'bar', -- What should the bar look like. (bar, trailing)
userandomkey = true, -- Should the minigame generate a random key to press?
keytopress = 'B', -- userandomkey must be false for this to work. Static key to press
keycode = 66, -- The JS keycode for the keytopress
speed = 20, -- How fast the orbiter grows
strict = false -- if true, letting the timer run out counts as a failed attempt
}


MiniGame.Start('skillcheck', cfg, function(result)
print("Passed?", result.passed) -- true/false
end)
end)[/CODE]

Taş Kağıt Makas​


Kod:
local MiniGame = exports['bcc-minigames'].initiate()

RegisterCommand('playgame', function(args, rawCommand)
    local cfg = {
        focus = true, -- Should minigame take nui focus
        cursor = true, -- Should minigame have cursor (required)
        allowretry = false --Allows use to start the minigame over.
    }


    MiniGame.Start('rps', cfg, function(result)
        print("Result?", result.result) -- win, lose, tie
    end)
end)

İnek Sağımcısı​


Kod:
local MiniGame = exports['bcc-minigames'].initiate()
RegisterCommand('playgame', function(args, rawCommand)
    local cfg = {
        focus = true, -- Should minigame take nui focus (required)
        cursor = true, -- Should minigame have cursor  (required)
        timer = 30, -- The amount of seconds the game will run for
        minMilkPerSqueez = 0.1,
        maxMilkPerSqueez = 0.4
    }

    MiniGame.Start('cowmilker', cfg, function(result)
        print("Milk Collected!", result.collected) -- true/false
    end)
end)
 

Şu an konuyu görüntüleyenler (Toplam : 0, Üye: 0, Misafir: 0)

Geri
Üst