Y-Less
Y-Less
I only added that `validIDs` array as an experiment in a private branch for something about 2 weeks ago - that's a pretty keen eye you've got there to have...
Also, if the number of carriages is consistent (I don't know), you can get the compiler to do the work for you: ```pawn native AddTrain(modelid, Float:spawn_x, Float:spawn_y, Float:spawn_z, carriages[3]); ```...
It won't always be the next IDs, if those are already in use (I suspect).
Just tested - `GetPlayerVehicleID` is correct in carriages.
Also, there are three carriages, but I can't control them at all. I can't destroy them, I can't spawn separate new ones, except the box car. If anyone else has...
Yes, that probably is the case, but I wonder what happens if you create 1 less than the maximum vehicles, then create a train.
The game crashes, and that's just missing one slot for one carriage: ``` SA-MP 0.3.7 Exception At Address: 0x03AD1C44 Base: 0x03A20000 Registers: EAX: 0x00000000 EBX: 0x00000000 ECX: 0x00000000 EDX: 0x00000000...
I think the short answer is: this can't be changed.
If anything, that crash is something to try detect and protect against.
That's easy to fix.