Jump to content

TrickyTommy

Members
  • Content Count

    50
  • Joined

  • Last visited

Community Reputation

4 Neutral

About TrickyTommy

  • Rank
    Snitch

Details

  • Location
    Canada

Recent Profile Visitors

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

  1. +: My problem is that getRealTime()'s month function returns the month without 0. And the number is less without the 0 and may work incorrectly.
  2. Hi. I made a table for player bans, right now it has 2 rows, one of it is the player's serial, and the other one is the reason. But the problem is, i can only make a system for permanent bans. I was wondering, how should i make a temporary one, and this is what i have come up so far: The player who banns should write the date until the ban is up like this: YYYYMMDDHHMM (all in together, it would look like this: 199903160010 So if the admin would like to ban him for a day, (199903170010) and if it passes by, the system checks the current date with the exact same format, and if the cur
  3. yeah, but this forum helped me more so far than any mta-sa wikipedia page.
  4. ohh i see. i thought that triggerServerEvent's arg order is the same as triggerClientEvent's.
  5. So the correct way is this: ? triggerClientEvent (element, "characterCreationMenu", element, v['accountname'])
  6. Hi. I have a problem, that whoever is online on my server, sees edit boxes, that should only appear to who clicked a button (i use localPlayer), and it simply just appears for the ones who already passed the login panel. Pieces of scripts: (Client and serverside) Client: function loginButton_Click() loginUsernameText = guiGetText (loginUsername) loginPasswordText = guiGetText (loginPassword) triggerServerEvent ("attemptLogin", localPlayer, localPlayer, loginUsernameText, loginPasswordText) end Server: function attemptLogin(element, accountname, password) local
  7. Hi. I am making an interior system, alongside with a siren-system. I noticed, that whenever want to destroy (only just one siren), the other sirens, in other cars stop as well. The problem's description: I spawn 2 vehicles, and sound a siren in them, i sit into one of the 2 active sirening vehicles, and i stop the siren of the car i am sitting in, but the siren stops in the 2nd car too. And i want to make an interior system, already made it's tables, but after i get all the interior entrances from the database, with for k, v and i want to spawn a marker for each interior's entrance, bu
  8. function sqlQuery(query, ...) return dbQuery(connection, query, ...) end iprint(connection, "INSERT INTO test (asd1, asd2) VALUES (?, ?)", "asd1", "asd2") local Query = sqlQuery ("INSERT INTO test (asd1, asd2) VALUES (?, ?)", "asd1", "asd2") if Query then outputServerLog ("true") else outputServerLog ("false") end i might be dumb, and messed it up. not sure if it's correct. FIXED: re-created the table, it is working now. function sqlQuery(query, ...) return dbQuery(connection, query, ...) end local Query = sqlQuery ("INSERT INTO test (test1, test2) VALUES (?, ?)", "Successs
  9. sorry, i dont get it, where do i need to put the iprint line?
  10. function sqlQuery(query, ...) return dbQuery(connection, query, ...) end local Query = sqlQuery ("INSERT INTO test (asd1, asd2) VALUES (?, ?)", "asd1", "asd2") if Query then outputServerLog ("true") else outputServerLog ("false") end it is not inserting to the database, however it returns true. what have gone wrong?
  11. Sorry, we misunderstood each other. Let me show it to you on the following picture: I want to make some king of a "useful function", and i would like to use this instead of dbQuery, because the connection was already declared here, and i would not like to declare an other connection in an other script. So i can export the function and use it like exports.db:sqlQuery(string query, variables for the query)
  12. connection = dbConnect( "mysql", "dbname="..mySQLDetails["db"]..";host="..mySQLDetails["host"].."", ""..mySQLDetails["acc"].."", ""..mySQLDetails["pass"].."", "share=1" ) function dbQuery(query, values) qh = dbQuery(connection, query, values) end Hi! I am making a mysql script, and i would not like to do the dbConnect stuff and things like this everytime. But after the query, there might be values, not only just one. So for example in the query, i want to insert 2 things, and it would look like this: -------------------------------------------------string query---------
  13. you guys helped me to make my very first account system with gui! i am very thankful.
  14. thank you guys, i think i have one last question. what method should i use for getting the player's account id from database, and after set it as his element data?
×
×
  • Create New...