Jump to content


  • Content Count

  • Joined

  • Last visited

Everything posted by Ab-47

  1. Ab-47

    The last reply

    This last reply topic will never end not on my watch
  2. Ab-47

    The last reply

    April 2020, cool!
  3. "scoreboard" is an old resource, check to see if scoreboard even exists in your resource folder. The new one is dxscoreboard, same syntax I guess. Also, I would advise you to remove your code and just leave the exports, as far as I could see your code should work fine. Just the exports that aren't being called properly. Syntax looks correct, no typos spotted either. If you do have the old scoreboard, try updating to dxscoreboard and running the code again, let me know if there's any errors.
  4. Ab-47

    anti afk

    Could you be more specific about what you want? I could walk you through setting it up or creating one yourself.
  5. To answer your question, just use "takeWeapon" at the else. Also, it'd be more convenient using tables for these sorts of things. Element data is not the wisest choice. For example: local using_phone = {} function togglePhone(player) if (not using_phone[player]) then using_phone[player] = true --You could also add giveWeapon here (to continue your script) --Animation here else using_phone[player] = false --And here you could add takeWeapon here. --End animation here
  6. I was just thinking about this, getRealTime could actually work. I assume getRealTime would use the servers local time otherwise you could create a custom script where you could use fetchRemote to return a specific time using PHP. It's not that difficult either, PHP is somewhat similar to Lua. However you would need an online website for that. I wouldn't really recommend fetchRemote, just the standard MTA getRealTime should do the trick.
  7. Ab-47

    Warp player to

    Or you could just do this.. addCommandHandler("easr", function() local sx, sy, sz = getElementPosition(source) for i, v in pairs(getElementsByType("player")) do setElementPosition(v, sx + math.random(5, 10), sy, sz) end end )
  8. Ab-47

    The last reply

    You won't get away that easy hehuheuh
  9. Ab-47


    You're creating a GUI in your code, I just modified the code you sent above including the variables you mentioned in your code. Try this isHolding = false addEventHandler( "onClientGUIMouseDown", getRootElement( ), function ( btn, x, y ) if (source ~= inventoryGridlist["inventory"]) then return end if btn == "left" and getElementType(source) == "gui-gridlist" then clickedElement = source local elementPos = { guiGetPosition( source, false ) } offsetPos = { x - elementPos[ 1 ], y - elementPos[ 2 ] } isHolding = true end end )
  10. Sorry for the late reply, in simple terms you can just call the setAccountData function again and again for as many variables as you like but the name must change setAccountData(account, "objectID1", id1) setAccountData(account, "objectID2", id2) setAccountData(account, "objectID3", id3) But to retrieve it you must call each piece of data, objectID1, objectID2, objectID3 and so on. But that's all time consuming and pointless A better way to do that is by setting the toJSON converted table to the account data and use fromJSON to retrieve it as stPatrick mentioned above. If
  11. Your code is a bit messy, I fixed a few typos that you had. Not gonna suggest SQL, it may be a bit more complex for you so for now just use accountData to save the ID. Player has to be logged in for this to work. Also added an extra function for when the player logs in, if the data was saved to their account it'll respawn on login. [[ Client ]] function finel () local item = guiGridListGetSelectedItem (myGirld) ID = guiGridListGetItemText (myGirld, item,3) body = guiGridListGetItemText (myGirld, item,4) rot = guiGridListGetItemText (myGirld, item,5) prices = guiGridList
  12. Ab-47


    You could use the following functions/events > (Event) -> onClientClick -> Returns: you'll need to identify the clickedElement as the type of GUI you want to move button, state, absoluteX, absoluteY, worldX, worldY, worldZ, clickedElement Instead of the above you could use: (Event) -> onClientGUIClick -> which returns the clicked GUI element rather than an element clicked -> returns: button, state, absoluteX, absoluteY (Event) -> onClientCursorMove -> Returns: use absoluteX, absoluteY as your X / Y params needed to move. cursorX, cursorY, ab
  13. I did mention above to remove your headphones lol, but anyways, I guess you have your sound/devices default as your monitor. Open your control panel > click "Hardware and Sound" > click "Sound" > a box should appear, try select the device you want to use to output your sound and click on "Set Default". Maybe that would help, maybe your default device is set to the wrong thing. If that doesn't work, right click your sound icon and click "Troubleshoot sound problems" and run the troubleshooter, it should fix your issue. If after changing your default device and your sound does
  14. Well at-least you're getting somewhere now. Does MTA run fluently as-well, just without sound? Just double check that your sound drivers are updated and your sound is enabled in MTA settings > Audio tab.
  15. Honestly I don't know what the issue could be, so I'm sorry. Don't give up yet, try do the following: Delete the gta_sa.set file located in the GTA San Andreas User Files in your Documents folder. Check in your GTA San Andreas installation directory for a D3D9.dll. If one is present, delete it. Then install MTA SA's latest version without starting up GTA SA. Then install the latest patch: https://nightly.mtasa.com/?mtasa-1.5-rc-latest After all of that, try run MTA SA and click "Host Server", just enter your own local server to see if you could actually load the game with
  16. Ab-47

    mta timed out

    Well to test if the issue is actually there, try playing directly through your modem rather than the router and see for yourself. I'm not sure if there's a way around this as it's nothing to do with the configuration, rather the gateway between the 2 devices causing the jitter which is enough to take you offline for a few seconds. Maybe do a little google search to see if other gamers had this issue, I'm guessing your best bet would be to buy a better router lol
  17. I really don't know what the issue could be.. Have you tried double checking to see if MTA is allowed through your firewall or if windows defender sees it as a threat? Or another antivirus program interfering? After all you've tried I believe the issue relates to access (Can't access D:\jocuri instalate\MTA\mods\deathmatch\resources\benchmark\output\bench.log) for example..
  18. Ab-47

    mta timed out

    Oh okay, now you've made that clear it's not just one specific server, it's your internet. I remember a while back allot of people had issues to do with connection timeouts even whilst their internet had quite a good speed, and that was because they were using a router to boost their WiFi signals through a modem. Do you have a setup as such? Router connected to modem?
  19. No no, it does show as D drive I never saw that. You could try re-install it into the C drive maybe the D drive has some restrictions?
  20. Ab-47

    mta timed out

    Then you haven't explained your situation clear enough because lag can either be from you or the server, if it's neither where would the lag come from? You mentioned above, That it's on this one server. Then karts asked: And you replied: So if you're not having issues yourself and you're not having issues with "other" servers, then where do you think the issue is? Right. Read my post again: I'm talking about the "server" you're connecting to, nothing to do with you or your connection.
  21. If you just need the server information, you could use https://www.game-state.com/index.php?game=mta, it'll tell you all the information you need and all you need is the iframe or image.
  22. That way is more sophisticated and onClientRender will use a lot of memory, easiest and best way to do it is use create a table of positions then use createObject in a loop through the data in the table (positions), set a perimeter using any object you like, then create a loop that runs 1 time to setElementAlpha(object, 0) of all objects in the table. Easiest way to create the objects is literally map editor, create all of them then convert the .map file to .lua Whichever solution you find best, you can go with. XasKel's way seems better in the sense of reversing the position if it's
  23. I just figured out the illegal character thing as XasKel pointed out lol "then" is not actually "then", it has an invisible illegal character that the system can identify but not you, leading it to not be a correct statement. I've created a workaround for your code for testing purposes and removed all the illegal characters, take the code from what I've pasted below and make sure you eliminate all the illegal characters. function checkWhatever(cmd, string) if string == "can" then if getPlayerMoney(localPlayer) >= 5000 then if getElementHealth(localPlayer) ~
  24. Are you using headphones? If you are, try not inserting them, reinstall GTA again, then try install MTA in a separate destination then reboot your PC but DO not insert your headphones. Give the game a run and see if it works, if you have issues after you plug your headphones in it could be a driver issue. Try the following below, worth a try. If none of the following work, I could try suggest a few more but we'll just have to wait for the mods/admins to read through your MTAdiag to diagnose the issue. I've tried finding the issue and it looks like it's from here: You may want to try id
  • Create New...