notorious_nils Posted June 20, 2018 Share Posted June 20, 2018 (edited) Hey guys first of all i'm not sure if this is the right area so pls dont be mean I am about to make an Roleplay script and got a little problem. I have to say that i am a bit new to nodejs i am new in ragemp and just got experience with C# (GTMP) and Pawn(Samp). When i create my Vehicle handling (load save and stuff) i does it in that way - Loading all Vehicles from Database on Server start - Save a vehicle on special tasks like create, take dmg, player exit - save all Vehicles on server stop (to avoid any save troubles) i didnt find any serverStop event in ragemp wiki. normaly it didnt need to save any vehicle on server stop because i save it everytime a player leave the Vehicle. BUT i want to add smth like an Mechanicle team and the PD should have a option to tow a wrong parked vehicle when it is looked can you say me an way to call functions on serverstop an other way is to create a timer every 10 sek. and check if the vehicle moved and when save it. but i think if there are maybe 50 players and everyone driving they are 50 querys every 10 second sounds like performance troubles Edited June 20, 2018 by notorious_nils some stupid grammar stuff Link to comment Share on other sites More sharing options...
Sgoldik Posted June 21, 2018 Share Posted June 21, 2018 (edited) I'm using process NodeJs. Example: process.on('exit', function(code) { console.log(`About to exit with code: ${code}`); //some code }); Edited June 21, 2018 by Sgoldik 1 Link to comment Share on other sites More sharing options...
notorious_nils Posted June 21, 2018 Author Share Posted June 21, 2018 thx comrade i didnt reallize i can use nodejs intern functions and libraries Link to comment Share on other sites More sharing options...
linnik Posted July 6, 2018 Share Posted July 6, 2018 Doesn't work. No code executed when I close cmd window. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now