Jump to content

Help me with this please :D


iFoReX

Recommended Posts

I want do a elevator move with a password :D But I dont know how do ? please help me :

  
    local objeto = createObject ( 2669, 1090.67834, -2704.56226, 8.48407, 0, 0, 270) 
    local Col = createColCuboid ( 1088, -2705.56226, 7.5, 5, 2, 4 ) 
  
     local mover = moveObject 
     
     local tiempo = setTimer 
  
function Elevador(player) 
  
 local accName = getAccountName ( getPlayerAccount ( player ) ) -- get his account name 
    if isObjectInACLGroup ("user.".. accName, aclGetGroup ( "Everyone" ) ) then 
        mover(objeto ,5000 ,1090.67834, -2704.56226, 18, 0, 0, 0) 
        tiempo (mover, 10000, 1, objeto, 5000, 1090.67834, -2704.56226, 9) 
    end 
end 
  
addEventHandler("onColShapeHit", Col, Elevador) 
  
  
    local objeto2 = createObject ( 2669, 1111.05212, -3085.17236, 3.55537, 0, 0, 270) 
    local Col2 = createColCuboid ( 1088, 1111.05212, -3085.17236, 3.55537 ) 
  
function Elevador2(player) 
  
 local accName = getAccountName ( getPlayerAccount ( player ) ) -- get his account name 
    if isObjectInACLGroup ("user.".. accName, aclGetGroup ( "Everyone" ) ) then 
        mover(objeto2 ,5000 ,1111.05212, -3085.17236, 3.55537) 
        tiempo (mover, 10000, 1, objeto2, 5000, 1111.05212, -3085.17236, 3.55537) 
    end 
end 
  
function col2Hit (hitPlayer) 
    if ( hitPlayer == localPlayer ) then 
        guiSetVisible (GUIEditor_Window[1], true) 
        showCursor (true) 
    end 
end 
addEventHandler ("onClientColShapeHit", Col2, col2Hit) 
  
function crearmygui() 
  
GUIEditor_Window = {} 
GUIEditor_Button = {} 
GUIEditor_Edit = {} 
  
GUIEditor_Window[1] = guiCreateWindow(195,167,372,244,"Gui Sistema De Mover Objetos",false) 
GUIEditor_Button[1] = guiCreateButton(61,123,231,49,"Mover",false,GUIEditor_Window[1]) 
GUIEditor_Edit[1] = guiCreateEdit(53,63,256,44,"Porfavor Pon la Contraseña Correcta----",false,GUIEditor_Window[1]) 
GUIEditor_Button[2] = guiCreateButton(60,180,233,52,"Cancelar",false,GUIEditor_Window[1]) 
     
    end 
end 
  

Link to comment

This?

GUIEditor_Window = {} 
GUIEditor_Button = {} 
GUIEditor_Edit = {} 
  
GUIEditor_Window[1] = guiCreateWindow(195,167,372,244,"Gui Sistema De Mover Objetos",false) 
GUIEditor_Button[1] = guiCreateButton(61,123,231,49,"Mover",false,GUIEditor_Window[1]) 
GUIEditor_Edit[1] = guiCreateEdit(53,63,256,44,"Porfavor Pon la Contraseña Correcta----",false,GUIEditor_Window[1]) 
GUIEditor_Button[2] = guiCreateButton(60,180,233,52,"Cancelar",false,GUIEditor_Window[1]) 
guiSetVisible ( GUIEditor_Window[1], false ) 
  
local objeto = createObject ( 2669, 1090.67834, -2704.56226, 8.48407, 0, 0, 270) 
local Col = createColCuboid ( 1088, -2705.56226, 7.5, 5, 2, 4 ) 
  
addCommandHandler ( 'yourPassword', 
    function ( ) 
        moveObject ( objecto, 5000, 1090.67834, -2704.56226, 18, 0, 0, 0 ) 
        setTimer ( moveObject, 10000, 1, objecto, 5000, 1090.67834, -2704.56226, 9 ) 
    end 
) 
  
local objeto2 = createObject ( 2669, 1111.05212, -3085.17236, 3.55537, 0, 0, 270) 
local Col2 = createColCuboid ( 1088, 1111.05212, -3085.17236, 3.55537 ) 
  
