Jump to content

Leo Messi

Members
  • Posts

    58
  • Joined

  • Last visited

Posts posted by Leo Messi

  1. Hello, today after long time of working and development I decided to sell my own resources that I created .. all of them are lua I just created a copy ideas of CIT not original

    mbe6BJD.png

     

    wC8Wsg8_d.webp?maxwidth=760&fidelity=gra

     

    fiakpEx.png

     

    t0skQhx.png

     

    AND MANY RESOURCES 

    SEND MESSAGE HERE OR WHATSAPP; [Edited]

    OR MESSENGER FACEBOOK [Edited]

  2. So okay, I've got an email script from the MTA SA community which lets you able to send an email by using a specified GUI ingame and u put the email that you want to send to, like [email protected]

    Well, so seems like the PHP link has expired, has anyone another link?

    local randomMails = {"[email protected]", "[email protected]", "[email protected]", "[email protected]", "[email protected]"}
    function fromRandom()
        return randomMails[math.random(#randomMails)]
    end
    
    function sendCustomMail(subject, header, sendto, mail)
        local header = "From: "..subject.." <"..(header or fromRandom())..">"
        callRemote("http://mta.skcit.tk/emailer.php", returns, subject, header, sendto, mail) -- This website is not available any more so add the PHP files in your own website and put URL here.
    end
    addEvent("sendEMail", true)
    addEventHandler("sendEMail", root, sendCustomMail)
    
    function returns(msg, num)
        if msg == "ERROR" or (not msg) then
            outputDebugString("E-Mail not sent due to webpage errors, check the script and/or page provided.", 2)
        else
            outputDebugString(msg, num or 3)
        end
    end

     

  3. On 8/10/2018 at 21:41, knightscript said:

    You could create a PNG image thats bigger than the original one with transparency, have an onclick for it

     

    Good idea, but wastes time and I already made it before

    I need something new

  4. So simple and easy, I want to make something like;

    for example; I created an icon (static image) and if I clicked near this image it will add event on it like onClientGUIClick and get a message with 'You clicked on x image' for example.

    Just like CIT rapid transportation map to be clear.

  5. Hello, since I don't have paypal or something to pay on, is there any host which accepts mobile payment, like entering my phone number and receive an SMS to confirm the host

    just like; delux-host  but Delux host is no longer available, please?

  6. How's it possible? can't you give me an example?

    Thats my map img

    window = 'hidden'
    -- Window stuff is hidden
    
    map = guiCreateStaticImage(12.5, 25, 700, 700, "map.png", false, window)  

     

  7. On 8/5/2018 at 04:57, MrTasty said:

    You want an example of how to calculate position on a 2D map image? Well, you'll want something like this:

    
    local pos
    pos = ((cursorPos-mapPos)/mapSize) -- calculate cursor pos relative to map image
    pos = pos - Vector2(0.5,0.5) -- change range from 01 to -0.50.5 so (0,0) is in the center rather than top left corner
    pos = pos * 6000 -- scale it by map size in meters
    
    -- this is equivalent to
    local pos = ((((cursorPos-mapPos)/mapSize)-Vector2(0.5,0.5))*6000
    

    cursorPos, mapPos and mapSize should be of type Vector2, absolute values used for testing but should work with relatives too. Resulting pos is also a Vector2.

    This will probably require changes if you want to use it for a zoomed-in section of the map.

    Thank you, I already done it.

    Thanks bro.

  8. On 8/4/2018 at 13:37, MrTasty said:

    What is this supposed to do?

    
    if worldx == x2 and worldy == y2 then
    

    Seems like your code requires that world position clicked on using the cursor is exactly the same as the X and Y screen positions of the GUI element clicked.

    Here's a tip: if something doesn't work - try adding other debug outputs to see the flow control in action - so that you can easily tell if and which flow branch failed, as I can see you only gave yourself a debug output only at the point of success but not at points of potential failure.

    At this point I think it's also worth pointing out that getCursorPosition world absolutes are related to what the cursor actually points at in the viewport, not on a map image - for the latter, you need to do manual calculations to convert screen position to a range between 0 and 1 of the map image, and then scale it up to world scale (6000x6000 meters) to get the world position indicated by the cursor click on a map image.

    Can't you give me an example?

  9. Hello, I want help in something

    for example I created the a map just like F11, once I click on any place on the map it will create a blip on the x, y of the position I choosed, I tried but didn't work..

    -- WINDOW is created but it's useless so I removed it from this code.

    map = guiCreateStaticImage(10, 25, 700, 685, "map.png", false, window)    
    
    -- I CREATED Command handler of opening the gui, etc.
    
    function createDest()
     if source ~= map then return end
     if isElement(blipImg) then
      destroyElement(blipImg)
      outputChatBox(getPlayerName(localPlayer).." has removed the group destination.", 0, 255, 0)
      return
     end
     local x, y, worldx, worldy, worldz = getCursorPosition()
     local x2, y2 = guiGetPosition(source, false)
     if worldx == x2 and worldy == y2 then
     outputChatBox(x)
     outputChatBox(y)
     blipImg = createBlip(x, y, 10, 3,  2, 255, 0, 0, 255, 0)
     end
    end
    addEventHandler("onClientGUIDoubleClick", guiRoot, createDest)

     

  10. On 7/24/2018 at 10:07, Snakegold said:

    Thanks :) but

    
    local ping = getPlayerPing(getLocalPlayer())
    

    must be under 

    
           function drawPing()
    

    thanks anyway :D

    I know, I didn't notice

    You're welcome.

    1. function checkPing()
    2. addEventHandler("onClientRender", root, drawPing)
    3. setTimer(function() removeEventHandler("onClientRender", root, drawPing) end, 3000, 1)
    4. end
    5. addCommandHandler("ping", checkPing)

           function drawPing()

          local ping = getPlayerPing(getLocalPlayer())

           dxDrawText("#ff0000Your ping is: #00ff00"..ping.."", 805, 303, 1175, 338, tocolor(255, 255, 255, 255), 1.00, "bankgothic", "left", "top", false, false, false, true, false)

    end

    • Thanks 1
  11. function disableNormalHUD()

     setPlayerHudComponentVisible("ammo", false)

     setPlayerHudComponentVisible("health", false)

     setPlayerHudComponentVisible("clock", false)

     setPlayerHudComponentVisible("money", false)

     setPlayerHudComponentVisible("wanted", false)

     setPlayerHudComponentVisible("weapon", false)

     -- Like that

    end

    addEventHandler("onClientResourceStart", resourceRoot, disableNormalHUD)

     

    setPlayerHudComponentVisible
  12. local imgTable = {
     {"LV - Hospital", 652, 131, 10, 9},
     {"LV - DM Area", 608, 93, 10, 9},
    }


     for index, imgTable in ipairs(imgTable) do
      blipImg = guiCreateStaticImage(imgTable[2], imgTable[3], imgTable[4], imgTable[5], "images/1.png", false, mapImg)
      addEventHandler("onClientGUIClick", blipImg, onClickBlip, false)

    end

    function onClickBlip()
     local x,  y = guiGetPosition(blipImg, false)
     for index, blips in ipairs(imgTable) do
      if x == blips[2] and y == blips[3] then
       if (blipImage2) then
        destroyElement(blipImage2)
       end
       blipImage2 = guiCreateStaticImage(blips[2], blips[3], blips[4], blips[5], "images/2.png", false, mapImg)
      end
     end
    end

     

    So okay, everything is working but I want it, once I click any icon it will be replaced with another icon on its place, look at my code

  13. It's so easy and simple, for example I created

    function givePlayersMoney(value)

     blah

    end

     

     function in accounts system, I don't want to make an export for it. I want it to be shared into all resources like

     

    givePlayersMoney(5000) without needing an export (exports.AccountsSystem:givePlayersMoney(5000))

×
×
  • Create New...