Code Monkey home page Code Monkey logo

qb-scavengerhunt's Introduction

Description

A script to run and manage scavenger hunts in fiveM. Team count and size are unlimited, and the script is OneSync Infinity-compatible.

Dependencies

Usage

First, designate a citizenid in the config of the player that will manage the scavenger hunt. This player has the ability to start/stop the scavenger hunt and view the teams' progress. To do this, use the sh_boss command. For the participants before the scavenger hunt is started, they can use the sh_jointeam command to join a team, and view other members of that team. Players will only be able to join 1 team at a time.

When the scavenger hunt is started, players will be able to start searching for goals using the scavenger_hunt_list item.

There are 5 types of goals in the config:

  • ped - The script will place a ped in the world and create a target on them, for the players to find and click. You provide the model, the static animation and location (vector4). Spawn a ped in your favorite in-game locations.

  • object - This will place an object model in the world for the player to find. You provide the model and location (vector4).
  • item - This goal is accomplished when the player is holding the designated item in their inventory. You provide the item name, found in the shared.lua file.
  • ped_giveitem - This will spawn a ped in the world, that will give the player an item upon activation. You provide the model, the static animation and location (vector4), and the item name they will give.
  • boxzone - You can place a boxzone around in-world objects/surfaces, for the player to find. You need to create the Boxzone and copy the information into the config. Box zone a statue for example.

Boss Menu

The player designated to admin the scavenger hunt has access to an admin menu with two functions. This can be opened with the sh_boss command.

  • Lock/Unlock Hunt - This action begins/halts the scavenger hunt. While the scavenger hunt is started, players are not able to join or leave teams. Players are not able to view the scavenger hunt task list until the hunt is started, to prevent them from looking at clues early. If for whatever reason you need to halt the scavenger hunt, goals will become unavailable. Items, boxzones will become unresponsive and peds will walk away from their designated areas, and become available again when the hunt is resumed.
  • Get Team Progress - While the scavenger is ongoing, the admin can view task progress of each team. This might be helpful at the end also, to quickly asses if each team completed eash task or not.

Qbus.xyz Discord:

Discord

qb-scavengerhunt's People

Contributors

joeszymkowicz avatar joeszymkowiczfivem avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.