Jump to content

Help CP


Recommended Posts

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
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
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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...