Jump to content

SlashBuster

Members
  • Content Count

    18
  • Joined

  • Last visited

Community Reputation

0 Neutral

About SlashBuster

  • Rank
    Square
  1. getElementID (vehicle) how does this string knows which vehicle is meant
  2. and is it only for the vehicle which was spawned in the smae function?
  3. I have a script which stores a car in a mysql database when it spawns so that every car is related to a owner. But thats only in the database. How can I do the same in the game so that a vehicle has an id which I can ask for in a Lock script so that only that person who owned it can open it Thanks best greetings
  4. It works so now I am finished and no it is not a mess because that's my scripting style that is logicly for me ^^
  5. So now I'm quiet close to finish my login/ register script but 1 more problem is there the server is saying that there is an error in line 6 but I think it is right StartServer.lua:6: ')' expected near ',' function loginHandler(username,password) local = connect = dbConnect("mysql", "dbname=mta_userdata;host=127.0.0.1","root","klaas","share=1" ) if (connect,"SELECT (Name,Passwort) FROM `user` WHERE (Name = ?,Passwort = ?)", tostring ( username ), tostring ( password ) ) then spawnPlayer(source, 1959.55, -1714.46, 10)
  6. triggerServerEvent ( "submitRegister", getRootElement(), username, password, passwordConfirm ) yeah but i have it this way
  7. tostring ( text ) I don't understand this string what is the text?
  8. hmm these are the fields in the databank but I only want to know how I can wrote variables in the sql string
  9. and the text comes from where? on client side I already have a script that takes the data that is post in the edit box to the server script function registerHandler(username,password) DB_connect = dbConnect("mysql", "dbname=mta_userdata;host=127.0.0.1","root","klaas","share=1") Register = dbExec(DB_connect,"INSERT INTO `user` (`idUser`, `Name`, `Passwort`) VALUES ('', 'Value', 'Value2')") end addEvent("submitRegister", true) addEventHandler("submitRegister",getRootElement(),registerHandler)
  10. Hi i have a problem How can I get for example the username and password that are from a editbox in the client script and put them as values in the dbExec command so that the text which is written in the box is postet into the database
×
×
  • Create New...