Jump to content

Ayuda por favor Move


eldelahoz

Recommended Posts

Hola me podrian ayudar por favor lo que quiero saber es que como puedo hacer para que la puerta se baje automaticamente pero solamente a los que esten en un team yo ya tengo las fucniones del team pero no ce como hacer lo de la puerta automatica

Funcion Team

local Nombre del team = getTeamFromName ( "Nombre del team" ) 
local Team = getPlayerTeam ( source ) 
if (Team) == Nombre del team then 

quiero saber si esta bien y como puedo hacer lo de la puerta

¡Saludos!

Link to comment
  
Reja = createObject(5020, -2508.3999023438, 2351.8999023438, 5.6999998092651, 0, 0, 270)  
area = createColCuboid( -2511.0952148438, 2347.5510253906, 3.734375, 7, 7.75,5)  
  
  
function hit(player) 
    if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)),aclGetGroup("--Aqui el ACL")) then   
          moveObject(Reja, 2500, -2508.3999023438, 2351.8999023438, 9)  
    end 
end 
  
addEventHandler("onColShapeHit", area, hit) 
  
function leave(player) 
    if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)),aclGetGroup("--Aqui el ACL--")) then 
        moveObject(Reja, 2000, -2508.3999023438, 2351.8999023438, 5.6999998092651)  
    end 
end 
  
addEventHandler("onColShapeLeave", area, leave) 
  

son Puertas auto maticas espero que te sirva

Link to comment

Si es que hablas del código del otro día:

theObject = createObject ( 980, 439.10000610352, 945.5, 3.9000000953674) 
x,y,z = getElementPosition (theObject) 
Zona = createColSphere ( x, y, z, 7.5 ) --Como es mas realista, lo ajuste a una esfera de Diametro 15 
function funcion (hitElement) 
 if getElementType( hitElement ) == "player" then 
if getTeamName( getPlayerTeam( hitElement ) ) == "TU NOMBRE DE TEAM" then 
moveObject ( theObject, 10000, 430.29998779297, 937.29998779297, -1.9000000953674 ) 
   end 
 end 
end 
addEventHandler ( "onColShapeHit", Zona, funcion ) 
  
function funcion2 (hitElement) 
 if getElementType( hitElement ) == "player" then 
if getTeamName( getPlayerTeam( hitElement ) ) == "TU NOMBRE DE TEAM" then 
moveObject ( theObject, 10000, 430.29998779297, 937.29998779297, 3.9000000953674 ) 
   end 
 end 
end 
addEventHandler ( "onColShapeLeave", Zona, funcion2 ) 

Si el código desde antes ya funcionaba, esto debería servir, pero te recomiendo probarlo bien y decirnos si hay algún problema en el código.

Link to comment
Si es que hablas del código del otro día:
theObject = createObject ( 980, 439.10000610352, 945.5, 3.9000000953674) 
x,y,z = getElementPosition (theObject) 
Zona = createColSphere ( x, y, z, 7.5 ) --Como es mas realista, lo ajuste a una esfera de Diametro 15 
function funcion (hitElement) 
 if getElementType( hitElement ) == "player" then 
if getTeamName( getPlayerTeam( hitElement ) ) == "TU NOMBRE DE TEAM" then 
moveObject ( theObject, 10000, 430.29998779297, 937.29998779297, -1.9000000953674 ) 
   end 
 end 
end 
addEventHandler ( "onColShapeHit", Zona, funcion ) 
  
function funcion2 (hitElement) 
 if getElementType( hitElement ) == "player" then 
if getTeamName( getPlayerTeam( hitElement ) ) == "TU NOMBRE DE TEAM" then 
moveObject ( theObject, 10000, 430.29998779297, 937.29998779297, 3.9000000953674 ) 
   end 
 end 
end 
addEventHandler ( "onColShapeLeave", Zona, funcion2 ) 

Si el código desde antes ya funcionaba, esto debería servir, pero te recomiendo probarlo bien y decirnos si hay algún problema en el código.

Muchas Gracias

Link to comment
  • Recently Browsing   0 members

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