Jump to content

IIYAMA

Moderators
  • Posts

    6,097
  • Joined

  • Last visited

  • Days Won

    218

Everything posted by IIYAMA

  1. not sure, but these are the functions that can control it. https://wiki.multitheftauto.com/wiki/Se ... ntrolState https://wiki.multitheftauto.com/wiki/Ge ... ntrolState
  2. @GoldenEye Debug your code, manually. Here: https://wiki.multitheftauto.com/wiki/Debugging Afaik you would see this warning from the code which which is posted here: getElementModel: Expect element at argument one, got boolean/nil. (when you don't hit an element) Learn to debug your code or you will never be able to solve your problem.
  3. local count = 1 local dropCount = function () count = count - 0.1 end local dropCountTimer = setTimer(dropCount,50,10) Timers aren't smooth.
  4. Very nice, But can you post this at the resource page next time? That section is created for this kind of topic's.
  5. Insert the player as key: players[v]=true -- Insert players[v]=nil -- remove It it easier to manage. Require the pairs loop, to loop the list. (not the ipairs)
  6. IIYAMA

    Fixed now

    np.
  7. IIYAMA

    Fixed now

    addEventHandler ("onPlayerLogin",root, function (thePreviousAccount, theCurrentAccount, autoLogin) local anterior = getAccountData (theCurrentAccount,"Last_Drift") local total = getAccountData (theCurrentAccount,"Total_Drift") local mejor = getAccountData (theCurrentAccount,"Best_Drift") setElementData(source, "Last Drift", anterior) setElementData(source, "Total Drift", total) setElementData(source, "Best Drift", mejor) end) addEventHandler ("onPlayerLogout", root, function() if not kickPlayer (source, nil, "Logging out is disallowed.") then -- if the player doesn't get kicked(no admin rights) setElementData(source, "Last Drift", false) setElementData(source, "Total Drift", false) setElementData(source, "Best Drift", false) end end) addEventHandler ("onPlayerQuit", root, function (quitType, reason, responsibleElement) local account = getPlayerAccount (source) if not isGuestAccount (account) then local anterior = getElementData(source, "Last Drift") local total = getElementData(source, "Total Drift") local mejor = getElementData(source, "Best Drift") setAccountData (account,"Last_Drift",anterior) setAccountData (account,"Total_Drift",total) setAccountData (account,"Best_Drift",mejor) end end)
  8. Elementdata uses in my experience circa 5x less data transfer. So yes it is far more optimal way for sharing it with all the clients, which is a big difference. It only isn't isn't manage able per client and it has very less options. It is just what you want to accomplish.
  9. IIYAMA

    Fixed now

    afaik, you haven't tried to store anything at the accounts, only set/get elementdata. Leave mySQL for later, no need to learn first the basic, like: local accountData = getAccountData (theCurrentAccount, "arizonadrift") if (accountData) then local getElementData(player, "Last Drift", anterior) local getElementData(player, "Total Drift", total) local getElementData(player, "Best Drift", mejor) setElementData(player, "Last Drift", anterior) setElementData(player, "Total Drift", total) setElementData(player, "Best Drift", mejor) end local anterior = getElementData(source, "Last Drift") local total = getElementData(source, "Total Drift") local mejor = getElementData(source, "Best Drift") setAccountData (theCurrentAccount,"Last_Drift") setAccountData (theCurrentAccount,"Total_Drift",total) setAccountData (theCurrentAccount,"Best_Drift",mejor) Repost when you are done fixing.
  10. Why don't you show us some screenshots?
  11. 1- Just recreate it after a while. 2- Set it to another position. 3- Set it to another dimension or interior.
  12. The only thing you have to know, is that everything which isn't using the lua memory is SLOWER. (elementdata slow, accountdata/databases very slow and xml very very slow) You may can say they are fast enough, but lua memory is more or less optimised memory for quick use. Lua memory > variables. (which can hold: strings, numbers, tables, nil's, functions, boolean's etc....)
  13. IIYAMA

    Fixed now

    what is wrong with account data? https://wiki.multitheftauto.com/wiki/SetAccountData If you haven't 1000+ of players in your server, accountdata will do the job.
  14. IIYAMA

    firefighter

    Then use a replaced object. (and disabled the collision) or create effects. Possibility's enough, good luck.
  15. Make two small scripts, with this content you posted here. and zip it so I can test/check it.
  16. huh? what do you mean? Resource? It can speed up, because you can change the texture format. It may will take extra time to load it when you use something else then 'argb', but after it is all loaded as a "dxt5" you can speed up drawing. I am not sure if the rendertarget stay in to the GPU memory as you probably was trying to say. But since it is variable it is already in to the lua memory, I don't think this texture is much different from other textures.
  17. Not really lame, It has a lot of benefits: - You can speed up drawing. - You can edit the images. (and export them as images) - Never have to recreate those textures again.
  18. It is just what the server owners want to run on their servers, if they want cheats they get cheats, if they want to run stolen resources, be my quest. But asking people to fix random code which doesn't belong to them, that is sick. You should contact the owner for permissions to do that.
  19. Then we can't help you, stolen/illegal software isn't supported here.
  20. Go to the ones you bought the script from. If you didn't buy it, then probably will help you with this.
  21. did you checked p before the loop? To be honest it is a strange error, but please check your variables first.
  22. Afaik I it will be 1 thing. I was yesterday working with render targets. But if you want to be sure. You can use dxGetTexturePixels from that texture and set it back to a new texture. https://wiki.multitheftauto.com/wiki/DxGetTexturePixels So you also won't have problems losing the render target while using alt+tab.
  23. no indeed it shouldn't, but we are playing on a game modification which get updates all the time, so you never know. When you start ones of those resources the only error/warning you got is from the export? (Code doesn't loaded because of an error before) Well I can only gamble what is going wrong... code looks just fine.
  24. LekRoots, addEventHandler missing? https://wiki.multitheftauto.com/wiki/OnClientRender and one end and remove that. return and use as king did. elseif
  25. He means that you can't calling from serverside a client function. Which you aren't doing afaik, but if you haven't checked that, check it. Else. What if you don't attach that event handler? I know it is probably not the problem, but to be honest I have never attached addEventHandlers to my export functions. You also have to mind timing of the scripts. If you start both scripts at the same time, there is always one faster loaded. Which will most of the time go wrong when you have included other resources in the meta.xml. (the first export will fail in this case)
×
×
  • Create New...