LiOneLMeSsIShoT Posted March 14, 2014 Share Posted March 14, 2014 joinmarker = createMarker (1727, -1638.5, 19, 'cylinder', 2.0, 255, 0, 0, 150) setElementInterior (joinmarker, 18) function firstJoin ( hitElement ) if getElementType ( hitElement ) and not isPedInVehicle ( hitElement ) then spawnPlayer (source, 2307.8564453125, 556.2001953125, 7.78125+1) end end addEventHandler ("onMarkerHit", joinmarker, firstJoin) I've made this marker to spawn the player to some place but i need this marker don't work before the player hit another marker, , could you help please? Link to comment
Hell-Mate Posted March 14, 2014 Share Posted March 14, 2014 joinmarker = createMarker (1727, -1638.5, 19, 'cylinder', 2.0, 255, 0, 0, 150) setElementInterior (joinmarker, 18) function firstJoin ( hitElement ) if getElementType ( hitElement ) and not isPedInVehicle ( hitElement ) then spawnPlayer (source, 2307.8564453125, 556.2001953125, 7.78125+1) end end addEventHandler ("onMarkerHit", joinmarker, firstJoin) I've made this marker to spawn the player to some place but i need this marker don't work before the player hit another marker, , could you help please? You mean u want this marker ( joinmarker ) appear when thePlayer hit another marker so this marker appear ? Link to comment
LiOneLMeSsIShoT Posted March 14, 2014 Author Share Posted March 14, 2014 joinmarker = createMarker (1727, -1638.5, 19, 'cylinder', 2.0, 255, 0, 0, 150) setElementInterior (joinmarker, 18) function firstJoin ( hitElement ) if getElementType ( hitElement ) and not isPedInVehicle ( hitElement ) then spawnPlayer (source, 2307.8564453125, 556.2001953125, 7.78125+1) end end addEventHandler ("onMarkerHit", joinmarker, firstJoin) I've made this marker to spawn the player to some place but i need this marker don't work before the player hit another marker, , could you help please? You mean u want this marker ( joinmarker ) appear when thePlayer hit another marker so this marker appear ? Exactlly ! ! ! Link to comment
Hell-Mate Posted March 14, 2014 Share Posted March 14, 2014 (edited) --Server side appear= createMarker (1725, -1638.5, 19, 'cylinder', 2.0, 255, 0, 0, 150) -- this marker when the player hit the another marker will appear. setElementInterior (joinmarker, 18) function firstJoin ( hitElement ) if getElementType ( hitElement ) and not isPedInVehicle ( hitElement ) then triggerClientEvent ( "MarkerAppear", source ) -- To trigger the client event end end addEventHandler ("onMarkerHit", appear, firstJoin) ' -- Client function marker () createMarker (1727, -1638.5, 19, 'cylinder', 2.0, 255, 0, 0, 150) end addEvent ( "MarkerAppear", true ) addEventHandler ( "MarkerAppear", root, marker ) I made the marker in client side to make it only appear for only one player that will hit the another marker. i hope this will work. Edited March 14, 2014 by Guest Link to comment
LiOneLMeSsIShoT Posted March 14, 2014 Author Share Posted March 14, 2014 --Server side appear= createMarker (1725, -1638.5, 19, 'cylinder', 2.0, 255, 0, 0, 150) -- this marker when the player hit the another marker will appear. setElementInterior (joinmarker, 18) function firstJoin ( hitElement ) if getElementType ( hitElement ) and not isPedInVehicle ( hitElement ) then triggerClientEvent ( "MarkerAppear", source ) -- To trigger the client event end end addEventHandler ("onMarkerHit", appear, firstJoin) ' -- Client function marker () createMarker (1727, -1638.5, 19, 'cylinder', 2.0, 255, 0, 0, 150) end addEvent ( "MarkerAppear", true ) addEventHandler ( "MarkerAppear, root, marker ) I made the marker in client side to make it only appear for only one player that will hit the another marker. i hope this will work. Dosen't work, No Errors, + My point here: I think this script will only make another marker when you hit the other?, i don't need like that! i need when you hit other marker this marker will work, like if you don't hit another marker and moved on it it will say "You're not ready Yet to join". I hope you understand. Link to comment
TAPL Posted March 14, 2014 Share Posted March 14, 2014 --Server side appear= createMarker (1725, -1638.5, 19, 'cylinder', 2.0, 255, 0, 0, 150) -- this marker when the player hit the another marker will appear. setElementInterior (joinmarker, 18) function firstJoin ( hitElement ) if getElementType ( hitElement ) and not isPedInVehicle ( hitElement ) then triggerClientEvent ( "MarkerAppear", source ) -- To trigger the client event end end addEventHandler ("onMarkerHit", appear, firstJoin) ' -- Client function marker () createMarker (1727, -1638.5, 19, 'cylinder', 2.0, 255, 0, 0, 150) end addEvent ( "MarkerAppear", true ) addEventHandler ( "MarkerAppear, root, marker ) I made the marker in client side to make it only appear for only one player that will hit the another marker. i hope this will work. Dosen't work, No Errors, + My point here: I think this script will only make another marker when you hit the other?, i don't need like that! i need when you hit other marker this marker will work, like if you don't hit another marker and moved on it it will say "You're not ready Yet to join". I hope you understand. No Errors? Why you lying? I'm pretty sure this line will give a clear error in the debug. addEventHandler ( "MarkerAppear, root, marker ) What FaDY-Jo posted doesn't make any sense it's all wrong. Link to comment
LiOneLMeSsIShoT Posted March 14, 2014 Author Share Posted March 14, 2014 --Server side appear= createMarker (1725, -1638.5, 19, 'cylinder', 2.0, 255, 0, 0, 150) -- this marker when the player hit the another marker will appear. setElementInterior (joinmarker, 18) function firstJoin ( hitElement ) if getElementType ( hitElement ) and not isPedInVehicle ( hitElement ) then triggerClientEvent ( "MarkerAppear", source ) -- To trigger the client event end end addEventHandler ("onMarkerHit", appear, firstJoin) ' -- Client function marker () createMarker (1727, -1638.5, 19, 'cylinder', 2.0, 255, 0, 0, 150) end addEvent ( "MarkerAppear", true ) addEventHandler ( "MarkerAppear, root, marker ) I made the marker in client side to make it only appear for only one player that will hit the another marker. i hope this will work. Dosen't work, No Errors, + My point here: I think this script will only make another marker when you hit the other?, i don't need like that! i need when you hit other marker this marker will work, like if you don't hit another marker and moved on it it will say "You're not ready Yet to join". I hope you understand. No Errors? Why you lying? I'm pretty sure this line will give a clear error in the debug. addEventHandler ( "MarkerAppear, root, marker ) What FaDY-Jo posted doesn't make any sense it's all wrong. Sir, I'm saying no errors because i've fixed it before starting the script It's to : function marker () createMarker (1727, -1638.5, 19, 'cylinder', 2.0, 255, 0, 0, 150) end addEvent ( "MarkerAppear", true ) addEventHandler ("MarkerAppear", root, marker ) Whatever Still the error not fixed, Could you Help me Mr Tapl? Link to comment
TAPL Posted March 14, 2014 Share Posted March 14, 2014 anothermarker = createMarker(x, y, z, 'cylinder', 2.0, 255, 0, 0, 150) -- replace x y z setElementInterior(anothermarker, 18) function firstJoin(hitElement) if hitElement == localPlayer and not isPedInVehicle(hitElement) then if source == anothermarker and not isElement(joinmarker) then joinmarker = createMarker(1727, -1638.5, 19, 'cylinder', 2.0, 255, 0, 0, 150) setElementInterior(joinmarker, 18) elseif source == joinmarker then triggerServerEvent("spawnMe", localPlayer) end end end addEventHandler("onClientMarkerHit", root, firstJoin) addEvent("spawnMe", true) addEventHandler("spawnMe", root, function() spawnPlayer(source, 2307.8564453125, 556.2001953125, 7.78125+1) setCameraTarget(source) end) 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