Jump to content

[Help]Attachments


rafull6

Recommended Posts

Posted

Hello, guys! I've played one server once. It's called [NR]Gaming server, and there was an awesome script. Using those script you can attach objects to your car using command /attach [x y z xy yz zx] - cordinates. Question: How to create such script, or, if it's allready exist, post it here, please :)

Posted

https://wiki.multitheftauto.com/wiki/AttachElements

With this function you can attach two elements. Don't except me to write the code for you.

Oh well, I wrote a bit.

function attachHand ( source, commandName,objID,x,y,z,rx,ry,rz )
car = getPedOccupiedVehicle(source)
if (car) then
object = createObject(tonumber(objID),0,0,0);
attachElements ( car, object, tonumber(x),  tonumber(y),  tonumber(z), tonumber(rx),  tonumber(ry),  tonumber(rz) );
else
outputChatBox("You must be in car!",source,255,0,0);
end
end
addCommandHandler ( "attach", attachHand )

This works like /attach OBJECTID,x,y,z,rx,ry,rz

I'm not sure what you wanted.

Edit: It's untested dunno if works.

http://www.sincitygaming.net - The next generation of gaming!

SinCity Gaming | UltiRace 24/7 - 188.165.199.162:22003

SinCity Gaming | Roleplay Gaming - Beta soon!

SinCity Gaming | Zombie Mode + - 188.165.199.162:22005

Instead of using ip: 188.165.199.162 you can use: sincitygaming.net

Posted

But how to make command /attach x y z - where x y z is a cordinates for object. How to make it?

EDITED: Ok i'll check it now.

EDITED: Yep. It was untested and it won't work =)

Posted

Ok. But i need a script, that will attach an object when you'he used /attach command.

like: /attach 1225 0 10 0 10 15 10 - it's will attach a barrel to the car in front of it. /attach [id] [x y z rx ry rz]

EDITED: i need that using this command player can attach all kinds of objects.

Posted

read maybe?

again, but bigger:

It will work if you swap car with object in attachElements.

notice:

we are talking about Taalasmaa's script

Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online!

programista php rzeszów

Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting.

Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...