VehicleID
#1

Hello, now I compiled my script with the pawno and the include files from samp 0.3
All cars are fine, till car ID ~220 (it's a train)
After the car ID 220 all cars are "moved", have anyone a soloution?, I won't to change all vehicleIDs, before I asking here.


Thanks
Reply
#2

When you add train it's added with three trailers, so if train is ID 220, first trailer is 221, second 222 and third 223.

And why would oyu need to change any vehicle IDs manually? You can just save their IDs in variables and then use those variables in your script.
Reply
#3

hmm this is new, that each trailer from a train have a own ID or?

Hmm, can you give me a example?
Reply
#4

Each trailer is separated vehicle basically, but it is automaticly spawned and attached when you spawn train.

And for examples about variables.
Make an array for those special IDs you need like:
pawn Code:
new VehID[XXX];
And when you spawn those vehicles which you need IDs for later you do like:
pawn Code:
VehID[X] = CreateVehicle(...
or
VehID[X] = AddStaticVehicle(...
or
VehID[X] = AddStaticVehicleEx(...
And later on in your script you just use VehID[X] instead of actual IDs.

Of course XXX are just symbols in this example, you need ot change them with actual values.
Reply
#5

This is a very nice idea, thank you. I will change this
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)