addCommandHandler ( 'yourPassword', 
    function ( ) 
        moveObject ( objecto2, 5000, 1111.05212, -3085.17236, 3.55537 ) 
        setTimer ( moveObject, 10000, 1, objecto2, 5000, 1111.05212, -3085.17236, 3.55537 ) 
    end 
) 
  
addEventHandler ( 'onClientColShapeHit', root, 
    function ( ) 
        if ( source == Col2 ) then 
            guiSetVisible ( GUIEditor_Window[1], true ) 
            showCursor ( true ) 
        end 
    end 
) 

Change yourPassword to the password you want but don't delete ' '.

Link to comment

Like this?

GUIEditor_Window = {} 
GUIEditor_Button = {} 
GUIEditor_Edit = {} 
  
GUIEditor_Window[1] = guiCreateWindow(195,167,372,244,"Gui Sistema De Mover Objetos",false) 
GUIEditor_Button[1] = guiCreateButton(61,123,231,49,"Mover",false,GUIEditor_Window[1]) 
GUIEditor_Edit[1] = guiCreateEdit(53,63,256,44,"Porfavor Pon la Contraseña Correcta----",false,GUIEditor_Window[1]) 
GUIEditor_Button[2] = guiCreateButton(60,180,233,52,"Cancelar",false,GUIEditor_Window[1]) 
guiSetVisible ( GUIEditor_Window[1], false ) 
  
local objeto = createObject ( 2669, 1090.67834, -2704.56226, 8.48407, 0, 0, 270) 
local Col = createColCuboid ( 1088, -2705.56226, 7.5, 5, 2, 4 ) 
  
addCommandHandler ( 'move', 
    function ( move, password ) 
        if ( password == 'yourPassword' ) then 
            moveObject ( objecto, 5000, 1090.67834, -2704.56226, 18, 0, 0, 0 ) 
            setTimer ( moveObject, 10000, 1, objecto, 5000, 1090.67834, -2704.56226, 9 ) 
        else 
            outputChatBox ( 'Incorrect password!' ); 
        end 
    end 
) 
  
local objeto2 = createObject ( 2669, 1111.05212, -3085.17236, 3.55537, 0, 0, 270) 
local Col2 = createColCuboid ( 1088, 1111.05212, -3085.17236, 3.55537 ) 
  
addCommandHandler ( 'move2', 
    function ( move, password ) 
        if ( password == 'yourPassword' ) then 
            moveObject ( objecto2, 5000, 1111.05212, -3085.17236, 3.55537 ) 
            setTimer ( moveObject, 10000, 1, objecto2, 5000, 1111.05212, -3085.17236, 3.55537 ) 
        else 
            outputChatBox ( 'Incorrect password!' ); 
        end 
    end 
) 
  
addEventHandler ( 'onClientColShapeHit', root, 
    function ( ) 
        if ( source == Col2 ) then 
            guiSetVisible ( GUIEditor_Window[1], true ) 
            showCursor ( true ) 
        end 
    end 
) 

Example: /move 1234 /move2 1234

You need change yourPassword to your password.

Link to comment

Ahh.. I forgot this :/

GUIEditor_Window = {} 
GUIEditor_Button = {} 
GUIEditor_Edit = {} 
  
GUIEditor_Window[1] = guiCreateWindow(195,167,372,244,"Gui Sistema De Mover Objetos",false) 
GUIEditor_Button[1] = guiCreateButton(61,123,231,49,"Mover",false,GUIEditor_Window[1]) 
GUIEditor_Edit[1] = guiCreateEdit(53,63,256,44,"Porfavor Pon la Contraseña Correcta----",false,GUIEditor_Window[1]) 
GUIEditor_Button[2] = guiCreateButton(60,180,233,52,"Cancelar",false,GUIEditor_Window[1]) 
guiSetVisible ( GUIEditor_Window[1], false ) 
  
local objeto = createObject ( 2669, 1090.67834, -2704.56226, 8.48407, 0, 0, 270) 
local Col = createColCuboid ( 1088, -2705.56226, 7.5, 5, 2, 4 ) 
  
