Jump to content

Feche1320

Members
  • Posts

    461
  • Joined

  • Last visited

Everything posted by Feche1320

  1. Feche1320

    Question

    Sorry I did not understand
  2. Feche1320

    Question

    That is becouse you are indexing the table (pointing that table to the copy table).. To avoid this you can do it by copying the table asdd = { {"egy", "ketto", "három"}, {"egy1", "ketto1", "három1"}, {"egy1", "ketto1", "három1"}, } function wasd2 () local asddCopy = deepcopy(asdd) outputChatBox(asdd[2][3])-- Output: teszt asdd[2][3] = "teszt" outputChatBox(asdd[2][3].."|"..asddCopy[2][3])-- Output: teszt|teszt end addCommandHandler("teszt3", wasd2) function deepcopy(orig) local orig_type = type(orig) local copy if orig_type == 'table' then copy = {} for orig_key, orig_value in next, orig, nil do copy[deepcopy(orig_key)] = deepcopy(orig_value) end setmetatable(copy, deepcopy(getmetatable(orig))) else -- number, string, boolean, etc copy = orig end return copy end
  3. Looks like your host doesn't like include function, is it a free host? Try this:
  4. I don't think it is possible since the player's GTA3.img (this is where textures and DFFs are loaded from) does not contain the original .dff file. The first solution and not recommended is to force the player to download all stock vehicles .dff files and re-set them using MTA DFFs functions (engineLoadDFF, engineImportDFF) Of course it's a hard work and waste of bandwidth since players with stock DFFs will have to download them aswell, but I know that MTA has a function to check if a certain player has vehicle mods or not (can't remember the function name right now), so maybe you can skip players with already original .dff files. The second solution would be using the function to check if the player has mods or not, kick the player if they have and tell them to use only stock .dff files, but again, this could lead to players leaving your server since a single player won't uninstall all his mods only to play on one server (unless they are some kind of constant playing player on the server)
  5. Yeah I was thinking on moving it, but I bought it yesterday and I think I cannot transfer it?
  6. I bought domain on Hostinger, VPS is ServerArc
  7. This is driving me crazy, since yesterday night that I am with this.. I read from everywhere but I have no success unfortunately.. I bought a domain on Hostinger and a VPS on ServerArc, what I what is point my new .com domain to my VPS.. what I did was this: I've set up the DNS? (I think that they are the DNS, not sure what I did) from my VPS hosting. And on child nameservers (no f*king idea what these are) I left them blank: (Previously I set them to ns1.eru-mta.com, ns2.eru-mta.com, ns3.eru-mta.com and ns4.eru-mta.com; pointing to my VPS address but not sure if it was right, so I deleted them) Any help will be appreciated, thanks
  8. Hello, on my computer fetchRemote is working correctly.. but on my VPS I get error #400 (bad request), scripts are the same on my PC and on my VPS.. what could be the problem? The script is server-side ofcourse. local WEATHER_QUERY = "http://query.yahooapis.com/v1/public/yql?q=select item.condition from weather.forecast where woeid in (select woeid from geo.places(1) where text='CITYGOESHERE')&format=json" local players = getElementsByType("player") for i = 1, #players do if isPlayerLogged(players[i]) then local query = WEATHER_QUERY:gsub("CITYGOESHERE", getElementData(players[i], "country").region) fetchRemote(query, 2, onReceiveClientWeather, "", false, players[i]) outputDebugString(query) -- Outputs the correct syntax end end Thanks EDIT: I managed to fix it, not sure why it wasn't working on VPS but I had to add %20 for each space on the URL.
  9. Hello, I have a VPS with 2GB of RAM, which version is the best? 32 bits or 64 bits? thanks
  10. local prog = 0 addEventHandler('onClientRender',root, function() prog = prog < 1 and prog + 0.02 or 1 cX,cY,cX = interpolateBetween(0, 0, 0, 0, 10, 0,prog,"Linear") dxDrawRectangle(100,cY,100,100) end ) I think that is faster rather than math.min, not sure tought.
  11. I've fixed it using interpolateBetween, thank you anyways
  12. I made this simple scroll, I managed to get the scrollbar size depending on the amount of maps, but I need the algorithm to move the scrollbar according to the index position (variable goes +1 up, -1 down), I've been for hours trying different codes but no success.. this is what I've got so far -- Scroll pos local mapcount = _cache[inf.indextable] and #_cache[inf.indextable] or 0 local height = (inf.rectanglesamount * inf.height) height = height / ((mapcount * inf.height) / height) local starty, endy = inf.posy[1], inf.posy[inf.rectanglesamount] + inf.height - height local ofst = starty + () -- This is what I am missing.. dxDrawRectangle(posx + inf.width, ofst, 15, height, tocolor(40, 40, 40, 255)) Here is an image so you know what I am talking about: Thanks
  13. Feche1320

    Parachute

    <min_mta_version client="1.4.0" server="1.4.0" />
  14. Why you have two funcions named the same?
  15. If I remember correctly when my little brother modded his entire GTA SA game he was having a similar issue, objects appeared as you move or they had only LOD lodaded. In my opinion, a GTA bug.
  16. It depends on the use, I just used it to import +2000000 mysql rows to a sqlite database. Thanks to OP
  17. Take the example it's same. Then you are doing it wrong, sir. Take the fruit name as the index, and then add +whatevervalue to that index.. if you don't show your full code then we can't help you much more..
  18. local Leaders = { { 0, 2934.3000488281, -2052.1000976563, 3.5, 179.252929 }, { 0, 2935.6999511719, -2052.1000976563, 3.5, 179.252929 }, { 0, 2937.1000976563, -2052.1000976563, 3.5, 179.252929 } } m1, x1, y1, z1, r1 = unpack ( Leaders[1] ) m2, x2, y2, z2, r2 = unpack ( Leaders[2] ) m3, x3, y3, z3, r3 = unpack ( Leaders[3] ) function CreateThePeds() ped1 = createPed ( m1, x1, y1, z1, r1 ) ped2 = createPed ( m2, x2, y2, z2, r2 ) ped3 = createPed ( m3, x3, y3, z3, r3 ) end
  19. You cannot write to that directory
  20. Show your full script
  21. When you use downloadFile or fileWrite it gets created in that directory, take a look (client-side obviously)
  22. It outputs what you inserted on the table..
×
×
  • Create New...