Jaysds1 Posted May 15, 2011 Posted May 15, 2011 How do you create a script with the marker teleporting people to an interior?
karlis Posted May 15, 2011 Posted May 15, 2011 you don't need to create it, https://wiki.multitheftauto.com/wiki/Resource:Interiors https://community.multitheftauto.com/ind ... ils&id=436
Try Posted May 15, 2011 Posted May 15, 2011 OMG MAN YOU REPOST THIS One time i posted this! But now its my time for help The Code: Marker = createMarker (1686,-2434,12.6,"cylinder", 1.5, 0, 255, 0, getRootElement() ) function MarkerHit ( hitElement, dimension ) if source == Marker then if getElementType ( hitElement ) == "player" then setElementPosition ( hitElement, 1686,-2434,1000) end end end addEventHandler ( "onMarkerHit", getRootElement(), MarkerHit ) I think its this you need Cya Later, Maria.
Infernus Posted May 15, 2011 Posted May 15, 2011 or local myMarker = createMarker( -2596.6259765625, 579.3583984375, 15.626741409302, 'cylinder', 2.0, 255, 0, 0, 150 ) function MarkerHit( hitElement, matchingDimension ) setElementInterior ( source, 1, 2233.91, 1714.73, 1011.38 ) end addEventHandler( "onMarkerHit", myMarker, MarkerHit )
Jaysds1 Posted May 16, 2011 Author Posted May 16, 2011 so what if i have multiples of Markers that i want to link?
Castillo Posted May 16, 2011 Posted May 16, 2011 Well, i would recommend using a table to store the markers. local myMarkers = {} myMarkers[1] = createMarker( -2596.6259765625, 579.3583984375, 15.626741409302, 'cylinder', 2.0, 255, 0, 0, 150 ) myMarkers[2] = createMarker( -702, 969, 11, 'cylinder', 2.0, 255, 0, 0, 150 ) --markerID, interiorID, posX, posY, posZ local markersData = { {1, 1, "2233.91", "1714.73", "1011.38"}, } function MarkerHit( hitElement, matchingDimension ) for index,markers in pairs(myMarkers) do if (source == markers) then setElementInterior (hitElement, markersData[index][2], markersData[index][3], markersData[index][4], markersData[index][5]) end end end addEventHandler( "onMarkerHit", getRootElement(), MarkerHit ) So, you only have to create the marker using the example, and add the data to the markersData table.
Jaysds1 Posted May 16, 2011 Author Posted May 16, 2011 Solidsnake14 The script you gave me is not working!!!
Castillo Posted May 16, 2011 Posted May 16, 2011 It is working, i personally tested it, show me what are you doing.
Jaysds1 Posted May 16, 2011 Author Posted May 16, 2011 (edited) NEVER MIND I put it on client-side by accident!!! LOL : Edited May 17, 2011 by Guest
Castillo Posted May 16, 2011 Posted May 16, 2011 Omg, you did triple post for no reason! use the f*** "EDIT" button!
will briggs Posted June 10, 2011 Posted June 10, 2011 All he's doing is trying to get more posts by his name, ive seen it on his other posts...
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