addEventHandler ( 'onClientGUIClick', root, 
    function ( ) 
        if ( source == GUIEditor_Button[1] ) then 
            local text = guiGetText ( GUIEditor_Edit[1] ) 
            if ( text == 'yourPassword' ) then 
                moveObject ( objecto, 5000, 1090.67834, -2704.56226, 18, 0, 0, 0 ) 
                setTimer ( moveObject, 10000, 1, objecto, 5000, 1090.67834, -2704.56226, 9 ) 
            else 
                outputChatBox ( 'Incorrect password!' ); 
            end 
        end 
    end 
) 
  
local objeto2 = createObject ( 2669, 1111.05212, -3085.17236, 3.55537, 0, 0, 270) 
local Col2 = createColCuboid ( 1088, 1111.05212, -3085.17236, 3.55537 ) 
  
addEventHandler ( 'onClientGUIClick', root, 
    function ( ) 
        if ( source == GUIEditor_Button[1] ) then 
            local text = guiGetText ( GUIEditor_Edit[1] ) 
            if ( text == 'yourPassword' ) then 
                moveObject ( objecto2, 5000, 1111.05212, -3085.17236, 3.55537 ) 
                setTimer ( moveObject, 10000, 1, objecto2, 5000, 1111.05212, -3085.17236, 3.55537 ) 
            else 
                outputChatBox ( 'Incorrect password!' ); 
            end 
        end 
    end 
) 
  
addEventHandler ( 'onClientColShapeHit', root, 
    function ( ) 
        if ( source == Col2 ) then 
            guiSetVisible ( GUIEditor_Window[1], true ) 
            showCursor ( true ) 
        end 
    end 
) 

Link to comment

this is the debbugging

[2012-03-26 09:11:50] Rejas restarted successfully 
[2012-03-26 09:12:02] restart: Requested by Console 
[2012-03-26 09:12:02] restart: Resource restarting... 
[2012-03-26 09:12:02] Stopping Rejas 
[2012-03-26 09:12:02] Resource 'Rejas' changed, reloading and starting 
[2012-03-26 09:12:02] WARNING: Rejas/xD.lua [Server] is encoded in ANSI instead of UTF-8.  Please convert your file to UTF-8. 
[2012-03-26 09:12:02] Some files in 'Rejas' use deprecated functions. 
[2012-03-26 09:12:02] Use the 'upgrade' command to perform a basic upgrade of resources. 
[2012-03-26 09:12:02] Starting Rejas 
[2012-03-26 09:12:02] WARNING: Script 'Rejas\xD.lua' is not encoded in UTF-8.  Loading as ANSI... 
[2012-03-26 09:12:02] ERROR: Rejas\.lua:6: attempt to call global 'GuiCreateWindow' (a nil value) 
[2012-03-26 09:12:02] Rejas restarted successfully 
  

Link to comment
Ahh.. I forgot this :/
GUIEditor_Window = {} 
GUIEditor_Button = {} 
GUIEditor_Edit = {} 
  
GUIEditor_Window[1] = guiCreateWindow(195,167,372,244,"Gui Sistema De Mover Objetos",false) 
GUIEditor_Button[1] = guiCreateButton(61,123,231,49,"Mover",false,GUIEditor_Window[1]) 
GUIEditor_Edit[1] = guiCreateEdit(53,63,256,44,"Porfavor Pon la Contraseña Correcta----",false,GUIEditor_Window[1]) 
GUIEditor_Button[2] = guiCreateButton(60,180,233,52,"Cancelar",false,GUIEditor_Window[1]) 
guiSetVisible ( GUIEditor_Window[1], false ) 
  
local objeto = createObject ( 2669, 1090.67834, -2704.56226, 8.48407, 0, 0, 270) 
local Col = createColCuboid ( 1088, -2705.56226, 7.5, 5, 2, 4 ) 
  
