Mr. Maxilian

Members
  • Content Count

    18
  • Joined

  • Last visited

Community Reputation

3 Neutral

About Mr. Maxilian

  • Rank
    Square

Recent Profile Visitors

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

  1. Mr. Maxilian

    help

    Hello. There were several questions, someone will be able to help? (I have a system of authorization on clean mysql now. There are such fields as "name", "password', "money" and such other.) 1. Whether as to me to make check such player already on the server is authorized or not. I receive a name of the player for validation of the password with "guiCreateEdit". How to make check that the player with such name did not come into a game yet (that it was impossible to log in one account on 2 different computers)? 2. How to me (for example) to learn how many money at the player from the money field in the database, and to issue to the player (after he is spawn)? 3. Whether it is possible to realize similar such system selection of clothes as on video? If yes, prompt that as?
  2. Thanks! Everything works.
  3. Prompt how for example to receive quantity of money from the field "money" and to issue them to the player?
  4. Thanks! Everything works.
  5. 10 line. Unexpected symbol near ' '
  6. Correctly? addEvent("PlayerCheck", true) function PlayerCheck(player, username, password) if type(username) == "string" and type(password) == "string" then 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 if result_account.password == password then-- success else-- wrong password  end else-- wrong username  end end end addEventHandler("PlayerCheck", root, PlayerCheck)
  7. I need to check at first whether there is such login, and then only the right password or not. (Not at the same time)
  8. Does not fit. I use mysql plugin
  9. All hi. Help please... I receive the login and the password which is entered by the player at an entrance. How to me to check correctness of the password (it is necessary to make corrections)? --Client ... local rpn = guiGetText(show_PN) --player login local rpp = guiGetText(show_PP) --player password triggerServerEvent("PlayerCheck", getLocalPlayer(), getLocalPlayer(), rpn, rpp) ... --Server addEvent("PlayerCheck", true) function PlayerCheck(player, username, password) ip = getPlayerIP(source) qh_username = dbQuery(db, "SELECT * FROM accounts WHERE username=?", username) local result_username = dbPoll(qh_username, -1) if #result_username >= 1 then qh_password = dbQuery(db, "SELECT password FROM accounts WHERE username=?", username) local result_password = dbPoll(qh_password, -1) if #result_password >= 1 then ... else triggerClientEvent(player, "error_password", root) end else triggerClientEvent(player, "error_username", root) end end addEventHandler("PlayerCheck", root, PlayerCheck)
  10. Can I run multiple triggers at once? How to do this?
  11. I have a function in the resource "onClientResourceStart" that runs everything else. Maybe you can make a check on the spawn player or something?
  12. Create a login system, faced with this problem: I need to for the player who came to run the resource with authorization. But I don't know how to do it, because my resource runs for everyone. Please help, or if you know how to make it easier - please describe.
  13. I have a resource which runs another resource when the server comes player: function PlayerJoin() resource = getResourceFromName("player-auth") startResource(resource) end addEventHandler("onPlayerJoin", root, PlayerJoin) The problem is this: This resource is triggered FOR ALL PLAYERS, and I need it to ONLY run FOR the PLAYER WHO JOINED! HELP, PLEASE!
  14. ALL THANK! I will use MySQL)