Jump to content

Deddalt

Members
  • Posts

    31
  • Joined

  • Last visited

Details

  • Gang
    Valhalla (vG)

Deddalt's Achievements

Rat

Rat (9/54)

0

Reputation

  1. One more thing I want is if you'll make it so I can delete a .lua file that I've created. I right click it and hit "delete", but nothing happens. That's one thing that I'd really like to be fixed. EDIT: I tried to make a new resource and it's telling me "Object reference not set to an instance of an object." Any idea what's wrong?
  2. A few of things that I would love to see: Creating a new lua inside a resource Saving new lua files into resources Possibly when you create a new file, if you want it to be in an existing resource, it would automatically add it to the meta.xml Right-clicking on functions to add them to the meta.xml with But as soon as I can create a new lua file in a resource & save it, I'll start using this as my main method of editing / creating scripts in MTA. You've done a great job
  3. You just had to make me feel stupid, didn't you? Thanks for the help
  4. I have a command to check how much money you have in your wallet (/wallet) and I want to have it do: local wallet = getElementData( sourcePlayer, "wallet" ) outputChatBox( " * You have $"..wallet.." in your wallet.", sourcePlayer, 200, 200, 200 ) But it's giving me a weird string, something along the lines of I have a feeling that this is due to the data being an integer, but if that's the case, how do I make that data into a readable string?
  5. Well, I'm sure you've heard it before, but I think that the Woozie skin (used by Wu Zi Mu in SP) should be in MTA. It's my favorite skin to wear, so... yeah... Note: The skin looks like:
  6. I'm not planning on releasing the script to anyone, I just want to make this script work. It's unfortunate that the two things that I was hoping on using have to not work. setAccountData and SQL... Is there a MySQL plugin for MTA, then? I suppose I'll have to stop using SQLite and learn how to use MySQL instead... This is so annoying...
  7. /me is about to cry So do I need to get a MySQL server or something for this?
  8. Well I know that, but I need an example as to how to check if it's empty... like... local badtablevar = "{ { firstname=' ', lastname=' ' }, { username=' ', password=' ' }, }" if( check == badtablevar ) then triggerClientEvent( source, "register", getRootElement(), firstname, lastname ) else triggerClientEvent( source, "login", getRootElement(), firstname, lastname ) end Or something like that, I don't know what to do, so could someone please tell me how to check for an empty cell?
  9. I take that back. Now I need to know how to check if it doesn't give me anything, because it apparently isn't returning false. local check = executeSQLQuery( "SELECT lastname, firstname FROM player WHERE lastname='"..lastname.."' AND firstname='"..firstname.."'" ) if( check == false ) then username[source].firstname = firstname username[source].lastname = lastname triggerClientEvent( source, "2register", getRootElement(), firstname.."_"..lastname ) else triggerClientEvent( source, "2login", getRootElement() ) username[source].lastname = lastname username[source].firstname = firstname end end I need something to replace: if( check == false ) then
  10. Well I found out that my problem is that I have the tablecreate bug, now everything works since I'm using the SQLite Database Browser.
  11. I updated the first post with the most current code I'm using, but it's still returning the same error.
  12. resRoot = getResourceRootElement(getThisResource()) function createSQLTable( ) executeSQLCreateTable( "table", "username BLOB, password BLOB, lastname TEXT, firstname TEXT, wallet REAL, bank REAL, faction BLOB, admin INTEGER, phours INTEGER, skin INTEGER, pos_x INTEGER, pos_y INTEGER, pos_z INTEGER"..string1..", "..string2..", "..string3 ) end function Connect( ) username = { } username[source] = { } fadeCamera( source, true ) username[source].log = 0 setCameraPosition( source, -2642.8926, 1927.8561, 224.3582 ) setCameraLookAt( source, 1481.1476, -1750.8605, 15.4453 ) setCameraMode( source, "fixed" ) local name = getClientName( source ) local firstname = gettok( name, 1, string.byte( "_" ) ) local lastname = gettok( name, 2, string.byte( "_" ) ) local check = executeSQLQuery( "SELECT lastname, firstname FROM table WHERE lastname = '"..lastname.."'" ) if( not check == false ) then triggerClientEvent( source, "2login", getRootElement() ) username[source].lastname = lastname username[source].firstname = firstname else username[source].firstname = firstname username[source].lastname = lastname triggerClientEvent( source, "2register", getRootElement(), firstname.."_"..lastname ) end end addEventHandler( "onResourceStart", resRoot, createSQLTable ) It is returning the error: ERROR: Database query failed: near "table": syntax error (SELECT lastname, firstname FROM table WHERE lastname == 'Tokudaiji' )
  13. I want to make all of my vehicles in a .map, but I want to be able to handle them individually. Also, I want to have a /start and /stop command for turning vehicles on and off. What would be the shortest way to do this?
  14. You can use it, sure, but it doesn't work.
  15. I'm new to LUA so I can't really tell you if it's possible on MTA, but I know on SA-MP it's impossible.
×
×
  • Create New...