Hello I have worked this code but I do not know what problem do I want any one shows errors
Forfeits
Client
GUIEditor = {
gridlist = {},
window = {},
label = {},
memo = {}
}
addEventHandler("onClientResourceStart", resourceRoot,
function()
GUIEditor.window[1] = guiCreateWindow(230, 155, 663, 440, "Teams System", false)
guiWindowSetSizable(GUIEditor.window[1], false)
guiSetAlpha(GUIEditor.window[1], 0.90)
noteam = guiCreateButton(9, 21, 97, 123, "Go To NoTeam", false, GUIEditor.window[1])
guiSetProperty(noteam, "NormalTextColour", "FFF93905")
nill = guiCreateButton(9, 156, 93, 133, "nill", false, GUIEditor.window[1])
guiSetProperty(nill, "NormalTextColour", "33FAF9F9")
exit = guiCreateButton(9, 300, 120, 130, "Exit ", false, GUIEditor.window[1])
guiSetProperty(exit, "NormalTextColour", "B504C41A")
GUIEditor.gridlist[1] = guiCreateGridList(454, 22, 199, 408, false, GUIEditor.window[1])
guiGridListAddColumn(GUIEditor.gridlist[1], "Teams System", 0.9)
for i = 1, 2 do
guiGridListAddRow(GUIEditor.gridlist[1])
end
guiGridListSetItemText(GUIEditor.gridlist[1], 0, 1, "NoTeam", false, false)
guiGridListSetItemText(GUIEditor.gridlist[1], 1, 1, "nill", false, false)
GUIEditor.memo[1] = guiCreateMemo(111, 23, 319, 127, "Mod V.1.0 \nCan To Go NoTeam\nOr nill Team\n\nAnd In Gridlist Click You Team \n\n#", false, GUIEditor.window[1])
guiMemoSetReadOnly(GUIEditor.memo[1], true)
GUIEditor.label[1] = guiCreateLabel(115, 167, 300, 28, "Teams System V.1.0", false, GUIEditor.window[1])
guiSetFont(GUIEditor.label[1], "default-small")
guiLabelSetColor(GUIEditor.label[1], 247, 75, 127)
guiLabelSetHorizontalAlign(GUIEditor.label[1], "center", false)
end
)
addEventHandler("onClientRender", root,
function()
dxDrawText("Team System Started v.1", 966, 699, 1083, 731, tocolor(0, 0, 0, 255), 1.00, "pricedown", "left", "top", false, true, true, true, false)
dxDrawText("Team System Started v.1", 965, 698, 1082, 730, tocolor(3, 54, 9, 32), 1.00, "pricedown", "left", "top", false, true, true, true, false)
end
)
addEventHandler('onClientGUIClick',root,
function ()
if (source ==noteam ) then
triggerServerEvent ( 'noteam', localPlayer )
end
end
addEventHandler('onClientGUIClick',root,
function ()
if (source == nill ) then
triggerServerEvent ( 'nill', localPlayer )
end
end
addEventHandler('onClientGUIClick',root,
function ()
if (source == exit ) then
triggerServerEvent ( 'exit', localPlayer )
end
end
Server
addEvent( 'noteam', true )
addEventHandler( 'noteam', root,function()
setPlayerTeam(source,nil)
outputChatBox ( "You Now No Team", source)
end
)
addEvent( 'exit', true )
addEventHandler( 'exit', root,function()
setPlayerTeam(source,nil)
outputChatBox ( "Nill Team Done", source)
end
)
addEvent( 'exit', true )
addEventHandler( 'exit', root,function()
guisetVisbile( GUIEditor.window[1] ,false)
outputChatBox ( "Exit GUI Done", source)
end
)