Jump to content

Hydra

Members
  • Posts

    372
  • Joined

  • Last visited

  • Days Won

    11

Everything 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)
  2. warpPedIntoVehicle(thePed, theVehicle, 0)
  3. Pentru a dezactiva vegetatia ai direct in setarile mta-ului (Settings - Video - Grass Effect sau cv de genu)
  4. 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)
  5. 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
  6. yes, you put the arhive in [gameplay] folder
  7. function c(thePlayer, commandName) local x, y, z = getElementPosition(thePlayer) local vehicle = createVehicle(411, x, y+3, z+2) local missile = createObject(3790, x, y, z) attachElements(missile, vehicle, 0, 0, 3) end addCommandHandler("missile", c)
  8. 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)
  9. I think you can do that with setElementData() getElementData() onPlayerWasted() (server-side) or onClientPlayerWasted() (client-side)
  10. I don't remember exactly what you need to do about the modded cars but i'm sure you need to modify the .txd file
  11. 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
  12. Yes you can with: engineApplyShaderToWorldTexture() https://wiki.multitheftauto.com/wiki/EngineApplyShaderToWorldTexture
  13. --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)
  14. 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.
  15. Hydra

    Scroll label

    change i*0.36 with something smaller, maybe i*0.14 idk i just put a random value
  16. Hydra

    Scroll label

    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
  17. Hydra

    Scroll label

    I'm not sure because i haven't tested it but on the wiki it appears to work.
  18. Hydra

    Scroll label

    Use guiCreateScrollPane https://wiki.multitheftauto.com/wiki/GuiCreateScrollPane
  19. Hydra

    Scroll label

    I think he wants to scroll the gui-label like gui-memo or gui-edit. ?
  20. Well idk why is not working, it needed fetchRemote acces so it should work if you added in admin acl.
  21. Yes, it needs admin rights Press P in game -> Resources -> Manage ACL -> Admin -> click on ,,Add Objects" -> resource.musicsearcher and click ok
×
×
  • Create New...