[Question] CreateVehicle - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: [Question] CreateVehicle (
/showthread.php?tid=355992)
[Question] CreateVehicle -
Maxips2 - 02.07.2012
Hey guys, got a simple question about CreateVehicle, couldn't find the answer anywhere so I am asking here.
What would CreateVehicle return if the vehicle limit is reached?
new vehicleid = CreateVehicle(...);
what would vehicleid be?
Re: [Question] CreateVehicle -
ReneG - 02.07.2012
When vehicles are created their ID's are assigned in order from 0. So if that is the 5th vehicle made on your server, it would be ID 4.
Re: [Question] CreateVehicle -
Maxips2 - 02.07.2012
You didn't understand my question, clearly you haven't read it all.
I asked what would it return IF the LIMIT is reached
Re: [Question] CreateVehicle -
Tee - 02.07.2012
https://sampwiki.blast.hk/wiki/Limits - therefore it should return 2000.
Re: [Question] CreateVehicle -
steki. - 02.07.2012
INVALID_VEHICLE_ID
Re: [Question] CreateVehicle -
MP2 - 02.07.2012
Quote:
Originally Posted by VincentDunn
When vehicles are created their ID's are assigned in order from 0. So if that is the 5th vehicle made on your server, it would be ID 4.
|
Vehicle IDs start at 1.
Re: [Question] CreateVehicle -
miikeyy45 - 02.07.2012
IDS start at 0 o.O
Re: [Question] CreateVehicle -
ReneG - 02.07.2012
No, MP2 is right, they start at 1.
https://sampwiki.blast.hk/wiki/Starting_IDs
Re: [Question] CreateVehicle -
AndreT - 02.07.2012
I have some experience with reaching the vehicle limit. If this happens, then the vehicle just doesn't spawn and I think it might be INVALID_VEHICLE_ID that's returned! This hasn't been mentioned in this topic yet so I thought I'd pop in and give it a mention!