Skip to Content

QBミニゲーム

導入

qb-minigamesサーバーのゲームプレイにインタラクティブなチャレンジを追加するために設計された、スキルベースのミニゲームの軽量コレクションです。各ミニゲームは独立したメカニクスとして使用することも、強盗、ハッキング、クラフト、ロックピッキングなどのスクリプトに組み込んでplayerのエンゲージメントを高めることもできます。

これらのミニゲームは、シンプルなクライアントエクスポートを使用してLuaで完全に実装されているため、既存のものと簡単に統合できます。qb-coreリソースまたはカスタムロジック

[!NOTE] クレジット: これらのミニゲームは、元々はコーディングネパールウェブ — オリジナルのクリエイターに完全なクレジットを付与

特徴

  • 🧠クイズ: 時間制限のある複数問のクイズ
  • 🔡単語当てゲーム: ミスを制限したハングマンスタイルのチャレンジ
  • 🔀ワードスクランブル: 時間切れになる前に単語を解読してください
  • ⌨️キーミニゲーム: 障害追跡機能を備えたタイミングキー押下
  • 🛠️ロックピック: 制限回数のあるクラシックロックピッキングチャレンジ
  • 💻ハッキング: 制限時間内でのパターンの記憶と入力
  • 🎯スキルバー: 難易度とカスタムキーによる反応ベースのチャレンジ
  • 🔢ピンパッド: キーパッドUIを使用して正しいコードを入力します

クイズ

playerが制限時間内に正しく答えなければならない一連の多肢選択式の質問を提示します

  • 質問:table
    • 質問のリスト。各質問には次の内容が含まれます。
      • 質問:string
      • 答え:string
      • オプション:table— 可能な回答のリスト
  • 必須正解:number
  • 質問ごとの時間:number(秒単位)
local success = exports['qb-minigames']:Quiz({ { question = 'What color is a peach?', answer = 'pink', options = { 'red', 'yellow', 'orange', 'blue', 'pink' } }, { question = 'What color is an apple?', answer = 'red', options = { 'red', 'yellow', 'orange', 'blue', 'pink' } }, { question = 'What color is an orange?', answer = 'orange', options = { 'red', 'yellow', 'orange', 'blue', 'pink' } }, { question = 'What color is a banana?', answer = 'yellow', options = { 'red', 'yellow', 'orange', 'blue', 'pink' } }, { question = 'What color is a strawberry?', answer = 'red', options = { 'red', 'yellow', 'orange', 'blue', 'pink' } }, { question = 'What color is a blueberry?', answer = 'blue', options = { 'red', 'yellow', 'orange', 'blue', 'pink' } }, }, 3, 15) if success then print('success') else print('fail') end

ワードゲス

古典的なハングマンスタイルのゲームで、playerは隠された単語の文字を推測する必要がありますが、間違った推測はnumberに制限されています。

  • 言葉:string
  • ヒント:string
  • 最大誤推測:number
local success = exports['qb-minigames']:WordGuess( 'fivem', 'the game modification you are playing on', 5 ) if success then print('success') else print('fail') end

ワードスクランブル

playerに単語の羅列とヒントを提示します。playerは制限時間内に単語を解読しなければなりません。

  • 言葉:string
  • ヒント:string
  • 時間制限:number(秒単位)
local success = exports['qb-minigames']:WordScramble( 'fivem', 'the game modification you are playing on', 30 ) if success then print('success') else print('fail') end

キーミニゲーム

ランダムに表示されたキーを指定された回数だけ素早く押すことをplayerに要求します。誤った入力や途中で終了したキーも追跡します。

  • 必要な押下回数:number
    • 合計 number 回の正しいキー押下が必要です。
local result = exports['qb-minigames']:KeyMinigame(10) if result.quit then print('User quit game early') return end if result.faults > 3 then print('User got more than 3 keys wrong') end

ロックピック

時間制限のあるロックピッキング ミニゲームで、player は指定された回数の試行でロックを正常に開ける必要があります。

  • 試み:number
    • ロックピックの number は player を許可します。
local success = exports['qb-minigames']:Lockpick(5) if success then print('success') else print('fail') end

ハッキング

player が制限時間内に視覚パターン チャレンジを解かなければならない、メモリベースのハッキング ミニゲームです。

  • グリッドサイズ:number
    • player が記憶しなければならないコード ブロック内の文字の number。
  • 時間制限:number
    • ハッキングを解決するのにかかる時間(秒)。
local success = exports['qb-minigames']:Hacking(5, 30) if success then print('success') else print('fail') end

スキルバー

playerが正しいキーを正しいタイミングで押す、反応重視のミニゲームです。難易度とキーセットのカスタマイズが可能です。

  • 困難:string(オプション)
    • できる"easy""medium"、 または "hard"デフォルトは"easy"省略した場合。
  • キー:string(オプション)
    • 許可されるキー入力の string (例:"wasd")。デフォルトは"1234"省略した場合。
luaCopyEdit-- Basic: uses default difficulty and keys ("easy", "1234") local success = exports['qb-minigames']:Skillbar() -- Medium difficulty with default keys local success = exports['qb-minigames']:Skillbar("medium") -- Easy difficulty with custom keys local success = exports['qb-minigames']:Skillbar("easy", "wasdfgh") if success then print('success') else print('fail') end

ピンパッド

playerが正しいPINコードを入力する必要があるテンキーのミニゲーム。このミニゲームではキーを使用します。1–9ユーザーのアクションを追跡します。

  • ピン:number
    • 正しい 4 桁のコード (1 ~ 9 の数字を使用する必要があります)。
luaCopyEditlocal result = exports['qb-minigames']:StartPinpad(1234) if result.quit then print('User quit game early') elseif result.correct then print('User passed game') else print('User failed game') end
Last updated on