How i can put player in vehicle?
#3

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:

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);
There are also other ways to get the vehicle id such as OnPlayerEnterVehicle.
Reply


Messages In This Thread
How i can put player in vehicle? - by SkyWings - 31.10.2012, 10:33
Re: How i can put player in vehicle? - by Kevin FOx - 31.10.2012, 10:36
Re: How i can put player in vehicle? - by Simon - 31.10.2012, 10:37
Re: How i can put player in vehicle? - by SkyWings - 31.10.2012, 10:38

Forum Jump:


Users browsing this thread: 1 Guest(s)