Hugos

Members
  • Content Count

    74
  • Joined

  • Last visited

Everything posted by Hugos

  1. Hugos

    MySQL

    Thanks!
  2. Hugos

    MySQL

    I have a table "player." It has the fields "username" and coordinates "x", "y", "z". How do I spam the player on the saved coordinates. ???
  3. Hugos

    KickPlayer

    What better way? To players who are not logged in did not occupy the slots? (the player will go to the server and will not enter the account, and the slot will be busy - until he leaves the server.)
  4. Hugos

    KickPlayer

    Help! I need to make a timer function to kick a player who is not spawn 5 minutes after join. How to do it correctly? function PlayerJoin() ... ... ... setTimer(function() kickPlayer(? ? ?) end, 5000, 0) end addEventHandler("onPlayerJoin", root, PlayerJoin)
  5. I need to get the amount of money from the table and give the money to the player. addEvent("PlayerSpawn", true) function PlayerSpawn() setPlayerMoney(?, ?) end addEventHandler("PlayerSpawn", root, PlayerSpawn) Could you tell me please, as this can be done?
  6. And if you configure the rights. Function onClientResourceStart?
  7. Hugos

    2 Questions

    Yes. How do I get "Money" from the database? Thanks!
  8. Hugos

    2 Questions

    2 question (please help to solve them): 1. Is it possible to hide the health bar and nick, the other players? (so that they are not displayed to anyone) 2. I have a table in MySQL, where saved "logins" and "amount of money", how do I give money at the entrance of the player, based on the information in the database?
  9. I have "edixBox" from which I get the result (variable - result), how to check if there is such a player on the server (with the same name)?
  10. Thank you, that often help!
     

  11. Hugos

    Help! player...

    Help. What function is responsible for the list of all players. To the connections to check whether the server is the player with the same name (I'm early get the player's name)
  12. Hugos

    Help, please!

    Thank you, I got it.
  13. Hugos

    Help, please!

    What is it? addCommandHandler - why I need?
  14. Hugos

    Help, please!

    ? not work.
  15. Hugos

    dbQuery

    addEvent("CheckName", true) function OnPlayerCheck(name) qh_name = dbQuery(db, "SELECT * FROM dbQuery WHERE name=?", rname) --Find the row in the table local result = dbPoll(qh_name, -1) if #result >= 1 then --if the result is correct outputToChat(" " ..result.. " say: " ..message, v, 255, 100, 200, true) else --endIf the "name" is incorrect end addEventHandler("CheckName", root, CheckName) Server text = guiCreateEdit(0, 0, 0, 0, "", false) function btn(button) --function if the player pressed the button. if button == "left" then local CheckName = guiGetText(text) --Get the name - from the edit field (guiCreateEdit) triggerServerEvent("CheckName", getLocalPlayer(), name) --Server end end Client In this example, I get the name of the player that he enters in "guiCreateEdit" >> Find it in the database >> If found, output the text
  16. Hugos

    dbQuery

    Do you need to get a name from the table?
  17. Hugos

    Help, please!

    Help. When you click on the start Server-trigger >> account is checked >> the lrient trigger is started >> the function is triggered >> the line is displayed, but it is not displayed for the player who pressed the button, but for all players. Here's the code: Server: triggerClientEvent("error", root) Client: addEvent("error", true) function error() addEventHandler("onClientRender", root, redline) end function redline() dxDrawLine(448, 435, 917, 435, tocolor(240, 75, 90), 2, true) end How to make something appear only for the player who pressed the button?
  18. Hugos

    Start Resurs

    Hi. Prompt whether it is possible to create function in a resource which would start other resource?
  19. Hugos

    Help. guiCreateEdit

    Only now understood. Thank you for making my life easier and code! 🧐
  20. I use: removeEventHandler("onClientGUIClick", btn, btn_edit) But the function and the text is not hiding
  21. I have such a function: function btn_edit(button) if button == "left" then name = guiCreateEdit(0, 0, 0, 0, "", false) setTimer(function() dxDrawText(guiGetText(name), 455, 316, 690, 346, tocolor(255, 255, 255), 1, Font13, "left", "center", clip, wordBreak, true) guiFocus(name) guiSetAlpha(name, 0) guiEditSetMaxLength(name, 32) end, 1, 0) end end ( addEventHandler("onClientGUIClick", btn, btn_edit) ) Does not work "removeEventHandler". In another function, when I click I hide all the specified functions except this one. I can't understand why she's not hiding. Help, please!
  22. Found another way, easier: Create "guiCreateLabel (x, y, width, height, "", false)", where x, y, width and height are the same as " dxDrawRectangle", and create function "onClientGUIClick"