papam77 Posted July 27, 2013 Share Posted July 27, 2013 (edited) function MGPED () -- NPC -- local Christina = createPed (90, 359.14141, 173.59044, 1008.32, -90 ) setElementInterior (Christina, 3 ) setTimer(setPedAnimation, 90, 1, Christina, "FOOD", "FF_Sit_Eat1", -1, true, false) -- Markery -- local px, py, pz, typ, size = 362.1, 173.6, 1008.7, "arrow", 1.0 MGMARKER = createMarker ( px, py, pz, typ, size ) setElementInterior ( MGMARKER, 3 ) end addEventHandler ("onResourceStart", resourceRoot, MGPED ) function MGMA () if ( MGMARKER ) then local msg = "#ff9900Christina:#ffffff If you want to open a Multi-Gamemode, press F." outputChatBox (msg, source, 255,255,255, true) end end addEventHandler("onPlayerMarkerHit",getRootElement(),MGMA) Why is marker as invisible hiting to Z:1025 ? Marker is Z: 1008.7 and it is Arrow, but here is problem if i am on same place but on Z 1025 i see still Message from marker, but why? I don't see a marker on this Z position... Where is problem? Edited July 27, 2013 by Guest Link to comment
mint3d Posted July 27, 2013 Share Posted July 27, 2013 typ try it type i cant see any other errors local px, py, pz, typ, size = 362.1, 173.6, 1008.7, "arrow", 1.0 MGMARKER = createMarker ( px, py, pz, type, size ) setElementInterior ( MGMARKER, 3 ) end addEventHandler ("onResourceStart", resourceRoot, MGPED ) Link to comment
papam77 Posted July 27, 2013 Author Share Posted July 27, 2013 At floor 1 http://www.upload.ee/image/3472214/F1.png At floor 3 http://www.upload.ee/image/3472216/F3.png I am hitting to this marker at floor 3 and debugscript is empty. function MGPED () -- NPC -- local Christina = createPed (90, 359.14141, 173.59044, 1008.32, -90 ) setElementInterior (Christina, 3 ) setTimer(setPedAnimation, 90, 1, Christina, "FOOD", "FF_Sit_Eat1", -1, true, false) -- Markery -- local px, py, pz, type, size = 362.1, 173.6, 1008.7, "arrow", 1.0 MGMARKER = createMarker ( px, py, pz, type, size ) setElementInterior ( MGMARKER, 3 ) end addEventHandler ("onResourceStart", resourceRoot, MGPED ) Current code. Link to comment
mint3d Posted July 27, 2013 Share Posted July 27, 2013 So you want it to elevate you up to floor 3? Link to comment
mint3d Posted July 27, 2013 Share Posted July 27, 2013 function MGPED () -- NPC -- local Christina = createPed (90, 359.14141, 173.59044, 1008.32, -90 ) setElementInterior (Christina, 3 ) setTimer(setPedAnimation, 90, 1, Christina, "FOOD", "FF_Sit_Eat1", -1, true, false) -- Markery -- local x, y, z, type, size = 362.1, 173.6, 1008.9, "arrow", 1.3 MGMARKER = createMarker ( x, y, z, type, size ) setElementInterior ( MGMARKER, 3 ) end addEventHandler ("onResourceStart", resourceRoot, MGPED ) Link to comment
papam77 Posted July 27, 2013 Author Share Posted July 27, 2013 No, i am talking about, that if i am enter to marker in floor 1 i see this message local msg = ..... It is correct, but i see same message at Floor 3, but in floor 3 isn't marker. Why i see it ? Link to comment
mint3d Posted July 27, 2013 Share Posted July 27, 2013 Oh so you see the message in floor 1 and 3? Link to comment
mint3d Posted July 27, 2013 Share Posted July 27, 2013 function MGPED () -- NPC -- local Christina = createPed (90, 359.14141, 173.59044, 1008.32, -90 ) setElementInterior (Christina, 3 ) setTimer(setPedAnimation, 90, 1, Christina, "FOOD", "FF_Sit_Eat1", -1, true, false) -- Markery -- local x, y, z, typ, size = 362.1, 173.6, 1009.1, "arrow", 1.0 MGMARKER = createMarker ( x, y, z, type, size ) setElementInterior ( MGMARKER, 3 ) end addEventHandler ("onResourceStart", resourceRoot, MGPED ) Link to comment
papam77 Posted July 27, 2013 Author Share Posted July 27, 2013 Yes and i wanna see it only in one floor. Link to comment
papam77 Posted July 27, 2013 Author Share Posted July 27, 2013 I have try already, but i still see the message at floor 3 and at floor 1. Link to comment
mint3d Posted July 27, 2013 Share Posted July 27, 2013 function MGPED () -- NPC -- local Christina = createPed (90, 359.14141, 173.59044, 1008.32, -90 ) setElementInterior (Christina, 3 ) setTimer(setPedAnimation, 90, 1, Christina, "FOOD", "FF_Sit_Eat1", -1, true, false) -- Markery -- local x, y, z, type, size = 362.1, 173.6, 1009.1, "arrow", 1.0 MGMARKER = createMarker ( x, y, z, type, size) setElementInterior ( MGMARKER, 3 ) end ) addEventHandler ("onResourceStart", resourceRoot, MGPED ) Try this then debug it Link to comment
papam77 Posted July 27, 2013 Author Share Posted July 27, 2013 Still i get this message at floor 3 Link to comment
mint3d Posted July 27, 2013 Share Posted July 27, 2013 I dont know them i am only learner scripter wait till a pro come Link to comment
TAPL Posted July 27, 2013 Share Posted July 27, 2013 function MGPED() -- NPC -- local Christina = createPed (90, 359.14141, 173.59044, 1008.32, -90) setElementInterior(Christina, 3) setTimer(setPedAnimation, 90, 1, Christina, "FOOD", "FF_Sit_Eat1", -1, true, false) -- Markery -- local px, py, pz, typ, size = 362.1, 173.6, 1008.7, "arrow", 1.0 MGMARKER = createMarker(px, py, pz, typ, size) setElementInterior(MGMARKER, 3) end addEventHandler("onResourceStart", resourceRoot, MGPED) function MGMA(marker) if (marker == MGMARKER) then local msg = "#ff9900Christina:#ffffff If you want to open a Multi-Gamemode, press F." outputChatBox(msg, source, 255,255,255, true) end end addEventHandler("onPlayerMarkerHit", root, MGMA) Link to comment
papam77 Posted July 27, 2013 Author Share Posted July 27, 2013 Yeah, it works, thank you man 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