-
Posts
6,097 -
Joined
-
Last visited
-
Days Won
218
Everything posted by IIYAMA
-
Jup, yup, yep, (Except for the typo of the event on line 35 > onResourceStop) And this line: fileSetPos(file, fileGetSize(file)) It only has to be called ones, when the file already exist. But is not a critical thing. After writing lines, the position will also change, so no need to call it every time you add content.
-
You can't have the same reason, because of line 6. nil values are not allow to pass line 6. Pls restart everything correctly. You probably have some data in your db which doesn't have a valid shaderid. Which means you have saved some incomplete/corrupted data. Validate the file-locations in your db with: https://wiki.multitheftauto.com/wiki/FileExists Delete those that do not exist.
-
outputDebugString("filename[i] = ".. tostring(filename[i])) if theskinId then fetchRemote("http://localhost/shadersqsdqs/"..theskinId..".jpg", checkPlayerAlternateSkin) end
-
I can't help you if everything is correct. You have to be more specific. AND DEBUG YOUR CODE MANUALLY LIKE I DID FOR YOU! outputDebugString(tostring(theskinId))
-
There is also math.max (another problem) else aFinal = math.min(aFinal - 20, 0) dxDrawRectangle(posX,posY,sizeX,sizeY,tocolor(r,g,b,aFinal)) end else aFinal = math.max(aFinal - 20, 0) dxDrawRectangle(posX,posY,sizeX,sizeY,tocolor(r,g,b,aFinal)) end
-
for i=1, #filename do -- local theskinId = filename[i].shaderid outputDebugString(tostring(theskinId)) -- end ? https://www.lua.org/pil/4.3.4.html
-
Opening and closing a file for every command isn't a good idea. (when the file gets larger you might experience lagg) That's why the fileFlush function is so important. fileFlush
-
It does, you just have to search better. https://wiki.multitheftauto.com/wiki/FileCreate In the Netherlands we would call a you a 'blind chicken', although it is just a way of announcing somebody who doesn't search very well. (don't take this personal) -- on the top of your script local newFile = fileCreate("command.log") fileFlush ( newFile ) -- log files require buffers to reduce hard-drive writing. (more performance) -- -- when a player writes a command if (newFile) then fileWrite(newFile, "Log the blind chicken!") end -- -- on resource stop > if (newFile) then fileClose(newFile) end --
-
You should change your service. Nobody is going to pay monthly for a service like this. Because: There are not a lot of model creators on this forum, most of the models are from thirth parties and easy to trace back. You can always keep it monthly, but pay for a single model must be available.
-
1.0.3 progress Functions added: Saving window position and scale A small useful backup after restarting the resource. (50 items remain available for 1 min, after stopping the resource) experimental + experimental + experimental + ... I added an experimental function, which allows you to open files automatic in resedit. You can find the installation later on the bottom of the client.lua file from version 1.0.3 . It is experimental, I am not in anyway responsible for damage to your files. I hope this can be done official and added by the owner The_GTA himself. That's why I will not prepare those files for you, you will have to install it yourself. Unfortunately he hasn't been online for a while, I contact him on Google+ so lets wait for his response. The reason why I am making this available, is that you guys can check if you want something like that in the debug console. It seems he has replied. So the quick file open feature for resedit might come! And I cleaned up the debug console code a little!
-
Thinking you fixed all errors and warnings. A common thing, but do you always have to be the one that creates them? Also are you always in the server when they appear? Of course not. It seems, I still have a few of errors and warnings in my server. The debug information collector is my solution, see the useful information it collected for me: Warnings Errors
-
Using: loadstring But it is a complex process/project, I do not recommend you to start building it. (and no it isn't just loadstring, it is much more than that) can u give me an example ? local exampleString = ' addEventHandler("onClientRender", root, function () setElementPosition(localPlayer, 0, 0, 100) -- I am stuck... Not funny! end) ' Load the code for a single client! loadstring(exampleString)
-
Using: loadstring But it is a complex process/project, I do not recommend you to start building it. (and no it isn't just loadstring, it is much more than that)
-
You can't replace a timer with a for loop! But you can make the code dynamic with a "for" loop. local glitchesTable = { {"super_sprint", "fastsprint"}, {"fastmove", "fastmove"}, -- etc.! } for i=1, #glitchesTable do local glitchData = glitchesTable[i] local glitchValue = tostring(get(glitchData[1])) local glitchName = glitchData[2] if glitchValue ~= "" then setGlitchEnabled ( glitchName , glitchValue:lower() == "true" ) end end
-
You could edit the code ? "You could edit the code ?" = a very arrogant way of asking somebody his help Instead of that, you can ask it like this: "Can you pls help me with editing the code, so that I understand what I have to change?" If you don't know anything about LUA, you shouldn't ask this in the first place, but follow a tutorial first, study examples and ask specific LUA questions.
-
Changing it's color over time.
-
You could edit the code ? Watch your mouth, don't be so arrogant!
-
if vehplayer then if getElementModel(vehplayer) ~= 582 then else end end
-
+ pairs, loops through custom indexes, like: local tableAsIndex = {} local thisTable = { ["customIndex1"] = 45836, ["customIndex2"] = 45836, [true] = 3246765, [localPlayer] = 547356, [resourceRoot] = 5646745387, [tableAsIndex] = 354654638 -- etc. }
-
Try to find a script which enables: "fastmove" https://wiki.multitheftauto.com/wiki/SetGlitchEnabled These seem to have it: https://community.multitheftauto.com/in ... s&id=11059 https://community.multitheftauto.com/in ... ls&id=5317
-
Debugging isn't just watching the stupid console, it is much more than that. So read this page: https://wiki.multitheftauto.com/wiki/Debugging Read everything! Except for Debugging Performance Issues. The most important subject is: "Debug strategies" So make sure you study especially that one.
-
player is NOT the same as Player This language is upper-case sensitive.
-
Something like this. You have to adjust it to your girdlist. local itemsHeight = rowHeight + 3 local startBoundaryY = top addEventHandler ( "onClientClick",root, function (button, state, cursorX, cursorY) if button == "left" and state == "down" then if cursorX > 300 and cursorX < 400 and cursorX > startBoundaryY then local yPositionOnItemIndex = (cursorY-startBoundaryY)/itemsHeight if yPositionOnItemIndex < rowHeight then -- so without that 3 pixels offset on the top. local itemIndex = math.floor(yPositionOnItemIndex) outputDebugString("item: " .. tostring(itemIndex)) end end end end)
-
You haven't added a wrapper function called pairs in your code?
-
Something like this: local startBoundaryY = 400 local itemsHeight = 30 addEventHandler ( "onClientClick",root, function (button, state, cursorX, cursorY) if button == "left" and state == "down" then if cursorX > 300 and cursorX < 400 and cursorX > startBoundaryY then local item = math.floor((cursorY-startBoundaryY)/itemsHeight) end end end)
