Jump to content

Ayuda


kaleuxe

Recommended Posts

Necesito ayuda con mi server dayz.

Lo que pasa es que agregue las puertas a las bases para que se abran solo a los del Team, pero el problema es que en Dayz solo hay 2 Team que son: Player y Zombies y los otros son Gang (Pandillas), las cuales no son las mismas. Bueno resulta que no se que tengo que hacer para que las puertas se abran solo a los del Gang y no a los del Team.

Aquí esta el archivo que yo ocupo:

objeto = createObject ( 971, 1082.69921875, 1302.8994140625, 13.39999961853, 0, 0, 0 ) 
x,y,z = getElementPosition (objeto) 
Zona = createColCircle ( x,y, 5, 5 ) 
  
function Funcion (source) 
    playerTeam = getPlayerTeam ( source ) 
    Clann = getTeamFromName ( "Player" ) 
    if ( playerTeam ) == Clann then 
        moveObject ( objeto, 6000, 1074.69921875, 1302.8994140625, 13.39999961853, 0, 0, 0 ) 
    outputChatBox ( "Bienvenido", source, 0, 255, 0, true ) 
    else 
    outputChatBox ( "Tu no eres del clan!", source, 255, 0, 0, true ) 
end 
end 
addEventHandler ( "onColShapeHit", Zona, Funcion ) 
  
function Funcion2 () 
        moveObject ( objeto, 6000, 1082.69921875, 1302.8994140625, 13.39999961853, 0, 0, 0 ) 
        outputChatBox ( "Abandonando Base!", source, 0, 255, 0, true ) 
end 
addEventHandler ( "onColShapeLeave", Zona, Funcion2 ) 
  

PD: Soy muy nuevo en esto. :D

Espero su ayuda :wink:

Link to comment
    playerTeam = getPlayerTeam ( source ) 
    Clann = getTeamFromName ( "Player" ) 
    if ( playerTeam ) == Clann then 

Eso lo cambias por algo asi:

if ( getElementData ( source, "gang" ) == "EL NOMBRE DE LA GANG" ) then 

Probé de muchas formas, pero aun no funciona. Gracias de todas formas por tratar de ayuda :wink:

Link to comment
objeto = createObject ( 971, 1082.69921875, 1302.8994140625, 13.39999961853, 0, 0, 0 ) 
x,y,z = getElementPosition (objeto) 
Zona = createColCircle ( x,y, 5, 5 ) 
  
function Funcion (source) 
if ( getElementData ( source, "group_system" ) == "DCChile" ) then 
        moveObject ( objeto, 6000, 1074.69921875, 1302.8994140625, 13.39999961853, 0, 0, 0 ) 
    outputChatBox ( "Bienvenido", source, 0, 255, 0, true ) 
    else 
    outputChatBox ( "Tu no eres del clan!", source, 255, 0, 0, true ) 
end 
end 
addEventHandler ( "onColShapeHit", Zona, Funcion ) 
  
function Funcion2 () 
        moveObject ( objeto, 6000, 1082.69921875, 1302.8994140625, 13.39999961853, 0, 0, 0 ) 
        outputChatBox ( "Abandonando Base!", source, 0, 255, 0, true ) 
end 
addEventHandler ( "onColShapeLeave", Zona, Funcion2 ) 
  

PD: Estoy aprendiendo este tipo de lenguaje así que si vez algún me lo dices :oops:

Link to comment
  • Recently Browsing   0 members

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