Tete omar Posted August 2, 2012 Posted August 2, 2012 Hello there. function trucko(thePlayer) setElementData(thePlayer,"loling",0) destroyElement( Marker ) givePlayerMoney( thePlayer ,3000 ) local Marker2 = createMarker( 2642.740234375, -1791.4304199219, 9.734375, "cylinder", 2, 0, 0, 0 ) addEventHandler("onMarkerHit", Marker2, function() setElementData(thePlayer,"lolingsz",1) destroyElement( Marker2 ) givePlayerMoney( thePlayer ,4000 ) end) end addEventHandler("onMarkerHit", Marker, trucko) here's if the player hit Marker then create Marker2 i want here if the player hit Marker2 then create Marker again etc.. etc.. etc..
UAEpro Posted August 2, 2012 Posted August 2, 2012 ❝ «≈≈» ✪‹Eɴᴛᴇʀ›✪ what about the position ? ✪‹Exɪᴛ›✪ «≈≈» ❝
Tete omar Posted August 2, 2012 Author Posted August 2, 2012 sorry !! i forgot something local Marker = createMarker( 2642.814453125, -1739.0861816406, 9.734375, "cylinder", 2, 0, 0, 0 ) function Trucko(thePlayer) setElementData(thePlayer,"wder",0) destroyElement( Marker ) givePlayerMoney( thePlayer ,3000 ) local Marker2 = createMarker( 2642.740234375, -1791.4304199219, 9.734375, "cylinder", 2, 0, 0, 0 ) addEventHandler("onMarkerHit", Marker2, function() setElementData(thePlayer,"wderz",1) destroyElement( Marker2 ) givePlayerMoney( thePlayer ,4000 ) end) end addEventHandler("onMarkerHit", Marker, Trucko) I don't understand what are you trying to do. i made here when the player hit the " Marker " then create another marker and it's "Marker2" if i hit "Marker2" i think everything done , i want to repeat the action and recreate " Marker " again you understand me now ?
top sniper Posted August 2, 2012 Posted August 2, 2012 sorry !! i forgot something local Marker = createMarker( 2642.814453125, -1739.0861816406, 9.734375, "cylinder", 2, 0, 0, 0 ) function Trucko(thePlayer) setElementData(thePlayer,"wder",0) destroyElement( Marker ) givePlayerMoney( thePlayer ,3000 ) local Marker2 = createMarker( 2642.740234375, -1791.4304199219, 9.734375, "cylinder", 2, 0, 0, 0 ) addEventHandler("onMarkerHit", Marker2, function() setElementData(thePlayer,"wderz",1) destroyElement( Marker2 ) givePlayerMoney( thePlayer ,4000 ) end) end addEventHandler("onMarkerHit", Marker, Trucko) I don't understand what are you trying to do. i made here when the player hit the " Marker " then create another marker and it's "Marker2" if i hit "Marker2" i think everything done , i want to repeat the action and recreate " Marker " again you understand me now ? local Marker = createMarker( 2642.814453125, -1739.0861816406, 9.734375, "cylinder", 2, 0, 0, 0 ) function Trucko(thePlayer) setElementData(thePlayer,"wder",0) destroyElement( Marker ) givePlayerMoney( thePlayer ,3000 ) Marker2 = createMarker( 2642.740234375, -1791.4304199219, 9.734375, "cylinder", 2, 0, 0, 0 ) addEventHandler("onMarkerHit", Marker2, function() setElementData(thePlayer,"wderz",1) destroyElement( Marker2 ) givePlayerMoney( thePlayer ,4000 ) Marker = createMarker( 2642.814453125, -1739.0861816406, 9.734375, "cylinder", 2, 0, 0, 0 ) end) end addEventHandler("onMarkerHit", Marker, Trucko)
Tete omar Posted August 2, 2012 Author Posted August 2, 2012 No, i didn't mean like that, i mean unlimited , infinity marker, doesn't end or stop like this script https://community.multitheftauto.com/ind ... ls&id=5271 when you done the final marker the first marker gonna show up again etc.. and the player keeps hitting the markers till he get bored. Castillo may knows that.
jcullen Posted August 2, 2012 Posted August 2, 2012 Not really sure with this but considering the lot of other options, It would not be surprising to see how they are going to pan out just like that. WIth regard to the markers, there are some hits and misses that you might as well consider as blunders with putting everything together. Hope that helps you out with the issue. Looks really interesting to see it actually.
myonlake Posted August 2, 2012 Posted August 2, 2012 Just make a table of positions and then make the function(s) call the table and create the next marker when you hit a marker. Easy as what.
Tete omar Posted August 2, 2012 Author Posted August 2, 2012 You mean a route system? route system ?? what about it ?
Tete omar Posted August 2, 2012 Author Posted August 2, 2012 You mean a route system? route system ?? what about it ? ------------------------------------------------------------------------------------------------------------------- Just make a table of positions and then make the function(s) call the table and create the next marker when you hit a marker. Easy as what. didn't you understand what i want yet ?
myonlake Posted August 2, 2012 Posted August 2, 2012 Please, learn LUA first before starting to ask these questions which can be solved with one function. Commands /playmarker - Warps you to the marker play thing.. local marker1 = createMarker(-18.08, 25.42, 2.11, "cylinder", 3, 255, 0, 255, 100) addEventHandler("onMarkerHit", root, function(hitElement, matchingDimension) if getElementType(hitElement) == "player" and matchingDimension then if source == marker1 then destroyElement(marker1) marker2 = createMarker(-13.13, 33.48, 2.11, "cylinder", 3, 255, 0, 255, 100) playSoundFrontEnd(hitElement, 1) givePlayerMoney(hitElement, 4000) elseif source == marker2 then destroyElement(marker2) marker1 = createMarker(-18.08, 25.42, 2.11, "cylinder", 3, 255, 0, 255, 100) playSoundFrontEnd(hitElement, 1) givePlayerMoney(hitElement, 4000) end end end ) addCommandHandler("playmarker", function(player, cmd) if getPedOccupiedVehicle(player) then removePedFromVehicle(player) end setElementPosition(player, -8.83, 26.15, 3.11) setElementInterior(player, 0) setElementDimension(player, 0) end )
Tete omar Posted August 2, 2012 Author Posted August 2, 2012 (edited) Please, learn LUA first before starting to ask these questions which can be solved with one function.Commands /playmarker - Warps you to the marker play thing.. local marker1 = createMarker(-18.08, 25.42, 2.11, "cylinder", 3, 255, 0, 255, 100) addEventHandler("onMarkerHit", root, function(hitElement, matchingDimension) if getElementType(hitElement) == "player" and matchingDimension then if source == marker1 then destroyElement(marker1) marker2 = createMarker(-13.13, 33.48, 2.11, "cylinder", 3, 255, 0, 255, 100) playSoundFrontEnd(hitElement, 1) givePlayerMoney(hitElement, 4000) elseif source == marker2 then destroyElement(marker2) marker1 = createMarker(-18.08, 25.42, 2.11, "cylinder", 3, 255, 0, 255, 100) playSoundFrontEnd(hitElement, 1) givePlayerMoney(hitElement, 4000) end end end ) addCommandHandler("playmarker", function(player, cmd) if getPedOccupiedVehicle(player) then removePedFromVehicle(player) end setElementPosition(player, -8.83, 26.15, 3.11) setElementInterior(player, 0) setElementDimension(player, 0) end ) Are you kidding me ? , this is absolutely out of the subject and you telling me learn lua ? thanks anyway it's not what i want also it's not working correctly. sorry !! i forgot something local Marker = createMarker( 2642.814453125, -1739.0861816406, 9.734375, "cylinder", 2, 0, 0, 0 ) function Trucko(thePlayer) setElementData(thePlayer,"wder",0) destroyElement( Marker ) givePlayerMoney( thePlayer ,3000 ) local Marker2 = createMarker( 2642.740234375, -1791.4304199219, 9.734375, "cylinder", 2, 0, 0, 0 ) addEventHandler("onMarkerHit", Marker2, function() setElementData(thePlayer,"wderz",1) destroyElement( Marker2 ) givePlayerMoney( thePlayer ,4000 ) end) end addEventHandler("onMarkerHit", Marker, Trucko) I don't understand what are you trying to do. i made here when the player hit the " Marker " then create another marker and it's "Marker2" if i hit "Marker2" i think everything done , i want to repeat the action and recreate " Marker " again you understand me now ? Just make a table of positions and then make the function(s) call the table and create the next marker when you hit a marker. Easy as what. Edited August 2, 2012 by Guest
Castillo Posted August 2, 2012 Posted August 2, 2012 1: I recommend making it client side the creation of the marker. 2: I recommend using a table with the positions and money reward. 3: A route system is one first marker then another and another until it reach back to first.
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