Jump to content

Cursor problem


Mefisto_PL

Recommended Posts

Hi ! My problem is when resource start then cursor isn't showed.. Why? :C

addEventHandler ( "onClientResourceStart", getResourceRootElement ( getThisResource ( ) ),  
    function () 
            creatingLoginWindow ( ) 
            outputChatBox ( "Welcome to My MTA:SA Server, please log in." ) 
            if ( modernWNDLogin ~= nil ) then 
            guiSetVisible ( modernWNDLogin, true ) 
            showCursor ( true ) 
        else 
            outputChatBox ( "An unexpected error has occurred and the log in GUI has not been created." ) 
            end 
            guiSetInputEnabled ( true ) 
    end 
) 

Link to comment

I get it from wiki :D

Doesn't work.. :C

addEventHandler ( "onClientResourceStart", getResourceRootElement ( getThisResource ( ) ), 
    function () 
            creatingLoginWindow ( ) 
            outputChatBox ( "Welcome to My MTA:SA Server, please log in." ) 
            if modernWNDLogin then 
            guiSetVisible ( modernWNDLogin, true ) 
            showCursor ( true ) 
        else 
            outputChatBox ( "An unexpected error has occurred and the log in GUI has not been created." ) 
            end 
            guiSetInputEnabled ( true ) 
    end 
) 

Link to comment
function creatingLoginWindow () 
    local X = 0.375 
    local Y = 0.375 
    local Width = 0.25 
    local Height = 0.25 
    modernWNDLogin = guiCreateWindow ( X, Y, Width, Height, "Welcome To Modern Freeroam !", true ) 
    X = 0.0825 
    Y = 0.23 
    Width = 0.25 
    Height = 0.25 
    guiCreateLabel ( X, Y, Width, Height, "Username", true, modernWNDLogin ) 
    Y = 0.53 
    guiCreateLabel ( X, Y, Width, Height, "Password", true, modernWNDLogin ) 
  
  
    X = 0.415 
    Y = 0.2 
    Width = 0.5 
    Height = 0.15 
    editUsername = guiCreateEdit ( X, Y, Width, Height, "", true, modernWNDLogin ) 
    Y = 0.5 
    editPassword = guiCreateEdit ( X, Y, Width, Height, "", true, modernWNDLogin ) 
    guiEditSetMaxLength ( editUsername, 50 ) 
    guiEditSetMaxLength ( editPassword, 50 ) 
  
    X = 0.415 
    Y = 0.7 
    Width = 0.25 
    Height = 0.2 
    loginBtn = guiCreateButton ( X, Y, Width, Height, "Log In", true, modernWNDLogin ) 
  
    guiSetVisible ( modernWNDLogin, false ) 
end 
  
addEventHandler ( "onClientResourceStart", getResourceRootElement ( getThisResource ( ) ), 
    function () 
            creatingLoginWindow ( ) 
            outputChatBox ( "Welcome to My MTA:SA Server, please log in." ) 
            if modernWNDLogin then 
            guiSetVisible ( modernWNDLogin, true ) 
            showCursor ( true ) 
        else 
            outputChatBox ( "An unexpected error has occurred and the log in GUI has not been created." ) 
            end 
            guiSetInputEnabled ( true ) 
    end 
) 

Link to comment
function creatingLoginWindow ( ) 
    local X = 0.375 
    local Y = 0.375 
    local Width = 0.25 
    local Height = 0.25 
    modernWNDLogin = guiCreateWindow ( X, Y, Width, Height, "Welcome To Modern Freeroam !", true ) 
    X = 0.0825 
    Y = 0.23 
    Width = 0.25 
    Height = 0.25 
    guiCreateLabel ( X, Y, Width, Height, "Username", true, modernWNDLogin ) 
    Y = 0.53 
    guiCreateLabel ( X, Y, Width, Height, "Password", true, modernWNDLogin ) 
  
  
    X = 0.415 
    Y = 0.2 
    Width = 0.5 
    Height = 0.15 
    editUsername = guiCreateEdit ( X, Y, Width, Height, "", true, modernWNDLogin ) 
    Y = 0.5 
    editPassword = guiCreateEdit ( X, Y, Width, Height, "", true, modernWNDLogin ) 
    guiEditSetMaxLength ( editUsername, 50 ) 
    guiEditSetMaxLength ( editPassword, 50 ) 
  
    X = 0.415 
    Y = 0.7 
    Width = 0.25 
    Height = 0.2 
    loginBtn = guiCreateButton ( X, Y, Width, Height, "Log In", true, modernWNDLogin ) 
  
    showCursor ( true ) 
    guiSetInputEnabled ( true ) 
end 
  
addEventHandler ( "onClientResourceStart", resourceRoot, 
    function ( ) 
        creatingLoginWindow ( ) 
        outputChatBox ( "Welcome to My MTA:SA Server, please log in." ) 
    end 
) 

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...