Vehicle X was not deleted [Trains]

Started by SA:MP, May 05, 2023, 05:35 AM

Previous topic - Next topic

0 Members and 8 Guests are viewing this topic.

SA:MP

Vehicle X was not deleted [Trains]

Hey,

i know this bug have already been reported some years ago. Still, it exists.



Example Explanation:

Creating https://sampwiki.blast.hk/wiki/Image:Vehicle_537.jpg will also bring 3 https://sampwiki.blast.hk/wiki/Image:Vehicle_569.jpg with it. The 3 trailers will ALWAYS have the trains vehicle id +X.



If the train got the vehicleid 500, the first trailer will have the id 501, the second the id 502 and the third the id 503. And here it comes to the problem. This trailer will realy ALWAYS get the trains id ++. Even if another vehicle already got this id. The vehicle will automaticly be destroyed, regardless if a player is inside, the car is not even inside the stream radius and and and...



Fix:

If the modelid 537 or 538 (both are trains with 3 trailers) will be created, SA-MP should firstly selected the current highest vehicleid and spawn the trailer on this id. This will easily fix it. If the highest vehicleid => 1996, the train should not be able to spawn (since 2000 max vehicles, or: 1999).





Also: I'm actualy working with a workaround (creating vehicles until the id the train would get + 3 more ids are free) but this is awfuel.

Source: Vehicle X was not deleted [Trains]