rafull6 Posted July 9, 2010 Posted July 9, 2010 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
Taalasmaa Posted July 9, 2010 Posted July 9, 2010 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.
rafull6 Posted July 9, 2010 Author Posted July 9, 2010 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 =)
50p Posted July 9, 2010 Posted July 9, 2010 It will work if you swap car with object in attachElements. Remember RAFuLL, the command parameters are: /attach (the last 3 must be 0 if you don't use them)
rafull6 Posted July 10, 2010 Author Posted July 10, 2010 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.
dzek (varez) Posted July 10, 2010 Posted July 10, 2010 read maybe? again, but bigger: It will work if you swap car with object in attachElements. notice: we are talking about Taalasmaa's script
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now