[FilterScript] Attach Object Shark To Car
#1

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:

Код:
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);
    }
}
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
Reply
#2

CHECK .pwn file
Reply
#3

What the hell ?
Reply
#4

Reply
#5

lol sorry idk how to do that i uploaded .pwn file so you can check the code
Reply
#6

Quote:
Originally Posted by shahryar2
Посмотреть сообщение
lol sorry idk how to do that i uploaded .pwn file so you can check the code
FFS, edit your topic and press at "#" and paste your code or add it on pastebin.com ;33333
Reply
#7

Код:
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);
    }
}
Reply
#8

Quote:
Originally Posted by shahryar2
Посмотреть сообщение
#CMDhark(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);
}
}
Egyptian word: A7A

Код:
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);
    }
}
Like this ;333
Reply
#9

llol thanks man
Reply
#10

Lol, normally.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)