How to add vehicle component on gamemodint - 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: How to add vehicle component on gamemodint (
/showthread.php?tid=637603)
How to add vehicle component on gamemodint -
akib - 18.07.2017
how to add vehicle component when the gamemode enter......
Images;
This two vehicles are modified when the gamemode enter :/
Re: How to add vehicle component on gamemodint -
Sew_Sumi - 18.07.2017
These are not components, they are objects. We're not here to simply ripoff other servers for you.
Re: How to add vehicle component on gamemodint -
SmileJack - 18.07.2017
You need to use "AttachObjectToVehicle".
First you create object, and before you attach the object
Код:
new objectid = CreateObject(...);
new vehicleid = GetPlayerVehicleID(playerid);
AttachObjectToVehicle(objectid, vehicleid, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0);
//Or this
new objectid = CreateObject(...);
new vehicleid = CreateVehicle(520, 2109.1763, 1503.0453, 32.2887, 82.2873, -1, -1, 60);
AttachObjectToVehicle(objectid, vehicleid, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0);