Jump to content

Sou Novo Alguém Pode Me Ajudar? Estou Precisando Colocar Acl Nos Dois Markers.


Recommended Posts

function teleport()
Teleport1 = createMarker ( 2946.3688964844,-1964.4616699219,11.06875038147, "arrow", 1, 255, 8, 243, 243, getRootElement() )

function MarkerHit( hitElement, matchingDimension, interior )
    setElementPosition ( hitElement,2995.9343261719,-1968.4597167969,11.06875038147 )
    setElementDimension ( hitElement, 0 )  
    setElementInterior ( hitElement, 0 )
    setElementRotation(hitElement, 0, 0, 0) 
    
end
addEventHandler( "onMarkerHit", Teleport1, MarkerHit )

end
addEventHandler ( "onResourceStart", getRootElement (), teleport )


function teleport()
Teleport2 = createMarker ( 0,0,0, "arrow", 1, 0, 255, 255, 255, getRootElement() )
setElementDimension ( Teleport2, 0 )  
setElementInterior ( Teleport2, 0 )

function MarkerHit( hitElement, matchingDimension )
    setElementPosition ( hitElement, 0,0,0)
    setElementDimension ( hitElement, 0 )  
    setElementInterior ( hitElement, 0 )
    setElementRotation(hitElement, 0, 0, 0) 
end
addEventHandler( "onMarkerHit", Teleport2, MarkerHit )

end
addEventHandler ( "onResourceStart", getRootElement (), teleport )
 

Link to comment
  • Other Languages Moderators

@Sr. BruxoPara fazer com que os markers funcionem via ACL Group, faça o seguinte nas funções onde o jogador é teleportado:

function MarkerHit (hitElement, matchingDimension, interior)
    if (hitElement and getElementType (hitElement) == "player") then -- Se o elemento que colidiu no marker existir e for um player, então:
        if (isObjectInACLGroup ("user."..getAccountName (getPlayerAccount (hitElement)), aclGetGroup ("Admin"))) then -- Se o jogador está na ACL Group Admin, então:
            setElementPosition (hitElement, 2995.9343261719, -1968.4597167969, 11.06875038147)
            setElementDimension (hitElement, 0)
            setElementInterior (hitElement, 0)
            setElementRotation (hitElement, 0, 0, 0)
        else
            outputChatBox ("Acesso negado.", hitElement, 255, 0, 0)
        end
    end
end
addEventHandler ("onMarkerHit", Teleport1, MarkerHit)

 

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