Veh ids?
#1

Well,i wanted to ask?where can i get veh id?,like example,if i have 5 cars,
are they like this:
addstaticvehicle(psalpdlaspldas); carid 1
addstaticvehicle(psalpdlaspldas); carid 2
addstaticvehicle(psalpdlaspldas); carid 3
addstaticvehicle(psalpdlaspldas); carid 4
addstaticvehicle(psalpdlaspldas); carid 5


thanks for answering.
Reply
#2

You can store it in a variable:

new Vehicle[MAX_VEHICLES];

Vehicle[1] = addstaticvehicle(psalpdlaspldas); carid 1
Vehicle[2] = addstaticvehicle(psalpdlaspldas); carid 2
Vehicle[3] = addstaticvehicle(psalpdlaspldas); carid 3
Vehicle[4] = addstaticvehicle(psalpdlaspldas); carid 4
Vehicle[5] = addstaticvehicle(psalpdlaspldas); carid 5
Reply
#3

Quote:
Originally Posted by Merlо
You can store it in a variable:

new Vehicle[MAX_VEHICLES];

Vehicle[1] = addstaticvehicle(psalpdlaspldas); carid 1
Vehicle[2] = addstaticvehicle(psalpdlaspldas); carid 2
Vehicle[3] = addstaticvehicle(psalpdlaspldas); carid 3
Vehicle[4] = addstaticvehicle(psalpdlaspldas); carid 4
Vehicle[5] = addstaticvehicle(psalpdlaspldas); carid 5
AddStaticVehicle doesn't return a specific value, use CreateVehicle-function instead.
Reply
#4

Quote:
Originally Posted by Don Correlli
Quote:
Originally Posted by Merlо
You can store it in a variable:

new Vehicle[MAX_VEHICLES];

Vehicle[1] = addstaticvehicle(psalpdlaspldas); carid 1
Vehicle[2] = addstaticvehicle(psalpdlaspldas); carid 2
Vehicle[3] = addstaticvehicle(psalpdlaspldas); carid 3
Vehicle[4] = addstaticvehicle(psalpdlaspldas); carid 4
Vehicle[5] = addstaticvehicle(psalpdlaspldas); carid 5
AddStaticVehicle doesn't return a specific value, use CreateVehicle-function instead.
Thank you for your correction. I've forgotten it.
Reply
#5

ooohhh,thanks but..can i start them from end,like

Vehicle[122] = CreateVehicle(psalpdlaspldas);
Vehicle[121] = CreateVehicle(psalpdlaspldas);
Vehicle[120] = CreateVehicle(psalpdlaspldas);
Vehicle[119] = CreateVehicle(psalpdlaspldas);
Vehicle[118] = CreateVehicle(psalpdlaspldas);
Reply
#6

You can order as you want, just make sure that the index exists.
Reply
#7

thanks
Reply
#8

Quote:
Originally Posted by Don Correlli
AddStaticVehicle doesn't return a specific value.
It does return the vehicleid.
Reply
#9

Quote:
Originally Posted by MadeMan
It does return the vehicleid.
Since when?

Quote:
This function does not return a specific value, it's best to simply ignore it.
Reply
#10

It does return the vehicle id. Wiki is wrong
Reply
#11

Quote:
Originally Posted by Don Correlli
Quote:
Originally Posted by MadeMan
It does return the vehicleid.
Since when?

Quote:
This function does not return a specific value, it's best to simply ignore it.
Have you ever tried it yourself or believe everything that wiki says?
Reply
#12

Quote:
Originally Posted by MadeMan
Have you ever tried it yourself or believe everything that wiki says?
I'm using CreateVehicle since it was added, i guess the wiki wasn't updated since then. At least i'm the one who knows how to check the wiki when it's needed unlike you.
Reply


Forum Jump:


Users browsing this thread: 8 Guest(s)