Coder Social home page Coder Social logo

linden_threads's Introduction

Yet another sample resource

Allows for simple creation of threads in a single resource which we can then use to trigger events in other resources. I personally use it with modified versions of cosmo_hud, RealisticVehicleFailure, and my car locks resource.
Using a 600ms thread in this one resource allows me to enable the car hud, enable the seatbelt command, check if the player is driving or a passenger, and with my car locks to determine if I am on foot (trust me, it's important for optimisation).
I was able to strip 0.02ms off cosmo_hud by removing the vehicle check, reduce vehiclefailure by 0.01ms in a car and to 0ms while on foot - I would say the benefits are very noticeable.
The new SetInterval function is something I had thought of but didn't create until I saw the convenience of it in ESX Reborn.
Not having to define a function to create a thread containing a while loop saves a lot of hassle and it's simple enough to stop the interval and recreate it with different timers (though you could also take influence from the ClearInterval function to see how you could modify the time).

linden_threads's People

Contributors

thelindat avatar

Watchers

 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.