-
Posts
6,097 -
Joined
-
Last visited
-
Days Won
218
Everything posted by IIYAMA
-
fontforge can edit/export fonts like you want. I do not recommend you to do that, unless you know this tool and can work with it. It is very complex and I am only using it to convert old print/printer fonts to convert them to use-able formats for other media. What I do recommend you, is to search for a font-family which looks like the default-bold font. This page says that the default-bold font from gui's is this font: Tahoma bold, 8px As well as this page for dx fonts: "default-bold": Tahoma Bold Finding a similar looking fonts: https://www.myfonts.com/WhatTheFont/ Fonts (a lot of them are free with licence): https://www.dafont.com/ Good luck
-
Why not use an outline font?
-
Debug the: response variable. https://wiki.multitheftauto.com/wiki/GetServerIp
-
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
-
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.
-
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
-
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:
-
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.
-
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.
-
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:
-
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.
-
@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?
-
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
-
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.
-
Yes, I understand that already. So I helped you a bit with it. Now start with writing your example.
-
If you want to make an example, then isn't it correct of me to give you the right syntax for it? ???
-
How about xml? https://wiki.multitheftauto.com/wiki/XML
-
hmm good quest. (to be honest never done it with the internal db, I did misread that part) You should start with viewing the structure of the db itself, with for example this tool: https://github.com/sqlitebrowser/sqlitebrowser This will also tell you if the db is protected (or the data is protected) in anyway. If everything is fine, then you should be able to connect with it the same way as with a regular db. If that doesn't work and yet your viewer does do the job, then you might need to convert the db to another version.
-
You want to eat zombies. ! This will tell you, when you have eaten your zombie: Client https://wiki.multitheftauto.com/wiki/OnClientPedWasted Server https://wiki.multitheftauto.com/wiki/OnPedWasted bon appétit / eet smakelijk / enjoy your dinner !
-
Only one way to go. Remove all vehicle sounds and give them all new sounds with playSound. Other ways do not exist at the moment. (1-5-2018)
-
Before you can store or receive data, it requires tables as containers. Not the best site, but it explains the basics on how to create a table. http://www-db.deis.unibo.it/courses/TW/DOCS/w3schools/sql/sql_create_table.asp.html Also handy: http://www.tech-recipes.com/rx/36940/sql-server-check-if-table-or-database-already-exists/
-
You want to close it, but: There is one thing that you might consider handy, if you want every player to have to same camera speed. local velCam = 0.02 * (timeSlice / 17) Parameters float timeSlice timeSlice: The interval between this frame and the previous one in milliseconds (delta time). https://wiki.multitheftauto.com/wiki/OnClientPreRender Good luck with developing/finishing it!
-
Because I am not asking the user to learn also oop and everything is already available on that page.
