AttachObjectToVehicle
#2

u can create at anywhere where u want (for examples at CMD)

define object at top of the script
new VehObject[MAX_VEHICLES];

put this script at command
vehid = GetPlayerVehicleID(playerid);
VehObject[vehid] = CreateObject(objectid,0,0,0,0,0,0,0);
AttachObjectToVehicle(VehObject[vehid],vehid,0,0,0,0,0,0);

and put this at OnVehicleDestroy
DestroyObject(VehObject[vehicleid]);

u can also check these functions at wiki to get full information how to use it.
https://sampwiki.blast.hk/wiki/AttachObjectToVehicle
Reply


Messages In This Thread
AttachObjectToVehicle - by Matyaas - 01.02.2018, 19:55
Re: AttachObjectToVehicle - by Mugala - 01.02.2018, 20:19
Re: AttachObjectToVehicle - by Matyaas - 02.02.2018, 03:06
Re: AttachObjectToVehicle - by Mugala - 02.02.2018, 09:56

Forum Jump:


Users browsing this thread: 2 Guest(s)