Jump to content

Hugos

Members
  • Posts

    172
  • Joined

  • Last visited

Everything posted by Hugos

  1. function ...() local username = getPlayerName(source) local qh_account = dbQuery(db, "SELECT * FROM accounts WHERE username=? LIMIT 1", username) local result_account = dbPoll(qh_account, -1)[1] if result_account then local serial = result_account.serial --serial in DB getPlayerSerial(source) end I have a feature where I get a serial number from the database (6 line) and recognize the player 's serial number at the moment (7 line). I need to compare whether the serial number is recorded in the database or if there is an empty string. If the line is empty - you need to add data (which I received in the 7 line), and if the serial number has already been recorded, I need to break it with the player number (if the number differs - output the text to the console How to make it?
  2. And how can you return the rectangle to the starting position (you need to make a reverse animation)?
  3. Hey. I need your help! I have this rectangle: addEventHandler("onClientRender", root, windows) ------------------------------------------------- function windows() dxDrawRectangle(0, y-y/7.5, y/1.6, y/15, tocolor(0, 0, 0), true) end How do I animate it with "interpolateBetween" so that it "leaves" (strEasingType - "Line") from the left corner? Tell me how to WRITE correctly "interpolateBetween"! PLEASE)
  4. Hugos

    new log

    A question arose... is it possible to write a function in the resource that would create a new log file, set a specific name for it? (well, to be able to record this log some events)
  5. Thanks! Sorry... my bad english?
  6. The name is just for example, but I need to REMOVE the trigger
  7. I have such trigger: triggerEvent("tigger", root) addEvent("tigger", true) function tigger() label = guiCreateLabel(...) addEventHandler("onClientGUIClick", label, function_label) end addEventHandler("tigger", root, tigger) How to me to remove this trigger?
  8. It is possible to make still so... edit = guiCreateEdit(x, y, width, heiht, "you text" ) --We set the name of a variable str = string.gsub(guiGetText(edit), " ", "") --Get text and replace spaces guiSetText(edit, str) --Let's replace with the ready text P.S: string.gsub (<s>, <Search pattern>, <Replacement template>, [n]) S is a string. Search pattern - what to search for or regular expression. Replacement template - what to replace. N - how many times can a replacement be made at most.
  9. There is such an idea... Could you add another "dxDrawRectangleClient" or to add more arguments to be able to do krupenye corners.
  10. Such a system can be implemented
  11. Hugos

    help (string)

    I have a line with "money," this knowledge I frame in "dxDrawText." (For example, You Money: $156,000). I need to change the string (Lua) to get a number separated by a dot, i.e. "156.000," instead of "156000." I need to add dots every 3 digits starting at the end, but I don 't know how to do it properly?
  12. Hugos

    Change MTA serial

    Numery seryjne się nie zmieniają.
  13. I have a function where I get text from "guiCreateEdit," as well as "triggerServerEvent," I need to move my text to the server part. How do I do that? function go(button) if button == "left" then guiGetText(pin) triggerServerEvent("check", resourceRoot) end end
  14. For animation use InterpolateBetween.
  15. Hugos

    help

    On the side of the client I got "guiGetText (...)," I need to move it to the side of the north. Tell me how to do it?
  16. Hugos

    help

    All right, I already figured it out. Everything is much easier... pin = ("" ..string.gsub(guiGetText(PIN), "%D", "").. "") guiSetText(PIN, pin) string.gsub - we replace in line "%D" on "" , and all. guiGetText(PIN) - My line with we enter the text; "%D" - Any letter or symbol other than digit; "" - emptiness;
  17. Hugos

    no limit

    In SA-MP, 0.3.DL realized the ability to add their skins/models without replacement. But we still speak for MTA)
  18. Hugos

    help

    I have a "guiCreateEdit," I need to prohibit the user from entering any characters except numbers. And I need to bring them out using "dxDrawText," but replacing them with "*" (asterisk). How do I do that? addEvent("edit", true) function editbox() PIN = guiCreateEdit(0, 0, 0, 0, "", false) end addEventHandler("edit", resourceRoot, edit) function pin() dxDrawText(guiGetText(PIN), 0, 0, 100, 100, tocolor(0, 0, 0), 1, Font, "center", "center", true, true, true) end (It is string.gsub necessary to use? )
×
×
  • Create New...