03.03.2014, 09:09
(
Последний раз редактировалось shahryar2; 03.03.2014 в 10:01.
)
Hello everyone i searched all over samp filterscripts and i didnt see any pawn code to attach object to car and save it so when you restart server it comes back so i made my own using help from other programs.
First if you just want to attach shark object to car then put Pawno code:
on your gamemode .pwn file all the way at the bottom. This will attach the shark to the infernus. If you want to change the vehicle its attached to then change 411 to your vehicle id. also change Infernus to your cars name.
Now if you want another object on your car then download iVO - Vehicle Object Creator/Attach Tool
Then make your object using this tool. It will save the pawno code to your scriptfiles. Then go to your script files look for attachobjecttovehicle click on it and then copy the code. After that just delete
new object = CreateObject( 1608,0,0,0,0,0,0,80 ); // <iVO>
AttachObjectToVehicle( object, GetPlayerVehicleID(playerid), -0.000000, -2.899999, 0.300000, 0.000000, 360.000000, 0.000000 ); // <iVO>
And replace it with your code. If you need help then just comment below you can use it on how many cars you want. If you want to remove it then simply restart your sever or just spawn another car because it only attaches to the car you want thank you.
Downloads: https://sampforum.blast.hk/showthread.php?tid=272552
Pictures: http://postimg.org/image/6umzi4yzh/
PLZ GIVE ME REP IM NEW HERE
First if you just want to attach shark object to car then put Pawno code:
Код:
CMD:shark(playerid,params[]) { if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 411) { new object = CreateObject( 1608,0,0,0,0,0,0,80 ); // <iVO> AttachObjectToVehicle( object, GetPlayerVehicleID(playerid), -0.000000, -2.899999, 0.300000, 0.000000, 360.000000, 0.000000 ); // <iVO> } else { GameTextForPlayer(playerid,"~N~ ~N~ ~N~ ~N~ ~R~ You are not in an ~H~ ~W~ Infernus",2000,5); } }
Now if you want another object on your car then download iVO - Vehicle Object Creator/Attach Tool
Then make your object using this tool. It will save the pawno code to your scriptfiles. Then go to your script files look for attachobjecttovehicle click on it and then copy the code. After that just delete
new object = CreateObject( 1608,0,0,0,0,0,0,80 ); // <iVO>
AttachObjectToVehicle( object, GetPlayerVehicleID(playerid), -0.000000, -2.899999, 0.300000, 0.000000, 360.000000, 0.000000 ); // <iVO>
And replace it with your code. If you need help then just comment below you can use it on how many cars you want. If you want to remove it then simply restart your sever or just spawn another car because it only attaches to the car you want thank you.
Downloads: https://sampforum.blast.hk/showthread.php?tid=272552
Pictures: http://postimg.org/image/6umzi4yzh/
PLZ GIVE ME REP IM NEW HERE