Jump to content

hendawh

Members
  • Posts

    6
  • Joined

  • Last visited

  • Days Won

    1

hendawh last won the day on December 1 2023

hendawh had the most liked content!

Recent Profile Visitors

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

hendawh's Achievements

Vic

Vic (3/54)

2

Reputation

  1. Problem solved. If anyone had a problem with this: You need to remove the bootstrap styling of the body element, which overwrites the body background to #fff
  2. Hi, I wrote a simple form using boostrap, but when I render it to the player, the transparency option does not work. The page I show to the player is transparent until I add bootstrap to it. I've tried with version 4.0, 5.0, 5.2 but still the same problem. My HTML file: head: <link rel="stylesheet" href="bootstrap/css/bootstrap.css"> body: <body> <div class="container d-flex justify-content-center align-items-center"> <form class="d-flex flex-column"> <div class="form-group mb-2"> <label for="username-input">Username</label> <input type="text" class="form-control" placeholder="Ur username"> </div> <div class="form-group mb-2"> <label for="password-input">Password</label> <input type="text" class="form-control" placeholder="Ur password"> </div> <button type="submit" class="btn btn-success align-self-center">Log in</button> </form> </div> </body> lua clientside: local screen_w, screen_h = guiGetScreenSize() local browser = guiCreateBrowser(0, 0, screen_w, screen_h, true, true) local theBrowser = guiGetBrowser (browser) function setURL() loadBrowserURL(source, "http://mta/local/selection-ui/index.html") showCursor(true) end addEventHandler ("onClientBrowserCreated", theBrowser, setURL) any solutions how to make it transparent with bootstrap?
  3. From what you wrote I understand that I should create and export the dbResponse() function in each resource that performs a database query at some point?
  4. You mentioned that I should prepare two functions (including one in a separate resource) and I don't understand what you meant. I want to perform a query on a resource (e.g. player login) - where should I have the function responsible for receiving query results? (spreading it into two resources: res_database, res_auth)
  5. I saw your project, but I couldn't quite understand what was going on. Thanks a lot for explaining it.
  6. Hi, I want to create a function to execute async SQL queries. However, I have a problem with getting the return values of dbPoll(). Code snippet for better understanding: function db_query(...) if (db_settings.db_connection) then dbQuery(function(query_handle) local result, num_affected_rows, last_insert_id = dbPoll(query_handle, 0) return result, num_affected_rows, last_insert_id end, db_settings.db_connection, ...) end end For example, I want to use this function somewhere else in the script, but of course it will not return the value, because it executes faster than the values are retrieved from the database. addCommandHandler("reg", function(player, command, ...) local args = {...} local result, num_affected_rows, last_insert_id = exports.database_connection:db_query("SELECT * FROM `players`") outputDebugString(tostring(num_affected_rows)) end) I tried to use triggerEvent for this, but I don't quite understand how I'm supposed to use it later to get the return values the way I mentioned above. Any help?
×
×
  • Create New...