SA-MP Forums Archive
Vehicle ID/Name - 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: Vehicle ID/Name (/showthread.php?tid=329118)



Vehicle ID/Name - Skribblez - 27.03.2012

i was wondering if there's an actual function that checks if the string/integer that was typed is a valid vehicle id or name.

thank you!


Re: Vehicle ID/Name - TheLazySloth - 27.03.2012

In my signature there's a link, "Creating Useful Functions" click it.
Scroll down a bit and you should find stock IsValidModelID(ModelID)
Copy and paste the code into your own code and compile.
Don't forget to comment on my thread if I helped you.

Hope you learned a thing or two.
If you require more help you can PM me or add my Skype: TheLazySloth
Thanks for Reading.


Re: Vehicle ID/Name - Skribblez - 27.03.2012

the function on your thread only checks the vehicle id, which is easy. i'm looking for something that checks both vehicle name and id. i already have one, using the good old
Код:
ReturnVehicleModelID()
thanks for trying though.


Re: Vehicle ID/Name - TheLazySloth - 27.03.2012

Sure thing =] Have a great day.