Sr. Bruxo Posted January 27, 2022 Share Posted January 27, 2022 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
Moderators turret001 Posted January 27, 2022 Moderators Share Posted January 27, 2022 welcome to MTA forums! I've moved your topic to the Portuguese subforums, please keep in mind that the rest of the forums are English only. Link to comment
Shady1 Posted January 27, 2022 Share Posted January 27, 2022 @Sr. BruxoOi. meu português não é muito bom, tentei entender da melhor forma possível, pode tentar o código que te enviei, se fizer perguntas mais detalhadas posso ajudar melhor local marker = createMarker(startX, startY, startZ, "cylinder", 2.0, 255, 255, 255, 0) Link to comment
Other Languages Moderators Lord Henry Posted January 27, 2022 Other Languages Moderators Share Posted January 27, 2022 @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
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