Working Raycasting - v1.1.1 had bugs calculating the forward vector causing hit position to be off.
Refactoring to enums, hashes, models, ui, everything. This allow for better development + accessibility.
Models now get freed after requesting
Play/Stop audio sounds
Additions to World class regarding (game) time, manipulating weather and cloudhats.
We had another PR from Hellslicer and also a new community member who is creating his own gamemode using Typescript + React. Glad to see new members explore languages out side of Lua!
I’m currently unable to use version 1.2.0 of fivem-js, whenever I import it the script throws the following error:
class UIMenuCheckboxItem extends _1.UIMenuItem {
----------------------------------------------------------------^
TypeError: Class extends value undefined is not a constructor or null
at Object.defineProperty.value (\server-data\resources\test-resource\dist\index.js:3999:37)
Downgrading to 1.1.1 imports fine and I’m able to use it… Unsure if it’s something I’m doing wrong, any help would be appreciated
Minor patch v1.2.1 - Fixes some export issues that caused certain features to not work. For example, the issue @LemonCaik had above. There were several others that got my attention regarding this. Thank you for the patch Lemon!
I’ve tried to clone your javascript example. When i try to run it doesn’t recognize webpack. So i install it using npm install. I then get my dist file. But it doesn’t recognize the fivem-js package…Whenever i remove the code and the import my script is recognizable…When I put it back it doesn’t do anything. What am I missing? I assume it has something to do with using a seperate webpack? Should it be recognizing fivem’s webpack?
Minor patch v1.2.2 - This time I actually merged the changes of @LemonCaik which should fix the issues with the menu UI that was present since the introduction of v1.2
Just a heads up that v1.3.0 is close! I expect to push it live this week if I don’t forget and finish some things I’d also like to push, like support for all resolutions for the menu.
New minor version v1.3.0! - A lot of changes that will impact the way you use the wrapper. Nothing major, but enough so you have to adapt your own scripts. Therefore minor version upgrade. Oh and some small neat UI features.
BREAKING New linting config - What does this mean for you? All methods are now in lowerCamelCase, so please edit your scripts accordingly. If you use Typescript or reference properly in Javascript you should be getting linting errors
Timerbar class - Pretty timerbars to create those fancy race and mission gamemodes! Example:
What’s that? A loading prompt? Yes! Timerbars take into account loading prompts, look. Click me
Vector3’s now function properly (Oops!) - Thanks @zr0iq!
New fancy drawing of… lines, spotlights, things like that
I had planned to include some new menu UI items, but they didn’t make it into this version. Still working on them, but will be added next big patch!
I have actually pushed a hotfix not too long ago and have a couple of changes locally, but haven’t updated this topic. My focus has gone elsewhere over the past couple of months and I don’t feel like there’s much to add in this.
If you have anything you feel is missing and could be useful, let me know here or write a suggestion here
Add more documentation to various classes - still at https://d0p3t.nl
Updated examples to use newest fivem-js and other dependencies
Updated project dependencies
Submenus can now be added more easily. Thanks @MythicalBro. Example:
let MainMenu = new Cfx.Menu("MythicalBro", "options");
let SubMenu = MainMenu.addNewSubMenu('SubMenu', 'Some description');
let NewMenu = new Cfx.Menu('NewMenu', 'Subtitle', new Point(20, 30));
MainMenu.addSubMenu(NewMenu, 'NewMenu', 'Some description');
Hello ,
I’ve been on FiveM for 3 years now, I’m a developer on a lot of servers, and now I want to learn another language like TypeScript.
I’d like to have more information, because I want to work underneath. Already for me and why not create a server in TypeScript.
Please I am looking for a person who can really help me I am not 15 years old I can tell you.
First of all thanks for your hard work, @d0p3t, I’m getting started with fivem-js, using Typescript. Everything is working perfectly and it’s really a great way to get started, 3 billion times easier than basic natives. The thing is that I’m trying to export another script function, “spawnmanager” but it isn’t working. This is the script I’m trying to run: