Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 29/08/19 in all areas

  1. Na verdade é bem simples por meio de código. Vc só precisa saber o ID do objeto e informar uma coordenada bem próxima ao objeto, não precisa ser exatamente no centro do objeto. Para descobrir o ID de um objeto que não é selecionável, dai é algo mais complexo que exige ferramentas externas. Para isso, vamos no site http://dev.prineside.com e clicamos no botão Model Search by Map Position. Após selecionada a posição no mapa, ele vai mostrar todos os objetos (selecionáveis e não selecionáveis) em um raio de 500 metros, em ordem dos mais próximos para os mais distantes. Na lista que aparecer, encontre o objeto que você deseja remover e anote o ID desse objeto. Descobrimos o ID do objeto, e agora? Agora já passou a parte mais difícil, o resto é programar um script básico de remoção de objetos por ID. Para isso vamos usar a função RemoveWorldModel. Essa função é bem simples de se usar, basta informar o ID do objeto a ser removido, o raio cuja remoção será aplicada e as coordenadas do ponto onde vai começar a remoção. Se você quiser restaurar o objeto quando o script for desligado, use RestoreWorldModel. Ideal para colocar em scripts de mapas, casas ou bases. O script funciona tanto em server-side quanto em client-side, mas em geral utiliza-se server-side. O Script deve ficar como esse: function removeBagulho () removeWorldModel (5681, 15, 1911.3, -1776.25, 13.38) --Remove o objeto do lava-jato próximo ao posto de LS quando o resource é iniciado. end addEventHandler ("onResourceStart", getResourceRootElement(getThisResource()), removeBagulho) function restauraBagulho () restoreWorldModel (5681, 15, 1911.3, -1776.25, 13.38) --Restaura o objeto quando o resource é desativado. end addEventHandler ("onResourceStop", getResourceRootElement(getThisResource()), restauraBagulho) Esse script vc adiciona junto com o resource do seu mapa. Você pode optar por deixar isso em um script separado ou deixar junto com algum script que vc já tenha no seu mapa por exemplo scripts de portões, server-side. Vlw, flw. Deixe seu LIKE se ajudou você. Dúvidas comente abaixo.
    1 point
  2. السلام عليكمم ورحمةة الله وبرككاتههء كيف الححال؟؟ بما إن الحساب الاول مدري ما يبغي يفتح سويت واحد جديد المهم .. سويت مود جديد واخذ الفكرة من مود السوات الى عن طريق المؤشر يسحب ويقتل كذا بس بفكرة ثانية ,, هي ان تحدد علي اللاعب بالماوس وتضغط كليك يمين تسحب كل الرتب حقته وتعطيه رتبة اسمها Admin_Ex يمديك تغير اسم الرتبة من الكلينت وتضغط كليك يسار تفك مخالفته وتسحب منه رتبة الادمن اكس وطبعا فيه حماية من سحب رتب الكونسيل , خلينا نشوف صور طبعا المؤشر يظهر للي معه رتبة اسمها Acl_Ex ويفتح عن طريق الضغط علي حرف M نجي للـتحميل اضغط هنا لتحميل السكربت لازم تحط المود بقروب الأدمن علشان يسحب رتب ويعطي مخالفة * رأيكم يهمني.. إهداء لـ @!#NssoR_) @!#DesTroyeR_,) @N3xT @+Source|> @Mr.Solo @Kareem Amer @Abdul KariM ولكل الموجودين #-
    1 point
  3. هلآ والله شباب انا مسوي رادار بس مشكله يجني بق ومسويه ب شيدر كمان بس مدري ليش يجني بق يعني في بحر الصور ايشش سالفه ؟ كود حقي addEventHandler( "onClientResourceStart", resourceRoot, function() hudMaskShader = dxCreateShader("hud_mask.fx") -- شيدر radarTexture = dxCreateTexture("img/map.png") -- صوره ماب maskTexture1 = dxCreateTexture("img/radar-background.png") -- صوره عاديه bAllValid = hudMaskShader and radarTexture and maskTexture1 if not bAllValid then outputDebugString( "LOGS: RADAR worked",0, 255,0,123 ) -- يشيك ب ديبوق رادار شغال else dxSetShaderValue( hudMaskShader, "sPicTexture", radarTexture ) -- شيدر dxSetShaderValue( hudMaskShader, "sMaskTexture", maskTexture1 ) -- شيدر end end) function radar() -- local xDiv, yDiv = posX/6000, posY/-6000 dxSetShaderValue(hudMaskShader, "gUVPosition", xDiv, yDiv) local camX, camY, camZ, tX, tY, tZ = getCameraMatrix() local north = findRotation(camX, camY, tX, tY) local northInv = 180 - north local xDiv, yDiv = posX/6000, posY/-6000 dxSetShaderValue(hudMaskShader, "gUVPosition", xDiv, yDiv) local zoom = 20 * radar.scale * radar.zoomScale radar.range = 3000/zoom local zoom = 7 dxSetShaderValue(hudMaskShader, "gUVScale", 1/zoom, 1/zoom) dxSetShaderValue(hudMaskShader, "gUVRotAngle", math_rad(-north)) if backgroundAlpha ~= 205 then dxDrawImage(radarX, radarY, radar.size, radar.size, hudMaskShader, 0, 0, 0, tocolor(255, 255, 255, 240 * radar.alpha), false) dxDrawImage(radarX, radarY, radar.size, radar.size, maskTexture1, 0, 0, 0, tocolor(14, 19, 26, 240 * radar.alpha), false) end else dxDrawImage(radarX, radarY, radar.size, radar.size, maskTexture1, 0, 0, 0, tocolor(14, 19, 26, 240 * radar.alpha), false) dxDrawImage(radarX, radarY, radar.size, radar.size, hudMaskShader, 0, 0, 0, tocolor(255, 255, 255, 240 * radar.alpha), false) end addEventHandler("onClientRender", root, radar)
    1 point
  4. All right, I already figured it out. Everything is much easier... pin = ("" ..string.gsub(guiGetText(PIN), "%D", "").. "") guiSetText(PIN, pin) string.gsub - we replace in line "%D" on "" , and all. guiGetText(PIN) - My line with we enter the text; "%D" - Any letter or symbol other than digit; "" - emptiness;
    1 point
  5. ي طيب ولا واحد رد؟ وش وضع
    1 point
  6. From what you described I'm certain it's rigging and not import/export related. For characters you need to do the so called 'rigging' in order to specify which vertices are affected by which bone(s). I believe the retail version of 2016, and can confirm that any version of 3ds 2017+ features voxel solving. Although this doesn't give an amazing result it can get you started. https://m.youtube.com/watch?v=Kimn7CIZ5bI If you're not able to get hold of the afforementioned versions of 3ds max you may find numerous articles and guides teaching basics of rigging. I want to mention that those who title their guide as skin rigging and merely show the custom skin aligned to default game skin and then attaching to it, is not skin rigging and is only to retain bones for custom skin and the weighing values which are usually incorrect because of vertex data being different from default to custom model. If you require any more help please plot down a lot more details and eventually some screenshots so that we can better understand the state of your model.
    1 point
  7. Actually, it's already being worked on by MTA devs (FYI @Hugos), a PR to implement dynamic skin ID's exists and Saml1er (MTA dev) is planning to lift many more limits in the near future.. including making vehicles and game objects also dynamic, so that you can apply an infinite amount of models without running out of base game models to replace. So you can rest assured that this suggestion will become reality.
    1 point
  8. 1. local character local forbidden_characters = { ["w"] = "w", ["a"] = "a", ["s"] = "s", ["d"] = "d", } function onClientCharacter(char) if forbidden_characters[char] then character = char end end addEventHandler("onClientCharacter", getRootElement(), onClientCharacter) function onClientGUIChanged(element) if element then -- add check for your element local gui_text = guiGetText(element) if gui_text then local forbidden_character = character local check = forbidden_characters[forbidden_character] if check then local replace = string.gsub(gui_text, check, "") guiSetText(element, replace) end end end end addEventHandler("onClientGUIChanged", getRootElement(), onClientGUIChanged) Tested a bit, and looks like works for typing, you would need to replace string with characters to "" when player paste something. Also you need to fill table with forbidden characters. https://wiki.multitheftauto.com/wiki/OnClientPaste
    1 point
  9. Is quickest method, but not the only way. https://stackoverflow.com/questions/47766700/how-to-extract-numbers-from-a-string-in-Lua
    1 point
  10. e cam simplu safe house ala , puteai sa il faci mai bine de atat dar oricum bravo
    1 point
  11. function test() local alpha = math.sin ( getTickCount () / 200 ) dxDrawRectangle ( 416, 174, 498, 373, tocolor(0, 0, 0, 255*alpha), false ) end addEventHandler("onClientRender", root, test)
    1 point
  12. use guiGetText? --try this local screenWidth, screenHeight = guiGetScreenSize ( ) editBox = guiCreateEdit( 0.3, 0.1, 0.4, 0.1, "", true ) function salh() dxDrawText ( guiGetText(editBox),44, 41, screenWidth, screenHeight, tocolor ( 0, 0, 0, 255 ), 1.0, "pricedown" ) end addEventHandler ( "onClientRender", root, salh)
    1 point
  13. Your code is badly optimized, i've fixed it. Should work, untested. -- Useful function function isVehicleEmpty(vehicle) if not isElement(vehicle) or getElementType(vehicle) ~= "vehicle" then return true end local passengers = getVehicleMaxPassengers(vehicle) if type(passengers) == "number" then for seat = 0, passengers do if getVehicleOccupant(vehicle, seat) then return false end end end return true end -- Unfroze when entering function onPlayerVehicleEnter(vehicle, seat, jacked) if isElementFrozen(vehicle) then -- don't froze if element is frozen setElementFrozen(vehicle, false) end end addEventHandler("onPlayerVehicleEnter", getRootElement(), onPlayerVehicleEnter) -- Froze on exit function onPlayerVehicleExit(vehicle, seat, jacker, forced) if not isElementFrozen(vehicle) and isVehicleEmpty(vehicle) then -- don't froze if element is frozen, and be sure that vehicle is empty setElementFrozen(vehicle, true) end end addEventHandler("onPlayerVehicleExit", getRootElement(), onPlayerVehicleExit) -- Check all vehicles on resource start function onResourceStart() local vehicles = getElementsByType("vehicle") for i = 1, #vehicles do -- no need for ipairs, int loop faster local vehicle = vehicles[i] -- get vehicle if vehicle and isVehicleEmpty(vehicle) then -- check if vehicle is empty. if not isElementFrozen(vehicle) then -- don't froze if element is frozen setElementFrozen(vehicle, true) end end end end addEventHandler("onResourceStart", resourceRoot, onResourceStart) -- Froze on vehicle spawn function onVehicleRespawn(exploded) if isVehicleEmpty(source) then -- ditto if not isElementFrozen(source) then -- ditto setElementFrozen(source, true) end end end addEventHandler("onVehicleRespawn", getRootElement(), onVehicleRespawn) --[[for all vehicles, change to resourceRoot instead of getRootElement() - if it should happen for vehicles created only by this resource]]
    0 points
  14. لا في لوحة حبعتلك في الخاص السكريبت
    0 points
×
×
  • Create New...