SA-MP Forums Archive
Scripters,please click here - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Scripters,please click here (/showthread.php?tid=246559)



Scripters,please click here - [DJ]Boki - 04.04.2011

I need your help.

If you can make for me full FS how to attach object to vehicle,and to "freeze" that attached objects.
And i want when i connect,to load that object to vehicle

Thank you guys


Re: Scripters,please click here - Sinner - 04.04.2011

Wrong thread: https://sampforum.blast.hk/showthread.php?tid=187229


Re: Scripters,please click here - [MG]Dimi - 04.04.2011

Anyway it's easy
use these:

Код:
new carobject;
new targetvehicle;

public OnGameModeInit()
{
	carobject = CreateObject([modelid],[x co-ordinate], [y co-ordinate], [z co-ordinate], [x rotation], [y rotation],[z rotation], [draw distance]); // I suggest you to put 0.0,0.0,0.0 for co-ordinates ;)
	targetvehicle = CreateVehicle([vehicleid],[x co-ordinate], [y co-ordinate], [z co-ordinate], [rotation], [colo1],[color2],[respawn delay]);
	AttachObjectToVehicle(carobject,targetvehicle, [position X], [position Y], [position Z], [rotation X], [rotation Y], [rotation Z]);
	return 1;
}