Jump to content

Hugos

Members
  • Posts

    172
  • Joined

  • Last visited

Everything posted by Hugos

  1. 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.)
  2. 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)
  3. 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?
  4. And if you configure the rights. Function onClientResourceStart?
  5. Hugos

    2 Questions

    Yes. How do I get "Money" from the database? Thanks!
  6. 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?
  7. 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)?
  8. Thank you, that often help!
     

  9. 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)
  10. Hugos

    Help, please!

    Thank you, I got it.
  11. Hugos

    Help, please!

    What is it? addCommandHandler - why I need?
  12. 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
  13. Hugos

    dbQuery

    Do you need to get a name from the table?
  14. 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?
  15. Hugos

    Start Resurs

    Hi. Prompt whether it is possible to create function in a resource which would start other resource?
  16. Only now understood. Thank you for making my life easier and code! ?
  17. I use: removeEventHandler("onClientGUIClick", btn, btn_edit) But the function and the text is not hiding
  18. 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!
  19. 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"
  20. Please tell me whether it is possible to "dxDrawRectangle" to attach the function "onClientGUIClick"? If so, then how to do it?
  21. I use "guiSetAlpha", the field is hidden and the cursor remains. P.S: + What is this script?
×
×
  • Create New...