Create vehicle and check after that is it valid
#1

Hi,

I want to ask. I'am loading vehicles from database. And after all loading, i want to do cikle MAX_VEHICLES, and check IsValidVehicle, but can i do that just then when i just create vehicle? and i immedently can check IsValidVehicle, or i have to wait when i create?

Thanks for answers.

Sorry for my bad English (
Reply
#2

IsValidVehicle returns true if the passed vehicle ID is created, else it returns false.

So you can check if the vehicle is valid just after creating, there's no reason to wait.
Reply
#3

Remember that 'IsValidVehicle' was not actually included in the sa-mp includes release. You have to include it yourself by adding:
pawn Код:
native IsValidVehicle(vehicleid);
to the top of your script after your includes.

EDIT: On second look at the first post, I don't think my post has helped at all... (lol).
I should have read the question more thoroughly.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)