• Content count

  • Joined

  • Last visited

Community Reputation

85 Popular


About MrTasty

  • Rank
    Road Dawg


  • Location
    United Kingdom
  • Occupation
    Scripting Guru

Recent Profile Visitors

1,755 profile views
  1. Have you read attachElementsOffsets (it's linked in the attachElements wiki page)? Maybe something in there will help.
  2. MrTasty

    MTA Server MySQL problem ZeroMTA

    The error message is self-evident: `safeusername` local variable is a nil value (null or undefined), and you tried to append or concatenate it in a string on like 857 in s_account_system.lua of resource `account-system`. Most likely you just didn't define a value for it.
  3. MrTasty

    Plate Vehicle

    In the last 17 hours, you've made 5 topics and 3 of them provided you with fixed code, so don't pretend like it's "just this time." Please, for the sake of us all, get help from us to learn to script instead of leeching off the work of others. We're here to help, not work for you. Please try it yourself just this time
  4. MrTasty

    questions about creating lobby system

    Element hierarchy and parenting has nothing to do with sync, its mostly about propagation. The second parameter is simply a question of where in the element tree the map will be loaded. On the second point, everything created on the client side is only created on client, it is not synced to the server. This includes objects, vehicles, markers, peds, blips, everything.
  5. MrTasty

    setSoundMaxDistance Problem

    local x,y,z = getElementPosition(source) And make sure when you trigger that event on the server, that the source of the event is the player who played the song. I.e. triggerClientEvent(root, "syncSong", thePlayerWhoPlayedTheSong) -- ^ who will hear the song ^ event source
  6. "error attempt to index upvalue "users" (a nil value)" This means that the local variable users is a nil value, and you tried to index it (users[name]). Is what you posted here the whole code? Perhaps somewhere in the full code users is changed to a nil? The snippet alone seems to be correct so I don't know why users would be a nil value.
  7. MrTasty

    Custom Animations Question

    You don't need the skill to be 1000. It's enough to change walking style to 56 and you basically have exactly the same animations you'd get with 1000 muscle stat CJ. Sprinting still doesn't work, just it doesn't work with CJ on 1000 stat.
  8. MrTasty

    Custom Animations Question

    First of all, you should have clarified from the beginning that you're talking about sprinting. I was under the impression "run" means "run", not "sprint". Now, I have never heard of being able to sprint with an M4 in SA with the muscular animations (or any other armed animations for that matter). I have just tried it and you can't sprint as CJ with or without 1000 muscle stat or whatever. It's not possible, unless you change the walking style into something other than armed animation sets). Indeed, there is literally no animation for sprinting with a two-handed weapon within the muscular animation set. You can use a different walking style and override (with engineReplaceAnimation) whatever you need. If you need original animations of muscular style, you need to extract them and put them into your custom ifp to use for engineReplaceAnimation (unfortunately it seems engineReplaceAnimation doesn't allow for redirecting default anims to other default anims. Perhaps that might be a good suggestion/issue to open).
  9. MrTasty

    help i get number color

    MTA's default "info" chatbox outputs (including this connect message) use RGB 255, 100, 100 (#FF6464)
  10. MrTasty

    [HELP] Prone Script [Z]

    If it's not on the community site then it's most likely propriety - that MTA PUBG server owns that script and if you want it from them, you should contact them directly. If you're looking for someone to script a copy of it for you, you're in the wrong place - we're here to help, not to fulfil requests.
  11. MrTasty

    More functions\

    engineApplyShaderToWorldTexture Tip: • When using with a 'ped', ensure you have set 'ped' or 'all' in the elementTypes when calling dxCreateShader By default, dxCreateShader does not create a shader that works on peds. You need to manually set that.
  12. MrTasty

    fileExists returns false after resource restart

    TeaEncode returns a base64 representation of the encoded payload that's about 33% inflated in size from the original text. When dealing with DFFs or other binary, TeaEncode needs a base64 encoded input, a ~33% larger input. The output size with base64'd input is ~76.89% larger. encodeString doesn't base64 the output nor does it need the input to be base64'd, and seems to return a barely inflated output; Specifically, 100.00168517551% of the original size in my quick test using a vehicle model DFF for input.
  13. MrTasty

    fileExists returns false after resource restart

    Because non-latent events are guaranteed to arrive in order, a side effect is that a large payload (such as a file) in such event will hang the event manager, since subsequent events need to wait and yield to this big event, so that they arrive after that big one, ensuring order. Using latent events, however, allows you to forego this guarantee, and also limit transfer rates among other things. Latent events are suited for sending over large data that isn't sync-like, such as file contents. As to fileDownload, it downloads the file as-is on the server, and at every reconnect or restart, it compares the server's hash; if the file is different on the client (outdated, for example), it will re-download; so if you encrypt the file after downloading, it's no longer identical to the server file and thus will be re-downloaded on restart. You should, as suggested above, encrypt it on the server and send to the client via a latent event, later caching the contents into some file on the client's computer. You will also need manual hash checks to make sure the client didn't replace, edit or break the file, on onClientResourceStart. Further, the loading errors are almost definitely because you did not Base64 the TEA input (required for binary data in teaEncode); preferably move towards encodeString and decodeString as these do not require Base64ing (thus lower CPU and bandwidth use). Finally, I'd ultimately recommend just pre-encryping rather than encrypting on-the-go whenever a client demands either a hash check or the encrypted contents from the server, as that causes the server becomes busy encrypting what could have just as easily been encrypted earlier.
  14. MrTasty

    Help revive system.

    How about you attempt it on your own and come back if you encounter any problems? We're not here to script for you.
  15. MrTasty

    File contains error

    MTA raises that error when the DFF's headers don't add up, indicating some data integrity error (possible file corruption). Perhaps these mods do work, but they share similarities (corrupted header) with mods that crash the client, so that's why they get blocked.