mjau Posted February 3, 2013 Posted February 3, 2013 I really wouldnt call it a good tutorial since firstly, u use a text editor to say things, which is good but u should use a mic or write a bit faster and second why the heck do u have your windows sound enabled?, the car u are sitting in makes much noise, your skype and everything Taht was just some suggestions.
Anderl Posted February 3, 2013 Posted February 3, 2013 Yeah, agree - should add some more effort on videos.
xXMADEXx Posted February 4, 2013 Author Posted February 4, 2013 Next video's guys, i will add more details and effort.
maky55 Posted February 12, 2013 Posted February 12, 2013 is there anyway to change this bit to the players team?: local data = getElementData(player,"job") if (data=="Admin") (Full script): object = createObject(2933, 2582.1000976563, -2123.6000976563, 1.3999999761581) marker = createMarker(2581.8000488281, -2123, -0.5, "cylinder", 2, 100, 0, 0, 100) function gateo(player) local data = getElementData(player,"job") if (data=="Admin") then moveObject(object, 2000, 2582.1000976563, -2123.6000976563, -5) end addEventHandler("onMarkerHit", gateo) function gatec(player) -- makes a function to close the gate moveObject(object,2933, 2582.1000976563, -2123.6000976563, 1.3999999761581) end addEventHandler("onMarkerLeave", gatec) end
Castillo Posted February 12, 2013 Posted February 12, 2013 object = createObject(2933, 2582.1000976563, -2123.6000976563, 1.3999999761581) marker = createMarker(2581.8000488281, -2123, -0.5, "cylinder", 2, 100, 0, 0, 100) function gateo ( player ) local team = getPlayerTeam ( player ) local teamName = ( team and getTeamName ( team ) or "" ) if ( teamName == "Admin" ) then moveObject ( object, 2000, 2582.1000976563, -2123.6000976563, -5 ) end end addEventHandler ( "onMarkerHit", root, gateo ) function gatec ( player ) moveObject ( object, 2933, 2582.1000976563, -2123.6000976563, 1.3999999761581 ) end addEventHandler ( "onMarkerLeave", root, gatec )
pcisoft Posted July 4, 2016 Posted July 4, 2016 Thank you, people :fp: now I know why when I was an idiot scripter this script haven't worked :fp: Reason: addEventHandler("onMarkerHit", gateo) Example from Wiki: (https://wiki.multitheftauto.com/wiki/OnMarkerHit) local myMarker = createMarker(-2596.625, 579.358, 15.626, 'cylinder', 2.0, 255, 0, 0, 150) -- create myMarker function MarkerHit( hitElement, matchingDimension ) -- define MarkerHit function for the handler local elementType = getElementType( hitElement ) -- get the hit element's type outputChatBox( elementType.." inside myMarker", getRootElement(), 255, 255, 0 ) -- attach the element's type with the text, and output it end addEventHandler( "onMarkerHit", myMarker, MarkerHit ) -- attach onMarkerHit event to MarkerHit function he forgot to write the marker before the function :fp: xXMADEXx's script haven't worked with me cauz there is no specific marker to hit or to leave in the addEventHandler
Recommended Posts