kaleuxe Posted May 24, 2013 Share Posted May 24, 2013 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. Espero su ayuda Link to comment
Castillo Posted May 24, 2013 Share Posted May 24, 2013 Usa getElementData, el "dataName" es "gang". Link to comment
kaleuxe Posted May 24, 2013 Author Share Posted May 24, 2013 Usa getElementData, el "dataName" es "gang". Como dije soy nuevo en esto no entiendo mucho, lo que entendí es que ¿tengo que reemplazar lo de Team por Gang? Link to comment
Castillo Posted May 24, 2013 Share Posted May 24, 2013 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 Link to comment
kaleuxe Posted May 24, 2013 Author Share Posted May 24, 2013 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 Link to comment
kaleuxe Posted May 24, 2013 Author Share Posted May 24, 2013 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 Link to comment
Castillo Posted May 24, 2013 Share Posted May 24, 2013 if ( getElementData ( source, "group_system" ) == "DCChile" ) then Ese es el problema, porque pusiste "group_system"? Link to comment
kaleuxe Posted May 24, 2013 Author Share Posted May 24, 2013 if ( getElementData ( source, "group_system" ) == "DCChile" ) then Ese es el problema, porque pusiste "group_system"? Por que con gang tampoco funciono, entonces puse el nombre del archivo para ver si funcionaba Link to comment
Castillo Posted May 24, 2013 Share Posted May 24, 2013 Si estoy en lo correcto, el script que utiliza el DayZ es mi sistema de gangs, asi que con "gang" deberia funcionar. Link to comment
kaleuxe Posted May 24, 2013 Author Share Posted May 24, 2013 Si estoy en lo correcto, el script que utiliza el DayZ es mi sistema de gangs, asi que con "gang" deberia funcionar. Gracias amigos. Ahora si funciona el problema era el nombre del grupo Gracias por la ayuda Link to comment
Recommended Posts