Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 10/09/20 in all areas

  1. Então eu não sei se você viu isso no meu canal: Victor Scripting, mas ok vms lá vou deixar um exemplo a qual está na wiki do mta no seguinte link: https://wiki.multitheftauto.com/wiki/FetchRemote server-side: Este exemplo mostra como você pode buscar uma imagem de uma página da web e transferi-la para um cliente específico: function startImageDownload( playerToReceive ) fetchRemote ( "http://www.example.com/image.jpg", myCallback, "", false, playerToReceive ) end function myCallback( responseData, error, playerToReceive ) if error == 0 then triggerClientEvent( playerToReceive, "onClientGotImage", resourceRoot, responseData ) end end client-side: addEvent( "onClientGotImage", true ) addEventHandler( "onClientGotImage", resourceRoot, function( pixels ) if myTexture then destroyElement( myTexture ) end myTexture = dxCreateTexture( pixels ) end ) addEventHandler("onClientRender", root, function() if myTexture then local w,h = dxGetMaterialSize( myTexture ) dxDrawImage( 200, 100, w, h, myTexture ) end end ) ou seja note que o fetchRemote pega/baixa essa imagem através do link dela e envia para a function: myCallback como parâmetro e a function myCallBack leva o objeto para o client-side através do triggerClientEvent. No client side ela recebe a imagem como um objeto e transforma numa textura através do dxCreateTexture e no evento onClientRender ela puxa a imagem pela sua variável.
    2 points
  2. ===VK Dayz International=== Dayz Server , lets play together ✯ Base System ✯ Groups ✯ Wars ✯ Base to your group ✯ Vips ✯ Zombies ✯ Free tent ✯ Promotion to buy vip and base ✯ Events ✯ PVP ✯ Slots for staffs , contact with us at discord. ===VK Dayz International=== Server: mtasa://177.67.80.165:22353 Discord : https://discord.gg/xgqps4N PLAYER RECORD : 42/50 Owners : Gomes & FroesG ~Waiting you guys in the server and in discord.
    1 point
  3. ja esta Home General MTA Other languages Portuguese / Português Programação em Lua [AJUDA]Estou com problemas num script de MTA no ServerSide
    1 point
  4. Then try with this shader file please:
    1 point
  5. As alternative: It would be possible to use a render-target in between. Draw the first shader inside of the rendertarget, then apply the render-target on to the second shader and draw that one on to the screen. https://wiki.multitheftauto.com/wiki/DxCreateRenderTarget I am not sure what the impact on the quality as well as the performance will be. Probably not so good for toasters... so stick with 1 shader if you possible can...
    1 point
  6. @85242 Something like this, but I can't test it. Shader local screenX, screenY = guiGetScreenSize() local screenSource = dxCreateScreenSource(screenX, screenY) local blurStrength = 6 local blurShader = dxCreateShader("fx/BlackAndWhiteBlurShader.fx") dxSetShaderValue(blurShader, "BlurStrength", blurStrength); dxSetShaderValue(blurShader, "UVSize", screenWidth, screenHeight); function blur() if (blurShader) then dxUpdateScreenSource(screenSource) dxSetShaderValue(blurShader, "ScreenSource", screenSource); dxDrawImage(0, 0, screenX, screenY, blurShader) end end addEventHandler("onClientPreRender", getRootElement(), blur)
    1 point
  7. 1 point
  8. This code is executed every frame. I can see that you add some validation checks. But check the execution rate of the following code, if it is too high it will be a much bigger than not playing sounds: As for the not playing sound, you forgot to index the table: themes[math.random(#themes )]
    1 point
  9. Olha mano, o createPickup está certo, mas a função de setar a skin está bem errada.. Segue abaixo a correção: function pickupskin(thePlayer) setElementModel(thePlayer, 312) end addEventHandler("onPickupHit", marker, pickupskin )
    1 point
  10. السلام عليكم ورحمة الله وبركاته اتهامات سرقة السكربتات بدون دليل ممنوعة, لاحظت في الفترة الأخيرة اتهامات بين أعضاء المنتدى بخصوص نشر سكربتات مسروقة وما شابه ولذلك اذا توفر لديك الدليل الكافي بأن السكربتات مسروقة وليست يملكاً للشخص الذي قام بنشرها قم بالتواصل مع المشرفين على الخاص وسيتم التعامل مع الموضوع. * ملاحظة: ليست لدينا أي صلاحيات تجاه السيرفرات التي تستعمل سكربتات مسروقة, فقط السكربتات التي تم نشرها على هذا المنتدى. تحياتي لكم
    1 point
×
×
  • Create New...