Jump to content

Jimmy.

Members
  • Posts

    21
  • Joined

  • Last visited

Everything posted by Jimmy.

  1. Jimmy.

    CEF

    Hi, What are the main reasons why lags videos? How can reduce lagging? Lag is significantly lower when using YouTube, but I can't upload film in Youtube. Maybe you know what video storage web which does not prevent it? And is it possible to make management with cursor when browser I use on dxDrawMaterialLine3D? Thanks.
  2. Server: function Video ( player, commandName, text) triggerClientEvent(getRootElement(),"createVideo", getRootElement(), text) end addCommandHandler ( "startas", Video ) Client: local screenWidth, screenHeight = guiGetScreenSize() local webBrowser = createBrowser(screenWidth, screenHeight, false, false) addEvent ("createVideo", true) addEventHandler ("createVideo", getRootElement(), function (text) local x, y = 110.7, 1024.15 dxDrawMaterialLine3D(x, y, 23.25, x, y, 14.75, webBrowser, 18.2, tocolor(255, 255, 255, 255), x, y+1, 19) loadBrowserURL(webBrowser, ""..text.."") end ) Sounds work, but video no. Debug show nothing.
  3. How to check or in guiCreateEdit is dot symbol. I tried: if string.find(register_email, ".") then else triggerClientEvent(client,"SetWarningMessage",client,"Register","Dot not found.") return end but not working.
  4. Jimmy.

    SQL if exist

    outputChatBox(username) here it is okay, what i wrote, output show the same. I send PM my all clientside file.
  5. Jimmy.

    SQL if exist

    The same "0". Maybe something can be wrong with clientside?
  6. Jimmy.

    SQL if exist

    outputChatBox shows "0"
  7. Jimmy.

    SQL if exist

    Again always "Wrong username".
  8. Jimmy.

    SQL if exist

    But now always show: "Welcome to My Server." Or wrong username or no.
  9. Jimmy.

    SQL if exist

    I check or row is exist, but always got " Wrong username" even username is in database. Where can be a mistake? function loginHandler(username,password) local query = dbQuery(handler,"SELECT * FROM accounts WHERE username=?", username) local result = dbPoll( query, -1 ) if result == true then local query = dbQuery(handler,"SELECT * FROM accounts WHERE username=? AND password=?",username,password) local result = dbPoll( query, -1 ) if result then if (client) then spawnPlayer(client, 1959.55, -1714.46, 10) fadeCamera(client, true) setCameraTarget(client, client) outputDebugString("Welcome to My Server.") end else outputDebugString("Wrong password.") end else outputDebugString("Wrong username.") end end addEvent("SubmitLogin",true) addEventHandler("SubmitLogin",root,loginHandler)
  10. Thanks, it works, but I have another mistake. Whatever username or password write always fit. Where to look for errors?
  11. Hello, what's wrong with this code? How to make, that doesn't show error about SQL nil? http://prntscr.com/7s2rbp. local handler = exports.SQL:connect() function loginHandler(usernametext,passwordtext) local query = dbQuery(handler,"SELECT * FROM accounts WHERE Username=?", usernametext) if (query) then local query = dbQuery(handler,"SELECT * FROM accounts WHERE Username=? AND Password=?",usernametext,passwordtext) if (query) then if (client) then spawnPlayer(client, 1959.55, -1714.46, 10) fadeCamera(client, true) setCameraTarget(client, client) outputDebugString("Welcome to My Server.") end else outputDebugString("Wrong password.") end else outputDebugString("Wrong username.") end end addEvent("submitLoginStepTwo",true) addEventHandler("submitLoginStepTwo",root,loginHandler) local HOST = "localhost" local USERNAME = "root" local PASSWORD = "" local DATABASE = "mta" local connection = false function connect() connection = dbConnect("mysql","dbname="..DATABASE..";host="..HOST..";",USERNAME,PASSWORD) end addEventHandler("onResourceStart",resourceRoot,connect)
  12. Jimmy.

    Notepad++

    Hi, maybe someone has Syntax Highlighting for Notepa++on a dark background? I could fail to properly align the colors that irritate my eyes.
  13. Not Possible Or use by dx.... visit this link: http://forum.mtasa.com/viewtopic.php?f=108&t=84376 Thanks.
  14. Hi, how can I change guiCreateEdit box color or add picture on it?
×
×
  • Create New...