Jump to content

Looney;3

Members
  • Posts

    41
  • Joined

  • Last visited

Everything posted by Looney;3

  1. Hey I'm Looney and i need help, please ¿you can help? Look this This bug create Objects between on maps and not allow play happy
  2. https://community.multitheftauto.com/in ... s&id=12957
  3. Holus nececito ayuda para saber como solucionar el Circle Shader, porque sale pixelado function dxDrawCircle( x, y, width, height, color, angleStart, angleSweep, borderWidth ) height = height or width color = color or tocolor(255,255,255) borderWidth = borderWidth or 1e9 angleStart = angleStart or 0 angleSweep = angleSweep or 360 - angleStart if ( angleSweep < 360 ) then angleEnd = math.fmod( angleStart + angleSweep, 360 ) + 0 else angleStart = 0 angleEnd = 360 end x = x - width / 2 y = y - height / 2 if not circleShader then circleShader = dxCreateShader ( "files/circle.fx" ) end dxSetShaderValue ( circleShader, "sCircleWidthInPixel", width ); dxSetShaderValue ( circleShader, "sCircleHeightInPixel", height ); dxSetShaderValue ( circleShader, "sBorderWidthInPixel", borderWidth ); dxSetShaderValue ( circleShader, "sAngleStart", math.rad( angleStart ) - math.pi ); dxSetShaderValue ( circleShader, "sAngleEnd", math.rad( angleEnd ) - math.pi ); dxDrawImage( x, y, width, height, circleShader, 0, 0, 0, color ) end circle.fx // // Example shader - circle.fx // // // Based on code from: // [url=http://www.geeks3d.com/20130705/shader-library-circle-disc-fake-sphere-in-glsl-opengl-glslhacker/]http://www.geeks3d.com/20130705/shader- ... lslhacker/[/url] // float sCircleHeightInPixel = 100; float sCircleWidthInPixel = 100; float sBorderWidthInPixel = 10; float sAngleStart = -3.14; float sAngleEnd = 3.14; //------------------------------------------------------------------------------------------ // PixelShaderFunction // 1. Read from PS structure // 2. Process // 3. Return pixel color //------------------------------------------------------------------------------------------ float4 PixelShaderFunction(float4 Diffuse : COLOR0, float2 TexCoord : TEXCOORD0) : COLOR0 { float2 uv = float2( TexCoord.x, TexCoord.y ) - float2( 0.5, 0.5 ); // Clip unwanted pixels from partial pie float angle = atan2( -uv.x, uv.y ); // -PI to +PI if ( sAngleStart > sAngleEnd ) { if ( angle < sAngleStart && angle > sAngleEnd ) return 0; } else { if ( angle < sAngleStart || angle > sAngleEnd ) return 0; } // Calc border width to use float2 vec = normalize( uv ); float CircleRadiusInPixel = lerp( sCircleWidthInPixel, sCircleHeightInPixel, vec.y * vec.y ); float borderWidth = sBorderWidthInPixel / CircleRadiusInPixel; // Check if pixel is inside circle float dist = sqrt( dot( uv, uv ) ); if ( ( dist > 0.5 ) || ( dist < 0.5 - borderWidth ) ) return 0; else return Diffuse; } //------------------------------------------------------------------------------------------ // Techniques //------------------------------------------------------------------------------------------ technique tec0 { pass P0 { PixelShader = compile ps_2_0 PixelShaderFunction(); } }
  4. Help Me please http://subefotos.com/ver/?94b962ef9f97422ca56d8b2ae7dd4c5fo.png
  5. screenX, screenY = guiGetScreenSize() function kiiromanevem() outputChatBox("#005588[info]:#ffffff Mute Radio #232323Press #0066EEi", 255, 255, 255, true) end addEventHandler("onClientResourceStart", resourceRoot, kiiromanevem) function loadxml() xmlFile = xmlLoadFile("options.xml") if xmlFile then animations = xmlFindChild(xmlFile, "animate", 0) anim_mutat = xmlNodeGetValue(xmlFindChild(animations, "in", 0)) anim_rejt = xmlNodeGetValue(xmlFindChild(animations, "out", 0)) anim_speed = xmlNodeGetValue(xmlFindChild(animations, "speed", 0)) url = xmlNodeGetValue(xmlFindChild(xmlFile, "url", 0)) autoplay = xmlNodeGetValue(xmlFindChild(xmlFile, "autoplay", 0)) else create_xmlFile = xmlCreateFile("options.xml", "root") create_animations = xmlCreateChild(create_xmlFile, "animate") xmlNodeSetValue(xmlCreateChild(create_animations, "in"), "OutBounce") xmlNodeSetValue(xmlCreateChild(create_animations, "out"), "OutBounce") xmlNodeSetValue(xmlCreateChild(create_animations, "speed"), "700") xmlNodeSetValue(xmlCreateChild(create_xmlFile, "url"), "http://stream.dubbase.fm:7004") xmlNodeSetValue(xmlCreateChild(create_xmlFile, "autoplay"), "true") xmlSaveFile(create_xmlFile) xmlFile = xmlLoadFile("options.xml") animations = xmlFindChild(xmlFile, "animate", 0) anim_mutat = xmlNodeGetValue(xmlFindChild(animations, "in", 0)) anim_rejt = xmlNodeGetValue(xmlFindChild(animations, "out", 0)) anim_speed = xmlNodeGetValue(xmlFindChild(animations, "speed", 0)) url = xmlNodeGetValue(xmlFindChild(xmlFile, "url", 0)) autoplay = xmlNodeGetValue(xmlFindChild(xmlFile, "autoplay", 0)) end end addEventHandler("onClientResourceStart", resourceRoot, loadxml) addCommandHandler("reloadmxml", loadxml) function zeneindit() zene = playSound(url, true) outputChatBox("#005588[Radio]:#ffffff On", 255, 255, 255, true) setRadioChannel(0) end function bekapcs_kikapcs() if allapot then outputChatBox("#005588[Radio]:#ffffff Off", 255, 255, 255, true) stopSound(zene) allapot = false xmlNodeSetValue(xmlFindChild(xmlFile, "autoplay", 0), "false") xmlSaveFile(xmlFile) else zeneindit() allapot = true xmlNodeSetValue(xmlFindChild(xmlFile, "autoplay", 0), "true") xmlSaveFile(xmlFile) end end function ellenorizd_hogy_inulhat() if autoplay == "true" then bekapcs_kikapcs() end end addEventHandler("onClientResourceStart", resourceRoot, ellenorizd_hogy_inulhat) bindKey("i", "down", bekapcs_kikapcs) function mimegy() most = getSoundMetaTags(zene) outputChatBox("#005588[Radio]:#ffffff Now Play: " .. most.stream_title, 255, 255, 255, true) end addCommandHandler("nowc", mimegy) function makeRadioStayOff() setRadioChannel(0) cancelEvent() end addEventHandler("onClientPlayerRadioSwitch", getRootElement(), makeRadioStayOff) function tobbimute() if allapot then for id = 1, #getElementsByType("sound") do if getElementsByType("sound")[id] ~= zene then soundLength = getSoundLength(getElementsByType("sound")[id]) if soundLength > 30 then setSoundVolume(getElementsByType("sound")[id], 0) end end end elseif not nemitas then for id = 1, #getElementsByType("sound") do if getElementsByType("sound")[id] ~= zene then soundLength = getSoundLength(getElementsByType("sound")[id]) if soundLength > 30 then setSoundVolume(getElementsByType("sound")[id], 1) end end end end end addEventHandler("onClientRender", getRootElement(), tobbimute) addEventHandler("onClientRender", getRootElement(), function() most = getSoundMetaTags(zene) mimegy = most.stream_title if not mostmegy then mostmegy = "zene" end if mostmegy ~= mimegy then mostmegy = mimegy mutat() end end) -- screenX, screenY [890] function asd() textWidth = dxGetTextWidth(most.stream_title, 1, "default-bold") textWidth = textWidth / 2 tick = getTickCount() posY = interpolateBetween(screenX + 10, 0, 0, screenY - screenY/1.01123595505618, 0, 0, 1, "OutBounce") dxDrawRectangle(screenX / 2 - textWidth - 6, posY - 2, textWidth * 2 + 12, 63, tocolor(0, 0, 0, 255)) dxDrawRectangle(screenX / 2 - textWidth - 5, posY - 1, textWidth * 2 + 10, 30, tocolor(23, 23, 23, 255)) dxDrawRectangle(screenX / 2 - textWidth - 5, posY + 30, textWidth * 2 + 10, 30, tocolor(10, 10, 10, 255)) dxDrawText("Now", screenX / 2 - textWidth, posY - 1, screenX / 2 + textWidth, posY + 30, tocolor(255, 255, 255, 255), 1, "default-bold", "center", "center", false, false, true, false, false) dxDrawText(most.stream_title, screenX / 2 - textWidth, posY + 30, screenX / 2 + textWidth, posY + 60, tocolor(255, 255, 255, 255), 1, "default-bold", "center", "center", false, false, true, false, false) if 5 <= (tick - tick2) / 1200 then rejt() end end function asd2() textWidth = dxGetTextWidth(most.stream_title, 1, "default-bold") textWidth = textWidth / 2 tick = getTickCount() posY = interpolateBetween(screenX - screenY - screenY/1.01123595505618, 0, 0, screenY + 10, 0, 0, 1, "OutBounce") dxDrawRectangle(screenX / 2 - textWidth - 6, posY - 2, textWidth * 2 + 12, 63, tocolor(0, 0, 0, 255)) dxDrawRectangle(screenX / 2 - textWidth - 5, posY - 1, textWidth * 2 + 10, 30, tocolor(23, 23, 23, 255)) dxDrawRectangle(screenX / 2 - textWidth - 5, posY + 30, textWidth * 2 + 10, 30, tocolor(10, 10, 10, 255)) dxDrawText("Now", screenX / 2 - textWidth, posY - 1, screenX / 2 + textWidth, posY + 30, tocolor(255, 255, 255, 255), 1, "default-bold", "center", "center", false, false, true, false, false) dxDrawText(most.stream_title, screenX / 2 - textWidth, posY + 30, screenX / 2 + textWidth, posY + 60, tocolor(255, 255, 255, 255), 1, "default-bold", "center", "center", false, false, true, false, false) end function mutat() tick2 = getTickCount() removeEventHandler("onClientRender", getRootElement(), asd2) addEventHandler("onClientRender", getRootElement(), asd) end addCommandHandler("now", mutat) function rejt() tick3 = getTickCount() addEventHandler("onClientRender", getRootElement(), asd2) removeEventHandler("onClientRender", getRootElement(), asd) end function zene_nemitas() if allapot then if nemitas then for id = 1, #getElementsByType("sound") do if getElementsByType("sound")[id] then soundLength = getSoundLength(getElementsByType("sound")[id]) if getElementsByType("sound")[id] == zene then setSoundVolume(getElementsByType("sound")[id], 0) end end end else for id = 1, #getElementsByType("sound") do if getElementsByType("sound")[id] == zene then setSoundVolume(getElementsByType("sound")[id], 1) end end end elseif nemitas then for id = 1, #getElementsByType("sound") do if getElementsByType("sound")[id] then soundLength = getSoundLength(getElementsByType("sound")[id]) if soundLength > 30 then setSoundVolume(getElementsByType("sound")[id], 0) end end end else for id = 1, #getElementsByType("sound") do if getElementsByType("sound")[id] then soundLength = getSoundLength(getElementsByType("sound")[id]) if soundLength > 30 then setSoundVolume(getElementsByType("sound")[id], 1) end end end end end addEventHandler("onClientRender", getRootElement(), zene_nemitas) function nemit_ellenoriz() if nemitas then contador = getTickCount() addEventHandler("onClientRender", getRootElement(), encendidoFunc) nemitas = false else contador = getTickCount() addEventHandler("onClientRender", getRootElement(), apagadoFunc) nemitas = true end end bindKey("m", "down", nemit_ellenoriz) function apagadoFunc() if nemitas then if 1 >= (getTickCount() - contador) / 1200 then kep1, kep2 = interpolateBetween(0, 0, 0, 64, 64, 0, 1, "OutElastic") elseif 1 <= (getTickCount() - contador) / 1200 then kep1, kep2 = interpolateBetween(64, 64, 0, 0, 0, 0, 1, "InElastic") if 1 == 1 then removeEventHandler("onClientRender", getRootElement(), apagadoFunc) end end dxDrawImage(screenX / 2 - kep1 / 2, screenY - 100 - kep2 / 2, kep1, kep2, "images/soundoff.png") end end function encendidoFunc() if not nemitas then if 1 >= (getTickCount() - contador) / 1200 then kep1, kep2 = interpolateBetween(0, 0, 0, 64, 64, 0, 1, "OutElastic") elseif 1 <= (getTickCount() - contador) / 1200 then kep1, kep2 = interpolateBetween(64, 64, 0, 0, 0, 0, 1, "InElastic") if 1 == 1 then removeEventHandler("onClientRender", getRootElement(), encendidoFunc) end end dxDrawImage(screenX / 2 - kep1 / 2, screenY - 100 - kep2 / 2, kep1, kep2, "images/soundon.png") end end
  6. yes, but the original has the same mistakes I only change the interface
  7. Line 40 - 41 textWidth = dxGetTextWidth(meta.stream_title, 1, "default-bold") textWidth2 = textWidth / 2
  8. Hey I need Help with Scripting please ERROR dxGetTextWidth local screenX, screenY = guiGetScreenSize() local animState = "close" setTimer(outputChatBox,1000*60*0,0,"#005588[info]:#ffffff Name Song - #232323Command:#0066EE \"names\"", 255, 255, 255, true) setTimer(outputChatBox,1000*60*0,0,"#005588[info]:#FFFFFFStart and Stop Radio #232323Command:#0066EE \"song\" #FFFFFFor Press #0066EE\"i\"", 255, 255, 255, true) function Start() outputChatBox("#005588[info]:#ffffff Name Song - #232323Command:#0066EE \"names\"", 255, 255, 255, true) outputChatBox("#005588[info]:#FFFFFFStart and Stop Radio #232323Command:#0066EE \"song\" #FFFFFFor Press #0066EE\"i\"", 255, 255, 255, true) start = getTickCount() animState = "open" rend() zeneindit() end addEventHandler("onClientResourceStart", resourceRoot, Start) function zeneindit() radio = playSound("http://stream.dubbase.fm:7004", true) outputChatBox("#005588[Radio]:#ffffff On", 255, 255, 255, true) end function mimegy() meta = getSoundMetaTags(radio) outputChatBox("#005588[Radio]:#ffffff Now Play: " .. meta.stream_title, 255, 255, 255, true) end addCommandHandler("names", mimegy) function RendStart() meta = getSoundMetaTags(radio) mimegy = meta.stream_title if not mostmegy then mostmegy = "radio" end if mostmegy ~= mimegy then mostmegy = mimegy end end addEventHandler("onClientRender", getRootElement(),RendStart) function asd() textWidth = dxGetTextWidth(meta.stream_title, 1, "default-bold") textWidth2 = textWidth / 2 local tick = getTickCount() - start local progress = tick/3000 if animState == "open" then posY = interpolateBetween(screenX + 10, 0, 0, screenY - screenY/1.01123595505618, 0, 0, progress, "OutBounce") else posY = interpolateBetween(0, 0, 0,screenX + 10, 0, 0, progress, "OutBounce") end dxDrawRectangle(screenX / 2 - textWidth2 - 6, posY - 2, textWidth2 * 2 + 12, 63, tocolor(255, 255, 255, 100))--background dxDrawRectangle(screenX / 2 - textWidth2 - 5, posY - 1, textWidth2 * 2 + 10, 30, tocolor(25, 25, 25, 200))--SONG text background dxDrawRectangle(screenX / 2 - textWidth2 - 5, posY + 30, textWidth2 * 2 + 10, 30, tocolor(10, 10, 10, 200))--SONG Name background dxDrawText("SONG", screenX / 2 - textWidth2, posY - 1, screenX / 2 + textWidth2, posY + 30, tocolor(255, 255, 255, 255), 1, "default-bold", "center", "center", false, false, true, false, false) dxDrawText(meta.stream_title, screenX / 2 - textWidth2, posY + 30, screenX / 2 + textWidth2, posY + 60, tocolor(255, 255, 255, 255), 1, "default-bold", "center", "center", false, false, true, false, false) end function rend() addEventHandler("onClientRender", root, asd) addEventHandler("onClientRender", getRootElement(),RendStart) end function Removerend() setTimer(function() removeEventHandler("onClientRender", root, asd) removeEventHandler("onClientRender", getRootElement(),RendStart) stopSound(radio) end, 800, 1) end function show(x) if x == true then rend() zeneindit() animState = "open" start = getTickCount() else Removerend() outputChatBox("#005588[Radio]:#ffffff Off", 255, 255, 255, true) start = getTickCount() animState = "close" end active = x end function isShowCustomHud() return active end function StopStart() if isShowCustomHud() == false then show(true) else show(false) end end addCommandHandler("song",StopStart) bindKey("i", "down", StopStart) fileDelete("radio_client.lua")
×
×
  • Create New...