Matevsz Posted May 3, 2015 Author Share Posted May 3, 2015 Yes /login Matevsz password after logging can open the Admin Panel, etc. Link to comment
Walid Posted May 3, 2015 Share Posted May 3, 2015 Yes /login Matevsz password after logging can open the Admin Panel, etc. Fixed the whole code * Client side GUIEditor = { button = {}, window = {}, label = {}, memo = {}, } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.window[1] = guiCreateWindow(242, 216, 1224, 670, "DjPanel By Matevsz", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetVisible(GUIEditor.window[1], false) GUIEditor.button[1] = guiCreateButton(22, 39, 360, 32, "Wlacz dym", false, GUIEditor.window[1]) GUIEditor.button[2] = guiCreateButton(23, 93, 359, 34, "Wylacz dym", false, GUIEditor.window[1]) GUIEditor.memo[1] = guiCreateMemo(23, 179, 359, 32, "", false, GUIEditor.window[1]) GUIEditor.label[1] = guiCreateLabel(81, 159, 253, 15, "Wpisz tekst, ktory bedzie pokazany na scianie", false, GUIEditor.window[1]) GUIEditor.browser[1] = guiCreateBrowser(396, 39, 810, 609, "", false, GUIEditor.window[1]) GUIEditor.button[3] = guiCreateButton(13, 624, 108, 34, "Zamknij", false, GUIEditor.window[1]) GUIEditor.button[4] = guiCreateButton(91, 228, 222, 29, "Pokaz tekst", false, GUIEditor.window[1]) local theBrowser = guiGetBrowser(GUIEditor.browser[1]) end ) function showGui() guiSetVisible(GUIEditor.window[1], true) showCursor(true) end addEvent("ShowGui", true) addEventHandler("ShowGui",root,showGui) addEventHandler("onClientBrowserCreated", theBrowser, function() loadBrowserURL(source, "https://www.youtube.com") end ) function WlaczDym() if source == GUIEditor.button[1] then dym = createObject (2780, 489.29998779297, -13.89999961853, 994.20001220703, 0, 0, 0) elseif source == GUIEditor.button[2] then if isElement(dym) then destroyElement(dym) end elseif source == GUIEditor.button[3] then guiSetVisible(GUIEditor.window[1], false) showCursor(false) end end addEventHandler("onClientGUIClick", root, WlaczDym) addEvent("LogOutSetVisible", true) addEventHandler("LogOutSetVisible", root, function() if guiGetVisible(GUIEditor.window[1]) then guiSetVisible(GUIEditor.window[1], false) showCursor(false) end end ) * Server side local marker = createMarker (487.599609375, -0.900390625, 1001.4000244141, "cylinder", 0.60000002) local stoldj = createObject (14391, 487.7001953125, -2.7001953125, 1002.299987793, 0, 0, 90) local marker2 = createMarker (493.39999389648, -24.799999237061, 1001.299987793, "arrow", 1.20000004, 235, 227, 19, 255) local marker3 = createMarker (1836.8000488281, -1682.5, 13.89999961853, "arrow", 1.20000004, 235, 227, 19, 255) local glosnik1 = createObject (2232, 484.29998779297, -5.6999998092651, 1001.700012207, 0, 0, 0) local glosnik2 = createObject (2232, 490.20001220703, -5.5999999046326, 1001.700012207, 0, 0, 0) local glosnik3 = createObject (2232, 493.29998779297, -13.89999961853, 1002, 0, 0, 272) local tancerka1 = createPed (90, 479.60000610352, -8.8999996185303, 1002.4000244141, 246.001373) local tancerka2 = createPed (90, 479.5, -4.3000001907349, 1003.9000244141, 214.001373) local barierka1 = createObject (2773, 1836, -1681, 13, 0, 0, 90) local barierka2 = createObject (2773, 1833.4000244141, -1681, 13.10000038147, 2, 0, 90) local barierka3 = createObject (2773, 1836.0999755859, -1684, 12.89999961853, 2, 0, 90) local barierka4 = createObject (2773, 1833.4000244141, -1684, 13, 1.99951171875, 0, 90) local blip = createBlip (1837.1999511719, -1682.5, 14.199999809265, 48, 2, 255, 0, 0, 255, 0) addEventHandler("onResourceStart", resourceRoot, function() tancerka1 = createPed (90, 479.60000610352, -8.8999996185303, 1002.4000244141, 246.001373) tancerka2 = createPed (90, 479.5, -4.3000001907349, 1003.9000244141, 214.001373) setTimer (AnimacjaTancerek, 1000, 0) for i, player in ipairs(getElementsByType("player")) do if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)), aclGetGroup("DJ")) then setElementData(player, "Show_GUI", true) else setElementData(player, "Show_GUI", nil) end end end ) addEventHandler("onMarkerHit", marker, function ( hitElement, matchingDimension ) if matchingDimension and isElement(hitElement) and getElementType(hitElement) == "player" then if getElementData(hitElement, "Show_GUI") ~= nil then triggerClientEvent(hitElement,"ShowGui",hitElement) end end end ) function AnimacjaTancerek() setPedAnimation (tancerka1, "STRIP", "Strip_G") setPedAnimation (tancerka2, "DANCING", "dnce_M_e") end function TeleportNaDyskoteke(player) if getElementType(player)=="player" then if source == marker3 then setElementPosition(player, 493.60000610352, -22.799999237061, 1000.700012207) setElementInterior(player, 17) setElementFrozen(player, true) setElementInterior(glosnik1, 17) setElementInterior(glosnik2, 17) setElementInterior(glosnik3, 17) setElementInterior(marker2, 17) setElementInterior(marker, 17) setElementInterior(stoldj, 17) setElementInterior(tancerka1, 17) setElementInterior(tancerka2, 17) setTimer(setElementFrozen, 1000, 1, player, false) end end end addEventHandler("onMarkerHit", marker3, TeleportNaDyskoteke) function TeleportZDyskoteki(player) if getElementType(player)=="player" then if source == marker2 then setElementPosition(player, 1834.6999511719, -1682.5999755859, 13.39999961853) setElementInterior(player, 0) setElementFrozen(player, true) setTimer(setElementFrozen, 1000, 1, player, false) end end end addEventHandler("onMarkerHit", marker2, TeleportZDyskoteki) addEventHandler("onPlayerLogin", root, function(_, acc) if isObjectInACLGroup("user."..getAccountName(acc), aclGetGroup("DJ")) then setElementData(source, "Show_GUI", true) else setElementData(source, "Show_GUI", nil) end end ) addEventHandler("onPlayerLogout", root, function(_, acc) triggerClientEvent(source, "LogOutSetVisible", root) setElementData(source, "Show_GUI", nil) end ) Link to comment
Walid Posted May 4, 2015 Share Posted May 4, 2015 Try it without getElementData addEventHandler("onMarkerHit", marker, function ( hitElement, matchingDimension ) if matchingDimension and isElement(hitElement) and getElementType(hitElement) == "player" then triggerClientEvent(hitElement,"ShowGui",hitElement) end end ) Link to comment
Matevsz Posted May 4, 2015 Author Share Posted May 4, 2015 GUI does not show And if the GUI, you must enter the place where you want to display? because it can be shown behind the screen? Link to comment
Matevsz Posted May 5, 2015 Author Share Posted May 5, 2015 Thanks, I want to do that by typing the link (YT) and press the button "Play" music was coming from YT, according to the script: [url=https://community.multitheftauto.com/index.php?p=resources&s=details&id=]https://community.multitheftauto.com/in ... etails&id=[/url]10065 And after editing when I go to the server immediately GUI appears, what's not to remove showed? Only after entry into the marker. serwer local marker = createMarker (487.599609375, -0.900390625, 1001.4000244141, "cylinder", 1) local stoldj = createObject (14391, 487.7001953125, -2.7001953125, 1002.299987793, 0, 0, 90) local marker2 = createMarker (493.39999389648, -24.799999237061, 1001.299987793, "arrow", 1.20000004, 235, 227, 19, 255) local marker3 = createMarker (1836.8000488281, -1682.5, 13.89999961853, "arrow", 1.20000004, 235, 227, 19, 255) local glosnik1 = createObject (2232, 484.29998779297, -5.6999998092651, 1001.700012207, 0, 0, 0) local glosnik2 = createObject (2232, 490.20001220703, -5.5999999046326, 1001.700012207, 0, 0, 0) local glosnik3 = createObject (2232, 493.29998779297, -13.89999961853, 1002, 0, 0, 272) local tancerka1 = createPed (90, 479.60000610352, -8.8999996185303, 1002.4000244141, 246.001373) local tancerka2 = createPed (90, 479.5, -4.3000001907349, 1003.9000244141, 214.001373) local barierka1 = createObject (2773, 1836, -1681, 13, 0, 0, 90) local barierka2 = createObject (2773, 1833.4000244141, -1681, 13.10000038147, 2, 0, 90) local barierka3 = createObject (2773, 1836.0999755859, -1684, 12.89999961853, 2, 0, 90) local barierka4 = createObject (2773, 1833.4000244141, -1684, 13, 1.99951171875, 0, 90) local blip = createBlip (1837.1999511719, -1682.5, 14.199999809265, 48, 2, 255, 0, 0, 255, 0) addEventHandler("onResourceStart", resourceRoot, function() tancerka1 = createPed (90, 479.60000610352, -8.8999996185303, 1002.4000244141, 246.001373) tancerka2 = createPed (90, 479.5, -4.3000001907349, 1003.9000244141, 214.001373) setTimer (AnimacjaTancerek, 1000, 0) for i, player in ipairs(getElementsByType("player")) do if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)), aclGetGroup("DJ")) then setElementData(player, "Show_GUI", true) else setElementData(player, "Show_GUI", nil) end end end ) addEventHandler("onMarkerHit", marker, function ( hitElement, matchingDimension ) if matchingDimension and isElement(hitElement) and getElementType(hitElement) == "player" then triggerClientEvent(hitElement,"ShowGui",hitElement) end end ) function AnimacjaTancerek() setPedAnimation (tancerka1, "STRIP", "Strip_G") setPedAnimation (tancerka2, "DANCING", "dnce_M_e") end function TeleportNaDyskoteke(player) if getElementType(player)=="player" then if source == marker3 then setElementPosition(player, 493.60000610352, -22.799999237061, 1000.700012207) setElementInterior(player, 17) setElementFrozen(player, true) setElementInterior(glosnik1, 17) setElementInterior(glosnik2, 17) setElementInterior(glosnik3, 17) setElementInterior(marker2, 17) setElementInterior(marker, 17) setElementInterior(stoldj, 17) setElementInterior(tancerka1, 17) setElementInterior(tancerka2, 17) setTimer(setElementFrozen, 1000, 1, player, false) end end end addEventHandler("onMarkerHit", marker3, TeleportNaDyskoteke) function TeleportZDyskoteki(player) if getElementType(player)=="player" then if source == marker2 then setElementPosition(player, 1834.6999511719, -1682.5999755859, 13.39999961853) setElementInterior(player, 0) setElementFrozen(player, true) setTimer(setElementFrozen, 1000, 1, player, false) end end end addEventHandler("onMarkerHit", marker2, TeleportZDyskoteki) addEventHandler("onPlayerLogin", root, function(_, acc) if isObjectInACLGroup("user."..getAccountName(acc), aclGetGroup("DJ")) then setElementData(source, "Show_GUI", true) else setElementData(source, "Show_GUI", nil) end end ) addEventHandler("onPlayerLogout", root, function(_, acc) triggerClientEvent(source, "LogOutSetVisible", root) setElementData(source, "Show_GUI", nil) end ) function excuteCommandYT (source, theCommand, theLink) if getElementData(source,"playingYTSound") then setElementData(source, "playingYTSound",false) triggerClientEvent ( source, "playHandler", source, "false" ) else if theLink == nil then else setElementData(source, "playingYTSound",true) triggerClientEvent(source, "playHandler", source, theLink) end end end function triggerYT (theLink) if getElementData(client,"playingYTSound") then setElementData(client, "playingYTSound",false) triggerClientEvent(client, "playHandler", client, "false") else if theLink == nil then outputChatBox ("Error: The link is returned nil",client) else setElementData(client, "playingYTSound",true) triggerClientEvent(client, "playHandler", client, theLink) end end end addEvent("triggerYT", true) addEventHandler("triggerYT", resourceRoot, triggerYT) client GUIEditor = { button = {}, window = {}, label = {}, memo = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.window[1] = guiCreateWindow(380, 239, 884, 470, "Dj Panel", false) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.button[1] = guiCreateButton(14, 433, 103, 27, "Zamknij", false, GUIEditor.window[1]) GUIEditor.memo[1] = guiCreateMemo(20, 50, 678, 31, "", false, GUIEditor.window[1]) GUIEditor.label[1] = guiCreateLabel(27, 30, 162, 15, "Wpisz link muzyki z YouTube:", false, GUIEditor.window[1]) GUIEditor.button[2] = guiCreateButton(704, 51, 67, 30, "Play", false, GUIEditor.window[1]) GUIEditor.button[5] = guiCreateButton(-76, 78, 55, 48, "", false, GUIEditor.button[4]) GUIEditor.button[6] = guiCreateButton(781, 50, 71, 31, "Stop", false, GUIEditor.window[1]) GUIEditor.memo[2] = guiCreateMemo(570, 127, 292, 317, "", false, GUIEditor.window[1]) GUIEditor.label[2] = guiCreateLabel(573, 106, 194, 15, "Zapisz linki z YouTube", false, GUIEditor.window[1]) GUIEditor.memo[3] = guiCreateMemo(20, 131, 519, 34, "", false, GUIEditor.window[1]) GUIEditor.label[3] = guiCreateLabel(28, 112, 251, 15, "Wpisz tekst, który będzie pokazany na ścianie:", false, GUIEditor.window[1]) GUIEditor.button[7] = guiCreateButton(194, 179, 163, 29, "Pokaż", false, GUIEditor.window[1]) GUIEditor.button[8] = guiCreateButton(36, 257, 186, 37, "Włącz dym", false, GUIEditor.window[1]) GUIEditor.button[9] = guiCreateButton(232, 257, 186, 37, "Wyłącz dym", false, GUIEditor.window[1]) end ) function showGui() guiSetVisible(GUIEditor.window[1], true) showCursor(true) end addEvent("ShowGui", true) addEventHandler("ShowGui",root,showGui) addEventHandler("onClientBrowserCreated", theBrowser, function() loadBrowserURL(source, "https://www.youtube.com") end ) function closeGui() if GUIEditor.button[1] then guiSetVisible(GUIEditor.window[1], false) showCursor(false) end end addEvent("closeGui", true) addEventHandler("closeGui",root,closeGui) function WlaczDym() if source == GUIEditor.button[8] then dym = createObject (2780, 489.29998779297, -13.89999961853, 994.20001220703, 0, 0, 0) elseif source == GUIEditor.button[9] then if isElement(dym) then destroyElement(dym) end elseif source == GUIEditor.button[1] then guiSetVisible(GUIEditor.window[8], false) showCursor(false) end end addEventHandler("onClientGUIClick", root, WlaczDym) addEvent("LogOutSetVisible", true) addEventHandler("LogOutSetVisible", root, function() if guiGetVisible(GUIEditor.window[1]) then guiSetVisible(GUIEditor.window[1], false) showCursor(false) end end ) function muzykaYT(thelink) if link == "false" then stopTheMusic() else playingSound = playSound("http://youtubeinmp3.com/fetch/?video="..linkSent) end end addEvent("playHandler", true) addEventHandler("playHandler", localPlayer, playHandler) function stopTheMusic() if (not playingSound) then else stopSound (playingSound) outputChatBox("Stopped the music") end end function PlayButton() if source == GUIEditor.button[2] then triggerServerEvent ( "triggerYT", resourceRoot,guiGetText (GUIEditor.memo[1])) end end addEventHandler("onClientGUIClick",root,PlayButton) function StopButton() if source == GUIEditor.button[6] then triggerServerEvent ( "triggerYT", resourceRoot,guiGetText (GUIEditor.memo[1])) end end addEventHandler("onClientGUIClick",root,PlayButton) Link to comment
Walid Posted May 5, 2015 Share Posted May 5, 2015 add guiSetVisible onClientResourceStart guiSetVisible(GUIEditor.window[1], false) here addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.window[1] = guiCreateWindow(380, 239, 884, 470, "Dj Panel", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetVisible(GUIEditor.window[1], false) GUIEditor.button[1] = guiCreateButton(14, 433, 103, 27, "Zamknij", false, GUIEditor.window[1]) GUIEditor.memo[1] = guiCreateMemo(20, 50, 678, 31, "", false, GUIEditor.window[1]) GUIEditor.label[1] = guiCreateLabel(27, 30, 162, 15, "Wpisz link muzyki z YouTube:", false, GUIEditor.window[1]) GUIEditor.button[2] = guiCreateButton(704, 51, 67, 30, "Play", false, GUIEditor.window[1]) GUIEditor.button[5] = guiCreateButton(-76, 78, 55, 48, "", false, GUIEditor.button[4]) GUIEditor.button[6] = guiCreateButton(781, 50, 71, 31, "Stop", false, GUIEditor.window[1]) GUIEditor.memo[2] = guiCreateMemo(570, 127, 292, 317, "", false, GUIEditor.window[1]) GUIEditor.label[2] = guiCreateLabel(573, 106, 194, 15, "Zapisz linki z YouTube", false, GUIEditor.window[1]) GUIEditor.memo[3] = guiCreateMemo(20, 131, 519, 34, "", false, GUIEditor.window[1]) GUIEditor.label[3] = guiCreateLabel(28, 112, 251, 15, "Wpisz tekst, który będzie pokazany na ścianie:", false, GUIEditor.window[1]) GUIEditor.button[7] = guiCreateButton(194, 179, 163, 29, "Pokaż", false, GUIEditor.window[1]) GUIEditor.button[8] = guiCreateButton(36, 257, 186, 37, "Włącz dym", false, GUIEditor.window[1]) GUIEditor.button[9] = guiCreateButton(232, 257, 186, 37, "Wyłącz dym", false, GUIEditor.window[1]) end ) Link to comment
Matevsz Posted May 5, 2015 Author Share Posted May 5, 2015 When I enter the marker is a GUI shows up but as I click "Close" is the GUI still is, but I do not see the cursor, and I have to once again enter the marker, and the music does not play Link to comment
Walid Posted May 5, 2015 Share Posted May 5, 2015 When I enter the marker is a GUI shows up but as I click "Close" is the GUI still is, but I do not see the cursor, and I have to once again enter the marker, and the music does not play Sorry i don't undrestand your english, anyways try to use sth like this function close() if source == ""buttonName"" then -- Edit the button name guiSetVisible(GUIEditor.window[1], false) showCursor ( false ) end end addEventHandler(onClientGUIClik,guiRoot,close) Link to comment
Blaawee Posted May 5, 2015 Share Posted May 5, 2015 It's not gonna work at all. The API is dead. Link to comment
Matevsz Posted May 6, 2015 Author Share Posted May 6, 2015 It YouTube not work? And how to add music, that as we enter the link is immediately is downloaded? Just like in this script: [url=https://community.multitheftauto.com/index.php?p=resources&s=details&id=]https://community.multitheftauto.com/ind ... etails&id=[/url]5972 Link to comment
Walid Posted May 6, 2015 Share Posted May 6, 2015 It YouTube not work? And how to add music, that as we enter the link is immediately is downloaded? Just like in this script: [url=https://community.multitheftauto.com/index.php?p=resources&s=details&id=]https://community.multitheftauto.com/ind ... etails&id=[/url]5972 You mean internet radio sth like that. Link to comment
Matevsz Posted May 6, 2015 Author Share Posted May 6, 2015 You can somehow throw .mp3 song on the internet and the script alone give link to this thrown into songs? Because I give songs to the script this script will be much weighed. Sorry for my english Link to comment
Matevsz Posted May 7, 2015 Author Share Posted May 7, 2015 Okay, last question, how to fix this error: ERROR: Server triggered djscreen clientside event, but event is not added clientside S: local marker = createMarker (487.599609375, -0.900390625, 1001.4000244141, "cylinder", 1) local stoldj = createObject (14391, 487.7001953125, -2.7001953125, 1002.299987793, 0, 0, 90) local marker2 = createMarker (493.39999389648, -24.799999237061, 1001.299987793, "arrow", 1.20000004, 235, 227, 19, 255) local marker3 = createMarker (1836.8000488281, -1682.5, 13.89999961853, "arrow", 1.20000004, 235, 227, 19, 255) local glosnik1 = createObject (2232, 484.29998779297, -5.6999998092651, 1001.700012207, 0, 0, 0) local glosnik2 = createObject (2232, 490.20001220703, -5.5999999046326, 1001.700012207, 0, 0, 0) local glosnik3 = createObject (2232, 493.29998779297, -13.89999961853, 1002, 0, 0, 272) local tancerka1 = createPed (90, 479.60000610352, -8.8999996185303, 1002.4000244141, 246.001373) local tancerka2 = createPed (90, 479.5, -4.3000001907349, 1003.9000244141, 214.001373) local barierka1 = createObject (2773, 1836, -1681, 13, 0, 0, 90) local barierka2 = createObject (2773, 1833.4000244141, -1681, 13.10000038147, 2, 0, 90) local barierka3 = createObject (2773, 1836.0999755859, -1684, 12.89999961853, 2, 0, 90) local barierka4 = createObject (2773, 1833.4000244141, -1684, 13, 1.99951171875, 0, 90) local blip = createBlip (1837.1999511719, -1682.5, 14.199999809265, 48, 2, 255, 0, 0, 255, 0) addEventHandler("onResourceStart", resourceRoot, function() tancerka1 = createPed (90, 479.60000610352, -8.8999996185303, 1002.4000244141, 246.001373) tancerka2 = createPed (90, 479.5, -4.3000001907349, 1003.9000244141, 214.001373) setTimer (AnimacjaTancerek, 1000, 0) for i, player in ipairs(getElementsByType("player")) do if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)), aclGetGroup("DJ")) then setElementData(player, "djscreen", true) else setElementData(player, "djscreen", nil) end end end ) addEventHandler("onMarkerHit", marker, function ( hitElement, matchingDimension ) if matchingDimension and isElement(hitElement) and getElementType(hitElement) == "player" then triggerClientEvent(hitElement,"djscreen",hitElement) end end ) function AnimacjaTancerek() setPedAnimation (tancerka1, "STRIP", "Strip_G") setPedAnimation (tancerka2, "DANCING", "dnce_M_e") end function TeleportNaDyskoteke(player) if getElementType(player)=="player" then if source == marker3 then setElementPosition(player, 493.60000610352, -22.799999237061, 1000.700012207) setElementInterior(player, 17) setElementFrozen(player, true) setElementInterior(glosnik1, 17) setElementInterior(glosnik2, 17) setElementInterior(glosnik3, 17) setElementInterior(marker2, 17) setElementInterior(marker, 17) setElementInterior(stoldj, 17) setElementInterior(tancerka1, 17) setElementInterior(tancerka2, 17) setTimer(setElementFrozen, 1000, 1, player, false) end end end addEventHandler("onMarkerHit", marker3, TeleportNaDyskoteke) function TeleportZDyskoteki(player) if getElementType(player)=="player" then if source == marker2 then setElementPosition(player, 1834.6999511719, -1682.5999755859, 13.39999961853) setElementInterior(player, 0) setElementFrozen(player, true) setTimer(setElementFrozen, 1000, 1, player, false) end end end addEventHandler("onMarkerHit", marker2, TeleportZDyskoteki) C: djscreen = guiCreateStaticImage ( 0.00, 0.3, 1, 0.7, "brushedmetal3.jpg", true ) guiSetVisible (djscreen, false) guiSetAlpha (djscreen, 1) digitalfont = guiCreateFont ( "digital.ttf", 13 ) screen = "main" deckApan = guiCreateStaticImage ( 0.05, 0.27, 0.21, 0.39, "lcd.jpg", true, djscreen ) deckBpan = guiCreateStaticImage ( 0.74, 0.27, 0.21, 0.39, "lcd.jpg", true, djscreen ) ---playA1 = guiCreateStaticImage (0.05, 0.87, 0.09, 0.09, "loopblue.jpg", true, djscreen ) ---playA = guiCreateButton( 0.05, 0.87, 0.09, 0.09, ">", true, djscreen ) ---guiSetAlpha (playA, 0.35) ---playB1 = guiCreateStaticImage ( 0.65, 0.87, 0.09, 0.09, "loopblue.jpg", true, djscreen ) ---playB = guiCreateButton( 0.65, 0.87, 0.09, 0.09, ">", true, djscreen ) ---guiSetAlpha (playB, 0.35) pauseA1 = guiCreateStaticImage ( 0.15, 0.87, 0.09, 0.09, "loopblue.jpg", true, djscreen ) pauseA = guiCreateButton( 0.15, 0.87, 0.09, 0.09, "|| / >", true, djscreen ) guiSetAlpha (pauseA, 0.35) pauseB1 = guiCreateStaticImage ( 0.76, 0.87, 0.09, 0.09, "loopblue.jpg", true, djscreen ) pauseB = guiCreateButton( 0.76, 0.87, 0.09, 0.09, "|| / >", true, djscreen ) guiSetAlpha (pauseB, 0.35) stopA1 = guiCreateStaticImage ( 0.05, 0.87, 0.09, 0.09, "loopblue.jpg", true, djscreen ) stopA = guiCreateButton( 0.05, 0.87, 0.09, 0.09, "X", true, djscreen ) guiSetAlpha (stopA, 0.35) stopB1 = guiCreateStaticImage (0.86, 0.87, 0.09, 0.09, "loopblue.jpg", true, djscreen ) stopB = guiCreateButton( 0.86, 0.87, 0.09, 0.09, "X", true, djscreen ) guiSetAlpha (stopB, 0.35) syncA1 = guiCreateStaticImage ( 0.25, 0.87, 0.09, 0.09, "loopblue.jpg", true, djscreen ) syncA = guiCreateButton( 0.25, 0.87, 0.09, 0.09, "Sync", true, djscreen ) guiSetAlpha (syncA, 0.35) syncB1 = guiCreateStaticImage ( 0.66, 0.87, 0.09, 0.09, "loopblue.jpg", true, djscreen ) syncB = guiCreateButton( 0.66, 0.87, 0.09, 0.09, "Sync", true, djscreen ) guiSetAlpha (syncB, 0.35) loop1A1 = guiCreateStaticImage ( 0.05, 0.78, 0.045, 0.04, "loopblue.jpg", true, djscreen ) loop1A = guiCreateButton( 0.05, 0.78, 0.045, 0.04, "loop 1", true, djscreen ) guiSetAlpha (loop1A, 0.35) loop2A1 = guiCreateStaticImage (0.05, 0.82, 0.045, 0.04, "loopblue.jpg", true, djscreen ) loop2A = guiCreateButton( 0.05, 0.82, 0.045, 0.04, "loop 2", true, djscreen ) guiSetAlpha (loop2A, 0.35) loop4A1 = guiCreateStaticImage ( 0.095, 0.78, 0.0442, 0.04, "loopblue.jpg", true, djscreen ) loop4A = guiCreateButton( 0.095, 0.78, 0.0442, 0.04, "loop 4", true, djscreen ) guiSetAlpha (loop4A, 0.35) loop8A1 = guiCreateStaticImage ( 0.095, 0.82, 0.0442, 0.04, "loopblue.jpg", true, djscreen ) loop8A = guiCreateButton( 0.095, 0.82, 0.0442, 0.04, "loop 8", true, djscreen ) guiSetAlpha (loop8A, 0.55) loop16A1 = guiCreateStaticImage (0.14, 0.78, 0.045, 0.04, "loopblue.jpg", true, djscreen ) loop16A = guiCreateButton( 0.14, 0.78, 0.045, 0.04, "loop 16", true, djscreen ) guiSetAlpha (loop16A, 0.35) loop32A1 = guiCreateStaticImage (0.14, 0.82, 0.045, 0.04, "loopblue.jpg", true, djscreen ) loop32A = guiCreateButton( 0.14, 0.82, 0.045, 0.04, "loop 32", true, djscreen ) guiSetAlpha (loop32A, 0.35) loopoutA1 = guiCreateStaticImage ( 0.185, 0.78, 0.055, 0.08, "loopblue.jpg", true, djscreen ) loopoutA = guiCreateButton( 0.185, 0.78, 0.055, 0.08, "OUT", true, djscreen ) guiSetAlpha (loopoutA, 0.35) loop1B1 = guiCreateStaticImage (0.815, 0.78, 0.0442, 0.04, "loopblue.jpg", true, djscreen ) loop1B = guiCreateButton( 0.815, 0.78, 0.0442, 0.04, "loop 1", true, djscreen ) guiSetAlpha (loop1B, 0.35) loop2B1 = guiCreateStaticImage ( 0.815, 0.82, 0.0442, 0.04, "loopblue.jpg", true, djscreen ) loop2B = guiCreateButton( 0.815, 0.82, 0.0442, 0.04, "loop 2", true, djscreen ) guiSetAlpha (loop2B, 0.35) loop4B1 = guiCreateStaticImage ( 0.86, 0.78, 0.045, 0.04, "loopblue.jpg", true, djscreen ) loop4B = guiCreateButton( 0.86, 0.78, 0.045, 0.04, "loop 4", true, djscreen ) guiSetAlpha (loop4B, 0.35) loop8B1 = guiCreateStaticImage ( 0.86, 0.82, 0.045, 0.04, "loopblue.jpg", true, djscreen ) loop8B = guiCreateButton( 0.86, 0.82, 0.045, 0.04, "loop 8", true, djscreen ) guiSetAlpha (loop8B, 0.35) loop16B1 = guiCreateStaticImage ( 0.905, 0.78, 0.045, 0.04, "loopblue.jpg", true, djscreen ) loop16B = guiCreateButton( 0.905, 0.78, 0.045, 0.04, "loop 16", true, djscreen ) guiSetAlpha (loop16B, 0.35) loop32B1 = guiCreateStaticImage ( 0.905, 0.82, 0.045, 0.04, "loopblue.jpg", true, djscreen ) loop32B = guiCreateButton( 0.905, 0.82, 0.045, 0.04, "loop 32", true, djscreen ) guiSetAlpha (loop32B, 0.35) loopoutB1 = guiCreateStaticImage ( 0.76, 0.78, 0.055, 0.08, "loopblue.jpg", true, djscreen ) loopoutB = guiCreateButton( 0.76, 0.78, 0.055, 0.08, "OUT", true, djscreen ) guiSetAlpha (loopoutB, 0.35) labelA = guiCreateLabel( 0.05, 0.08, 0.35, 0.07, "Deck A", true, djscreen ) labelB = guiCreateLabel( 0.65, 0.08, 0.35, 0.07, "Deck B", true, djscreen ) labelDpltimeA = guiCreateLabel( 0.06, 0.51, 0.10, 0.07,"Playtime:", true, djscreen ) labelDtottimeA = guiCreateLabel( 0.06, 0.56, 0.1, 0.07, "Totaltime:", true, djscreen ) labelDbpmA = guiCreateLabel( 0.06, 0.61, 0.1, 0.07, "BPM:", true, djscreen ) labelDpltimeB = guiCreateLabel( 0.75, 0.51, 0.10, 0.07,"Playtime:", true, djscreen ) labelDtottimeB = guiCreateLabel( 0.75, 0.56, 0.1, 0.07, "Totaltime:", true, djscreen ) labelDbpmB = guiCreateLabel( 0.75, 0.61, 0.1, 0.07, "BPM:", true, djscreen ) guiSetFont( labelDpltimeA , digitalfont) guiSetFont( labelDtottimeA , digitalfont) guiSetFont( labelDbpmA , digitalfont) guiSetFont( labelDpltimeB , digitalfont) guiSetFont( labelDtottimeB , digitalfont) guiSetFont( labelDbpmB , digitalfont) progressBarA = guiCreateProgressBar( 0.05, 0.19, 0.30, 0.07, true, djscreen ) progressBarB = guiCreateProgressBar( 0.65, 0.19, 0.30, 0.07, true, djscreen ) vuBleft = guiCreateStaticImage( 0.74, 0.67, 0.1, 0.1, "0.jpg", true, djscreen ) vuBright = guiCreateStaticImage( 0.85, 0.67, 0.1, 0.1, "0.jpg", true, djscreen ) vuAleft = guiCreateStaticImage( 0.05, 0.67, 0.1, 0.1, "0.jpg", true, djscreen ) vuAright = guiCreateStaticImage( 0.16, 0.67, 0.1, 0.1, "0.jpg", true, djscreen ) digVuAbut = guiCreateButton( 0.36, 0.20, 0.28, 0.04, "Digital standard VU", true, djscreen ) digVu2Abut = guiCreateButton( 0.36, 0.24, 0.28, 0.04, "Digital new VU", true, djscreen ) oldVuAbut = guiCreateButton( 0.36, 0.28, 0.28, 0.04, "Analog VU", true, djscreen ) volumebarAleft = guiCreateProgressBar( 0.05, 0.67, 0.21, 0.05, true, djscreen ) volumebarAright = guiCreateProgressBar( 0.05, 0.72, 0.21, 0.05, true, djscreen ) vu2Aleft = guiCreateStaticImage( 0.05, 0.67, 0.21, 0.05, "d0.jpg", true, djscreen ) vu2Aright = guiCreateStaticImage( 0.05, 0.72, 0.21, 0.05, "d0.jpg", true, djscreen ) vu2Bleft = guiCreateStaticImage( 0.74, 0.67, 0.21, 0.05, "d0.jpg", true, djscreen ) vu2Bright = guiCreateStaticImage( 0.74, 0.72, 0.21, 0.05, "d0.jpg", true, djscreen ) volumebarBleft = guiCreateProgressBar( 0.74, 0.67, 0.21, 0.05, true, djscreen ) volumebarBright = guiCreateProgressBar( 0.74, 0.72, 0.21, 0.05, true, djscreen ) styleVUb = tostring("dig") styleVUa = tostring("dig") guiSetVisible(vuAleft, false) guiSetVisible(vuAright, false) guiSetVisible(vu2Aleft, false) guiSetVisible(vu2Aright, false) guiSetVisible(vu2Bleft, false) guiSetVisible(vu2Bright, false) guiSetVisible(vuBleft, false) guiSetVisible(vuBright, false) labelstatA = guiCreateLabel( 0.06, 0.445, 0.19, 0.07,"no song loaded", true, djscreen ) guiSetFont( labelstatA , digitalfont) labelstatB = guiCreateLabel( 0.75, 0.445, 0.19, 0.07,"no song loaded", true, djscreen ) guiSetFont( labelstatB , digitalfont) volumeA = guiCreateScrollBar (0.33, 0.28, 0.02, 0.48, false, true, djscreen ) volumeB = guiCreateScrollBar (0.65, 0.28, 0.02, 0.48, false, true, djscreen ) searchBarA = guiCreateScrollBar (0.05, 0.14, 0.30, 0.04, true, true, djscreen ) searchBarB = guiCreateScrollBar (0.65, 0.14, 0.30, 0.04, true, true, djscreen ) crossBar = guiCreateScrollBar (0.36, 0.83, 0.27, 0.07, true, true, djscreen ) guiScrollBarSetScrollPosition (crossBar, 50) speedA = guiCreateScrollBar (0.3, 0.28, 0.02, 0.48, false, true, djscreen ) guiScrollBarSetScrollPosition (speedA, 50) speedB = guiCreateScrollBar (0.68, 0.28, 0.02, 0.48, false, true, djscreen ) guiScrollBarSetScrollPosition (speedB, 50) speed1A = guiCreateButton( 0.27, 0.495, 0.02, 0.05, "o", true, djscreen ) speed1B = guiCreateButton( 0.71, 0.495, 0.02, 0.05, "o", true, djscreen ) speed1B = guiCreateButton( 0.71, 0.495, 0.02, 0.05, "o", true, djscreen ) filesBtn = guiCreateButton( 0.36, 0.08, 0.14, 0.05, "Files", true, djscreen ) settingsBtn = guiCreateButton( 0.5, 0.08, 0.14, 0.05, "Settings", true, djscreen ) songGridList = guiCreateGridList(0.36,0.14,0.28,0.51,true,djscreen) guiGridListSetSelectionMode(songGridList,0) songColumn = guiGridListAddColumn(songGridList,"Artist - Title",0.-- s8) -->bpmColumn = guiGridListAddColumn(songGridList,"bpm",0.2) fileColumn = guiGridListAddColumn(songGridList,"file",0.88) songs = { {"America - A horse with no name","http://netanimations.net/A-Horse-With-No-Name.mp3",0}, {"Ann Bailey & Damian Wilson - Take me away","http://video.ycv-servers.com/media/audio/old/60577.mp3",0}, {"AntiDJ - Dance or die cd1 Progressive house","http://freedownloads.last.fm/download/254068161/Dance+or+Die+-+CD+1.mp3",0}, {"Avicii - Clubbin @ slamfm 19-11-2011","http://www.hulkshare.com/dl/lzekdtg74ftn/Clubbin%20(slamfm)-sat-11-19-2011?d=1",0}, {"Bobby Burn - I'm from Holland","http://users.telenet.be/melissaris/holland.mp3",0}, {"Beatfreakz - Superfreak","http://shemet.in/~klav/Music/Dance%20Disko%20Electronik/Various/Beatfreakz%20-%20Superfreak%20(Radio%20Edit)%[email protected]",133.05}, {"Bomfunk MCs - Freestyler","http://video.ycv-servers.com/media/audio/old/60826.mp3",0}, {"Cardigans - My favourite game","http://1nsk.me/data/podcast/28/flv/639ae5bd30fc63ad.mp3",0}, {"David Guetta ft Sia - Titanium","http://a.tumblr.com/tumblr_m3j6avWuZ81qch4ruo1.mp3",0}, {"Delinquent Habits - Return of the tres","http://www.hulkshare.com/dl/jnrkenf3625b",0}, {"DJ Shabaz - The Riddle","http://www.hulkshare.com/dl/pr78vbc25tte/?d=1",0}, {"Eminem - The real slim shady","http://1cd.palco.fm/1/c/3/b/beltrao-eminem-the-real-slim-shady.mp3",0}, {"Fatboy slim - Funk soul brother","http://brunodilucca.com/transfer/casamento/musicasok/Fatboy%20Slim%20%20%20Funk%20Soul%20Brother.mp3",0}, {"Gabriella Cilmi - Sweet about me","http://krchnacek.ic.cz/Gabriella%20Cilmi%20-%20Sweet%20About%20Me.mp3",131.95}, {"Gigi Dagostino - Canto do mar","http://www.hulkshare.com/dl/pi9rvgeioxfr/?d=1",0}, {"Gigi Dagostino - Lamour Toujours","http://www.hulkshare.com/dl/zfb2jukqqjvq/Gigi%20d'agostino%20-%20l'amour%20toujours?d=1",0}, {"IAM - Petit frere","http://www.frap.ru/files/perevod/IAM-PetitFrere.mp3",0}, {"Jefferson Airplane - Somebody to love (remix)","http://www.hulkshare.com/dl/7a8g4uiat208",0}, {"John Dahlback - Clubbin' @ slamfm 17-1-2009","http://rs423p3.rapidshare.com/cgi-bin/rsapi.cgi?sub=download&fileid=185043241&filename=john_dahlback_-_clubbin__slamfm_-01-17-2009-UMP3.mp3&dlauth=0123456789",0}, {"Jordy Lishous - Clubbin' @ slamfm 4-2-2011","http://www.hulkshare.com/dl/pdyxnrbt7om0/Clubbin%20(slamfm)-cable-04-02-2011?d=1",0}, {"Knaan - Wavin' flag","http://wolkanca.com/wp-content/uploads/i/ses/knaan-wavin-flag.mp3",0}, {"Luc Margeaux - Vallee des larmes","http://mp3.wp.pl/ftp/t/24/18/181824.mp3",0}, {"Madonna - Miles away","http://api.ning.com/files/E9cdQbNRHB5nRSvSwfGZzchhnlV-8Ayz0TTl0DbOOfIO511Hz0UqrsxJarYuRVCxv1CW6IDJ1MhlXyOqrglqlickkL3KBxi9/n4mbYZlrZHqak6iOpGqCkp6fpKO",116}, {"Marco V - Clubbin @ slamfm 16-6-2012","http://www.hulkshare.com/dl/gt5z401hd8ul/Clubbin_%28SlamFM%29-SAT-06-16-2012_-_www.mixing.dj?d=1",0}, {"Mauro Picotto - Komodo","http://www.hulkshare.com/dl/4h94s8jx38iw/?d=1",137.65}, {"Nicky Minaj - Starships","http://www.hulkshare.com/dl/73vqf09qhlgl/Nicky%20minaj%20-%20starship%20(djtaz)?d=1",0}, {"Outkast - Hey Ya","http://junkyarddawgs.us/media/Out_Kast_-_Hey_Ya.mp3",0}, {"Outkast - Ms. Jackson","http://images.blog-24.com/900000/901000/901000.mp3",0}, {"Psy - Gangnam style","http://a.tumblr.com/tumblr_m8nexkKWB61qlpz0ko1.mp3",0}, {"RTC - Army of Hardcore","http://gratuitfr.free.fr/thunderdome%20-%20army%20of%20hardcore.mp3",0}, {"Shaft - Sway (mucho mambo)","http://www.ddrlover.net/media1107/MP3/mucho_mambo_sway.mp3",0}, {"Shanks & Bigfoot - Sweet like chocolate","http://helgo.net/simon/hornan/Musik/attachments/ISA-Njutare.mp3",0}, {"Swedish House Mafia - Greyhound","http://www.vincesteven.com/IMG/mp3_Swedish_House_Mafia_-_Greyhound_Original-Mix_.mp3",0}, {"Taio Cruz - Dynamite","http://dl.bombmusic.in/Music/Album/Top%2010%20/08%20-%20Taio%20Cruz%20-%20Dynamite.mp3",0}, {"The Dandy Warhols - Bohemian like you","http://www.radiorama.com.br/radiorama/audio/HBO%20-%20The%20Dandy%20Warhols%20-%20Bohemian%20Like%20You.mp3",0}, {"Yolanda be cool - We no speak Americano","http://www.fifa-champions.com/prueba/radio/musica/Yolanda%20Be%20Cool%20&%20Dcup%20-%20We%20No%20Speak%20Americano.mp3",0}, } for i,v in ipairs (songs) do local row = guiGridListAddRow (songGridList) guiGridListSetItemText (songGridList, row, 1, tostring(v[1]), false, true) guiGridListSetItemText (songGridList, row, 2, tonumber(v[3]), false, true) guiGridListSetItemText (songGridList, row, 3, tostring(v[2]), false, true) end loadAbut = guiCreateButton( 0.36, 0.67, 0.135, 0.09, "< load A", true, djscreen ) loadBbut = guiCreateButton( 0.505, 0.67, 0.135, 0.09, "load B >", true, djscreen ) function files() screen = "main" end addEventHandler ( "onClientGUIClick", filesBtn, files, false ) function settings() screen = "settings" end addEventHandler ( "onClientGUIClick", settingsBtn, settings, false ) function initDJwindow() if (screen == "main") then guiSetVisible (songGridList, true) guiSetVisible (loadAbut, true) guiSetVisible (loadBbut, true) end if not (screen == "main") then guiSetVisible (songGridList, false) guiSetVisible (loadAbut, false) guiSetVisible (loadBbut, false) end if (screen == "settings") then guiSetVisible (digVuAbut, true) guiSetVisible (digVu2Abut, true) guiSetVisible (oldVuAbut, true) end if not (screen == "settings") then guiSetVisible (digVuAbut, false) guiSetVisible (digVu2Abut, false) guiSetVisible (oldVuAbut, false) end end addEventHandler ("onClientGUIClick", getRootElement(), initDJwindow) function initDeckA () stopSound(musicA) destroyElement(musicA) if labeltotaltimeA then destroyElement(labeltotaltimeA) end if labelbpmA then destroyElement(labelbpmA) end if labelartistA then destroyElement(labelartistA) end if labeltitleA then Link to comment
Walid Posted May 7, 2015 Share Posted May 7, 2015 (edited) You must add djscreen event client side like this addEvent("djscreen",true) addEventHandler("djscreen",root, functionName) Edited May 7, 2015 by Guest Link to comment
Matevsz Posted May 7, 2015 Author Share Posted May 7, 2015 tell me how to do more to music that goes with interneru, was coming from a speaker in the MTA Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now