Jump to content

How create GUI in MTA 1.4.0?


dawid4157

Recommended Posts

Hy,

I have problem with create GUI in MTA version 1.4.0.

In logs I have this error:

[2014-08-07 18:13:10] ERROR: FirstDC\server.lua:24: attempt to call global 'guiCreateWindow' (a nil value) 

How repair this?

Code command:

function firstGUI(player) 
        oknoo = guiCreateWindow(43, 144, 712, 328, "Okienko", false) 
        guiWindowSetSizable(oknoo, false) 
    guiSetVisible ( oknoo, false ) 
end 
addCommandHandler("gui", firstGUI) 

Link to comment

I create file: guicommand.lua with this code:

function firstGUI(player) 
        outputChatBox("Powinno wyświetlić się ładne okienko GUI.", getRootElement(), 0, 255, 0) 
        oknoo = guiCreateWindow(43, 144, 712, 328, "Okienko", false) 
        guiWindowSetSizable(oknoo, false) 
        guiSetVisible ( oknoo, false ) 
end 
addCommandHandler("gui", firstGUI) 

In meta.xml I ser this:

<script src="guicommand.lua" type="client-side" /> 

And nothing. This erorr is all the time:

[2014-08-07 18:13:10] ERROR: FirstDC\server.lua:24: attempt to call global 'guiCreateWindow' (a nil value) 

Where is a problem?

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