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
)