eldelahoz Posted July 27, 2013 Share Posted July 27, 2013 Hola lo que pasa es que quiero tener una puerta autamatica para el server de dayz tengo este script objeto1 = createObject ( 980, 1067.3994140625, 1362, 12.300000190735, 0, 0, 0 ) x,y,z = getElementPosition (objeto1) Zona = createColCircle ( x,y, 5, 5 ) function Funcion1 (source) if ( getElementData ( source, "group_system" ) == "Los-Pros" ) then moveObject ( objeto1, 2000, 1067.3994140625, 1362, 18, 0, 0, 0 ) outputChatBox ( "Bienvenido", source, 0, 255, 0, true ) else outputChatBox ( "Tu no eres de #2EFEF7Los Pros!", source, 255, 0, 0, true ) end end addEventHandler ( "onColShapeHit", Zona, Funcion1 ) function Funcion2 () moveObject ( objeto1, 2000, 1067.3994140625, 1362, 12.300000190735, 0, 0, 0 ) outputChatBox ( "Abandonando Base!", source, 0, 255, 0, true ) end addEventHandler ( "onColShapeLeave", Zona, Funcion2 ) pero cuando me a acerco a la puerta no se mueve ni nada pero me dice que no pertenesco a la gang y si esto en la gang exactamente como esta escrita que podria ser ¡Saludos! Link to comment
Castillo Posted July 27, 2013 Share Posted July 27, 2013 Eso es porque el element data es "gang", ya que el DayZ usa mi gang system. Cambia "group_system" por "gang". Link to comment
eldelahoz Posted July 27, 2013 Author Share Posted July 27, 2013 a y una cosa como puedo hacer para que no detecte el area del cirulo si no de cubo yo se que seria createColCuboid pero tengo un error con el evento creo Ejemplo: objeto1 = createObject ( 980, 1067.3994140625, 1362, 12.300000190735, 0, 0, 0 ) x,y,z = getElementPosition (objeto1) Zona1 = createColCuboid ( 14.25, 16.5, 4.75 ) function Funcion1 (source) if ( getElementData ( source, "gang" ) == "Los-Pros" ) then moveObject ( objeto1, 2000, 1067.3994140625, 1362, 18, 0, 0, 0 ) outputChatBox ( "Bienvenido", source, 0, 255, 0, true ) else outputChatBox ( "Tu no eres de #2EFEF7Los Pros!", source, 255, 0, 0, true ) end end addEventHandler ( "onColShapeHit", Zona1, Funcion1 ) function Funcion2 () moveObject ( objeto1, 2000, 1067.3994140625, 1362, 12.300000190735, 0, 0, 0 ) outputChatBox ( "Abandonando Base!", source, 0, 255, 0, true ) end addEventHandler ( "onColShapeLeave", Zona1, Funcion2 ) pero me tira error Link to comment
Castillo Posted July 27, 2013 Share Posted July 27, 2013 Donde te "tira" error? en que linea? Link to comment
eldelahoz Posted July 27, 2013 Author Share Posted July 27, 2013 En la 4 la 14 y la 20 y aca una imagen Link to comment
Castillo Posted July 27, 2013 Share Posted July 27, 2013 Es porque no estas poniendo todos los argumentos requeridos de createColCuboid. Required ArgumentsfX: The X position of the collision cuboid's western side fY: The Y position of the collision cuboid's southern side fZ: The Z position of the collision cuboid's lowest side fWidth: The collision cuboid's width fDepth: The collision cuboid's depth fHeight: The collision cuboid's height Link to comment
Recommended Posts