Jump to content


  • Posts

  • Joined

  • Last visited

About NeXTreme

  • Birthday 05/11/1995


  • Gang
  • Location

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

NeXTreme's Achievements


Sucka (13/54)



  1. Hello, The wiki page for addEventHandler provides a good description of this parameter: "The handler will only be called when the event it is attached to is triggered for this element, or one of its children.". To understand this, you need to be familiar with the Element Tree. Basically, the attachedTo parameter allows you to restrict the events to a particular element. If I have, for example, 3 GUI buttons, If I were to attach an onClientGUIClick to the Root Element, it would be triggered when any of the 3 buttons are clicked. However, if I attach the same event to just one of those 3 buttons specifically, it will only get triggered when that specific button is clicked. To know what element to attach an event handler to, look at the Source section on the event's wiki page. For events like onClientClick, it says: "The source of this event is the client's root element." . The root element is on the top of the element hiearchy, therefore your only option here is to attach it to the root element. As mentioned before, with an event like onClientGUIClick, you can attach it to the root element to receive GUI click events from ANY resource, you can attach it to getResourceRootElement() to receive GUI click events from only THIS resource, or you can attach it to a specific GUI element and only get events from that single element. Of course, you can always attach an event to any element you like. With custom events (say, showLoginGui like yours) it's important to consider how the event will propagate. If you have the same event registered in two different resources and have both attached to the Root Element, you couldn't really control which one you want to trigger. The Event System page provides a good description of how this works exactly, I highly recommend you read it.
  2. Download link seems to be broken, could you post a new one?
  3. Me and my friend are having a problem where the local player can't be killed (with explosions, weapons) by other players, when the camera's position is set to a distant location, making the player and his vehicle out of the streamer's range. For example, if I'm position in my car near Vinewood, and then move my camera (but not myself) to Las Venturas, I can't be killed by weapons, explosions, neither can anybody push me around. Any solutions to this?
  4. local result = mysql_query(handler, "INSERT INTO accounts (accname, accpassword) VALUES ('"..username.."', '"..password.."')")
  5. TBH, I have no clue on this then. Can you post a screenshot of how it looks tho? I'm interested.
  6. Are you using guiCreateStaticImage or DX functions? I had some issues in the past with guiCreateStaticImage, where images had like "stripes" on them.
  7. You should get highest quality by using an image with dimensions that are a power of 2 (for example, 128 x 128) and drawing that image in 1:1 scale in MTA. As soon as you start to scale the image in MTA, it's quality will reduce. If you ARE scaling, make sure the image position and sizes are Integers (whole numbers), and that they are an even number. Should help a bit.
  8. Hello. I'm having a bit of a problem using engineApplyShaderToWorldTexture. Maybe I am just missing something? Anyway, I am using this function to replace a texture. What is really annoying here is that the "old" SHADED texture (yes, seems to already be shaded by GTA itself) doesn't get stored anywhere - just the render states get stored. I can recreate the original effect by just adding a pass with no custom vertex and pixel shaders. However, this is now a huge problem for me, because I then can't do correct lighting calculations on my custom texture drawn with the second pass. Also, there is now severe flickering on the place where two textures are. Solutions?
  9. http://community.mtasa.com/index.php?p= ... ls&id=5059 http://community.mtasa.com/index.php?p= ... ls&id=5058 Attempt to spread a Trojan/RAT/Keylogger Fail-d!
  10. Requesting removal of this resource http://community.mtasa.com/index.php?p= ... ls&id=5002 Stolen from my clan (TG)
  11. Hey. I've noticed that functions like fileCreate, fileWrite and fileClose work on client-side. However, when I try to do fileOpen or fileExists on a file that's in ANOTHER RESOURCE, It fails. I can confirm the file is really there on my computer. Is there a built-in limitation to MTA that prevents reading files from other resources or am I just doing something wrong? If so, the information on wiki should be corrected immediately. outputChatBox(tostring(fileExists(":testres/banana.lua"))) --> false Edit: I've tried placing this line ouside the function where I need it, precisely in a "onClientResourceStart" event handler, and over there it works perfectly. As soon as I place this in any function that gets run at a latter time, it fails.
  12. Oh I see... Well in that case, add an event handler for onColShapeHit right after you create it local shape = createColRectangle(x, y, sizex, sizey) addEventHandler("onColShapeHit", shape, functionToCall)
  • Create New...