Tombaa Posted May 18, 2011 Posted May 18, 2011 (edited) I have been trying to use this script: viewtopic.php?f=91&t=32662&p=344109&hilit=Attach#p344109 But the problem is, that when I once get it to attach, and detach after that, it wont attach to it anymore, before I restart script. function attach ( hitElement ) if ( getElementType( hitElement ) == "vehicle" ) then attachElements ( arrow1, cH, -1417 - hullx, 531 - hully, 18.5 - hullz ) attachElements ( hitElement, arrow1 ) do end end addEventHandler ( "onMarkerHit", theMarker, attach ) function detach ( thePlayer, commandName ) local pVehicle = getPedOccupiedVehicle( thePlayer ) detachElements ( pVehicle ) end addCommandHandler ( "detach", detach ) That is the code, could anyone please tell me, if there is some kind of loop thing or something, which I can use there. Thanks in advance Tombaa Edited May 18, 2011 by Guest
karlis Posted May 18, 2011 Posted May 18, 2011 first, pelase use tags!its much easier to help you then.2)what is cH, show full script
Tombaa Posted May 18, 2011 Author Posted May 18, 2011 The cH is a carrier, that I have attached the marker and the arrow to. The full script is nothing more than creating the carrier objects, and attaching them to each other.
karlis Posted May 18, 2011 Posted May 18, 2011 not sure, but maybe it doesn't like that you try to attach already attached object.
Tombaa Posted May 18, 2011 Author Posted May 18, 2011 I just noticed, that it actually works, when the carrier is still, but when you move the carrier to somewhere else, than detach and try to attach again, than it wont attach again. If its in the same place as stated in the script, it does work. How to fix it so that it attached everywhere?
GameZoneX Posted May 18, 2011 Posted May 18, 2011 Also interrested in this. You can't ask 1 of the SAES scripters, since you are known there
karlis Posted May 18, 2011 Posted May 18, 2011 i think both elements should be streamed in before the attaching. use setElementStreamable(arrow1,flase) setElementStreamable(hitElement,flase)
Tombaa Posted May 20, 2011 Author Posted May 20, 2011 So how do you know I play in the SAES server Bularax? And I test them on a selfhosted LAN server.
GameZoneX Posted May 21, 2011 Posted May 21, 2011 So how do you know I play in the SAES server Bularax?And I test them on a selfhosted LAN server. Since i am a SWAT and DE member.
Arran Posted May 21, 2011 Posted May 21, 2011 The cH is a carrier, that I have attached the marker and the arrow to. The full script is nothing more than creating the carrier objects, and attaching them to each other. https://community.multitheftauto.com/index.php?p= ... ils&id=987 That in other words.
Tombaa Posted May 21, 2011 Author Posted May 21, 2011 Yes, that one. i have managed to find out the real problem i have. it is that the marker doesnt really attach to the carrier, so it doesnt move when the carrier does...
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