Jump to content

John Smith

Members
  • Posts

    656
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by John Smith

  1. Well what if by unlucky conditions it happens that specific entry im looking for just appears to be at the bottom of loop? That way it would still have looped through whole table (though this wouldn't happen often) However I am interested how much does this big kind of looping affect the server and in what way, and which events would be suitable for using MySQL stuff What if that database wouldn't just have accounts on it, what if it had something more common, like maps for instance, they would change every few minutes, so if server would be looking for map data from MySQL database and if there were couple of thousands maps in MySQL database, it could affect the server.. TL;DR: what are the impacts of looping through MySQL table consisting of few thousands or tens of thousands of entries?
  2. Hi. I haven't really used MySQL in MTA so I don't really know how well it performs so I'm going to ask you guys a couple of questions (please answer only if you have actual experience with this or are sure that it is correct) If my MySQL database had a table consisiting of 20000+ stuff inside it, lets say accounts And i need to check specific account's data from MySQL or change it, when would it be best to do so? There are more than 20 thousand entries for accounts inside of that MySQL table, so wouldn't looking for specific account be kinda performance impacting to server? So when would be the appropriate time to access MySQL data in that case? Or is MySQL really fast so it doesn't matter that much? I don't really know much about MySQL since I haven't really used it so I'm asking you guys to help me out to learn some stuff about it. Oh and if there are some topics here explaining this sort of stuff regarding MySQL please show me the topic(s) haha Thanks for reading
  3. https://springrts.com/wiki/Lua_Performance#TEST_9:_for-loops
  4. Numerical looping is 2 times faster than pairs, while pairs is slightly faster than ipairs.
  5. I believe it is fixed now thank you Let me just ask; do you happen to know why does Windows do this? Why does it even disable access to graphics card?
  6. nvm this post wrote something which i thought fixed this issue but it didnt, i'll edit post when i reinstall the drivers
  7. I'm just playing around in a server and game starts glitching like this: looks like game is gonna crash (gameplay freezes) game goes to desktop returns back to game black screen screen shows screen freezes again starts normally working again this happens around 3 times under few minutes and after like 3 times it comes to desktop and it crashes and gives a directx error and here's pic of error i'm getting I've taken a look in mtasa link, updated DirectX (it was already up to date) Updated some C++ thing Updated to latest nightly Updated graphics card Problem is still there, I don't know what to do, Windows 10 is mean and i don't like it. https://pastebin.mtasa.com/134178216
  8. Thanks for giving specific details why you need them
  9. You're using theTable as a function argument and then creating it below which is a leftover by the way, and the handler function is supposed to handle the table (aka recieve it), not create it. However thank you for trying to help me out, but this isn't what I'm looking for Edit: Well, this seems to be more an issue with triggerEvent, so you guys don't need to reply anything.
  10. Hello. I am using this piece of code as a test example here: Mother = {}; Mother.__index = Mother; addEvent("onClientHandlerEvent"); function Mother:new() local self = setmetatable( {}, Mother ); self.type = "Mother"; triggerEvent("onClientHandlerEvent", localPlayer, self); return self; end function handlerTable(theTable) outputDebugString(tostring(theTable:getProperty("type"))); -- attempt to call method :getProperty (a nil value) end addEventHandler("onClientHandlerEvent", root, handlerTable); function Mother:getProperty(property) return self[property]; end local myMother = Mother:new(); outputChatBox(tostring(myMother:getProperty("type"))); -- works The issues that I'm having with this is that when I transfer the table with triggerEvent, function which handles that custom event cannot call any custom methods because apparently they're 'nil'. Why is this happening? Is this a triggerEvent issue?
  11. Nope, you can only load script code on client-side with loadstring function by reading script file's content and putting it in loadstring(fileContent), however that is much more complex thing to do, and it would require you to script a custom script loader which would be needed to unload the code which you have loaded with loadstring. If your goal is to make only 1 player see custom skins, you can do it already with functions such as engineLoadDFF/engineLoadTXD/etc on client-side, but make sure that that client code gets only executed for that player for who you want the skin to be visible
  12. Jesus... replace startResource ( skinnew ) with startResource(getResourceFromName("skinnew"))
  13. Hopefully that forum upgrade will bring a new, more modern looking type of forum
  14. I believe that MTA already has stream memory fix implemented for a long time now.
  15. Congratulations. Now go and script something actual good rather than copying other people.
  16. Thanks, it worked but, now the brightness setting doesn't have any effect and mta looks too dark, is there anything i can do about it? before moving to ssd i had fullscreen set to standard and alt-tabbing worked instantly.. Edit: I tried comparing how brightness looks in Fullscreen Standard and Borderless and it seems that brightness in Video section of settings doesn't affect the mta menu at all, and at Borderless setting the mta menu gets really darkened unnaturally Edit2: I realised disabling anti-aliasing fixes the issue so my brightness is like it should be, and it minimizes instantly (now its at Fullscreen Standard) However, is there a reason why anti-aliasing causes this?
  17. Hello. I've recently installed MTA on new SSD (Windows 10 Pro) and I've noticed that when i alt-tab or click windows button, it takes around 5 seconds for blackness to disappear and then it finally gets minimized to desktop or other window. I've had issue like this with earlier version of MTA and usually it would be because of some setting, but I don't remember which. Normally when you alt-tab it's instant, but I gotta wait 5 seconds or more for MTA to minimize and it's kinda annoying I'd post a MTADiag log here, but I cannot download it from files.mtasa.com link as it gives me SSL Error (Connection not secure)
  18. I don't know if there's such specific function, but most closest one to it is this one: isElementWaitingForGroundToLoad If above solution doesn't work, and there are no other functions to check if objects are loading, you can suggest that function at bugs.mtasa.com
  19. You can literally just edit mta shortcut icon on desktop by yourself
  20. https://forum.multitheftauto.com/viewforum.php?f=116
  21. Most probably happens due to this line of code in race_server.lua: addEventHandler('onGamemodeMapStop', g_Root, function(mapres) --Clear the scoreboard for i,player in ipairs(getElementsByType"player") do setElementData ( player, "race rank", "" ) setElementData ( player, "checkpoint", "" ) end fadeCamera ( g_RootPlayers, false, 0.0, 0,0, 0 ) gotoState('NoMap') unloadAll() end )
×
×
  • Create New...