PashaBiceps Posted March 30, 2019 Share Posted March 30, 2019 I have a question, if i have two or more local markers created, how i can add more markers for example in this funcion on isElementWithinMarker? I'm doing a harverst system and i want put more cp's working for the same. The player choose the marker where he want do it My problem is, just one marker work on isElementWithinMarker, how i can add more correctly on isElementWithinMarker? Thanks in advance local dutymarker = createMarker(126.56, 254.98, 78.9, "cylinder", 2.0, 255, 0, 0, 150) function duty(thePlayer) if isElementWithinMarker(thePlayer, dutymarker) then giveWeapon(thePlayer, 22, 100, 1) else outputChatBox("You are not at the right place!", thePlayer, 255, 0, 0) end end addCommandHandler("duty", duty) Link to comment
PashaBiceps Posted March 30, 2019 Author Share Posted March 30, 2019 27 minutes ago, GodKraken said: I have a question, if i have two or more local markers created, how i can add more markers for example in this funcion on isElementWithinMarker? I'm doing a harverst system and i want put more cp's working for the same. The player choose the marker where he want do it My problem is, just one marker work on isElementWithinMarker, how i can add more correctly on isElementWithinMarker? Thanks in advance local dutymarker = createMarker(126.56, 254.98, 78.9, "cylinder", 2.0, 255, 0, 0, 150) function duty(thePlayer) if isElementWithinMarker(thePlayer, dutymarker) then giveWeapon(thePlayer, 22, 100, 1) else outputChatBox("You are not at the right place!", thePlayer, 255, 0, 0) end end addCommandHandler("duty", duty) @Edit Resolvido ! Link to comment
Moderators Patrick Posted March 30, 2019 Moderators Share Posted March 30, 2019 local dutymarker = createMarker(126.56, 254.98, 78.9, "cylinder", 2.0, 255, 0, 0, 150) local dutymarker2 = createMarker(126.56, 254.98, 78.9, "cylinder", 2.0, 255, 0, 0, 150) function duty(thePlayer) if isElementWithinMarker(thePlayer, dutymarker) or isElementWithinMarker(thePlayer, dutymarker2) then giveWeapon(thePlayer, 22, 100, 1) else outputChatBox("You are not at the right place!", thePlayer, 255, 0, 0) end end addCommandHandler("duty", duty) 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