-
Posts
851 -
Joined
-
Last visited
-
Days Won
3
Everything posted by Noki
-
*cough* luadec *cough* unluac *cough*
-
We're not going to tell you how to decompile a .luac file. But, if you look hard enough (as in search it on Google, which should be the first place to go) you will find what you're looking for. *HINT HINT*
-
I isolated the bug to my local server. And after a fresh install of MTA, the bug no longer occurs.
-
https://wiki.multitheftauto.com/wiki/Call
-
You need to post your client-side code. Oh, and you shouldn't really use triggerClientEvent with the root element as your source parameter. Use player instead.
-
MTA has separate sliders for both horizontal and vertical sensitivity. I'm not sure about others but I have never noticed jarry mouse movements or mouse acceleration in MTA.
-
Wrong section.
-
To add onto what KariiM said, tostring() converts anything into a string. local plr = getPlayerFromName("Noki") tostring(isPedOnGround(plr)) will return either "true" or "false" tostring(getPlayerFromName("Noki")) will return a string with the player element of a player named 'Noki' tostring() converts anything into a string However, tonumber() will either return a number (float or integer) or nil if invalid arguments were passed tonumber(dxGetStatus()) will return nil as you cannot convert a table to an integer tonumber("12") will return 12 as an integer
-
Lol, he didn't even release it.
-
Consider hosting it on GitHub.
-
What errors does debug throw, if any? If you want to make it give armor or health, you will need to use setPedArmor and setElementHealth.
-
I think you mean things like the specific server having a lot of DX drawings or possibly using a lot of memory (storing large tables in memory etc). You could make your safe zone script entirely client-sided if you just wanted to stop player damage within a zone. Edit: changed a word because DirectX is in fact not an element
-
You will only need to use setCameraTarget if you happen to change the target at any point. Otherwise, you can use something like setCameraMatrix in conjunction with getPedBonePosition and onClientRender to create a custom camera.
-
Personally, I prefer using camel case for my custom functions in Lua, simply because it follows the same pattern MTA is using. But it's all personal preference in the end. Clear and concise guide. I like it!
-
"If you practice half-assed, you will play half-assed." - The Express (2008)
-
Why don't you just download the module instead of compiling it yourself?
-
function Player:test() outputDebugString(self:getName()) end How would I go about exporting something like this? There is another thread that mentions using loadstring, but that really only works if I want to import the class. However, since I'm using the existing player class (containing a table with all the player functions) how would I go about running this function from another resource?
-
If the whole table was empty and he was trying to loop through it, there would be no output. Run this: t = {} for i, v in pairs(t) do outputChatBox(v) end Your table is not defined, simple as that. In Lua, if something is not defined and you try to reference it, it will return nil. Make sure you have defined weaponAmmoTable in your code somewhere.
-
Not only are the people more creative, but the mod itself is just so much richer in features and capability. Just look at what you're able to do and the vast amount of functions you can use. Coding your own server, huh? If you're new to MTA I'd play around with the scripting aspect for a couple of months (at least) before hopping right in to create a new server. Just enough time for you to get a rough understanding of how everything works. Oh, if you want to create an RP server, don't play on an RP server for ideas. Same goes for any other game mode. Originality and creativity should be utilized. What course are you completing at college? Anyway, have fun and enjoy the game!
-
My graphics card was released in 2012, same for the remaining components of my computer. It is compatible with Windows 10. I will try single player now and edit this post when it starts to happen. Update: did not happen in single player. I believe it to be exclusive to MTA.
-
After being on MTA for an hour or so, textures do not load (http://imgur.com/a/O75VV). I have to completely restart MTA in order to fix the issue. I tried to run MTADiag, but it crashes when I am prompted to press 'n'. I'm using the latest 15.9.1 Catalyst drivers and Windows 10 build 10547. The issue has persisted even before the RTM build. The issue has also persisted through all of the AMD Catalyst drivers (15.6, 15.7, 15.7.1, 15.8 and 15.9). I have a Radeon 7730M with an i7-3632QM if that makes a difference. I've altered my draw distance settings and it has not made a difference. I also use the 'borderless window' mode. I run the latest nightlies as well.
-
You will have to speak the the admins of that particular server. Explain your situation and hope they believe you. Did you buy your computer, or any components in it, second-hand by any chance?
-
No, I gave already given you the code. What you need to do is fill in the bits I have told you to. I don't know the setup of what you're working with, only you do. All you need to do is replace some words here and there.
-
Replace 'color' (and possibly `vehicleid` in the SQL query itself) with the name of the corresponding column.
-
Then you need to update it in the database with the new JSON string. As TAPL said, remove the 'tonumber' next to 'unpack'. That was my bad there. Your code should end up looking like this. function doesVehExists(vehicleName) local qh = dbQuery(connection, "SELECT * FROM `vehicle` WHERE `vehicleName`=? LIMIT 1", vehicleName) local result = dbPoll(qh, -1) if (result and #result > 0) then return true end return false end function addToDatabase(vehicleName, vehicleid, vehicleType, r, g, b) if (not doesVehExists(vehicleName)) then local color = toJSON({r, g, b}) dbExec(connection, "INSERT INTO `vehicle` VALUES (?, ?, ?, ?)", tostring(vehicleName), tostring(vehicleid), tostring(vehicleType), color) return true end return false end function getVehicleColor(vehicleid) local qh = dbQuery(connection, "SELECT `color` FROM `vehicle` WHERE `vehicleid`=? LIMIT 1", vehicleid) local result = dbPoll(qh, -1) if (result and #result > 0) then return unpack(fromJSON(result[1].color)) end return false end Update the database with the JSON string and get back to us.
