Hugos
Members-
Posts
172 -
Joined
-
Last visited
Everything posted by Hugos
-
Tell me, is it possible to draw a rectangle that will have rounded corners?
-
Hello to everyone. I want to make sure that the player 's name is displayed above his head, but I don 't know how to do it correctly. Found the function "dxDrawTextOnElement" - I can 't understand how to apply it correctly? P.S: Also I want to add a team with which players can choose whether they will see the names of other players or not. Is it possible to implement this?
-
If it is not possible to delete, then such a question: I have "guiCreateStaticImage," and I use "onClientGUIClick" for the image. What function do I need to add them to avoid using a trigger?
-
Would you please tell me how to remove the trigger? For example: triggerEvent("trig", resourceRoot) addEvent("trig", true) function trig() ... end addEventHandler("trig", resourceRoot, trig) ...how to remove it?
-
I have such a system for oral ID to the player: function getIDFromPlayer(player) if player then local theid players = getElementsByType("player") for id,p in ipairs(players) do if player == p then theid = i end end return theid else return false end end Please help. I need to make sure that every player is assigned an ID at spawn. But I now work a little off-line (when the player comes out with id 1, the player with id 2, assigned id 1, but I need this player to have id 2 left, and the one who comes in - established id 1-n (is not busy) ).
-
Tell me please if it is possible to make a function that opens an adress URL in your browser? P.S.: I mean open a browser not in the game (not createBrowser), but in a regular browser (out of the game).
-
Hello to everyone. Please help. iStartTick = getTickCount() function StartAnimation() local iProgress = (getTickCount()-iStartTick)/1000 local x1 = interpolateBetween(-(y/1.6), 0, 0, 0, 0, 0, iProgress, "OutBack") local x2 = interpolateBetween(-(y/70), 0, 0, y/1.6-y/70, 0, 0, iProgress, "OutBack") dxDrawRectangle(x1, y-y/7.5, y/1.6, y/15, tocolor(0, 0, 0), true) dxDrawRectangle(x2, y-y/7.5, y/70, y/15, tocolor(255, 50, 65), true) dxDrawText("ERROR!", x1, y-y/7.5, x1+y/1.6, y-y/7.5+y/15, tocolor(200, 200, 200), 1, Font, "center", "center", true, false, true) if (iProgress >= 1) then iStartTick = 0; removeEventHandler("onClientRender", root, StartAnimation) end end addEventHandler("onClientRender", root, StartAnimation) I have such animation (rectangle "leaves" on the left side and then goes missing), I need this rectangle not to chill, but to stay for 3 seconds and with the same animation "left" to the initial position (reverse animation). But I don 't know how to do it.
-
Yes. It is already registered (nikneim in recorded in "username")
-
I get the player 's serial number at the moment, and if it 's not already recorded in the DB - I add. local username = getPlayerName(source) local serial = tostring(result_account.serial) local u_serial = getPlayerSerial(source) if (serial == u_serial) then --We check the serial number else if (serial == "") then --number will stop. Assign a new INSERT INTO accounts (, ) VALUES (?, ?) else end end How it is correct to make it?
-
How do I add data from a database? (I use the plugin mta_mysql)
-
I use the plugin "mta_mysql", and I write a similar function now (I want to know the player 's serial number and compare it to the one stored in the database)... You Can try it... local username = getPlayerName(source) --We learn the player's nickname local qh_account = dbQuery(db, "SELECT * FROM accounts WHERE username=? LIMIT 1", username) --We find a player with such a nickname in the DB (I have fields with a name called "username") local result_account = dbPoll(qh_account, -1)[1] if result_account then local serial = tostring(result_account.serial) --The serial number from a DB local u_serial = getPlayerSerial(source) --Current Player Serial Number if (serial == u_serial) then --compare --if number does coincides. else --if number does not coincides. end P.S: Now I only have a question on how to record the player number if it does not match and is equal to 0. if you find a solution, please write.
-
Do you need to get the player 's serial number from the DB?
-
Thanks. Do not tell us how to save it to the database (how to add such a string)?