Jump to content

dawid4157

Members
  • Posts

    23
  • Joined

  • Last visited

Everything posted by dawid4157

  1. 2. This is code: X_Label_ok = 0.0825 Y_Label2_ok = 0.5 Width_Label2_ok = 0.25 Height_Label2_ok = 0.25 ok_label = guiCreateLabel(X_Label_ok, Y_Label2_ok, Width_Label2_ok, Height_Label2_ok, "Proces rejestracji przebiegł prawidłowo.", true, register_ok) guiCreateStaticImage( 440, 275, 50, 50, "info.png", false ) outputChatBox("Poprawnie się zarejestrowałeś.") 3. Which function I hide image induced by guiCreateStaticImage?
  2. 1. Where is this image information? https://wiki.multitheftauto.com/wiki/Gu ... taticImage I need use in my project this image. 2. Why I can use only 16 characters in label GUI? How I rising this? How do I increase the limit?
  3. I show all code: local host = 'host' local user = 'user' local password = 'pass' local db = 'database' handler = mysql_connect(host, user, password, db) if (handler) then outputChatBox("Connected to the Database!", getRootElement(), 255, 000, 000) outputDebugString("Connected to the Database!") else outputChatBox("No connected to the Database!") outputDebugString("No connected to the Database!") end function zapytanie(player) local playerName = getPlayerName(player) local register = mysql_query(handler, "INSERT INTO `Gracze` SET `Nick`=? ", playerName ) outputChatBox("Poprawne zapytanie") end addCommandHandler("sql", zapytanie) What is wrong?
  4. Ok. Thanks. It`s nice work.
  5. Maybe I show all code: function firstGUI(player) --******************************** REGISTER WINDOW local X_okienko_GUI = 300 local Y_okienko_GUI = 250 local Width_okienko_GUI = 360 local Height_okienko_GUI = 220 register = guiCreateWindow(X_okienko_GUI, Y_okienko_GUI, Width_okienko_GUI, Height_okienko_GUI, "Panel rejestracji", false) --******************************** LABEL USERNAME X_Label1 = 0.0825 Y_Label1 = 0.2 Width_Label1 = 0.25 Height_Label1 = 0.25 guiCreateLabel(X_Label1, Y_Label1, Width_Label1, Height_Label1, "Enter username:", true, register) --******************************** LABEL PASSWORD X_Label2 = 0.0825 Y_Label2 = 0.5 Width_Label2 = 0.25 Height_Label2 = 0.25 guiCreateLabel(X_Label2, Y_Label2, Width_Label2, Height_Label2, "Enter password:", true, register) --******************************** ENTER USERNAME X_Pole_User = 0.415 Y_Pole_User = 0.17 Width_Pole_User = 0.5 Height_Pole_User = 0.15 pole_User = guiCreateEdit(X_Pole_User, Y_Pole_User, Width_Pole_User, Height_Pole_User, "", true, register) --******************************** ENTER PASSWORD X_Pole_Pass = 0.415 Y_Pole_Pass = 0.47 Width_Pole_Pass = 0.5 Height_Pole_Pass = 0.15 pole_Pass = guiCreateEdit(X_Pole_Pass, Y_Pole_Pass, Width_Pole_Pass, Height_Pole_Pass, "", true, register) --******************************** BUTTON REGISTER X_button_Reg = 0.2 Y_button_Reg = 0.7 Width_button_Reg = 0.25 Height_button_Reg = 0.2 btnRegister = guiCreateButton(X_button_Reg, Y_button_Reg, Width_button_Reg, Height_button_Reg, "Register", true, register) --******************************** BUTTON CANCEL X_button_Cancel = 0.6 Y_button_Cancel = 0.7 Width_button_Cancel = 0.25 Height_button_Cancel = 0.2 btnCancel = guiCreateButton(X_button_Cancel, Y_button_Cancel, Width_button_Cancel, Height_button_Cancel, "Cancel", true, register) --******************************** END guiWindowSetSizable(register, false) guiSetVisible ( register, true ) showCursor(true) -- pokazanie kursora [[--if btnCancel~=nil then outputChatBox("Canceled operation...") end --]] addEventHandler("onClientGUIClick", btnCancel, zamknijgui, false) end addCommandHandler("gui", firstGUI) -- BUTTON CLICK EVENT function zamknijgui() outputChatBox("Zamknąłeś GUI") end
  6. Yes, register is defined: local X_okienko_GUI = 300 local Y_okienko_GUI = 250 local Width_okienko_GUI = 360 local Height_okienko_GUI = 220 register = guiCreateWindow(X_okienko_GUI, Y_okienko_GUI, Width_okienko_GUI, Height_okienko_GUI, "Panel rejestracji", false)
  7. I am logeed in as admin. Command not work.
  8. It`s not work. Maybe oher concept?
  9. Why this function does not work? function zapytanie(player) local playerName = getPlayerName(player) local register = mysql_query(handler, "INSERT INTO `Players` SET `Nick` = ".. playerName .." ") outputChatBox("Poprawne zapytanie") end When I set this: function zapytanie(player) local playerName = getPlayerName(player) local register = mysql_query(handler, "INSERT INTO `Players` SET `Nick` = 'dawid4157' ") outputChatBox("Poprawne zapytanie") end code work good. Why? How use getPlayerName correctly? Please help.
  10. When I use command in game nothing happens. Is only this statement: [2014-08-08 14:30:46] DENIED: Denied 'dawid4157' access to command 'debugscript'
  11. [2014-08-08 12:36:51] debugscript: Incorrect client type for this command What is this?
  12. Code is in client side, but click do not work fine. Can someone perform example code for me? Please.
  13. Sorry continue unchanged. Maybe other idea?
  14. dawid4157

    click GUI

    Hi, I have a problem with click in GUI. I have this code: function firstGUI(player) X_button_Cancel = 0.6 Y_button_Cancel = 0.7 Width_button_Cancel = 0.25 Height_button_Cancel = 0.2 btnCancel = guiCreateButton(X_button_Cancel, Y_button_Cancel, Width_button_Cancel, Height_button_Cancel, "Cancel", true, register) guiWindowSetSizable(register, false) guiSetVisible ( register, true ) showCursor(true) addEventHandler("onClientGUIClick", btnCancel, zamknijgui) end addCommandHandler("gui", firstGUI) and this code: function zamknijgui() outputChatBox("Zamknąłeś GUI") end Why if I click button nothing happens. Why?
  15. Ok. All is good. Thanks. I do not know why I did not notice this
  16. Ok. Don`t errors after entering the type="client" but also don`t show GUI. Why? What is wrong?
  17. 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?
  18. 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)
  19. Thanks a lot, but what is this? [2014-08-07 01:03:58] Resource 'acpanel' requests some acl rights. Use the command 'aclrequest list acpanel'
  20. Hi, I have this logs when I start server console. What this is? Is it normal message in cosole? How repair this warning? I gave 1.4.0 version MTA. Please help. ================================================================== = Multi Theft Auto: San Andreas v1.4 ================================================================== = Server name : Default MTA Server = Server IP address: = Server port : 22003 = = Log file : .. 1.4/server/mods/deathmatch/logs/server.log = Maximum players : 32 = HTTP port : 22005 = Voice Chat : Disabled = Bandwidth saving : Medium ================================================================== [2014-08-06 14:02:05] Compacting accounts database 'internal.db' ... [2014-08-06 14:02:05] Resource 'acpanel' requests some acl rights. Use the command 'aclrequest list acpanel' [2014-08-06 14:02:07] Resources: 191 loaded, 0 failed [2014-08-06 14:02:07] Compacting database 'registry.db' ... [2014-08-06 14:02:07] Starting resources... [2014-08-06 14:02:08] WARNING: admin/client/gui/admin_spectator.lua(Line 269) [Client] isPlayerDead is deprecated and may not work in future versions. Please replace with isPedDead. [2014-08-06 14:02:08] Some files in 'admin' use deprecated functions. [2014-08-06 14:02:08] Use the 'upgrade' command to perform a basic upgrade of resources. [2014-08-06 14:02:08] Server minclientversion is now 1.4.0-9.06745 [2014-08-06 14:02:08] Querying MTA master server... success! (Auto detected IP:46.186.107.12) [2014-08-06 14:02:08] Server started and is ready to accept connections! [2014-08-06 14:02:08] To stop the server, type 'shutdown' or press Ctrl-C [2014-08-06 14:02:08] Type 'help' for a list of commands.
×
×
  • Create New...