SA-MP Forums

Go Back   SA-MP Forums > SA-MP > Bug Reports

Reply
 
Thread Tools Display Modes
Old 10/09/2018, 12:08 AM   #1
GangstaSunny.
Huge Clucker
 
GangstaSunny.'s Avatar
 
Join Date: Apr 2010
Location: Hamburg - Germany
Posts: 215
Reputation: 23
Default Vehicle X was not deleted [Trains]

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

Example Explanation:
Creating http://wiki.sa-mp.com/wiki/Image:Vehicle_537.jpg will also bring 3 http://wiki.sa-mp.com/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.
__________________
Visit my Website
https://gangstasunny.de
GangstaSunny. is offline   Reply With Quote
Old 14/09/2018, 09:25 AM   #2
BeckzyBoi
Beta Tester
 
Join Date: Dec 2006
Posts: 1,695
Reputation: 127
Default Re: Vehicle X was not deleted [Trains]

Trains can only be created with AddStaticVehicle/AddStaticVehicleEx, which can only be used in OnGameModeInit. Unless I'm misunderstanding your problem?
__________________
BeckzyBoi is offline   Reply With Quote
Old 14/09/2018, 10:35 AM   #3
GangstaSunny.
Huge Clucker
 
GangstaSunny.'s Avatar
 
Join Date: Apr 2010
Location: Hamburg - Germany
Posts: 215
Reputation: 23
Default Re: Vehicle X was not deleted [Trains]

Quote:
Originally Posted by BeckzyBoi View Post
Trains can only be created with AddStaticVehicle/AddStaticVehicleEx, which can only be used in OnGameModeInit. Unless I'm misunderstanding your problem?
Those functions can even be used in commands, not just OnGameModeInit (anymore).
__________________
Visit my Website
https://gangstasunny.de
GangstaSunny. is offline   Reply With Quote
Old 14/09/2018, 10:37 AM   #4
J0sh...
High-roller
 
J0sh...'s Avatar
 
Join Date: Aug 2014
Location: Hamburger
Posts: 1,275
Reputation: 389
Default Re: Vehicle X was not deleted [Trains]

They could be for a long time, its just not recommended to do so for this reason.
__________________
🍔🍔🍔🍔🍔🍔🍔🍔🍔🍔🍔🍔
Yes I know my name has 3 dots.
Thanks for noticing, it was meant to signify a pause in the personal message asking to be named J0sh but they got included.
J0sh... is offline   Reply With Quote
Old 14/09/2018, 02:02 PM   #5
GangstaSunny.
Huge Clucker
 
GangstaSunny.'s Avatar
 
Join Date: Apr 2010
Location: Hamburg - Germany
Posts: 215
Reputation: 23
Default Re: Vehicle X was not deleted [Trains]

Quote:
Originally Posted by Freshncool View Post
They could be for a long time, its just not recommended to do so for this reason.
Wow.
This is not a fix or helpfully in any way.

Simply creating the train on the current highest ID. I have to create a real car, but Kalcor got the possibility to create a small entity to like "block" the current free id if she's not the highest one.

This would be a much better solution.
__________________
Visit my Website
https://gangstasunny.de
GangstaSunny. is offline   Reply With Quote
Old 14/09/2018, 06:48 PM   #6
Spmn
Gangsta
 
Join Date: Jun 2015
Location: Romania
Posts: 543
Reputation: 131
Default Re: Vehicle X was not deleted [Trains]

Quote:
Originally Posted by GangstaSunny. View Post
The 3 trailers will ALWAYS have the trains vehicle id +X.
No, they get unused ids, at least on 0.3.7. For instance, this script prints:
Code:
Model: 400 - ID: 1
Model: 401 - ID: 2
Model: 402 - ID: 3
Model: 403 - ID: 4

Model: 538 - ID: 1
Model: 401 - ID: 2
Model: 402 - ID: 3
Model: 403 - ID: 4
Model: 570 - ID: 5
Model: 570 - ID: 6
Model: 570 - ID: 7
Which clearly shows that trailer ids don't overlap with other existing ids.
Spmn is online now   Reply With Quote
Old 15/09/2018, 04:07 PM   #7
GangstaSunny.
Huge Clucker
 
GangstaSunny.'s Avatar
 
Join Date: Apr 2010
Location: Hamburg - Germany
Posts: 215
Reputation: 23
Default Re: Vehicle X was not deleted [Trains]

Quote:
Originally Posted by Spmn View Post
No, they get unused ids, at least on 0.3.7. For instance, this script prints:
Code:
Model: 400 - ID: 1
Model: 401 - ID: 2
Model: 402 - ID: 3
Model: 403 - ID: 4

Model: 538 - ID: 1
Model: 401 - ID: 2
Model: 402 - ID: 3
Model: 403 - ID: 4
Model: 570 - ID: 5
Model: 570 - ID: 6
Model: 570 - ID: 7
Which clearly shows that trailer ids don't overlap with other existing ids.
Not for me (and basicly everyone else, including y_less, except you). 0.3.7
__________________
Visit my Website
https://gangstasunny.de
GangstaSunny. is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
warning: vehicle xxx was not deleted ScIrUsna Scripting Help 0 10/06/2016 06:45 PM
[HELP]Warning : Vehicle xx was not deleted Guest4390857394857 Server Support 1 18/02/2014 11:15 AM
Warning: Vehicle X was not deleted... Tee Scripting Help 5 28/11/2012 01:01 AM
Vehicle X was not deleted sollaa Help Archive 11 27/12/2010 12:35 PM
Problem with Trains on Vehicle System Mr.Z Help Archive 1 16/10/2009 03:20 PM


All times are GMT. The time now is 11:35 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.