Jump to content

Hydra

Members
  • Posts

    372
  • Joined

  • Last visited

  • Days Won

    11

Posts posted by Hydra

  1. local myMarker = createMarker(x, y, z, "cylinder", size, red, green, blue, alpha, visibleTo)
    
    function onEnterMarkerTakeWeapons(hitElement,matchingDimension)
      if hitElement == source then
        takeAllWeapons(hitElement)
        end
      end
    addEventHandler("onMarkerHit", myMarker, onEnterMarkerTakeWeapons)

     

    • Thanks 1
  2. 4 hours ago, Cleste said:

    Salut, am si eu mai multe probleme....

    Principala problema pe care vreau sa mi-o impartasesc cu voi in speranta de a gasi o solutie este asta:

    1. Eu am un laptop mai slab, am toate setarile pe low cu doar cateva moduri activate si imi ruleza undeva la 30-40 de FPS maxim. As putea umbla in fisierele GTA:SA sa scot vegetatia si mai multe? Daca da, cum? Ca am incercat sa bag un anumit fisier si nu am putut, imi dadea o eroare cum ca fisierul .asi e posibil sa afecteze calitatea jocului(dar nu s-a dezactivat).

    Si daca aveti alte propuneri pentru a scapa de lag, astept! P.S: am un Laptop DELL cu un i3 a 7a generatie.

     

    Iar priblema a doua....

    2. MTA  nu-mi inregistreaza sunetul, microfonul este activat, el capteaza sunetul, dar in joc nu se transpune, am bagat mai multe fisiere, dar fara niciun rezultat.

     

    Va multumesc pentru atentie!

    Pentru a dezactiva vegetatia ai direct in setarile mta-ului (Settings - Video - Grass Effect sau cv de genu)

  3. This example is with setAccountData & getAccountData, not what you requested but maybe you will use it :)

    function saveStuff()
      local theAcc = getPlayerAccount(source)
      if theAcc and not isGuestAccount(theAcc) then
        local x, y, z = getElementPosition(source)
        setAccountData(theAcc, "posX", x)
        setAccountData(theAcc, "posY", y)
        setAccountData(theAcc, "posZ", z)
        end
      end
    addEventHandler("onPlayerQuit", getRootElement(), saveStuff)
    
    function loadStuff(_,account)
      if account then
        local x, y, z = getAccountData(account, "posX"), getAccountData(account, "posY"), getAccountData(account, "posZ")
        setElementPosition(source, x, y, z)
        end
      end
    addEventHandler("onPlayerLogin", getRootElement(), loadStuff)

     

  4. Use refresh command in your server console and if the resource is loaded it will say ,,yourResource" is loaded or smt like that. After that type /start yourResource

  5. 14 hours ago, lipewws said:

    thanks, but where I put that?

     

     

    make a server.lua file and put this code:

    function saveModelSkin()
    modelSkin = getElementModel(source)
    setElementData(source, "saveSkin", modelSkin)
    setElementModel(source, modelSkin)
    end
    addEventHandler("onPlayerJoin", getRootElement(), saveModelSkin)
    
    function saveModelData2()
    modelS = getElementModel(source)
    setElementData(source, "saveSkin", modelS)
    setElementModel(source, modelS)
    end
    addEventHandler("onElementModelChange", getRootElement(), saveModelData2)
    
    function loadModelSkin()
    getModelSaved = getElementData(source, "saveSkin") or 0
    setElementModel(source, getModelSaved)
    end
    addEventHandler("onPlayerSpawn", getRootElement(), loadModelSkin)

     

  6. 4 hours ago, lipewws said:

    How to config a server to stay with the same skin you die? (como configurar um servidor para ficar com a mesma skin que você morreu?)

     

    I think you can do that with 

    setElementData()
    getElementData()
    onPlayerWasted() (server-side)
    or
    onClientPlayerWasted() (client-side)

     

  7. local shader = dxCreateShader("shader.fx")
    local thePaintjob = dxCreateTexture("asd.png")
    
    function b()
    dxSetShaderValue(shader, "gTexture", thePaintjob)
    engineApplyShaderToWorldTexture(shader, "vehiclegrunge256")
    end
    addEventHandler("onClientResourceStart", resourceRoot, b)

    You can find more about this here:

    https://wiki.multitheftauto.com/wiki/DxCreateShader

    https://wiki.multitheftauto.com/wiki/DxCreateTexture

    https://wiki.multitheftauto.com/wiki/DxSetShaderValue

    https://wiki.multitheftauto.com/wiki/Element/Shader

  8. --Client side
    --If you want with GUI
    function clickButton()
    if (source == button) then
    triggerServerEvent("leaveP", localPlayer)
    end
    end
    addEventHandler("onClientGUIClick", getRootElement(), clickButton)
    
    --If you want with DX
    function clickButton2(_,state)
    if isMouseInPosition(coordonates here) then
    if state == "down" then
    triggerServerEvent("leaveP", localPlayer)
    end
    end
    end
    addEventHandler("onClientClick", getRootElement(), clickButton2)
    
    --Server side
    function leaveP()
    kickPlayer(source, "asd")
    end
    addEvent("leaveP", true)
    addEventHandler("leaveP", root, leaveP)

     

  9. It may work if you create a colshape, attach to the train, create a marker for each station and use onClientMarkerHit or onMarkerHit depending on whether it is a client or server side and when the train enters the marker to stop, and when someone enters the train use the isElementWithinColShape function to check the players in the colshape and make it move again. I don't test it so i don't know if this will work, it's just an idea I thought of.
     

  10. Words = {
    {"ASD"},
    {"Aqs"},
    {"fasa"},
    {"dasg"},
    {"agaga"},
    {"rwrqrq"},
    {"agasgdas"},
    {"gagasda"},
    {"qwr2141"},
    {"41251251"},
    {"251251"},
    {"16171718"},
    {"ffasfagaha"},
    {"asdasdasfa"}
    }
    
    test = {
    window = {},
    scrollpane = {},
    label = {}
    }
    
            test.scrollpane[1] = guiCreateScrollPane(0.55, 0.36, 0.12, 0.50, true)
    
            for i, v in ipairs(Words) do
            test.label[1] = guiCreateLabel(0.42, i*0.36, 0.12, 0.04, v[1], true, test.scrollpane[1])
            end
            guiSetVisible(test.scrollpane[1], false)
            guiSetVisible(test.label[1], false)
    
    function t()
    if not d then
    d = true
    guiSetVisible(test.scrollpane[1], true)
    guiSetVisible(test.label[1], true)
    else
    d = false
    guiSetVisible(test.scrollpane[1], false)
    guiSetVisible(test.label[1], false)
    end
    end
    bindKey("f2", "down", t)

    Images: https://imgur.com/a/q1pRB07

    • Like 1
×
×
  • Create New...