Jump to content

Shady1

Members
  • Posts

    913
  • Joined

  • Last visited

  • Days Won

    61

Everything posted by Shady1

  1. hello @Lalalu welcome to the forum, I made an edit about this topic, I recommend you to try it. local sX, sY = guiGetScreenSize ( ) local onEmoji4 = {}; local plyEmoji4 = getElementsByType ( "player" ) local showEmoji4 = false local isEventAdded = false function onEmoji4Render ( ) local cx, cy, cz = getCameraMatrix () for i = 1, #plyEmoji4 do local p = plyEmoji4[i] if ( onEmoji4[p] ) then local x, y, z = getPedBonePosition.. --- -- blag blah blah local dEmoji4 = getDistanceBetweenPoints3D ( cx... -- blag blah blah if ( dEmoji4 < 100 ) then if ( isLineOfSightClear ( cx, cy... -- blag blah blah if (getElementData (p, "Emoji4") == true) then local sx, sy = getScreenFromWorldPosition...-- blag blah blah if ( sx ) and ( sy ) then local sEmoji4 = 400 / ...-- blag blah blah dxDrawImage ( sx - ( sEmoji4 / 2 ), sy - ( sEmoji4 / 2 ), sEmoji4, sEmoji4, "T_UI_Message_Icon_Aisatsu_BC.webp", 0, 0, 0, tocolor ( 255, 255, 255, 255 ) ) end end end end end end end function attachEmoji4 ( Emoji4 ) if not ( Emoji4 and isElement ( Emoji4 ) ) then return end if(isEventAdded) then return end -- if event added don't go onEmoji4[Emoji4] = true addEventHandler ( "onClientRender", root, onEmoji4Render ) isEventAdded = true -- mark as added setTimer(function() removeEventHandler ( "onClientRender", root, onEmoji4Render ) isEventAdded = false -- mark as deleted end, 2000, 1) end addEvent( "StartEmoji", true ) addEventHandler( "StartEmoji", root, attachEmoji4 ) local dEmoji4 = getDistanceBetweenPoints3D ( cx... -- blag blah blah and something caught my eye I'm seeing non-Lua codes, can you explain a bit? In addition, the code I sent you above will fix the eventHandler problem.
  2. another great project,you are doing this job well
  3. if it works you can like the comment
  4. hello @aunque welcome to the forum i edited some sample code for you. local theMarker = createMarker(0, 0, 2, "cylinder", 5, 255, 0, 0, 255) -- create marker on 0,0,2 coordinates addEventHandler("onMarkerHit", theMarker, function(hitElement, matchingDimension) setElementFrozen(hitElement, true) -- freeze element setTimer(function(hitElement) setElementFrozen(hitElement, false), end, 3000, 1, hitElement) --release after 3 seconds end )
  5. If you have another problem, I recommend you to open a new topic, we will help you.
  6. do you want it for all vehicles
  7. kargo_arac = {} kargo_teslim = {} local meslekbitis_marker local kargobitis_blips function meslekbitis(hitElement, matchingDimension) if(getElementType(hitElement) == "vehicle") then if(kargo_arac[hitElement]) then local player = getVehicleOccupant(hitElement) destroyElement(kargo_arac[hitElement]) destroyElement(meslekbitis_marker) destroyElement(kargobitis_blips) setElementData(player, "kargo:meslek", false) setElementData(player, "meslek", false) givePlayerMoney(player, 123) end end end addEvent("meslek:basla", true) addEventHandler("meslek:basla", root, function() setElementData(source, "kargo:meslek", true) setElementData(source, "meslek", true) kargo_arac[source] = createVehicle(456, -29.71848, -1122.65125, 1.07812) warpPedIntoVehicle(source, kargo_arac[source]) setVehicleLocked(kargo_arac[source], true) meslekbitis_marker = createMarker(-157.16824, -282.63116, 3.90531, "checkpoint", 2.5 , 255, 185, 15) kargobitis_blips = createBlip(-157.16824, -282.63116, 3.90531, 56) addEventHandler("onMarkerHit", meslekbitis_marker, meslekbitis) end) try this code
  8. hello @aunque welcome to the forum, i made some edits about the system,can you try this. kargo_arac = {} kargo_teslim = {} local meslekbitis_marker local kargobitis_blips function meslekbitis(hitElement, matchingDimension) if(getElementType(hitElement) == "player") then local jobVehicle = getPedOccupiedVehicle(hitElement) if(jobVehicle) then if(kargo_arac[jobVehicle]) then destroyElement(kargo_arac[jobVehicle]) destroyElement(meslekbitis_marker) destroyElement(kargobitis_blips) setElementData(hitElement, "kargo:meslek", false) setElementData(hitElement, "meslek", false) givePlayerMoney(hitElement, 123) end end end end addEvent("meslek:basla", true) addEventHandler("meslek:basla", root, function() setElementData(source, "kargo:meslek", true) setElementData(source, "meslek", true) kargo_arac[source] = createVehicle(456, -29.71848, -1122.65125, 1.07812) warpPedIntoVehicle(source, kargo_arac[source]) setVehicleLocked(kargo_arac[source], true) meslekbitis_marker = createMarker(-157.16824, -282.63116, 3.90531, "checkpoint", 2.5 , 255, 185, 15) kargobitis_blips = createBlip(-157.16824, -282.63116, 3.90531, 56) addEventHandler("onMarkerHit", meslekbitis_marker, meslekbitis) end) i edits the code, check again
  9. https://nightly.mtasa.com/ 32/64 bit hangiisiyse seç ve MTA:SA tekrar kurulum yap, eski MTA:SA silmeyi unutma
  10. merhaba, bugün senin gibi bu konuyla ilgili sorunlar yaşayan mağdurlardan birisin, MTA discord tarafındada bu sorunlarla ilgili yazılar paylaşıyorlar,MTA Staff tarafından bir açıklama geldiğinde sana bilgi vereceğim. yeni bir güncellemeden sonra olduğunu düşünüyorum
  11. Shady1

    pls help

    You should install GTA:SA on a clean partition without mods and then reinstall MTA:SA
  12. First of all, you should find the game modes of the server you will install, then you should rent an MTA server from a quality host.
  13. I couldn't get a reply from you, is your problem solved?
  14. you're welcome, if you have any other requests, all you have to do is open a new topic and tag me
  15. hello @MTA.Castiel Get ground coordinates with getGroundPosition GetDistancePointBetween3D to find distance. addCommandHandler("distanceground", function() local px, py, pz = getElementPosition(localPlayer) local groundPosition = getGroundPosition(px, py, pz) local distanceGround = getDistanceBetweenPoints3D(px, py, pz, px, py, groundPosition) outputDebugString("distance ground:"..distanceGround) end ) you can do a test run
  16. Shady1

    Help

    can you show a screenshot of the problem
  17. Shady1

    Help

    update graphic card drivers and reinstall MTA Then when you open the MTA program, a menu will appear, choose the Standard settings and continue the game.
  18. local dot = dxCreateTexture(1,1) local white = tocolor(255,255,255,255) function dxDrawRectangle3D(x,y,z,w,h,c,r,...) local lx, ly, lz = x+w, y+h, (z+tonumber(r or 0)) or z return dxDrawMaterialLine3D(x,y,z, lx, ly, lz, dot, h, c or white, ...) end addEventHandler("onClientRender", root, function() dxDrawRectangle3D(0,0, 20, 20, 20, tocolor(255,255,255,255)) end ) @Modafinil or this way you can make a start yourself,Make it as a client on the meta.xml side and continue your tests....
  19. The sample codes on the wiki side are working properly, you need to check the codes, if you share your code on this topic, I can help you
  20. The example in the wiki is client side, make sure you typed the meta.xml correctly.
×
×
  • Create New...