How i can put player in vehicle?
#1

Hey,

how i can put player in vehicle?

Code:

Код:
PutPlayerInVehicle(playerid, 462, 0);
PutPlayerInVehicle(DuelID, 462, 0);
Didn't working :/
Reply
#2

Show me the command..
Reply
#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
#4

--Deleted--
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)