addEventHandler ( 'onClientGUIClick', root, 
    function ( ) 
        if ( source == GUIEditor_Button[1] ) then 
            local text = guiGetText ( GUIEditor_Edit[1] ) 
            if ( text == 'yourPassword' ) then 
                moveObject ( objecto, 5000, 1090.67834, -2704.56226, 18, 0, 0, 0 ) 
                setTimer ( moveObject, 10000, 1, objecto, 5000, 1090.67834, -2704.56226, 9 ) 
            else 
                outputChatBox ( 'Incorrect password!' ); 
            end 
        end 
    end 
) 
  
local objeto2 = createObject ( 2669, 1111.05212, -3085.17236, 3.55537, 0, 0, 270) 
local Col2 = createColCuboid ( 1088, 1111.05212, -3085.17236, 3.55537 ) 
  
addEventHandler ( 'onClientGUIClick', root, 
    function ( ) 
        if ( source == GUIEditor_Button[1] ) then 
            local text = guiGetText ( GUIEditor_Edit[1] ) 
            if ( text == 'yourPassword' ) then 
                moveObject ( objecto2, 5000, 1111.05212, -3085.17236, 3.55537 ) 
                setTimer ( moveObject, 10000, 1, objecto2, 5000, 1111.05212, -3085.17236, 3.55537 ) 
            else 
                outputChatBox ( 'Incorrect password!' ); 
            end 
        end 
    end 
) 
  
addEventHandler ( 'onClientColShapeHit', root, 
    function ( ) 
        if ( source == Col2 ) then 
            guiSetVisible ( GUIEditor_Window[1], true ) 
            showCursor ( true ) 
        end 
    end 
) 

This post Or Dont ?

Link to comment

Here:

GUIEditor_Window = {} 
GUIEditor_Button = {} 
GUIEditor_Edit = {} 
  
GUIEditor_Window[1] = guiCreateWindow(195,167,372,244,"Gui Sistema De Mover Objetos",false) 
GUIEditor_Button[1] = guiCreateButton(61,123,231,49,"Mover",false,GUIEditor_Window[1]) 
GUIEditor_Edit[1] = guiCreateEdit(53,63,256,44,"Porfavor Pon la Contraseña Correcta----",false,GUIEditor_Window[1]) 
GUIEditor_Button[2] = guiCreateButton(60,180,233,52,"Cancelar",false,GUIEditor_Window[1]) 
guiSetVisible ( GUIEditor_Window[1], false ) 
  
local objeto = createObject ( 2669, 1090.67834, -2704.56226, 8.48407, 0, 0, 270) 
local Col = createColCuboid ( 1088, -2705.56226, 7.5, 5, 2, 4 ) 
  
addEventHandler ( 'onClientGUIClick', root, 
    function ( ) 
        if ( source == GUIEditor_Button[1] ) then 
            local text = guiGetText ( GUIEditor_Edit[1] ) 
            if ( text == 'yourPassword' ) then 
                moveObject ( objeto, 5000, 1090.67834, -2704.56226, 18, 0, 0, 0 ) 
                setTimer ( moveObject, 10000, 1, objeto, 5000, 1090.67834, -2704.56226, 9 ) 
            else 
                outputChatBox ( 'Incorrect password!' ); 
            end 
        end 
    end 
) 
  
local objeto2 = createObject ( 2669, 1111.05212, -3085.17236, 3.55537, 0, 0, 270) 
local Col2 = createColCuboid ( 1088, 1111.05212, -3085.17236, 3.55537 ) 
  
addEventHandler ( 'onClientGUIClick', root, 
    function ( ) 
        if ( source == GUIEditor_Button[1] ) then 
            local text = guiGetText ( GUIEditor_Edit[1] ) 
            if ( text == 'yourPassword' ) then 
                moveObject ( objeto2, 5000, 1111.05212, -3085.17236, 3.55537 ) 
                setTimer ( moveObject, 10000, 1, objeto2, 5000, 1111.05212, -3085.17236, 3.55537 ) 
            else 
                outputChatBox ( 'Incorrect password!' ); 
            end 
        end 
    end 
) 
  
addEventHandler ( 'onClientColShapeHit', root, 
    function ( ) 
        if ( source == Col or source == Col2 ) then 
            guiSetVisible ( GUIEditor_Window[1], true ) 
            showCursor ( true ) 
        end 
    end 
) 

It should work now.

Edited by Guest
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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