Wei Posted May 1, 2012 Share Posted May 1, 2012 what's wrong here? I got no errors ammumarker = createMarker ( 1367.34094, -1279.96411, 12.54688, "cylinder", 1.5, 255, 255, 0, 170 ) function teleportMeToAmmunationInterior () setElementInterior( source, 6 ) setElementPosition( source, 317.2380, -168.0520, 999.5930 ) end addEventHandler("onMarkerHit", ammumarker, teleportMeToAmmunationInterior) When I hit marker it disaphere Link to comment
Castillo Posted May 1, 2012 Share Posted May 1, 2012 "source" is not defined there. ammumarker = createMarker ( 1367.34094, -1279.96411, 12.54688, "cylinder", 1.5, 255, 255, 0, 170 ) function teleportMeToAmmunationInterior ( thePlayer ) setElementInterior ( thePlayer, 6 ) setElementPosition ( thePlayer, 317.2380, -168.0520, 999.5930 ) end addEventHandler ( "onMarkerHit", ammumarker, teleportMeToAmmunationInterior ) Link to comment
Wei Posted May 1, 2012 Author Share Posted May 1, 2012 1 question more. Why when I hit marker becomes to visible to all players ? When I remove root then shows error. CODE: function showMeTheWindow( ) guiSetVisible(mainWindow, true) showCursor(true) end addEventHandler("showMainWindow", root, showMeTheWindow) Link to comment
NextGenRP Posted May 1, 2012 Share Posted May 1, 2012 addEvent("showMainWindow", true) -- just in case you haven't already added the event function showMeTheWindow( ) guiSetVisible(mainWindow, true) showCursor(true) end addEventHandler("showMainWindow", getLocalPlayer(), showMeTheWindow) Try that it might be the problem Link to comment
Smart. Posted May 2, 2012 Share Posted May 2, 2012 a tip, use localPlayer instead of getLocalPlayer() 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