Michael_Tuner Posted April 2, 2010 Share Posted April 2, 2010 I added this to Play resource and tested it didn't work what to do? function elements ( name ) -- create an object at a specified position with a specified rotation lift = createObject ( 2951, 1195.3864746094, -1779.8454589844, 12.482206344604, 89.775024414063, 0, 270.22497558594 ) triggermarker = createMarker ( 1194.0065917969, -1780.0831298828, 12.503089904785, "corona", 1, 255,255,255,0 ) rtriggermarker = createmarker ( 1194.0065917969, -1780.0831298828, 33.611827850342, "corona", 1, 0, 0, 0, 0 ) rmarker = createMarker ( 1197.3414306641, -1778.1151123047, 33.611827850342, "corona", 2, 0, 0, 0, 0 ) rmarker2 = createMarker ( 1197.1531982422, -1783.1392822266, 33.681777954102, "corona", 2, 0, 0, 0, 0) rmarker3 = createMarker ( 1191.3764648438, -1783.7474365234, 33.643081665039, "corona", 2, 0, 0, 0, 0 ) end addEventHandler ( "onResourceStart", getRootElement(), elements ) addEventHandler( 'onMarkerHit', getRootElement(), function liftup(theMarker, thePlayer) if theMarker == triggermarker and pedSkin(thePlayer) = 59 then move = moveObject ( "lift", 500, 1195.3864746094, -1779.8454589844, 32.417213439941 ) end end ) The object(lift) was supposed to spawn right? but it never did, what to do? Link to comment
`Dmz Posted April 2, 2010 Share Posted April 2, 2010 I added this to Play resource and tested it didn't work what to do?The object(lift) was supposed to spawn right? but it never did, what to do? When you add function in to the event handler by this way you don't need to type function name, because it's invalid, also I changed element in first event handler to getResourceRootElement(getThisResource()) and also moveObject func haves got bad parameters, you see that the first parameter sais "object theObject" that means it can't be a string. One more thing, in second event handler you typed in second parameter "getRootElement()", but you need to type there marker variable. function elements ( name ) -- create an object at a specified position with a specified rotation lift = createObject ( 2951, 1195.3864746094, -1779.8454589844, 12.482206344604, 89.775024414063, 0, 270.22497558594 ) triggermarker = createMarker ( 1194.0065917969, -1780.0831298828, 12.503089904785, "corona", 1, 255,255,255,0 ) rtriggermarker = createMarker ( 1194.0065917969, -1780.0831298828, 33.611827850342, "corona", 1, 0, 0, 0, 0 ) rmarker = createMarker ( 1197.3414306641, -1778.1151123047, 33.611827850342, "corona", 2, 0, 0, 0, 0 ) rmarker2 = createMarker ( 1197.1531982422, -1783.1392822266, 33.681777954102, "corona", 2, 0, 0, 0, 0) rmarker3 = createMarker ( 1191.3764648438, -1783.7474365234, 33.643081665039, "corona", 2, 0, 0, 0, 0 ) end addEventHandler ( "onResourceStart", getResourceRootElement(getThisResource()), elements ) addEventHandler( 'onMarkerHit', getRootElement(), function (theMarker, thePlayer) if theMarker == triggermarker and pedSkin(thePlayer) = 59 then move = moveObject ( lift, 500, 1195.3864746094, -1779.8454589844, 32.417213439941 ) end end ) Try now and sorry for my bad English Link to comment
Michael_Tuner Posted April 2, 2010 Author Share Posted April 2, 2010 i used it into first in Freeroam but didn't work so I used in play resource 2nd Both didn't work? What could have had happened? Link to comment
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