31.10.2012, 10:37
(
Последний раз редактировалось Simon; 31.10.2012 в 10:44.
Причина: commented code/added extra info
)
It appears that you are trying to use 'model id' rather than 'vehicle id'. Vehicle id is a unique ID which indentifies an "instance" of a vehicle (can have multiple vehicles with the same model id). Model id is the ID which describes how a vehicle looks (e.g. Faggio has model id 462)
You can get the vehicle id of a vehicle by getting the return value of CreateVehicle/AddStaticVehicle(Ex). Something like this:
There are also other ways to get the vehicle id such as OnPlayerEnterVehicle.
You can get the vehicle id of a vehicle by getting the return value of CreateVehicle/AddStaticVehicle(Ex). Something like this:
pawn Код:
// global variables
new my_vehicle_id;
new my_other_vehicle_id;
// when you create the vehicle save their vehicleid's
my_vehicle_id = CreateVehicle(...);
my_other_vehicle_id = AddStaticVehicle(...);
// at some point when you want to put the player in your
// created vehicles
PutPlayerInVehicle(playerid, my_vehicle_id, 0);
PutPlayerInVehicle(playerid, my_other_vehicle_id, 0);