Jump to content

drk

Members
  • Posts

    1,607
  • Joined

  • Last visited

Everything posted by drk

  1. Dude, you know what is table? local musics = { [ 'Music Name' ] = 'url of the music', [ 'Music Name 2' ] = 'url of the music' }
  2. I tried several ways to do this but I can't. How can I stop a music started by the player from a table?
  3. But if I download the file, player have to wait to download the music to listen this. I want like TG Race DM Server, understand?
  4. Im making a radio player and I want to the server play a song from an url for the local player, I need a audio streaming hosting ? And how I can do this?
  5. drk

    Big noob problem ._.

    More one question I need an audio streaming hosting to play songs from the url on the server ?
  6. drk

    Big noob problem ._.

    working ! =D thanks very much solidsnake
  7. drk

    Big noob problem ._.

    Dont appear any error msg, only don't appear the items in the gridlist The complete code: local musics = { [ 'David Guetta - Where Dem Girls At' ] = 'gfx/music/dg-wdga.mp3', [ 'Coldplay - Paradise' ] = 'gfx/music/cp-pd.mp3', [ 'Coldplay - Viva la Vida' ] = 'gfx/music/cp-vlv.mp3', [ 'Ana Malhoa - Danza Kuduro' ] = 'gfx/music/am-dk.mp3', [ 'No Name - Jamming' ] = 'gfx/music/jm.mp3', [ 'Klaas - Make you Feel' ] = 'gfx/music/ks-myf.mp3', [ 'No Name - Vitality' ] = 'gfx/music/vy.mp3', [ 'Basshunter - All I ever wanted' ] = 'gfx/music/bh-aiew.mp3', [ 'Whiz Khalifa - Black and Yellow ( Ft. Snoop Dogg, Juicy J & T-Pain )' ] = 'gfx/music/wk-bay.mp3', [ 'Skrillex - My name is Skrillex ( Remix )' ] = 'gfx/music/sx-mnis.mp3', [ 'Italobrothers - Stamp on the Ground' ] = 'gfx/music/ib-sotg.mp3', [ 'Madcon - Freaky like Me' ] = 'gfx/music/mc-flm.mp3', [ 'Cut the Music - Greatest Deejay' ] = 'gfx/music/ctm-gd.mp3', [ 'No Name - Time`s Vortex' ] = 'gfx/music/tv.mp3', [ 'Manian - Welcome to the Club' ] = 'gfx/music/wttc.mp3', [ 'Bon Jovi - It`s my Life' ] = 'gfx/music/iml.mp3', [ 'Example - Changed the Way you Kissed Me' ] = 'gfx/music/ctwykm.mp3', [ 'Example - Kickstart ( Bar 9 Remix )' ] = 'gfx/music/e-ksb9rx.mp3' } --gui music = guiCreateWindow(0.2988,0.2317,0.4238,0.5617,"ppS Music Player",true) music_play = guiCreateLabel(0.3864,0.1098,0.236,0.0445,"Now playing:",true,music) guiSetAlpha(music_play,1) guiLabelSetColor(music_play,255,20,147,255) guiLabelSetHorizontalAlign(music_play,"center",false) guiSetFont(music_play,"default-bold-small") music_name = guiCreateLabel(0.1268,0.1869,0.7611,0.0623,"",true,music) guiLabelSetHorizontalAlign(music_name,"center",false) music_grid = guiCreateGridList(0.0649,0.2997,0.8732,0.6261,true,music) guiGridListSetSelectionMode(music_grid,0) local music_grid_column = guiGridListAddColumn(music_grid,"Playlist",0.2) guiSetVisible ( music, false ) function showMusic () if (music_grid_column) then for name, url in pairs(musics) do local row1 = guiGridListAddRow ( music_grid ) guiGridListSetItemText( music_grid, row1, music_grid_column, tostring(name), false, false ) end end end function showWindow() if (guiGetVisible (music)) then guiSetVisible (music, false) showCursor (false) else guiSetVisible(music, true) showCursor (true) end end bindKey ( "F3", "down", showWindow )
  8. drk

    Big noob problem ._.

    Other question, why the text don't appear on the row? ._. function showMusic () if (music_grid_column) then local row1 = guiGridListAddRow ( music_grid ) guiGridListSetItemText( music_grid, row1, music_grid_column, #musics, false, false ) end end Music table: local musics = { [ 'David Guetta - Where Dem Girls At' ] = { 'gfx/music/dg-wdga.mp3' }, [ 'Coldplay - Paradise' ] = { 'gfx/music/cp-pd.mp3' }, [ 'Coldplay - Viva la Vida' ] = { 'gfx/music/cp-vlv.mp3' }, [ 'Ana Malhoa - Danza Kuduro' ] = { 'gfx/music/am-dk.mp3' }, [ 'No Name - Jamming' ] = { 'gfx/music/jm.mp3' }, [ 'Klaas - Make you Feel' ] = { 'gfx/music/ks-myf.mp3' }, [ 'No Name - Vitality' ] = { 'gfx/music/vy.mp3' }, [ 'Basshunter - All I ever wanted' ] = { 'gfx/music/bh-aiew.mp3' }, [ 'Whiz Khalifa - Black and Yellow ( Ft. Snoop Dogg, Juicy J & T-Pain )' ] = { 'gfx/music/wk-bay.mp3' }, [ 'Skrillex - My name is Skrillex ( Remix )' ] = { 'gfx/music/sx-mnis.mp3' }, [ 'Italobrothers - Stamp on the Ground' ] = { 'gfx/music/ib-sotg.mp3' }, [ 'Madcon - Freaky like Me' ] = { 'gfx/music/mc-flm.mp3' }, [ 'Cut the Music - Greatest Deejay' ] = { 'gfx/music/ctm-gd.mp3' }, [ 'No Name - Time`s Vortex' ] = { 'gfx/music/tv.mp3' }, [ 'Manian - Welcome to the Club' ] = { 'gfx/music/wttc.mp3' }, [ 'Bon Jovi - It`s my Life' ] = { 'gfx/music/iml.mp3' }, [ 'Example - Changed the Way you Kissed Me' ] = { 'gfx/music/ctwykm.mp3' }, [ 'Example - Kickstart ( Bar 9 Remix )' ] = { 'gfx/music/e-ksb9rx.mp3' } } It don't work with tables? Then, why when I change #musics by 'Music Name 1' it don't appear too? =s
  9. drk

    Big noob problem ._.

    csmit195 way worked... thanks for helping too myonlake and scooby, anyone lock this noob topic
  10. Hey, why I get this error: WARNING: race_userpanel/music_c.lua:83: Bad argument @ 'guiGetVisible' [ expected gui-element at argument 1, got nil ] WARNING: race_userpanel/music_c.lua:85: Bad argument @ 'guiGetVisible' [ expected gui-element at argument 1, got nil ] WARNING: race_userpanel/music_c.lua:86: Bad argument @ 'guiSetVisible' [ expected gui-element at argument 1, got nil ] the code is function showWindow() if ( guiGetVisible ( music ) == true ) then guiSetVisible ( music, false ) elseif ( guiGetVisible ( music ) == false ) then guiSetVisible ( music, true ) end end bindKey ( "F3", "down", showWindow ) music variable is the gui: function musicPlayer() music = guiCreateWindow(0.2988,0.2317,0.4238,0.5617,"ppS Music Player",true) music_play = guiCreateLabel(0.3864,0.1098,0.236,0.0445,"Now playing:",true,music) guiSetAlpha(music_play,1) guiLabelSetColor(music_play,255,20,147,255) guiLabelSetHorizontalAlign(music_play,"center",false) guiSetFont(music_play,"default-bold-small") music_name = guiCreateLabel(0.1268,0.1869,0.7611,0.0623,"",true,music) guiLabelSetHorizontalAlign(music_name,"center",false) music_grid = guiCreateGridList(0.0649,0.2997,0.8732,0.6261,true,music) guiGridListSetSelectionMode(music_grid,0) local music_grid_column = guiGridListAddColumn(music_grid,"Playlist",0.2) guiSetVisible ( music, false ) if (music_grid_column) then for name,dir in pairs(musics) do local newRow = guiGridListAddRow ( music_grid ) guiGridListSetItemText( music_grid, newRow, music_grid_column, #musics, false, false ) end end end Why it gives me this error?
  11. I'll try anyway ^ ^ if not, have not lost anything because I'll be learning more C++
  12. LOL? MTA = Multi Theft Auto. Qual o problema de dizer MTA ou MTA:SA?
  13. Isso que dá usar recursos da comunidade, editar eles sem saber e vir fazer pergunta noob...
  14. Pagar bem pelo serviço? Você tem pelo menos a noção de quanto ficaria +/- ? Só o servidor RP completo seria mais de 2500 reais...
  15. Antes de você ter uma ideia de fazer um 'servidor de DD ( destruction derby )' você tem que aprender LUA primeiro.
  16. Como DeshawN disse, é obvío que recursos que vêm juntamente com o MTA podem ser modificados totalmente pelo usuário, pois esses recursos não estão compilados. Não precisa de entender quase nada para modificar o 'help' ( HelpManager) ... Caso você queira editá - lo vá na pasta do seu servidor ( MTA SA 1.0.5 - server/mods/deathmatch/resources | MTA SA 1.1 - server/mods/deathmatch/resources/managers/ | MTA SA 1.2 - Igual ao 1.1 ) e aibra o ficheiro comprimido 'helpmanager.zip'.
  17. Hey all ! I'm making a brazilian mta version, i'm translating main menu, server browser, resources, chat, server console and all things mta have... I want to release this when it's done. Can I release?
  18. Dimension: 100 x 100, with 1280 x 720 resolution it can be visible perfectly, in resolutions less than 1280 x 720 not.
×
×
  • Create New...