TD[M]ER Posted December 23, 2012 Share Posted December 23, 2012 Hi Everyone .. i made gang Panel and i try to fixed the script but it doesn't work i make when i chose the Grove Team then guiSetVisible (true) it's working in the Ballas team but the other teams doesn't work this is the client side -- GangPanel -- V2.1 -- [email protected] -- SkyPe : MR.TDMER ------------------- lblx = guiCreateLabel(853, 306, 478, 39, "", false) guiSetVisible(lblx,false) guiSetFont(lblx, guiCreateFont("Other/TD[M]ER.ttf", 10)) guiSetProperty(lblx, "Disabled", "True") function TDMER( x2, y2, width2, height2, titleBarText2, relative2 ) local mainBackground = guiCreateStaticImage ( x2, y2, width2, height2, "img/P.png", relative2 ) local mainBackgroundLabel = guiCreateLabel ( 50, 0, 400, 100, titleBarText2, false, mainBackground ) guiSetEnabled ( mainBackgroundLabel, false ) return mainBackground end local x7x GUIEditor = { label = {}, button = {}, } gangWnd = TDMER(272, 161, 729, 490, "▅▆二【 Gang Panel 】二▆▅", false) guiSetAlpha(gangWnd, 1.00) guiSetVisible(gangWnd, false) showCursor ( false ) stop = guiCreateButton(54, 388, 98, 31, "•| stop sound |•", false, gangWnd) guiSetFont(stop, "default-bold-small") guiSetProperty(stop, "NormalTextColour", "FFE0DD1E") GUIEditor.label[1] = guiCreateLabel(20, 447, 279, 28, "• Created By TD[M]ER V2.1 •", false, gangWnd) guiLabelSetColor(GUIEditor.label[1], 249, 4, 4) x7x = guiCreateLabel(357, 429, 327, 33, "© Welcome To Server 6AraT ©", false, gangWnd) guiSetFont(x7x, guiCreateFont("Other/TD[M]ER.ttf", 10)) Grove = guiCreateStaticImage(44, 30, 121, 301, "img/Grove.png", false, gangWnd) Ballas = guiCreateStaticImage(374, 30, 121, 302, "img/Ballas.png", false, gangWnd) Aztecas = guiCreateStaticImage(210, 30, 121, 300, "img/Aztecas.png", false, gangWnd) NoTeam = guiCreateStaticImage(538, 30, 124, 304, "img/NoTeam.png", false, gangWnd) GUIEditor.label[3] = guiCreateLabel(64, 341, 93, 21, " § Grove §", false, gangWnd) guiSetFont(GUIEditor.label[3], "default-bold-small") GUIEditor.label[4] = guiCreateLabel(220, 341, 93, 21, " § Aztecas §", false, gangWnd) guiSetFont(GUIEditor.label[4], "default-bold-small") GUIEditor.label[5] = guiCreateLabel(403, 343, 71, 25, " § Ballas §", false, gangWnd) guiSetFont(GUIEditor.label[5], "default-bold-small") GUIEditor.label[6] = guiCreateLabel(564, 342, 71, 25, " § NoTeam §", false, gangWnd) guiSetFont(GUIEditor.label[6], "default-bold-small") function color ( ) guiLabelSetColor ( x7x, math.random(0, 255), math.random(0, 255), math.random(0, 255) ) guiLabelSetColor ( lblx, math.random(0, 255), math.random(0, 255), math.random(0, 255) ) end setTimer ( color, 200, 0 ) ---------------------------------------- function onGuiClick (button, state, absoluteX, absoluteY) local ip = getLocalPlayer() if source == Ballas then guiSetVisible(gangWnd, false) showCursor ( false ) stopSound( soundG ) stopSound( soundN ) stopSound( soundA ) setElementPosition(ip, 214.03983, 1864.13306, 13.14063) soundB = playSound("Other/War.mp3", false) triggerServerEvent("setBallasTeam",getLocalPlayer()) outputChatBox ("you're joining to Ballas war", source, getRootElement(),255,0,0,true) guiSetVisible(lblx,true) guiSetText ( lblx, " " .. getPlayerName(ip) .. " has ben join to Ballas War " ) setTimer(guiSetVisible,5000,1,lblx,false) showCursor ( false ) elseif source == Grove then guiSetVisible(gangWnd, false) showCursor ( false ) stopSound( soundB ) stopSound( soundN ) stopSound( soundA ) setElementPosition(ip, 2498.7, -1680.3, 13.3) soundG = playSound("Other/War.mp3", false) triggerServerEvent("setGroveTeam",getLocalPlayer()) outputChatBox ("you're joining to Grove war", source, getRootElement(),255,0,0,true) guiSetText ( lblx, " " .. getPlayerName(ip) .. " has ben join to Grove War " ) setTimer(guiSetVisible,5000,1,lblx,false) showCursor ( false ) elseif source == Aztecas then guiSetVisible(gangWnd, false) showCursor ( false ) stopSound( soundG ) stopSound( soundB ) stopSound( soundN ) setElementPosition(ip, 1569.68652, -1019.28009, 23.91405) showCursor ( false ) soundA = playSound("Other/War.mp3", false) triggerServerEvent("setAztecasTeam",getLocalPlayer()) outputChatBox ("you're joining to Aztecas war", source, getRootElement(),255,0,0,true) guiSetText ( lblx, " " .. getPlayerName(ip) .. " has ben join to Aztecas War " ) setTimer(guiSetVisible,5000,1,lblx,false) showCursor ( false ) elseif source == NoTeam then guiSetVisible(gangWnd, false) showCursor ( false ) stopSound( soundG ) stopSound( soundB ) stopSound( soundA ) soundN = playSound("Other/War.mp3", false) triggerServerEvent("setNoTeam",getLocalPlayer()) outputChatBox ("you're joining to NoTeam", source, getRootElement(),255,0,0,true) showCursor ( false ) elseif source == stop then guiSetVisible(gangWnd, false) showCursor ( false ) stopSound( soundG ) stopSound( soundB ) stopSound( soundN ) stopSound( soundA ) outputChatBox ("sound was stoped", source, getRootElement(),255,0,0,true) end end addEventHandler ("onClientGUIClick", getRootElement(), onGuiClick) bindKey ( "F7" , "down" , function() if ( guiGetVisible ( gangWnd ) == true ) then guiSetVisible ( gangWnd ,false ) showCursor (false ) guiSetInputEnabled(false) elseif ( guiGetVisible ( gangWnd ) == false ) then guiSetVisible ( gangWnd ,true ) showCursor (false ) guiSetInputEnabled(true) end end ) Link to comment
manve1 Posted December 23, 2012 Share Posted December 23, 2012 lblx = guiCreateLabel(853, 306, 478, 39, "", false) guiSetVisible(lblx,false) guiSetFont(lblx, guiCreateFont("Other/TD[M]ER.ttf", 10)) guiSetProperty(lblx, "Disabled", "True") function TDMER( x2, y2, width2, height2, titleBarText2, relative2 ) local mainBackground = guiCreateStaticImage ( x2, y2, width2, height2, "img/P.png", relative2 ) local mainBackgroundLabel = guiCreateLabel ( 50, 0, 400, 100, titleBarText2, false, mainBackground ) guiSetEnabled ( mainBackgroundLabel, false ) return mainBackground end local x7x GUIEditor = { label = {}, button = {}, } gangWnd = TDMER(272, 161, 729, 490, "???? Gang Panel ????", false) guiSetAlpha(gangWnd, 1.00) guiSetVisible(gangWnd, false) showCursor ( false ) stop = guiCreateButton(54, 388, 98, 31, "•| stop sound |•", false, gangWnd) guiSetFont(stop, "default-bold-small") guiSetProperty(stop, "NormalTextColour", "FFE0DD1E") GUIEditor.label[1] = guiCreateLabel(20, 447, 279, 28, "• Created By TD[M]ER V2.1 •", false, gangWnd) guiLabelSetColor(GUIEditor.label[1], 249, 4, 4) x7x = guiCreateLabel(357, 429, 327, 33, "© Welcome To Server 6AraT ©", false, gangWnd) guiSetFont(x7x, guiCreateFont("Other/TD[M]ER.ttf", 10)) Grove = guiCreateStaticImage(44, 30, 121, 301, "img/Grove.png", false, gangWnd) Ballas = guiCreateStaticImage(374, 30, 121, 302, "img/Ballas.png", false, gangWnd) Aztecas = guiCreateStaticImage(210, 30, 121, 300, "img/Aztecas.png", false, gangWnd) NoTeam = guiCreateStaticImage(538, 30, 124, 304, "img/NoTeam.png", false, gangWnd) GUIEditor.label[3] = guiCreateLabel(64, 341, 93, 21, " § Grove §", false, gangWnd) guiSetFont(GUIEditor.label[3], "default-bold-small") GUIEditor.label[4] = guiCreateLabel(220, 341, 93, 21, " § Aztecas §", false, gangWnd) guiSetFont(GUIEditor.label[4], "default-bold-small") GUIEditor.label[5] = guiCreateLabel(403, 343, 71, 25, " § Ballas §", false, gangWnd) guiSetFont(GUIEditor.label[5], "default-bold-small") GUIEditor.label[6] = guiCreateLabel(564, 342, 71, 25, " § NoTeam §", false, gangWnd) guiSetFont(GUIEditor.label[6], "default-bold-small") function color ( ) guiLabelSetColor ( x7x, math.random(0, 255), math.random(0, 255), math.random(0, 255) ) guiLabelSetColor ( lblx, math.random(0, 255), math.random(0, 255), math.random(0, 255) ) end setTimer ( color, 200, 0 ) ---------------------------------------- function onGuiClick (button, state, absoluteX, absoluteY) local ip = getLocalPlayer() if source == GUIEditor.label[5] then guiSetVisible(gangWnd, false) showCursor ( false ) stopSound( soundG ) stopSound( soundN ) stopSound( soundA ) setElementPosition(ip, 214.03983, 1864.13306, 13.14063) soundB = playSound("Other/War.mp3", false) triggerServerEvent("setBallasTeam",getLocalPlayer()) outputChatBox ("you're joining to Ballas war", source, getRootElement(),255,0,0,true) guiSetVisible(lblx,true) guiSetText ( lblx, " " .. getPlayerName(ip) .. " has ben join to Ballas War " ) setTimer(guiSetVisible,5000,1,lblx,false) showCursor ( false ) elseif source == GUIEditor.label[3] then guiSetVisible(gangWnd, false) showCursor ( false ) stopSound( soundB ) stopSound( soundN ) stopSound( soundA ) setElementPosition(ip, 2498.7, -1680.3, 13.3) soundG = playSound("Other/War.mp3", false) triggerServerEvent("setGroveTeam",getLocalPlayer()) outputChatBox ("you're joining to Grove war", source, getRootElement(),255,0,0,true) guiSetText ( lblx, " " .. getPlayerName(ip) .. " has ben join to Grove War " ) setTimer(guiSetVisible,5000,1,lblx,false) showCursor ( false ) elseif source == GUIEditor.label[4] then guiSetVisible(gangWnd, false) showCursor ( false ) stopSound( soundG ) stopSound( soundB ) stopSound( soundN ) setElementPosition(ip, 1569.68652, -1019.28009, 23.91405) showCursor ( false ) soundA = playSound("Other/War.mp3", false) triggerServerEvent("setAztecasTeam",getLocalPlayer()) outputChatBox ("you're joining to Aztecas war", source, getRootElement(),255,0,0,true) guiSetText ( lblx, " " .. getPlayerName(ip) .. " has ben join to Aztecas War " ) setTimer(guiSetVisible,5000,1,lblx,false) showCursor ( false ) elseif source == GUIEditor.label[6] then guiSetVisible(gangWnd, false) showCursor ( false ) stopSound( soundG ) stopSound( soundB ) stopSound( soundA ) soundN = playSound("Other/War.mp3", false) triggerServerEvent("setNoTeam",getLocalPlayer()) outputChatBox ("you're joining to NoTeam", source, getRootElement(),255,0,0,true) showCursor ( false ) elseif source == stop then guiSetVisible(gangWnd, false) showCursor ( false ) stopSound( soundG ) stopSound( soundB ) stopSound( soundN ) stopSound( soundA ) outputChatBox ("sound was stoped", source, getRootElement(),255,0,0,true) end end addEventHandler ("onClientGUIClick", getRootElement(), onGuiClick) bindKey ( "F7" , "down" , function() if ( guiGetVisible ( gangWnd ) == true ) then guiSetVisible ( gangWnd ,false ) showCursor (false ) guiSetInputEnabled(false) elseif ( guiGetVisible ( gangWnd ) == false ) then guiSetVisible ( gangWnd ,true ) showCursor (false ) guiSetInputEnabled(true) end end ) Link to comment
TD[M]ER Posted December 23, 2012 Author Share Posted December 23, 2012 doesn't work it's working with Ballas team Only =| & no thing in /debugscript 3 -_-" Link to comment
manve1 Posted December 23, 2012 Share Posted December 23, 2012 local lblx = guiCreateLabel(853, 306, 478, 39, "", false) guiSetVisible(lblx,false) guiSetFont(lblx, guiCreateFont("Other/TD[M]ER.ttf", 10)) guiSetProperty(lblx, "Disabled", "True") GUIEditor = { label = {}, button = {}, } local gangWnd = guiCreateStaticImage(0, 0, 1, 1, "img/P.png", true) guiSetAlpha(gangWnd, 1) local mainBackgroundLabel = guiCreateLabel ( 50, 0, 400, 100, '', false, gangWnd ) guiSetEnabled ( mainBackgroundLabel, false ) guiSetVisible(gangWnd, false) showCursor ( false ) stop = guiCreateButton(54, 388, 98, 31, "•| stop sound |•", false, gangWnd) guiSetFont(stop, "default-bold-small") guiSetProperty(stop, "NormalTextColour", "FFE0DD1E") GUIEditor.label[1] = guiCreateLabel(20, 447, 279, 28, "• Created By TD[M]ER V2.1 •", false, gangWnd) guiLabelSetColor(GUIEditor.label[1], 249, 4, 4) local x7x = guiCreateLabel(357, 429, 327, 33, "© Welcome To Server 6AraT ©", false, gangWnd) guiSetFont(x7x, guiCreateFont("Other/TD[M]ER.ttf", 10)) Grove = guiCreateStaticImage(44, 30, 121, 301, "img/Grove.png", false, gangWnd) Ballas = guiCreateStaticImage(374, 30, 121, 302, "img/Ballas.png", false, gangWnd) Aztecas = guiCreateStaticImage(210, 30, 121, 300, "img/Aztecas.png", false, gangWnd) NoTeam = guiCreateStaticImage(538, 30, 124, 304, "img/NoTeam.png", false, gangWnd) GUIEditor.label[3] = guiCreateLabel(64, 341, 93, 21, " § Grove §", false, gangWnd) guiSetFont(GUIEditor.label[3], "default-bold-small") GUIEditor.label[4] = guiCreateLabel(220, 341, 93, 21, " § Aztecas §", false, gangWnd) guiSetFont(GUIEditor.label[4], "default-bold-small") GUIEditor.label[5] = guiCreateLabel(403, 343, 71, 25, " § Ballas §", false, gangWnd) guiSetFont(GUIEditor.label[5], "default-bold-small") GUIEditor.label[6] = guiCreateLabel(564, 342, 71, 25, " § NoTeam §", false, gangWnd) guiSetFont(GUIEditor.label[6], "default-bold-small") function color ( ) guiLabelSetColor ( x7x, math.random(0, 255), math.random(0, 255), math.random(0, 255) ) guiLabelSetColor ( lblx, math.random(0, 255), math.random(0, 255), math.random(0, 255) ) end setTimer ( color, 200, 0 ) ---------------------------------------- function onGuiClick (button, state, absoluteX, absoluteY) local ip = getLocalPlayer() if source == GUIEditor.label[5] then guiSetVisible(gangWnd, false) showCursor ( false ) stopSound( soundG ) stopSound( soundN ) stopSound( soundA ) setElementPosition(ip, 214.03983, 1864.13306, 13.14063) soundB = playSound("Other/War.mp3", false) triggerServerEvent("setBallasTeam",getLocalPlayer()) outputChatBox ("you're joining to Ballas war", source, getRootElement(),255,0,0,true) guiSetVisible(lblx,true) guiSetText ( lblx, " " .. getPlayerName(ip) .. " has ben join to Ballas War " ) setTimer(guiSetVisible,5000,1,lblx,false) showCursor ( false ) elseif source == GUIEditor.label[3] then guiSetVisible(gangWnd, false) showCursor ( false ) stopSound( soundB ) stopSound( soundN ) stopSound( soundA ) setElementPosition(ip, 2498.7, -1680.3, 13.3) soundG = playSound("Other/War.mp3", false) triggerServerEvent("setGroveTeam",getLocalPlayer()) outputChatBox ("you're joining to Grove war", source, getRootElement(),255,0,0,true) guiSetText ( lblx, " " .. getPlayerName(ip) .. " has ben join to Grove War " ) setTimer(guiSetVisible,5000,1,lblx,false) showCursor ( false ) elseif source == GUIEditor.label[4] then guiSetVisible(gangWnd, false) showCursor ( false ) stopSound( soundG ) stopSound( soundB ) stopSound( soundN ) setElementPosition(ip, 1569.68652, -1019.28009, 23.91405) showCursor ( false ) soundA = playSound("Other/War.mp3", false) triggerServerEvent("setAztecasTeam",getLocalPlayer()) outputChatBox ("you're joining to Aztecas war", source, getRootElement(),255,0,0,true) guiSetText ( lblx, " " .. getPlayerName(ip) .. " has ben join to Aztecas War " ) setTimer(guiSetVisible,5000,1,lblx,false) showCursor ( false ) elseif source == GUIEditor.label[6] then guiSetVisible(gangWnd, false) showCursor ( false ) stopSound( soundG ) stopSound( soundB ) stopSound( soundA ) soundN = playSound("Other/War.mp3", false) triggerServerEvent("setNoTeam",getLocalPlayer()) outputChatBox ("you're joining to NoTeam", source, getRootElement(),255,0,0,true) showCursor ( false ) elseif source == stop then guiSetVisible(gangWnd, false) showCursor ( false ) stopSound( soundG ) stopSound( soundB ) stopSound( soundN ) stopSound( soundA ) outputChatBox ("sound was stoped", source, getRootElement(),255,0,0,true) end end addEventHandler ("onClientGUIClick", getRootElement(), onGuiClick) bindKey ( "F7" , "down" , function() if ( guiGetVisible ( gangWnd ) == true ) then guiSetVisible ( gangWnd ,false ) showCursor (false ) guiSetInputEnabled(false) elseif ( guiGetVisible ( gangWnd ) == false ) then guiSetVisible ( gangWnd ,true ) showCursor (true ) guiSetInputEnabled(true) end end ) I had to re-make some of it because you didn't define it anywhere. Link to comment
manve1 Posted December 23, 2012 Share Posted December 23, 2012 Try without the labels: lblx and x7x, it worked for me without them. Link to comment
TD[M]ER Posted December 23, 2012 Author Share Posted December 23, 2012 Try without the labels: lblx and x7x, it worked for me without them. i can remove label : x7x but lblx is my problem i want lblx work Link to comment
manve1 Posted December 23, 2012 Share Posted December 23, 2012 well, you need to re-script it then, because i found lots of bugs with those 2 label's, i removed them and ur script worked for me. Link to comment
TD[M]ER Posted December 23, 2012 Author Share Posted December 23, 2012 well, you need to re-script it then, because i found lots of bugs with those 2 label's, i removed them and ur script worked for me. Ok i will re-script it & if i meet a problem i will say it here =D thank you have 1 <3 Link to comment
iPrestege Posted December 23, 2012 Share Posted December 23, 2012 I prefer to create a new label for each team (: . Link to comment
Ab-47 Posted December 24, 2012 Share Posted December 24, 2012 ROFL! lblx isn't a GUI, you're using guiCreateLabel you should use guiCreateWindow then guiCreateLabel relating to the gui window you made. for example: lblx = guiCreateWindow ( x, y, h, w, "", true ) label = guiCreateLabel(853, 306, 478, 39, "", false, lblx) guiSetVisible(lblx,false) guiSetFont(lblx, guiCreateFont("Other/TD[M]ER.ttf", 10)) guiSetProperty(lblx, "Disabled", "True") I guess there was an obvious plain sited hidden problem if that's what you mean? 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