Hugos
Members-
Posts
172 -
Joined
-
Last visited
Everything posted by Hugos
-
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?
-
And how can you return the rectangle to the starting position (you need to make a reverse animation)?
-
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)
-
Thanks! Sorry... my bad english?
-
strings error, please.
-
The name is just for example, but I need to REMOVE the trigger
-
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?
-
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.
-
There is such an idea... Could you add another "dxDrawRectangleClient" or to add more arguments to be able to do krupenye corners.
-
Such a system can be implemented
-
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?
-
Numery seryjne się nie zmieniają.
-
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
-
For animation use InterpolateBetween.
-
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;
-
In SA-MP, 0.3.DL realized the ability to add their skins/models without replacement. But we still speak for MTA)
-
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? )