Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 08/12/21 in all areas

  1. Hello everyone, it's a pleasure to be finally presenting you the xRz's Official Theme 2.0, a lot of work has been put into this, to make it look aesthetically pleasing with a clean delineation, that will make it enjoyable and easy to use. After 3 years we're releasing this theme hoping that will be a success like our previous one that hit 260downloads! We hope you use this theme and enjoy it! DOWNLOAD NOW! How to install? 1- Copy the "images" folder inside the .zip file to C:\Program Files (x86)\MTA San Andreas 1.5\MTA\cgui 2- Copy the xRz Skin 2021 folder inside the .zip file to C:\Program Files (x86)\MTA San Andreas 1.5\skins 3- Open MTA and go to Settings > Interface and change Skin to xRz Skin 2021 4- Make sure your MTA is set in English language. 5- Done!
    1 point
  2. addEventHandler + group elements I noticed that some people like to add 10000000000000000 addEventHandlers for each element, while you probably only need 1 addEventHandler. Using ONE addEventHandler on a group of elements? Answer: local group = createElement("groupMyCutePeds") -- Create a custom element and save it in to the variable <group>. -- Create 3 peds. local ped1 = createPed(120, 5540.6654, 1020.55122, 1240.545) local ped2 = createPed(120, 5541.6654, 1021.55122, 1240.545) local ped3 = createPed(120, 5542.6654, 1022.55122, 1240.545) -- Set the parent of the 3 peds. setElementParent(ped1, group) setElementParent(ped2, group) setElementParent(ped3, group) -- Add an addEventHandler and use the <group> as <attachedTo> element. addEventHandler("onPedWasted", group, -- "onPedWasted" = serverside. "onClientPedWasted" = clientside. function () outputChatBox("One of my cute peds just died. ;'( No exceptions!") end) Code is untested, but the method is tested. Syntax for functions in example createElement syntax element createElement ( string elementType, [ string elementID = nil ] ) setElementParent syntax bool setElementParent ( element theElement, element parent ) addEventHandler syntax bool addEventHandler ( string eventName, element attachedTo, function handlerFunction, [ bool getPropagated = true, string priority = "normal" ] ) DO NOT disable getPropagated getPropagated: A boolean representing whether the handler will be triggered if the event was propagated down or up the element tree (starting from the source), and not triggered directly on attachedTo (that is, handlers attached with this argument set to false will only be triggered if source == this). If you disable this, children of the <group> element are not included. Make use of the element tree Element tree For applying addEventHandlers to elements created by the resource: Use: resourceRoot / getResourceRootElement For applying addEventHandlers to elements created by scripts of the resource: Use: getResourceDynamicElementRoot For applying addEventHandlers to elements created by maps of the resource: Use: getResourceMapRootElement I hope your code will be without... print(10^10^10^10) -- Print here: https://www.lua.org/cgi-bin/demo ...addEventHandlers in the future.
    1 point
  3. السلام عليكم اليوم حبيت اعرض عليكم اخر اعمالي بالـثري دي ماكس وبليندر باللعبة واخذ ارائكم وهو مقتبس من مسلسل Squid game واول شي سويته هو اللفل 1 وهذي بعض الصور : وقريب بسوي بقية مابات الالعاب وبحط صورها هنا بالموضوع وبرفعها هنا بنفس الموضوع ومنتظر رأيكم هل اكمل ولالا ؟ Discord : MO7O#4039
    1 point
  4. Welcome back, amirmahdi. If you want to search for a player B who is closest to player A but A should not be equal to B then you have to tell the code that it should skip A when looking for closest players. Otherwise it will always find A because A is always closest player to A. ... for m,veh in ipairs(vehicles) do if not (veh == elem) then -- exclude the player whose closest players we want to find local veh_x, veh_y, veh_z = getElementPosition(veh); ... Please rename the variables inside of the function so that they match the element type to prevent confusion.
    1 point
  5. Muito obrigado pela ajuda mano, me ajudou muito, tmj que Deus te der o dobro
    1 point
  6. Another approach would be checking if there is something between the camera and the text position.https://wiki.multitheftauto.com/wiki/IsLineOfSightClear But it does have some flaws, like for example being blocked by transparent collisions Or the camera center is blocked by collision, but the sides are not when peaking around a corner. (Can be fixed by using more lines or using this function https://wiki.multitheftauto.com/wiki/GetScreenFromWorldPosition)
    1 point
  7. Hello NoviceWithManyProblems, how about you render your text on a texture/render-target and then use dxDrawMaterialPrimitive3D to render that color buffer into 3D space? This way you can draw only the closest pixels, obstructing any behind depth-enabled triangles. Please mind that GTA SA collisions are only very roughly approximated to visible triangles.
    1 point
  8. 1 point
  9. Me chama no Discord, bora resolver isso. É bem fácil ~ Carlos Dorelli#9932
    1 point
  10. Crie um marker (createMarker) invisível ao redor do objeto e maior que ele. Assim o jogador sempre irá colidir no marker independente se o objeto tem colisão ou não. Dai o sistema funciona usando onPlayerMarkerHit em vez de onPlayerTarget.
    1 point
  11. Hello everyone, I'm so happy because i can share with you my theme pack named Purple Dragon Vol. 1. A lot of work has been put into this theme clean and easy to use but with dragon style. After few hours of working I releasing this theme for public use. Enjoy and download! Preview: https://imgur.com/a/XbwB4FU Download: https://www.mediafire.com/file/jv9jo9xyc90vqar/Purple+Dragon+Vol.+1.rar/file How to install? 1. Copy the "images" folder inside the .zip file to C:\Program Files (x86)\MTA San Andreas 1.5\MTA\cgui 2. Copy the Purple Dragon Vol. 1 folder inside the .zip file to C:\Program Files (x86)\MTA San Andreas 1.5\skins 3. Open MTA and go to Settings > Interface and change Skin to xRz Skin 2021 4. Make sure your MTA is set in English language. 5. Done!
    1 point
×
×
  • Create New...