Git Product home page Git Product logo

bcc-train's Introduction

bcc-train

Description

This is the best, full fledged train script for RedM! A multitude of features like built in track switching, train inventories, ownership and more!

Features

  • Buy and Sell trains at the train stations
  • Track Switching
  • Bacchus Bridge explodable
  • Multiple train stations
  • Station access can be limited by job and jobgrade
  • Station hours may be set individually for each station or disabled to allow the station to remain open
  • Purchased trains are stored in the database
  • Can set a max number of trains a player can own
  • Individual inventory size for each train model
  • Config option to allow cruise control
  • Configurable train speeds
  • Trains need fuel to run
  • Maintain the train to keep it functional
  • Station blips are colored and changeable per stable location
  • Blips can change color reflecting if station is open, closed or job locked
  • Webhooks
  • Distance-based NPC spawns
  • Server-based delivery cooldown (persists through client relog)
  • Exports for developers to use

Dependencies

Installation

  • Download the latest release bcc-train.zip at /releases/latest
  • Add bcc-train folder to your resources folder
  • Add ensure bcc-train to your resources.cfg
  • Run the included database file train.sql
  • Add images to: ...\vorp_inventory\html\img
  • Make sure dependencies are ensured above bcc-train
  • Restart server

How to use

  • To refuel/repair train hold right click while near the driver seat to show prompts
  • Press U to access train inventory
  • Cruise control will disengage if conductor leaves engine seat
  • Buy a train from a station, spawn it and have fun!

Api

Check if train spawned! (Server Side Use only)

  • Returns true if a train has been spawned false if no train is spawned/in-use. Only 1 train should be spawned at a time on a server typically.
local retval = exports['bcc-train']:CheckIfTrainIsSpawned()

Get Train Entity (Server Side Use Only)

  • If a train exists, this returns the train entity to be used on the client side, returns false if no train is spawned/in-use.
local retval = exports['bcc-train']:GetTrainEntity()

Check if Bacchus Bridge Destroyed (Server Side Use Only)

  • Returns true if the bridge is destroyed false if not.
local retval = exports['bcc-train']:BacchusBridgeDestroyed()

Credits and Notes

  • All imagery was provided by Lady Grey our in house designer
  • Thanks sav for the nui
  • Images for items can be found under the imgs/itemImages folder

GitHub

bcc-train's People

Contributors

jakeyboi1 avatar davfount avatar juscampin avatar iseeyoucopy avatar andrewr3k avatar elzetia avatar popovvvvv 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.