Jump to content
RAGE Multiplayer Community

All Activity

This stream auto-updates

  1. Past hour
  2. Today
  3. Problem with rage mp. Every 3-5 minutes the rage mp display freezes for 5-7 seconds and then everything is normal again. The sound when freezing is sometimes present, and sometimes it's gone. This problem is only in rage mp. singleplayer, rage plugin hook, gta online are fine, with high fps. I have already reinstalled GTA, rage mp completely, with the removal of the cache.
  4. Since it's a sequential loop, there is a possibility that another vehicle can be destroyed in other code because there is enough time to destroy the vehicle if the save logic was to take half a second to run for each vehicle. So when that other vehicle is then being "saved", you will most likely get "Expired multiplayer object" exceptions if you don't check if it's in the pool. It's especially important to check this for players as they can leave the server whenever they want. I suppose another method would be to utilise Promise.all() so you can have some parallelism.
  5. Is there a reason to check if a vehicle exists when you're getting the vehicle pool? like it'll 100% be a vehicle that exists wouldn't it
  6. Yesterday
  7. This would work too mp.events.add("serverShutdown", async () => { mp.events.delayTermination = true; const vehicles = mp.vehicles.toArray(); for(let i = 0; i < vehicles.length; i++) { const vehicle = vehicles[i]; if(!vehicle || !mp.vehicles.exists(vehicle)) { continue; } let x = vehicle.position.x; let y = vehicle.position.y; let z = vehicle.position.z; let rx = vehicle.rotation.x; let ry = vehicle.rotation.y; let rz = vehicle.rotation.z; let plate = vehicle.numberPlate; let volume = vehicle.getVariable("Volume"); connection.query("SELECT Garage FROM vehicledata WHERE Plate = ?", [plate], function (err, res) { let garage = res[0].Garage; if (garage < 1) { connection.query("UPDATE vehicledata SET PosX = ?, PosY = ?, PosZ = ?, Volume = ?, RotX = ?, RotY = ?, RotZ = ? WHERE Plate = ?", [x, y, z, volume, rx, ry, rz, plate], function (err,res) { if(err) { console.log(err); } }); } }); } mp.events.delayTermination = false; });
  8. async function sleep(ms) { return new Promise(resolve => setTimeout(resolve, ms)); } mp.events.add("serverShutdown", async () => { mp.events.delayTermination = true; mp.vehicles.forEach(async (vehicle) => { let x = vehicle.position.x; let y = vehicle.position.y; let z = vehicle.position.z; let rx = vehicle.rotation.x; let ry = vehicle.rotation.y; let rz = vehicle.rotation.z; let plate = vehicle.numberPlate; let volume = vehicle.getVariable("Volume"); connection.query("SELECT Garage FROM vehicledata WHERE Plate = ?", [plate], function (err, res) { let garage = res[0].Garage; if (garage < 1) { connection.query("UPDATE vehicledata SET PosX = ?, PosY = ?, PosZ = ?, Volume = ?, RotX = ?, RotY = ?, RotZ = ? WHERE Plate = ?", [x, y, z, volume, rx, ry, rz, plate], function (err,res) { if(err) { console.log(err); } }); } }); await sleep(3000); }); mp.events.delayTermination = false; }); Is there a mistake?
  9. You could switch forEach with for loop so you wait for all promises to resolve, but it still works for me...
  10. Try mp.events.delayTermination instead of mp.events.delayShutdown
  11. I copied it but it dont work. If i doing an interval or useing for example playerjoin event, it works.
  12. Hi, I'm Pertinax Formerly known as Arnold Williams, retired Captain and Founder of a LSPD of a Big Server. As of right now I'm picking up in a new community building again a new and improved LSPD on Heavy RP. As of now, I'm the acting Chief of Police. But I seeking people from that Big Server that I was on to take over my place and run the Department WITH me. Currently the department has 12 Officers along my Roster. So the positions that are open for the LSPD are the: - All high command positions except for the Assistant Chief of Police. Chief of Police Commander of General Operations Commander of Special Operations Commander of Investigations Commander of Professional Standards Commander of Personnel & Training For these high command positions you are expected to be at least had a Command Position on my past server. Ether LSPD or LSCSD. As of right now, Since the department is starting we only have Mission Row Precinct Open. Which Means that I require a Captain and Lieutenant. If we get more than 25 officers on our Roster, Vespucci Precinct will be open and so du on with more precincts. - Captains and Lieutenants For these Command Positions you are expected to be at least on a Supervisor Position on ether LSPD or LSCSD of my past server. - Sergeants and Supervisors. For these Supervisor Positions you are expected to be at least a supervisor from any server that you can prove you where one. And if you were an officer III of my past server you may talk to me to set you up as a possible SLO. - Officers and Detectives. If you were an officer from my past server you can be "reinstated" right away on your past position. If you were from an other server, you will be require to go thru the Field Training Program at Least. As for General Information about the Department: Precincts Jurisdictions. Group Supervisors Custom Vehicles Custom EUP Proper Decals. Certifications Awards System Custom Break Room Items for Stress release. Fingerprint, Bullet Casing, and Blood Samples System. AKA Evidences. LAPD Based Real Call Signs, 1-L-23, 1-A13 and more Unique Badge numbers Academy and Field Training Program, Quality over quantity. Proper teaching. CQB Certifications, High Speed Unit, Air Support, Assault Rifle, Shotgun, Medical, Advance Driving Auto Dispatch System Personalized MDT Each Division has his Captain and LT Department Structure: General Operations Bureau Mission Row Precinct Vespucci Precinct Vinewood Precinct Special Operations Bureau Traffic Operations Division Air Operations Division Special Weapons And Tactics K9 Division Investigations Bureau Major Crimes Division Gangs & Narcotics Division General Investigations Division Professional Standards Bureau Internal Affairs’ Division Media Relations Licensing Division Personnel & Training Bureau Recruitment Division Training Division Advance Training Basic Training Real life Rank System Cadet Police Officer I Police Officer II Police Officer III Senior Lead Officer Detective I Detective II Detective III Sergeant I Sergeant II Lieutenant Captain Commander Assistant Chief of Police Chief of Police If you have any interest please Contact me on Discord: Pertinax#5312
  13. It was working before recent ragemp updates.
  14. Did you try If it works with mp.game1?
  15. mp.objects.atHandle returns null. var handle = mp.game.object.getClosestObjectOfType(player.position.x, player.position.y, player.position.z, 0.6, mp.game.joaat("prop_vend_soda_01"), false, false, false); mp.gui.chat.push("" + handle); mp.gui.chat.push("" + mp.objects.atHandle(handle));
  16. every resource has an app.config what is this?
  17. Last week
  18. It will work in that case. Here's an example: async function sleep(ms) { return new Promise(resolve => setTimeout(resolve, ms)); } mp.events.add("serverShutdown", async () => { mp.events.delayShutdown = true; mp.vehicles.forEach(async (vehicle) => { // Represents some long asynchronous operation await sleep(3000); }); mp.events.delayShutdown = false; });
  19. Should it work if i close the ragemp-server.exe? I only want to save the position of all cars and change it in my database. If i use the playerquit event, it works. Can you give me a example how it should work with the delay?
  20. serverShutdown used with with mp.events.delayShutdown does work if the server shuts down gracefully (e.g. it does not crash). It would help if you share some code.
  21. Hey, i want to change datas if the server close. ServerShutdown dont work to me. I saw something with process.on but that dont work for me too. Maybe i do it wrong. Can someone help me? Im using js server and client
  22. Xabi

    help

    Help you with what exactly? That server (don't know if it's yours) was using stolen resources.
  23. TheDarkside

    help

    Help me please discord TheDarkside#5004 [URL unfurl="true"]https://i.hizliresim.com/ie0vqmm.png[/URL] https://prnt.sc/1ic9otn
  1. Load more activity
×
×
  • Create New...