Jump to content

Andrew75t

Members
  • Posts

    31
  • Joined

  • Last visited

Everything posted by Andrew75t

  1. Patrick, Thank you so much. It works for me. You helped me a lot!
  2. Patrick. I used your script. I have a white square instead of a sight. What is it connected with and how to fix it?
  3. I tried to change the texture of the sight in a graphical editor and replace it through txdWorkShop, but it did not change, as well as the weapon icon, what is it connected with? I'll try your script, thanks for your answer.
  4. Hello. I want to replace the default texture of the sniper rifle scope with a custom texture . how can this be done on the my server?
  5. Thank you very much! Have a nice day, Patrick.
  6. Hello to all. I'm getting warnings like this, how can I fix them? WARNING: S\admin_sys.lua:21: Access denied @ 'addAccount' WARNING: S\admin_sys.lua:22: Bad argument @ 'setAccountData' [Expected account at argument 1, got nil] WARNING: S\admin_sys.lua:38: Bad argument @ 'getAccountData' [Expected account at argument 1, got boolean] WARNING: S\admin_sys.lua:39: Bad argument @ 'passwordVerify' [Expected string at argument 2, got boolean] local MINIMUN_PASSWORD_LENGTH = 6 local function isPasswordValid(password) return string.len(password) >= MINIMUN_PASSWORD_LENGTH end addCommandHandler('reg', function (player, command, username, password) if not username or not password then return outputChatBox('SYNTAX: /' .. command .. ' [username][password]', player, 255, 255, 255) end if getAccount(username) then return outputChatBox('An account already exists with that name.', player, 255, 100, 100) end if not isPasswordValid(password) then return outputChatBox('The password supplied was not valid.', player, 255,100,100) end passwordHash(password, 'bcrypt', {}, function (hashedPassword) local account = addAccount(username, hashedPassword) setAccountData(account, 'hashed_password', hashedPassword) outputChatBox('Your account has been successfully created! You may now login with /log', player, 100, 255, 100) end) end, false, false) addCommandHandler('log', function (player, command, username, password) if not username or not password then return outputChatBox('SYNTAX: /' .. command .. ' [username] [password]', player, 255, 255, 255) end local account = getAccount(username) if not account then outputChatBox('No such account could be found with that username or password.', player, 255, 100,100) end local hashedPassword = getAccountData(account, 'hashed_password') passwordVerify(password, hashedPassword, function (isValid) if not isValid then return outputChatBox('No such account could be found with that username or password.', player, 255, 100,100) end if logIn(player, account, hashedPassword) then return outputChatBox('You have successfully logged in!', player, 100,255,100) end return outputChatBox('An unknown error occured while attempting to authenticate.', player, 255, 100, 100) end) end, false, false)
×
×
  • Create New...