Jump to content

Ayuda Gang


Recommended Posts

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

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

Es porque no estas poniendo todos los argumentos requeridos de createColCuboid.

Required Arguments

fX: 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
  • Recently Browsing   0 members

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