Git Product home page Git Product logo

wp-seats's Introduction

Waypoint Seats

wp-seats

Waypoint Seats is a simple, standalone script that adds a "sit" target option to chairs around the map.

This script also works well with Waypoint Placeables, users can carry chair items and place them anywhere around the map (such as folding camping chairs, plastic chairs, etc), allowing them to put together their own seating areas anywhere they want.

Note: If the players path to walk to and sit down on the chair is obstructed, there is a timeout (Config.SitScenarioTimeout) that will run and teleport the player into the chair after the timeout. This adds more flexibility and lets players sit in chairs that are close to tables or other objects.

Preview: https://youtu.be/dxhkJY5AXkM

Usage

  • Target chair and sit in the chair
  • Press E or ESC to standup from the chair
  • Only one player can sit in a chair at a time, using statebags to keep track if the chair is occupied
  • Chairs can be placed and picked up anywhere using Waypoint Placeables

Setup

  1. Enable the script in your server.cfg

  2. Update the config file to match your scripts for: Framework, Notify, Target

  3. Optionally add more chair models to the config file. You can use the prop model name or the hash.

    • You can find additional props on Pleb Masters: Forge
    • Or if you see an object in game you can use your admin menu delete laser to get the prop name or hash.

    Note: Chairs in custom MLOs may or may not work. It is dependent on how the MLO was created. If the MLO uses the actual prop for the chair, then it should work. If the MLO has the chair baked into the MLO, then it will not work. If the model id does not work, you may have luck getting the name of the entity through codewalker.

  4. Optional: If using Waypoint Placeables, uncomment these lines in wp-placeables/shared/config.lua:

    local chairCustomTargetOptions = {
         {
             event = "wp-seats:client:sitOnChair",
             icon = "fas fa-chair",
             label = "Sit down",
         },
     } 
    

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

Aside from a targetting script, this script is standalone and does not require any other resources to function.

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

Credit

Originally based on qb-sit, but has been almost completely rewritten to be standalone, more performant and fix bugs.

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

wp-seats's People

Contributors

backsh00ter avatar

Stargazers

António Neves avatar snajdan avatar  avatar Dekwer avatar Chas avatar ᐯIᖇᑌᔕ avatar  avatar  avatar BruJ0 Tv avatar Aladrex avatar toby avatar DX HIGH avatar

Watchers

 avatar Waypoint RP avatar

wp-seats's Issues

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.