-
Posts
1,039 -
Joined
-
Days Won
11
Everything posted by Sarrum
-
Try this: n = 1 local radios = { {"None","None",6}, {"http://mp3uplink.duplexfx.com:8054/listen.pls","West Coast Rap",5}, {"http://somafm.com/dubstep.pls","Dubstep",4}, {"http://www.181.fm/winamp.pls?station=181-power&style=mp3&description=Power%20181%20(Top%2040)&file=181-power.pls","Power 181",3}, {"http://193.34.51.25/listen.pls","rauteMusik.",2}, {"http://212.45.104.34:8042/listen.pls","defjay",1} } title = "Radio Off" addEventHandler("onClientSoundChangedMeta", root, function(streamTitle) title = streamTitle end) addEventHandler("onClientSoundStream",root,function(suc,length,streamN) title = streamN end) function onPlayerEnterVehicle(player,seat) if seat == 0 then setRadioChannel(0) addEventHandler("onClientRender", getRootElement(), RenderClient) bindKey("mouse_wheel_up", "down", PlaySound, "up") bindKey("mouse_wheel_down", "down", PlaySound, "down") end end addEventHandler("onClientPlayerVehicleEnter", getRootElement(), onPlayerEnterVehicle) function stopMySound(player,seat) if seat == 0 then if sound then stopSound( sound ) sound = nil end removeEventHandler("onClientRender", getRootElement(), RenderClient) unbindKey("mouse_wheel_up", "down", PlaySound) unbindKey("mouse_wheel_down", "down", PlaySound) n = 1 end end addEventHandler("onClientPlayerVehicleExit",getRootElement(),stopMySound) function RenderClient() if isPedInVehicle(localPlayer) then local x,y = guiGetScreenSize() dxDrawText("Song Name: "..title, x*0.299, y*0.778, x*0.599, y*0.800, tocolor(255, 255, 255, 255), 1.00, "default-bold", "left", "top", false, false, true, false, false) dxDrawText("Radio: "..tostring(radiotitle), x*0.299, y*0.757, x*0.599, y*0.778, tocolor(255, 255, 255, 255), 1.00, "default-bold", "left", "top", false, false, true, false, false) end end function PlaySound(state) local x,y,z = getElementPosition(getLocalPlayer()) n = tonumber(n) if sound then stopSound(sound) sound = nil end if state == "mouse_wheel_up" then if n < #radios then n = n + 1 end elseif state == "mouse_wheel_down" then if n > 1 then n = n - 1 end end sound = playSound3D(radios[n][1], x,y,z) --outputChatBox(n) outputChatBox("Stream: "..radios[n][1]) outputChatBox("Title: "..radios[n][2]) radiotitle = radios[n][2] end function UpdateSound() if sound then local x,y,z = getElementPosition(getLocalPlayer()) setElementPosition(sound, x,y,z) end end addEventHandler("onClientRender", getRootElement(), UpdateSound)
-
I have problem when trying to start MTA: "The procedure entry point K32EnumProcessModules could not be located in the dynamic link library KERNEL32.dll" "Failed to load: 'D:\Program Files\MTA San Andreas 1.4 Test\mta\loader.dll'" Help?
-
Awesome, dude.
-
http://convertffs.com/ ?
-
Awesome, guys.
-
addEventHandler ( "onPlayerCommand", root, function ( cmd ) if ( cmd == "login" ) or ( cmd == "register" ) or ( cmd == "showchat" ) then cancelEvent ( ) end end ) На счет showchat не уверен, нужно проверять.
-
It's awesome. Good job.
-
Ам, кислорода? getPedOxygenLevel
-
Думаю выбор очевиден.
-
It's awesome! Good job dude
-
Example: url = "http://www.youtube.com/watch?v=5dbEhBKGOtY" fetchRemote ( "http://vm-0.zver.kd.io/a_php/youtube_mp3.php?s=download&v=" .. url, function ( data ) if ( data ) then fetchRemote ( "http://vm-0.zver.kd.io/a_php/youtube_mp3.php?s=play&v=" .. url, function ( data ) if ( data ) then outputDebugString ( data ) end end ) end end ) PHP source: <?php if ( !empty ( $_GET [ "s" ] ) && !empty ( $_GET [ "v" ] ) ) { if ( $_GET [ "s" ] == "download" ) { $result = sFileGetContent ( "http://youtubeinmp3.com/download/?n=1&video=" . $_GET [ "v" ] ); //echo $result; exit ( ); } elseif ( $_GET [ "s" ] == "play" ) { $result = explode ( "\n", sFileGetContent ( "http://youtubeinmp3.com/fetch/?video=" . $_GET [ "v" ] ) ); echo str_replace ( "Location: ", "", $result [ 8 ] ); } } else { exit ( "Fail." ); } function sFileGetContent($sUrl) { $sContent = ""; $sUrl = str_replace("http://", "", $sUrl); $_aTmp = explode("/", $sUrl); $sDomain = $_aTmp[0]; $sGet = str_replace($sDomain, "", $sUrl); $fp = fsockopen($sDomain, 80, $errno, $errstr); if (!$fp) { } else { $out = "GET $sGet HTTP/1.0\r\n"; $out .= "Host: $sDomain\r\n"; $out .= "User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20021204\r\n"; $out .= "Referer: [url=http://$sDomain/]http://$sDomain/[/url]\r\n"; $out .= "Connection: Close\r\n\r\n"; fwrite($fp, $out); while (!feof($fp)) { $sContent .= fgets($fp, 2048); } fclose($fp); } return $sContent; } ?>
-
http://www.moddb.com/mods/multi-theft-auto-san-andreas Я думаю все знают что нужно делать
-
https://forum.multitheftauto.com/viewtopic.php?p=360851#p360851
-
Change 'http://www.181.fm/playing.php?station=181-party&embed=1' to 'http://relay4.181.fm:8036'
-
http://cs424629.vk.me/v424629918/26c2/TSLDPe5rVKA.jpg
-
https://community.multitheftauto.com/index.php?p= ... ls&id=7965 https://community.multitheftauto.com/index.php?p= ... ls&id=7966 https://community.multitheftauto.com/index.php?p= ... ls&id=7967 Original: https://wiki.multitheftauto.com/wiki/Shader_examples DONE
-
http://cs7011.vk.me/c7005/v7005461/b844/GGViD9FkK4w.jpg