AttachObjectToVehicle Not Work?.
#2

This:
PHP код:
new vehicleid GetPlayerVehicleID(playerid); 
Requires the player to be inside a vehicle, otherwise it will return 0. Looking at the screenshots and the code, it doesn't look like the player would be in a vehicle after using /xyzz.

If you want the object to get attached to the created vehicle, assign vehicleid to CreateVehicle:
PHP код:
new vehicleid CreateVehicle(4111869.9429, -1760.531313.243170.7358119, -1); //Infernus 
The reason that works is because CreateVehicle returns the ID of the vehicle created.
Reply


Messages In This Thread
AttachObjectToVehicle Not Work?. - by quochuy - 05.08.2016, 06:16
Re: AttachObjectToVehicle Not Work?. - by AndySedeyn - 05.08.2016, 06:36
Re: AttachObjectToVehicle Not Work?. - by quochuy - 05.08.2016, 08:00
Re: AttachObjectToVehicle Not Work?. - by quochuy - 05.08.2016, 13:34
Re: AttachObjectToVehicle Not Work?. - by quochuy - 05.08.2016, 14:54
Re: AttachObjectToVehicle Not Work?. - by JuzDoiT - 05.08.2016, 16:36
Re: AttachObjectToVehicle Not Work?. - by quochuy - 06.08.2016, 03:48
Re: AttachObjectToVehicle Not Work?. - by Crayder - 06.08.2016, 04:19

Forum Jump:


Users browsing this thread: 1 Guest(s)