Jump to content

developa

Members
  • Posts

    57
  • Joined

  • Last visited

Everything posted by developa

  1. developa

    distance

    How to create 3d image with get screen from world position, but with the same image size, even if i am away from that position. 100 dist from image = size=200, 200 dist from image = The same sizes of image as on 100 dist Image is always as big as i want even if i am much distance from that position
  2. developa

    distance

    yeep!!! So that the image is the same size from any distance
  3. developa

    distance

    I want to get this effect: I stand on a vehicle, five meters away, I go away thirty meters and the picture is the same, not enlarge at all. Sorry for my english, i'm not from this country. By dividing the height and width of the image, the distance decreases - it is not expected. I just want this picture, no matter how many meters it is from, it was always the same. function dxDrawImageOnElement() local playerPosition = {getElementPosition(localPlayer)} local elementPosition = {getElementPosition(data.element)} local distance = math.floor(getDistanceBetweenPoints3D(elementPosition[1], elementPosition[2], elementPosition[3], playerPosition[1], playerPosition[2], playerPosition[3])) local clear = isLineOfSightClear(elementPosition[1], elementPosition[2], elementPosition[3], playerPosition[1], playerPosition[2], playerPosition[3], false, false, false, false, true, false, false, nil) local coords = {getScreenFromWorldPosition(elementPosition[1], elementPosition[2], elementPosition[3]+0.3)} if coords[1] and coords[2] and clear then dxDrawText(distance.."m", coords[1], coords[2], coords[1], coords[2], tocolor(255, 255, 255, 255), 0.9, font, "center", "center", false, false) dxDrawImage(coords[1], coords[2], data.width/distance, data.height/distance, data.image..".png", 0, 0, 0, tocolor(255, 255, 255, 255), false) end end
  4. developa

    distance

    Now, the picture is very big and as I try to divide it he will decrease with respect to the distance, and I do not want it. I just want to get the effect when I stand at 5 meters, at 1000 meters was the same.
  5. developa

    distance

    But do not you understand? This image itself increases with respect to the distance change of height and width does not give anything because it only reduces the picture but does not work for a distance !! for example, 3 meters: and 34 meters, I guess you can see the difference ...
  6. developa

    distance

    yes, text too
  7. developa

    distance

    I do not mean to see the draw, only about the size when we are at 1420 meters for example, so that the size is the same as 10 meters. example: Here the size is the same at 1420 meters, as at 10 meters. How to do that?
  8. developa

    distance

    Hello, will anyone help me with this code snippet? The point is that from a distance (50 meters, for example), you can see the same thing at a distance of 5 meters http://imgur.com/a/U4lmJ code: function dxDrawImageOnElement() local playerPosition = {getElementPosition(localPlayer)} local elementPosition = {getElementPosition(data.element)} local distance = math.floor(getDistanceBetweenPoints3D(elementPosition[1], elementPosition[2], elementPosition[3], playerPosition[1], playerPosition[2], playerPosition[3])) local coords = {getScreenFromWorldPosition(elementPosition[1], elementPosition[2], elementPosition[3]+0.3)} if coords[1] and coords[2] and isLineOfSightClear(elementPosition[1], elementPosition[2], elementPosition[3], playerPosition[1], playerPosition[2], playerPosition[3], false, false, false, false, true, false, false, nil) then dxDrawText(distance.."m", coords[1], coords[2] + sy/38, coords[1], coords[2], tocolor(255, 255, 255, 255), 2, "default-bold", "center", "center", false, false) dxDrawImage(coords[1], coords[2], data.width, data.height, data.image..".png", 0, 0, 0, tocolor(255, 255, 255, 255), false) end end
  9. solved
  10. Bump
  11. Hello, how do I move an image to a point using the mouse cursor? That means that we click on the image and move it to the specified point. Help! Presentation film: (Second in the film: 0:23) https://www.youtube.com/watch?v=F-eI5YCsWnM&index=6&list=PLp_5iWqN0r1irWsL9saGbRRiOoVXlLPuH
  12. developa

    Camera

    yes, showing
  13. developa

    Camera

    output: true
  14. developa

    Camera

    yes, about five, ten meters away from him
  15. developa

    Camera

    ped = createPed(135, 361.39, 171.45, 1025.79, 180) setElementDimension(ped, 5) setElementInterior(ped, 3) function followPed() local position = {getElementPosition(localPlayer)} local pedPosition = {getElementPosition(ped)} setCameraMatrix(position[1], position[2], position[3], pedPosition[1], pedPosition[2], pedPosition[3]) end addEventHandler("onClientPreRender", followPed)
  16. developa

    Camera

    I have it, but it does not set me a camera
  17. developa

    Camera

    i have error bad argument @setCameraMatrix [expected vector3 at argument 4, got boolean]
  18. developa

    Camera

    function followPed() local position = {getElementPosition(localPlayer)} local pedPosition = {getElementPosition(ped)} setCameraMatrix(position[1], position[2], position[3], pedPosition[1], pedPosition[2], pedPosition[3]) end addEventHandler("onClientPreRender", root, followPed) something like this?
  19. developa

    Camera

    Hi, how to setCameraMatrix camera tracking on individual players to follow them, twisted and the like?
  20. developa

    table

    Thanks! SOLVED
  21. developa

    table

    This example does not work.
  22. developa

    table

    Bump
  23. developa

    table

    Hello, how to detect second table in the first one? For example: commands={} commands["value"] = { ["report"] = { -- How to detect the name of this 'report'? [1] = "report", [2] = "notification" }, ["checkAdmins"] = { [1] = "admins" [2] = "administration" } } for _,value in ipairs(commands["value"]) do for _,v in ipairs(value) do if(value=="report")then addCommandHandler(v[1], report) elseif(value=="checkAdmins")then addCommandHandler(v[1], checkAdmins) end end end
  24. local wheelsNames = { [1025] = "Offroad", [1073] = "Shadow", [1074] = "Mega", [1075] = "Rimshine", [1076] = "Wires", [1077] = "Classic", [1078] = "Twist", [1079] = "Cutter", [1080] = "Switch", [1081] = "Grove", [1082] = "Import", [1083] = "Dollar", [1084] = "Trance", [1085] = "Atomic" } addCommandHandler("check", function() accessories = {} vehicle = getPedOccupiedVehicle(localPlayer) for key,v in pairs(wheelsNames) do if getVehicleUpgradeOnSlot(vehicle, 12) == key then table.insert(accessories, "wheels: "..v) end end outputChatBox(accessories) end) Hi, why this code above does not work? No errors. Help!
  25. developa

    Cents

    I will add that these cents only bump over a million, if we have less than a million all good show. What could be wrong is that over a million cents only get bumped?
×
×
  • Create New...