AttachObjectToVehicle - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: AttachObjectToVehicle (
/showthread.php?tid=406603)
AttachObjectToVehicle -
Smacky - 10.01.2013
Hello I want to attach object to vehicle on gamemode init, but not all vehicles only taxis help me thx.
Re: AttachObjectToVehicle -
JavoDiaz - 10.01.2013
pawn Код:
public OnGameModeInit()
{
//after you have loaded your cars...
for(new v = 0; v < MAX_VEHICLES; v++)
{
if(GetVehicleModel(v) == 420 || GetVehicleModel(v) == 438)
{
AttachObjectToVehicle(objectid, v, offX, offY, offZ, rotX, rotY, rotZ);
}
}
return 1;
}
replace the AttachObjectToVehicle parameters.
Good luck!
Re: AttachObjectToVehicle -
Smacky - 10.01.2013
Thank you very much