05.08.2016, 06:36
This:
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:
The reason that works is because CreateVehicle returns the ID of the vehicle created.
PHP код:
new vehicleid = GetPlayerVehicleID(playerid);
If you want the object to get attached to the created vehicle, assign vehicleid to CreateVehicle:
PHP код:
new vehicleid = CreateVehicle(411, 1869.9429, -1760.5313, 13.2431, 70.7358, 1, 19, -1); //Infernus