Servus Leutz,
ich habe das Problem das wenn ich ein Button drücke trotzdem einfach kein Sound kommt.
Das Script ist nur Client-Seitig.
Lua
local ShowingState = 0
GUIEditor = {
button = {}
}
function DieButtonsErstellen()
if ShowingState == 0 then
ShowingState = 1
showCursor(true)
GUIEditor.button[1] = guiCreateButton(1160, 398, 160, 144, "", false)
guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA")
GUIEditor.button[2] = guiCreateButton(785, 805, 160, 144, "", false)
guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFAAAAAA")
GUIEditor.button[3] = guiCreateButton(973, 600, 160, 144, "", false)
guiSetProperty(GUIEditor.button[3], "NormalTextColour", "FFAAAAAA")
GUIEditor.button[4] = guiCreateButton(592, 600, 160, 144, "", false)
guiSetProperty(GUIEditor.button[4], "NormalTextColour", "FFAAAAAA")
GUIEditor.button[5] = guiCreateButton(1160, 600, 160, 144, "", false)
guiSetProperty(GUIEditor.button[5], "NormalTextColour", "FFAAAAAA")
GUIEditor.button[6] = guiCreateButton(973, 398, 160, 144, "", false)
guiSetProperty(GUIEditor.button[6], "NormalTextColour", "FFAAAAAA")
GUIEditor.button[7] = guiCreateButton(598, 805, 160, 144, "", false)
guiSetProperty(GUIEditor.button[7], "NormalTextColour", "FFAAAAAA")
GUIEditor.button[8] = guiCreateButton(973, 805, 160, 144, "", false)
guiSetProperty(GUIEditor.button[8], "NormalTextColour", "FFAAAAAA")
GUIEditor.button[9] = guiCreateButton(785, 600, 160, 144, "", false)
guiSetProperty(GUIEditor.button[9], "NormalTextColour", "FFAAAAAA")
GUIEditor.button[10] = guiCreateButton(1160, 805, 160, 144, "", false)
guiSetProperty(GUIEditor.button[10], "NormalTextColour", "FFAAAAAA")
GUIEditor.button[11] = guiCreateButton(592, 398, 160, 144, "", false)
guiSetProperty(GUIEditor.button[11], "NormalTextColour", "FFAAAAAA")
GUIEditor.button[12] = guiCreateButton(785, 398, 160, 144, "", false)
guiSetProperty(GUIEditor.button[12], "NormalTextColour", "FFAAAAAA")
addEventHandler ( "onClientRender", root, DieBereicheDerFleachen )
addEventHandler ( "onClientGUIClick", GUIEditor.button[1], Pad1F, false )
addEventHandler ( "onClientGUIClick", GUIEditor.button[2], Pad2F, false )
addEventHandler ( "onClientGUIClick", GUIEditor.button[3], Pad3F, false )
addEventHandler ( "onClientGUIClick", GUIEditor.button[4], Pad4F, false )
addEventHandler ( "onClientGUIClick", GUIEditor.button[5], Pad5F, false )
addEventHandler ( "onClientGUIClick", GUIEditor.button[6], Pad6F, false )
addEventHandler ( "onClientGUIClick", GUIEditor.button[7], Pad7F, false )
addEventHandler ( "onClientGUIClick", GUIEditor.button[8], Pad8F, false )
addEventHandler ( "onClientGUIClick", GUIEditor.button[9], Pad9F, false )
addEventHandler ( "onClientGUIClick", GUIEditor.button[10], Pad10F, false )
addEventHandler ( "onClientGUIClick", GUIEditor.button[11], Pad11F, false )
addEventHandler ( "onClientGUIClick", GUIEditor.button[12], Pad12F, false )
else
ShowingState = 0
showCursor(false)
removeEventHandler("onClientRender", getRootElement(), DieBereicheDerFleachen)
destroyElement ( GUIEditor.button[1] )
destroyElement ( GUIEditor.button[2] )
destroyElement ( GUIEditor.button[3] )
destroyElement ( GUIEditor.button[4] )
destroyElement ( GUIEditor.button[5] )
destroyElement ( GUIEditor.button[6] )
destroyElement ( GUIEditor.button[7] )
destroyElement ( GUIEditor.button[8] )
destroyElement ( GUIEditor.button[9] )
destroyElement ( GUIEditor.button[10] )
destroyElement ( GUIEditor.button[11] )
destroyElement ( GUIEditor.button[12] )
removeEventHandler("onClientGUIClick", getRootElement(), Pad1F)
removeEventHandler("onClientGUIClick", getRootElement(), Pad2F)
removeEventHandler("onClientGUIClick", getRootElement(), Pad3F)
removeEventHandler("onClientGUIClick", getRootElement(), Pad4F)
removeEventHandler("onClientGUIClick", getRootElement(), Pad5F)
removeEventHandler("onClientGUIClick", getRootElement(), Pad6F)
removeEventHandler("onClientGUIClick", getRootElement(), Pad7F)
removeEventHandler("onClientGUIClick", getRootElement(), Pad8F)
removeEventHandler("onClientGUIClick", getRootElement(), Pad9F)
removeEventHandler("onClientGUIClick", getRootElement(), Pad10F)
removeEventHandler("onClientGUIClick", getRootElement(), Pad11F)
removeEventHandler("onClientGUIClick", getRootElement(), Pad12F)
end
end
bindKey ( "F9", "down", DieButtonsErstellen )
function Pad1F ()
local PAD1SOUND = playSound("Pad1.mp3", false ) --Play wasted.mp3 from the sounds folder
setSoundVolume(Pad1SOUND, 1)
end
function Pad2F ()
local PAD2SOUND = playSound("Pad2.mp3", false ) --Play wasted.mp3 from the sounds folder
setSoundVolume(Pad2SOUND, 1)
end
function PAD3SOUND ()
local sound = playSound("Pad3.mp3", false ) --Play wasted.mp3 from the sounds folder
setSoundVolume(Pad3SOUND, 1)
end
function PAD4SOUND ()
local sound = playSound("Pad4.mp3", false ) --Play wasted.mp3 from the sounds folder
setSoundVolume(Pad4SOUND, 1)
end
function PAD5SOUND ()
local sound = playSound("Pad5.mp3", false ) --Play wasted.mp3 from the sounds folder
setSoundVolume(Pad5SOUND, 1)
end
function PAD6SOUND ()
local sound = playSound("Pad6.mp3", false ) --Play wasted.mp3 from the sounds folder
setSoundVolume(Pad6SOUND, 1)
end
function PAD7SOUND ()
local sound = playSound("Pad7.mp3", false ) --Play wasted.mp3 from the sounds folder
setSoundVolume(Pad7SOUND, 1)
end
function PAD8SOUND ()
local sound = playSound("Pad8.mp3", false ) --Play wasted.mp3 from the sounds folder
setSoundVolume(Pad8SOUND, 1)
end
function PAD9SOUND ()
local sound = playSound("Pad9.mp3", false ) --Play wasted.mp3 from the sounds folder
setSoundVolume(Pad9SOUND, 1)
end
function PAD10SOUND ()
local sound = playSound("Pad10.mp3", false ) --Play wasted.mp3 from the sounds folder
setSoundVolume(Pad10SOUND, 1)
end
function PAD11SOUND ()
local sound = playSound("Pad11.mp3", false ) --Play wasted.mp3 from the sounds folder
setSoundVolume(Pad11SOUND, 1)
end
function PAD12SOUND ()
local sound = playSound("Pad12.mp3", false ) --Play wasted.mp3 from the sounds folder
setSoundVolume(Pad12SOUND, 1)
end
function DieBereicheDerFleachen()
dxDrawRectangle(522, 86, 879, 961, tocolor(0, 0, 0, 255), false)
dxDrawRectangle(523, 87, 877, 959, tocolor(50, 50, 50, 255), false)
dxDrawRectangle(539, 101, 846, 232, tocolor(0, 0, 0, 255), false)
dxDrawRectangle(540, 102, 844, 230, tocolor(127, 127, 127, 255), false)
dxDrawRectangle(539, 341, 846, 691, tocolor(0, 0, 0, 255), false)
dxDrawRectangle(540, 342, 844, 689, tocolor(180, 180, 180, 255), false)
dxDrawRectangle(784, 117, 343, 148, tocolor(0, 0, 0, 255), false)
dxDrawRectangle(785, 118, 341, 146, tocolor(180, 180, 180, 255), false)
dxDrawText("SINCE 2015", 544, 274, 1368, 296, tocolor(255, 255, 255, 255), 1.00, "default-bold", "center", "top", false, false, false, false, false)
dxDrawRectangle(591, 397, 162, 146, tocolor(0, 0, 0, 255), false)
dxDrawRectangle(592, 398, 160, 144, tocolor(127, 127, 127, 255), false)
dxDrawRectangle(784, 397, 162, 146, tocolor(0, 0, 0, 255), false)
dxDrawRectangle(785, 398, 160, 144, tocolor(127, 127, 127, 255), false)
dxDrawRectangle(972, 397, 162, 146, tocolor(0, 0, 0, 255), false)
dxDrawRectangle(973, 398, 160, 144, tocolor(127, 127, 127, 255), false)
dxDrawRectangle(1159, 397, 162, 146, tocolor(0, 0, 0, 255), false)
dxDrawRectangle(1160, 398, 160, 144, tocolor(127, 127, 127, 255), false)
dxDrawRectangle(597, 804, 162, 146, tocolor(0, 0, 0, 255), false)
dxDrawRectangle(598, 805, 160, 144, tocolor(127, 127, 127, 255), false)
dxDrawRectangle(784, 804, 162, 146, tocolor(0, 0, 0, 255), false)
dxDrawRectangle(785, 805, 160, 144, tocolor(127, 127, 127, 255), false)
dxDrawRectangle(972, 804, 162, 146, tocolor(0, 0, 0, 255), false)
dxDrawRectangle(973, 805, 160, 144, tocolor(127, 127, 127, 255), false)
dxDrawRectangle(1159, 804, 162, 146, tocolor(0, 0, 0, 255), false)
dxDrawRectangle(1160, 805, 160, 144, tocolor(127, 127, 127, 255), false)
dxDrawRectangle(591, 599, 162, 146, tocolor(0, 0, 0, 255), false)
dxDrawRectangle(592, 600, 160, 144, tocolor(127, 127, 127, 255), false)
dxDrawRectangle(784, 599, 162, 146, tocolor(0, 0, 0, 255), false)
dxDrawRectangle(785, 600, 160, 144, tocolor(127, 127, 127, 255), false)
dxDrawRectangle(972, 599, 162, 146, tocolor(0, 0, 0, 255), false)
dxDrawRectangle(973, 600, 160, 144, tocolor(127, 127, 127, 255), false)
dxDrawRectangle(1159, 599, 162, 146, tocolor(0, 0, 0, 255), false)
dxDrawRectangle(1160, 600, 160, 144, tocolor(127, 127, 127, 255), false)
dxDrawText("PAD9", 593, 521, 753, 543, tocolor(0, 0, 0, 255), 1.00, "default-bold", "center", "top", false, false, false, false, false)
dxDrawText("PAD9", 593, 519, 753, 541, tocolor(0, 0, 0, 255), 1.00, "default-bold", "center", "top", false, false, false, false, false)
dxDrawText("PAD9", 591, 521, 751, 543, tocolor(0, 0, 0, 255), 1.00, "default-bold", "center", "top", false, false, false, false, false)
dxDrawText("PAD9", 591, 519, 751, 541, tocolor(0, 0, 0, 255), 1.00, "default-bold", "center", "top", false, false, false, false, false)
dxDrawText("PAD9", 592, 520, 752, 542, tocolor(255, 255, 255, 255), 1.00, "default-bold", "center", "top", false, false, false, false, false)
dxDrawText("PAD6", 786, 723, 946, 745, tocolor(0, 0, 0, 255), 1.00, "default-bold", "center", "top", false, false, false, false, false)
dxDrawText("PAD6", 786, 721, 946, 743, tocolor(0, 0, 0, 255), 1.00, "default-bold", "center", "top", false, false, false, false, false)
dxDrawText("PAD6", 784, 723, 944, 745, tocolor(0, 0, 0, 255), 1.00, "default-bold", "center", "top", false, false, false, false, false)
dxDrawText("PAD6", 784, 721, 944, 743, tocolor(0, 0, 0, 255), 1.00, "default-bold", "center", "top", false, false, false, false, false)
dxDrawText("PAD6", 785, 722, 945, 744, tocolor(255, 255, 255, 255), 1.00, "default-bold", "center", "top", false, false, false, false, false)
dxDrawText("PAD12", 1161, 521, 1321, 543, tocolor(0, 0, 0, 255), 1.00, "default-bold", "center", "top", false, false, false, false, false)
dxDrawText("PAD12", 1161, 519, 1321, 541, tocolor(0, 0, 0, 255), 1.00, "default-bold", "center", "top", false, false, false, false, false)
dxDrawText("PAD12", 1159, 521, 1319, 543, tocolor(0, 0, 0, 255), 1.00, "default-bold", "center", "top", false, false, false, false, false)
dxDrawText("PAD12", 1159, 519, 1319, 541, tocolor(0, 0, 0, 255), 1.00, "default-bold", "center", "top", false, false, false, false, false)
dxDrawText("PAD12", 1160, 520, 1320, 542, tocolor(255, 255, 255, 255), 1.00, "default-bold", "center", "top", false, false, false, false, false)
dxDrawText("PAD7", 974, 723, 1134, 745, tocolor(0, 0, 0, 255), 1.00, "default-bold", "center", "top", false, false, false, false, false)
dxDrawText("PAD7", 974, 721, 1134, 743, tocolor(0, 0, 0, 255), 1.00, "default-bold", "center", "top", false, false, false, false, false)
dxDrawText("PAD7", 972, 723, 1132, 745, tocolor(0, 0, 0, 255), 1.00, "default-bold", "center", "top", false, false, false, false, false)
dxDrawText("PAD7", 972, 721, 1132, 743, tocolor(0, 0, 0, 255), 1.00, "default-bold", "center", "top", false, false, false, false, false)
dxDrawText("PAD7", 973, 722, 1133, 744, tocolor(255, 255, 255, 255), 1.00, "default-bold", "center", "top", false, false, false, false, false)
dxDrawText("PAD3", 974, 928, 1134, 950, tocolor(0, 0, 0, 255), 1.00, "default-bold", "center", "top", false, false, false, false, false)
dxDrawText("PAD3", 974, 926, 1134, 948, tocolor(0, 0, 0, 255), 1.00, "default-bold", "center", "top", false, false, false, false, false)
dxDrawText("PAD3", 972, 928, 1132, 950, tocolor(0, 0, 0, 255), 1.00, "default-bold", "center", "top", false, false, false, false, false)
dxDrawText("PAD3", 972, 926, 1132, 948, tocolor(0, 0, 0, 255), 1.00, "default-bold", "center", "top", false, false, false, false, false)
dxDrawText("PAD3", 973, 927, 1133, 949, tocolor(255, 255, 255, 255), 1.00, "default-bold", "center", "top", false, false, false, false, false)
dxDrawText("PAD10", 786, 521, 946, 543, tocolor(0, 0, 0, 255), 1.00, "default-bold", "center", "top", false, false, false, false, false)
dxDrawText("PAD10", 786, 519, 946, 541, tocolor(0, 0, 0, 255), 1.00, "default-bold", "center", "top", false, false, false, false, false)
dxDrawText("PAD10", 784, 521, 944, 543, tocolor(0, 0, 0, 255), 1.00, "default-bold", "center", "top", false, false, false, false, false)
dxDrawText("PAD10", 784, 519, 944, 541, tocolor(0, 0, 0, 255), 1.00, "default-bold", "center", "top", false, false, false, false, false)
dxDrawText("PAD10", 785, 520, 945, 542, tocolor(255, 255, 255, 255), 1.00, "default-bold", "center", "top", false, false, false, false, false)
dxDrawText("PAD11", 974, 521, 1134, 543, tocolor(0, 0, 0, 255), 1.00, "default-bold", "center", "top", false, false, false, false, false)
dxDrawText("PAD11", 974, 519, 1134, 541, tocolor(0, 0, 0, 255), 1.00, "default-bold", "center", "top", false, false, false, false, false)
dxDrawText("PAD11", 972, 521, 1132, 543, tocolor(0, 0, 0, 255), 1.00, "default-bold", "center", "top", false, false, false, false, false)
dxDrawText("PAD11", 972, 519, 1132, 541, tocolor(0, 0, 0, 255), 1.00, "default-bold", "center", "top", false, false, false, false, false)
dxDrawText("PAD11", 973, 520, 1133, 542, tocolor(255, 255, 255, 255), 1.00, "default-bold", "center", "top", false, false, false, false, false)
dxDrawText("PAD2", 786, 928, 946, 950, tocolor(0, 0, 0, 255), 1.00, "default-bold", "center", "top", false, false, false, false, false)
dxDrawText("PAD2", 786, 926, 946, 948, tocolor(0, 0, 0, 255), 1.00, "default-bold", "center", "top", false, false, false, false, false)
dxDrawText("PAD2", 784, 928, 944, 950, tocolor(0, 0, 0, 255), 1.00, "default-bold", "center", "top", false, false, false, false, false)
dxDrawText("PAD2", 784, 926, 944, 948, tocolor(0, 0, 0, 255), 1.00, "default-bold", "center", "top", false, false, false, false, false)
dxDrawText("PAD2", 785, 927, 945, 949, tocolor(255, 255, 255, 255), 1.00, "default-bold", "center", "top", false, false, false, false, false)
dxDrawText("PAD1", 599, 928, 759, 950, tocolor(0, 0, 0, 255), 1.00, "default-bold", "center", "top", false, false, false, false, false)
dxDrawText("PAD1", 599, 926, 759, 948, tocolor(0, 0, 0, 255), 1.00, "default-bold", "center", "top", false, false, false, false, false)
dxDrawText("PAD1", 597, 928, 757, 950, tocolor(0, 0, 0, 255), 1.00, "default-bold", "center", "top", false, false, false, false, false)
dxDrawText("PAD1", 597, 926, 757, 948, tocolor(0, 0, 0, 255), 1.00, "default-bold", "center", "top", false, false, false, false, false)
dxDrawText("PAD1", 598, 927, 758, 949, tocolor(255, 255, 255, 255), 1.00, "default-bold", "center", "top", false, false, false, false, false)
dxDrawText("PAD5", 593, 723, 753, 745, tocolor(0, 0, 0, 255), 1.00, "default-bold", "center", "top", false, false, false, false, false)
dxDrawText("PAD5", 593, 721, 753, 743, tocolor(0, 0, 0, 255), 1.00, "default-bold", "center", "top", false, false, false, false, false)
dxDrawText("PAD5", 591, 723, 751, 745, tocolor(0, 0, 0, 255), 1.00, "default-bold", "center", "top", false, false, false, false, false)
dxDrawText("PAD5", 591, 721, 751, 743, tocolor(0, 0, 0, 255), 1.00, "default-bold", "center", "top", false, false, false, false, false)
dxDrawText("PAD5", 592, 722, 752, 744, tocolor(255, 255, 255, 255), 1.00, "default-bold", "center", "top", false, false, false, false, false)
dxDrawText("PAD4", 1161, 928, 1321, 950, tocolor(0, 0, 0, 255), 1.00, "default-bold", "center", "top", false, false, false, false, false)
dxDrawText("PAD4", 1161, 926, 1321, 948, tocolor(0, 0, 0, 255), 1.00, "default-bold", "center", "top", false, false, false, false, false)
dxDrawText("PAD4", 1159, 928, 1319, 950, tocolor(0, 0, 0, 255), 1.00, "default-bold", "center", "top", false, false, false, false, false)
dxDrawText("PAD4", 1159, 926, 1319, 948, tocolor(0, 0, 0, 255), 1.00, "default-bold", "center", "top", false, false, false, false, false)
dxDrawText("PAD4", 1160, 927, 1320, 949, tocolor(255, 255, 255, 255), 1.00, "default-bold", "center", "top", false, false, false, false, false)
dxDrawText("PAD8", 1161, 723, 1321, 745, tocolor(0, 0, 0, 255), 1.00, "default-bold", "center", "top", false, false, false, false, false)
dxDrawText("PAD8", 1161, 721, 1321, 743, tocolor(0, 0, 0, 255), 1.00, "default-bold", "center", "top", false, false, false, false, false)
dxDrawText("PAD8", 1159, 723, 1319, 745, tocolor(0, 0, 0, 255), 1.00, "default-bold", "center", "top", false, false, false, false, false)
dxDrawText("PAD8", 1159, 721, 1319, 743, tocolor(0, 0, 0, 255), 1.00, "default-bold", "center", "top", false, false, false, false, false)
dxDrawText("PAD8", 1160, 722, 1320, 744, tocolor(255, 255, 255, 255), 1.00, "default-bold", "center", "top", false, false, false, false, false)
dxDrawText("MPC", 554, 142, 1358, 342, tocolor(254, 0, 0, 255), 5.00, "bankgothic", "center", "top", false, false, false, false, false)
dxDrawText("PRINZ", 880, 101, 1028, 191, tocolor(254, 0, 0, 255), 3.37, "bankgothic", "center", "top", false, false, false, false, false)
end
Alles anzeigen