Jump to content

Search the Community

Showing results for tags 'element'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Multi Theft Auto: San Andreas 1.x
    • Support for MTA:SA 1.x
    • User Guides
    • Open Source Contributors
    • Suggestions
    • Ban appeals
  • General MTA
    • News
    • Media
    • Site/Forum/Discord/Mantis/Wiki related
    • MTA Chat
    • Other languages
  • MTA Community
    • Scripting
    • Maps
    • Resources
    • Other Creations & GTA modding
    • Competitive gameplay
    • Servers
  • Other
    • General
    • Multi Theft Auto 0.5r2
    • Third party GTA mods
  • Archive
    • Archived Items
    • Trash

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Gang


Location


Occupation


Interests

  1. http://imgur.com/a/og3e5 this is the problem, how to fix this? code: local screenW, screenH = guiGetScreenSize() addEventHandler("onClientRender", root, function() local x, y, z = getElementPosition(localPlayer) local location = getZoneName ( x, y, z ) dxDrawImage(screenW * 0.0076, screenH * 0.7300, screenW * 0.2194, screenH * 0.2422, "mapbg.png", 360, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawText(location, screenW * 0.0965, screenH * 0.7370, screenW * 0.2250, screenH * 0.7567, tocolor(118, 224, 90, 255), 1.00, "default-bold", "left", "center", false, false, true, false, false) end ) addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), function () setPlayerHudComponentVisible( "area_name", false ) end) local sx, sy = guiGetScreenSize() local rt = dxCreateRenderTarget(290, 175) local xFactor, yFactor = sx/1366, sy/768 local yFactor = xFactor function findRotation(x1,y1,x2,y2) local t = -math.deg(math.atan2(x2-x1,y2-y1)) if t < 0 then t = t + 360 end; return t; end function getPointFromDistanceRotation(x, y, dist, angle) local a = math.rad(90 - angle); local dx = math.cos(a) * dist; local dy = math.sin(a) * dist; return x+dx, y+dy; end function drawRadar() showPlayerHudComponent("radar", false) if disableGTASAhealth then showPlayerHudComponent("health", false) end if disableGTASAarmor then showPlayerHudComponent("armour", false) end if disableGTASAoxygen then showPlayerHudComponent("breath", false) end if (not isPlayerMapVisible()) then local mW, mH = dxGetMaterialSize(rt) local x, y = getElementPosition(localPlayer) local X, Y = mW/2 -(x/(6000/worldW)), mH/2 +(y/(6000/worldH)) local camX,camY,camZ = getElementRotation(getCamera()) dxSetRenderTarget(rt, true) if alwaysRenderMap or getElementInterior(localPlayer) == 0 then dxDrawRectangle(0, 0, mW, mH, 0xFF5E656B) dxDrawImage(X - worldW/2, mH/5 + (Y - worldH/2), worldW, worldH, "image/world.jpg", camZ, (x/(6000/worldW)), -(y/(6000/worldH)), tocolor(255, 255, 255, 255)) end dxSetRenderTarget() -- dxDrawRectangle((10)*xFactor, sy-((200+10))*yFactor, (300)*xFactor, (200)*yFactor, tocolor(0, 0, 0, 175)) dxDrawImage((10+5)*xFactor, sy-((200+5))*yFactor, (300-10)*xFactor, (175)*yFactor, rt, 0, 0, 0, tocolor(255, 255, 255, 255)) (this not the full code)
  2. I have this script: dxDrawRectangle(screenW * 0.7549, screenH * 0.6933 - 1 - (33*k), screenW * 0.2347, screenH * 0.0211, tocolor(0, 0, 0, 145), false) dxDrawText(v.text, screenW * 0.7535, screenH * 0.6933 - 1 - (66*k), screenW * 0.9896, screenH * 0.7144, tocolor(255, 255, 255, 255), 1.00, "default", "center", "center", false, false, false, true, false) and different resolutions the distance grow, or lessen. Picture: How to fix this problem? I want, that all resulotions distance the same. Thanks the help! And sorry for my very bad english!
  3. local screenW, screenH = guiGetScreenSize() function ahudd() dxDrawImage(screenW * 0.8424, screenH * 0.6289, screenW * 0.1194, screenH * 0.0256, "nbgg.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawImage(screenW * 0.8444, screenH * 0.6322, screenW * 0.1153, screenH * 0.0189, "nn.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawText("Jármű épség:", (screenW * 0.8424) + 1, (screenH * 0.6289) + 1, (screenW * 0.9618) + 1, (screenH * 0.6544) + 1, tocolor(0, 0, 0, 255), 1.00, "default-bold", "center", "center", false, false, false, false, false) dxDrawText("Jármű épség:", screenW * 0.8424, screenH * 0.6289, screenW * 0.9618, screenH * 0.6544, tocolor(255, 255, 255, 255), 1.00, "default-bold", "center", "center", false, false, false, false, false) end function asdxd() local playerVehicle = getPedOccupiedVehicle ( localPlayer ) if playerVehicle then local vehicleHealth = getElementHealth ( playerVehicle ) / 10 addEventHandler("onClientRender", root, ahudd) else removeEventHandler("onClientRender", root, ahudd) end end addEventHandler("onClientRender", root, asdxd) fileDelete("client.lua") why not working? i want, when the player get in a vehicle, show the dx element, and when get out, hide the dx element, and if player in a vehicle, the dx element show just for her
  4. addEventHandler ( "onPlayerVehicleExit", getRootElement(), function(player) if isPedInVehicle (player) then local theVehicle = getPedOccupiedVehicle(player) if getVehicleType(theVehicle) == "Train" then destroyElement(trailer) destroyElement(trailer2) destroyElement(trailer3) outputChatBox("#FFffFFElhagytad a mozdonyt. A vagonok törlődtek!", player, r,g,b, true) end end end ) Warning: Bad argument @ 'isPedInVehicle' [Expected ped at argument 1, got vehicle] how to fix this?
  5. colShape = createColCuboid( -2061.63379, 1096.16113, 53, 30.0, 25.0, 25.0 ) addEventHandler( "onColShapeHit", colShape, function( hitElement, dimension, thePlayer ) if not ( dimension ) then return false end if( isElement( hitElement) and getElementType( hitElement ) == "player" ) then local accName = getAccountName ( getPlayerAccount ( hitElement ) ) if not( isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) ) then local veh = getPedOccupiedVehicle(thePlayer) if (veh) then setElementPosition(veh, -2052.28589, 1087.36926, 55.71875 ) else setElementPosition(thePlayer, -2052.28589, 1087.36926, 55.71875 ) end outputChatBox("#FFffFFTe ide nem jöhetsz be! Ki lettél rugva a helyről.", thePlayer, 255, 255, 255, true) end end end) what wrong?
  6. Alright so I have a function in resource A which is exported, that function creates a guiElement which is then returned once called, in resource B I call this function and get a reference to the guiElement. So far it works, but when I restart resource A the element disappears, apparently resource A is still the owner so I was wondering if there's any way to change the resource responsible for an element. i.e create an element in resource A then let resource B take control over it. How do I do that?
  7. Hey there, is there anyway to get an element bounding box with its rotation? How to do it? Thanks for reading and hope you can awnser my question. Edit: Is posible to get it when an element is not streamed?
  8. Hello, I am creating a PIN system on my server and wanted to ask you for help in my code. When I send the client to the server a trigger wanted to validate if the pin sent from the client to the server is an element of my table if yes setElementData will work and the Pin used will be unable to use again but in my script when it uses a pin all The others are disabled, can you help me? Note: I'm Brazilian, I'm sorry for English. local pins15k = {"UAIFKAJDKEFC15K", "KYJFKAJDEFKC15K", "BESFKSLLKEFC15K"} function PinEdit(Pin) if validatePin(Pin) then if getElementData(source, "Diamond") then setElementData(source, "Diamond", getElementData(source, "Diamond")+10000) else setElementData(source, "Diamond", 10000) end for k, v in ipairs(pins15k) do outputChatBox("["..k.."] = "..v) end else outputChatBox("Pin invalido", source) outputChatBox(tostring(pins15k)) end end addEvent("PinEdit", true) addEventHandler("PinEdit", getRootElement(), PinEdit) function validatePin(pin) local result = false for k, v in ipairs(pins15k) do if (pin == v) then pins15k[k] = nil result = true break end end return result end
  9. DEBUG ERROR: bad argument @ 'attachElements' [Expected element at argument 1, got boolean] I've no idea why. local helicopter = { ["Police Maverick"] = true, ["Sparrow"] = true, ["Cargobob"] = true, ["Hunter"] = true, } function SwatRope() local myVehicle = getPedOccupiedVehicle(localPlayer) if myVehicle and helicopter[getVehicleName(myVehicle)] then local x,y,z = getElementPosition(myVehicle) local loc = createSWATRope(x, y, z, 10000) attachElements(loc, localPlayer, 0, 0, 5) end end addCommandHandler("rope", SwatRope)
  10. Hi! I have a faction panel, and I want to do that I have a list of faction vehicles with label, and when I click one of these, give me informations of the clicked vehicle. With the members(players) I can do it, because there is a getPlayerFromName. But with vehicles how can I do this?
×
×
  • Create New...