John Smith

  • Content count

  • Joined

  • Last visited

  • Days Won


John Smith last won the day on February 14 2017

John Smith had the most liked content!

Community Reputation

31 Good

1 Follower

About John Smith

  • Rank
    Crime Partner


  • Gang
  • Occupation
  • Interests

Recent Profile Visitors

1,171 profile views
  1. White image gets black borders when scaling down height

    Thank you man for replies. Didn't even know how these formats performed before. It's just making me sad that my designs can't be loaded correctly and scaled, they are very simple shapes made in Photoshop and they can be done in literally 30 seconds so there's no complexity in it whatsoever. The solutions of different formats such as dds with compressions like dxt5 are very useful and I'll take a good look on using them for images that don't require too much quality and images that would fit the power of two type of dimensions, however this one would look weird with power of two so I'll just look at the format how it operates but it won't fix my issue due to it needed power of two dimensions and not using them will lead to blurring i suppose? I've been scripting from 2013 and honestly I haven't seen such an issue like mine at any time. Could this be a bug in MTA's DirectX? I could give you a simple resource for reproducing this with my exact image if you'd like, I don't know would that help any of this because frankly I have 0 ideas why this is happening in first place and all I know is that images are definitely good, and even when i zoom them in right to the pixels the program which is zooming them doesn't have any distortions and shows the image correctly, unlike MTA.
  2. White image gets black borders when scaling down height

    Thank you that has solved it. However, what about images which have more colors? For instance, I can reproduce same issue I had with a rectangle which has glowing effect in a different color (when it's not PNG-8). However PNG-8 has 256 color limit, plus I need to convert all of them to that format which is a bit time wasting and reduces quality (of some) elements Why does this occur anyway? Does the color mode (8 bit, 16 bit, 32 bit) affect this? I've just noticed that all of those images were made in 8-bit Color Mode with Photoshop, haven't noticed that before, it must be the default setting or something, I'm guessing that if i rework the images in 16 bit color mode or in 32 bit color mode that this issue should go away? Edit: tried 32 bit color mode, still appears with black bordes when scaled...
  3. Hello. I've run into an issue where I'm having a big white button image and when i draw it smaller than it's original dimensions, it gets black borders. On these links below you can notice difference where first link is picture drawn in original image dimensions while second link is same width of image but with reduced height. original - scaled down - Now i do understand that when bigger images get scaled unproperly that it can lead to stretching and those sorts of problems but this image is 99.9% white pixels with just a little bit of white-ish bits on left and right side where button is being rounded (made circular) I've also attempted to scale the image properly, by just using width / 2, height / 2 of original image dimensions, so that it's scaled down correctly, but the issue always happens when image gets scaled down, it gets these annoying black borders. I'm wondering, is that normal thing to happen or it shouldn't happen? Because the image is 99.9% white, I'm gonna show you below how it looks like in pixels when fully zoomed in I hope you understood my words in this topic, as I've rushed them a bit. Thanks for reading. Edit: tried making the image even smaller, same thing happens, unless i do it in exactly the same dimensions which are needed in game, but if i wanna scale it, then rip
  4. How to know whether the world objects have been loaded

    Hey, thanks but onClientElementStreamIn doesn't work on world objects, I've just tested it. Dunno what else there is to do, should I just make a feature request on bugtracker?
  5. Hello there. When you e.g setCameraMatrix to somewhere like thousands of meters from your original distance, the game takes up to 2-5 seconds to load all the objects in your streamed in radius. So I was wondering whether it's possible to determine when that loading has been finished, or to somehow make it load faster? Oh and doesn't work for this case, tried it anyway but as I expected it didn't work as it wasn't intended for that. Thanks for reading.
  6. dbQuery - why not use local function?

    Probably because callback functions aren't called instantly, rather it waits for result, and after your function finishes that code, everything that was declared local inside of that function will be erased from memory automatically, thus making your local callback function non-existant and so you'll never recieve result from dbQuery
  7. Well, that's just disappointing
  8. But why was this abandoned?
  9. client script are hidden

    Scripts are relatively in very small sizes of just few kilobytes, and even if you had lots of resources with lots of scripts, it would probably never exceed 1 MB of download, and for normal users it never really exceeds 200 kb. If someone has a problem downloading this small amount of kilobytes, then they shouldn't even use the internet at all.
  10. How i can get one data from table?

  11. clipboard text

    You can't due to privacy reasons.
  12. What can i do if someone stole/hack my server?

    Usually people get a globan ban if they were using hacking software or something serious, but if you gave someone an admin and he destroyed it, i'm afraid then it's your fault. Same for the scripts. If you really think that someone actually hacked admin system in your server, and you think your scripts are not to blame for that, then you can contact @ccw, but make sure that you have proof for that and it would be good to know or at least have a theory how someone did the hacks. I'll just write down script security measures which i recommend , just in case: Use on your scripts with maximum encrpytion (obfuscation). And in meta.xml in your resources make sure that client scripts which look like: <script src="client.lua" type="client" /> Change them into this: <script src="client.lua" type="client" cache="false" /> Setting cache to false will make sure that players who play your server don't have any client scripts downloaded on their PC, but instead it's run inside their RAM. With script security you can never be 100% safe, but you can make it harder for people to steal it by doing these methods which I've mentioned. Also, be careful who you give admin access too, it can be dangerous. However, if you give someone FTP access to your server, and they abuse it, then they can basically do anything, steal/delete anything.
  13. [REL] Hex-colored nametags (physical - above head..)

    The resource had an update, in case you guys are using this resource, update it to newer version as it fixes some issues like bug with nametags not being shown correctly on players in vehicles and the newer code has various optimizations to prevent client lag when run with too many players. Also the code has been tidied up a bit, got rid of some forgotten leftovers.
  14. [HELP]Team Spawn

    Hello. It would help us to help with your issue, if you would put that code in a code box which this text editor on this forum offers, you click on it, and it looks like < > It's easier to look the code when it's inside that code box as it makes it look better to diagnose. Also, use /debugscript 3 and tell us if you have any errors there when you start the resource. (/debugscript 3 info is also essential in helping us to help you with your problem when asking about script fixes)