IIYAMA

Members
  • Content count

    4,098
  • Joined

  • Last visited

  • Days Won

    27

IIYAMA last won the day on April 10

IIYAMA had the most liked content!

Community Reputation

378 Superstar

About IIYAMA

  • Rank
    Soldier
  • Birthday 01/01/2016

Details

  • Gang
    [HB]
  • Location
    Netherlands

Recent Profile Visitors

4,139 profile views
  1. GetServerIp() fetch.remove

    Debug the: response variable. https://wiki.multitheftauto.com/wiki/GetServerIp
  2. "got vehicle"

    You can't apply control states directly on to vehicles. You can only apply it on to players. (Or peds with another function) In your case you have to use a ped with this function: https://wiki.multitheftauto.com/wiki/SetPedControlState
  3. Problem in code

    You may haven't notice it, but you are making an unwanted request. Please read the scripting section rules, to understand why this request is unwanted. Good luck with learning lua.
  4. [Help] Lua tables

    v.turfArea Is nil. Normally you would inspect your table structure first: iprint(turfElement) Save everything first. turfElement[idZone] = {turfCol = turfCol, turfArea = turfArea, idZone = idZone, gX = v.gX, gY = v.gY, gtSizeX = v.gtSizeX, gtSizeY = v.gtSizeY } Then this might work. for idZone,v in pairs(turfElement) do outputChatBox("" .. v.gX .. "", player, 255, 255, 255) end
  5. Chat Write

    You are making an unwanted request. Please read and mind the forum rules before posting. Feel free to ignore this post, but keep in mind that people might not like you any more. Good luck with learning lua, here is a good start point:
  6. getAccount not working

    Wiki: https://wiki.multitheftauto.com/wiki/GetAccount Returns an account or false if an account matching the username specified (and password, if specified) could not be found. Why true? https://wiki.multitheftauto.com/wiki/TriggerServerEvent triggerServerEvent does indeed return true, when the message has been send. And false if not for some reason. Ping Let me remind you that something called ping exist. This is the delay between the server and the client. Which means that triggerServerEvent can't give you the result directly back, because the code doesn't wait for this delay. Todo - You will have to use triggerServerEvent to send the username and password. - When the user has been logged in, you have to send back (with triggerClientEvent) the message that user has been logged in.
  7. getAccount not working

    the logIn function is also serverside. Accounts can't be passed to the other side, since they are serverside references only. You will have to pass the username and password to serverside and login there.
  8. getAccount not working

    Serverside scripting should run on serverside. ORANGE > getAccount, logIn Clientside scripting should run on clientside. RED > guiGetText Shared, can be used on both sides. BLUE > outputConsole Clientside > every client/player The GUI is an user interface which only exists for the clients/players. Serverside > mta server The account database doesn't exist on a player his computer. It only exist on the server, which means you can't login clientside. A tutorial on how to transfer data between both sides:
  9. Advice with tables in lua

    You may have disrespect for XML, but I am not XML... lol Databases are indeed better, just not for new users. XML hard? I think that is a personal opinion. More writing code for XML? Yes indeed, but you will know what you will be saving. If you are storing large objects, I am very sure that it might get dirt in it. (Like user data) JSON? Replacement of XML from Javascript. But can be used within XML. Which means you can parse object models of your choice. Text file client-side? Bad practice for small updates. Parsing JSON is slow. \/ If I am would use an interface client-side for client-side data. Would you resave the whole object model for every small update? I do not recommend that. JSON Problem with lua objects. {G = 33, [2]=444} After saving + parsing this, the index 2 will be converted to a string. Which can be be a surprising annoying. You might be right about that XML is not as flexible as people would hope. But there are really benefits for it, which it seems you have just to discover. Let's end the discussion here.
  10. Advice with tables in lua

    @ShayF It is not "you" for you, it is IIYAMA. A little bit respect please. Why XML? - client and server-side support.(giving the user more options) - Related to html, so more chance that the user would understand it. - Data read able without tools. - lots of MTA documentation. - not required to bind data to a client account. So yes why xml? Because this user doesn't care about optimization or file size. He want to learn how to do it and I gave him this solution because it matches his profile. Which is only to learn XML. If you think that the user wants to learn 3 different things: - accountdata - Data communication (server/client) The end user is using a GUI. - JSON Then hmmm, why not everything one step at the time?
  11. Advice with tables in lua

    There are already examples on the wiki: -- Creates a file named "new.xml" with root node "newroot" and childnode "newchild". function createFileHandler() local rootNode = xmlCreateFile("new.xml","newroot") local childNode = xmlCreateChild(rootNode, "newchild") xmlSaveFile(rootNode) xmlUnloadFile(rootNode) end addCommandHandler("createfile", createFileHandler) example by Shadowstep07052 It shows you how to create a xml file, which has a new child. https://wiki.multitheftauto.com/wiki/XmlCreateFile XML syntax: https://www.tutorialspoint.com/xml/xml_syntax.htm
  12. [Question] Internal.db

    Your internal db should already have tables. Try to re-save the database.
  13. Help

    addEventHandler("onPedWasted", root, function (_, killer) -- a ped died end) Start with /\ I will help you more if you actually put energy in it yourself, which you are not doing at the moment. Good luck.
  14. Help

    Yes, I understand that already. So I helped you a bit with it. Now start with writing your example.
  15. Help

    If you want to make an example, then isn't it correct of me to give you the right syntax for it? ???