Hugos

Members
  • Content Count

    139
  • Joined

  • Last visited

Community Reputation

9 Neutral

About Hugos

  • Rank
    Poot-butt

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Hugos

    Help!

    I didn 't get it a little bit. Then how should the function fully look?
  2. Hugos

    Help!

    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) ).
  3. Hugos

    Open Browser

    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).
  4. Hugos

    Animation

    THANKS!)
  5. Hugos

    Animation

    Do you want to write this code after 8 lines?
  6. Hugos

    Animation

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

    DB (help, please!)

    THANKS!!!! 👊👊👊
  8. Hugos

    DB (help, please!)

    Yes. It is already registered (nikneim in recorded in "username")
  9. Hugos

    DB (help, please!)

    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?
  10. How do I add data from a database? (I use the plugin mta_mysql)
  11. 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.
  12. Do you need to get the player 's serial number from the DB?
  13. Hugos

    new log

    Thanks... And the question is, can you create a file in the logs package, not in the resource itself?
  14. Hugos

    new log

    text file. I just don 't understand if this argument can be used in the new version?