8000 GitHub - MLGC2024/wp-yogamats
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

MLGC2024/wp-yogamats

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Waypoint Yogamats

wp-yogamats

This is a simple addon for Waypoint Placeables that lets the player place a yoga mat on the ground and interact with the yogamat to begin doing yoga. You can optionally configure to apply buffs to the player while they are using a yogamat (ie: reduce stress, increase health, etc).

Preview

Usage

The player has two yoga options when interacting with the yoga mat:

  • Begin a looped animation of doing yoga by pressing the UP arrow key
  • Cycle between yoga actions one at a time by pressing the LEFT / RIGHT arrow keys

The player can exit the yoga mat by pressing BACKSPACE.

Setup

  1. Ensure you have Waypoint Placeables downloaded and setup.

  2. Enable the script in your server.cfg

    • Be sure to start this script after wp-placeables
  3. Update the config variables to fit your framework and whether you want to apply buffs (Config.ShouldReduceStress and Config.ShouldIncreaseHealth)

  4. Add this to your items.lua:

    ["yogamat_blue"] = {["name"] = "yogamat_blue", ["label"] = "Yoga mat (Blue)", ["weight"] = 500, ["type"] = "item", ["image"] = "yogamat_blue.png", ["unique"] = false, ["useable"] = true, ["shouldClose"] = true,["combinable"] = nil,   ["description"] = "Yoga is a great way to reduce stress"},
    ["yogamat_black"]  = {["name"] = "yogamat_black", ["label"] = "Yoga mat (Black)", ["weight"] = 500, ["type"] = "item", ["image"] = "yogamat_black.png", ["unique"] = false, ["useable"] = true, ["shouldClose"] = true,["combinable"] = nil,   ["description"] = "Yoga is a great way to reduce stress"},
    ["yogamat_red"] = {["name"] = "yogamat_red", ["label"] = "Yoga mat (Red)", ["weight"] = 500, ["type"] = "item", ["image"] = "yogamat_red.png", ["unique"] = false, ["useable"] = true, ["shouldClose"] = true,["combinable"] = nil,   ["description"] = "Yoga is a great way to reduce stress"},
  5. In wp-placeables/shared/config.lua, search for -- Uncomment this line if you are using wp-yogamats and uncomment the following lines:

    local yogaCustomTargetOptions = {
        {
            event = "wp-yogamats:client:useYogaMat",
            icon = "fas fa-pray",
            label = "Do yoga",
        },
    }
    
    {item = "yogamat_blue", label = "Yoga mat (Blue)", model = "prop_yoga_mat_01", isFrozen = true, customTargetOptions = yogaCustomTargetOptions},
    {item = "yogamat_black", label = "Yoga mat (Black)", model = "prop_yoga_mat_02", isFrozen = true, customTargetOptions = yogaCustomTargetOptions},
    {item = "yogamat_red", label = "Yoga mat (Red)", model = "prop_yoga_mat_03", isFrozen = true, customTargetOptions = yogaCustomTargetOptions},

Note: If you are using ox for any of the Framework options you need to uncomment @ox_lib/init.lua in the fxmanifest.lua.

Dependencies

  • Waypoint Placeables
  • QBCore / ESX / Or other frameworks (must implement framework specific solutions in framework.lua)
  • QBCore / ESX / OX for Notifications

Credit

Authored by: BackSH00TER - Waypoint Scripts

@DonHulieo for providing insipiration and examples for structuring the framework.lua file.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Lua 100.0%
0