Edit
supportsystem = guiCreateWindow(55, 43, 693, 459, "[GTA-iV]-Support System", false)
guiWindowSetSizable(supportsystem, false)
guiSetAlpha(supportsystem, 1.00)
guiSetVisible(supportsystem,false)
supportchat = guiCreateGridList(10, 41, 479, 317, false, supportsystem)
guiGridListAddColumn(supportchat, "Player", 0.5)
guiGridListAddColumn(supportchat, "Message", 0.5)
progressbar1 = guiCreateProgressBar(499, 22, 15, 427, false, supportsystem)
label = guiCreateLabel(20, 22, 213, 15, "Support Chat :", false, supportsystem)
supportonline = guiCreateGridList(514, 66, 168, 344, false, supportsystem)
guiGridListAddColumn(supportonline, "PlayerName", 0.9)
label2 = guiCreateLabel(522, 31, 99, 20, "Support Online :", false, supportsystem)
checkbox1 = guiCreateCheckBox(394, 368, 90, 18, "show in chat", false, false, supportsystem)
edit1 = guiCreateEdit(9, 399, 380, 36, "", false, supportsystem)
button1 = guiCreateButton(394, 401, 90, 34, "Send", false, supportsystem)
button2 = guiCreateButton(557, 415, 90, 34, "القوانين", false, supportsystem)
ruless = guiCreateWindow(183, 45, 453, 461, "قوانين السبورت|Support Rules", false)
guiWindowSetSizable(ruless, false)
guiSetAlpha(ruless, 1.00)
guiSetVisible(ruless,false)
memo = guiCreateMemo(10, 23, 433, 379, "English : \n\n1-dont ask Admin\n\n2-dont ask Money\n\n3-dont bad talk\n\n\"This Chat For Help\"\n\n---------------------------------------\n\n: العربية\n\n\nعدم طلب ادمن-1\n\nعدم طلب فلوس-2\n\nعدم السب-3\n\n\n\"هذا الشات للمساعدة فقط\"", false, ruless)
guiMemoSetReadOnly(memo, true)
closeb = guiCreateButton(150, 412, 118, 38, "Close", false, ruless)
function re()
guiGridListClear(supportonline)
triggerServerEvent("refresh",localPlayer)
end
addEventHandler("onClientGUIClick",root, function()
if (source == button2) then
guiBringToFront (ruless)
guiSetVisible(ruless, not guiGetVisible(ruless) )
end
end)
addEventHandler("onClientGUIClick",root, function()
if (source == closeb)then
guiSetVisible(ruless,false)
end
end)
bindKey("F5","down", function()
guiSetVisible(supportsystem, not guiGetVisible(supportsystem) )
showCursor(guiGetVisible(supportsystem))
guiSetVisible(ruless,false)
re()
end)
addEvent("online",true)
addEventHandler("online", root,
function (name)
local g = guiGridListAddRow(supportonline)
guiGridListSetItemText(supportonline,g, 1,""..name.."", false, false)
end)
addEventHandler("onClientGUIClick",button1,function ()
if guiGetText(edit1) ~= '' then
triggerServerEvent("support",localPlayer,guiGetText(edit1))
end
end, false)
addEvent("sendmessage",true)
addEventHandler("sendmessage",root, function()
local gg = guiGridListAddRow(supportchat)
guiGridListSetItemText(supportchat,gg, 1,getPlayerName(localPlayer), false, false)
guiGridListSetItemText(supportchat,gg, 2,guiGetText(edit1), false, false)
guiGridListSetItemColor(supportchat,gg, 1, 255, 0, 0, 255)
guiGridListSetItemColor(supportchat,gg, 2, 35, 254, 0, 255)
if ( guiCheckBoxGetSelected( checkbox1 ) == true ) then
outputChatBox("[support-System] #FF0000"..getPlayerName(localPlayer).."#FFFFFF : #00FF00"..guiGetText(edit1),255,255,0,true)
end
end)
addEvent("sendmessage2",true)
addEventHandler("sendmessage2",root, function()
local gg = guiGridListAddRow(supportchat)
guiGridListSetItemText(supportchat,gg, 1,getPlayerName(localPlayer), false, false)
guiGridListSetItemText(supportchat,gg, 2,guiGetText(edit1), false, false)
guiGridListSetItemColor(supportchat,gg, 1, 255, 0, 0, 255)
guiGridListSetItemColor(supportchat,gg, 2, 35, 254, 0, 255)
if ( guiCheckBoxGetSelected( checkbox1 ) == true ) then
outputChatBox("[support-System] #FF0000"..getPlayerName(localPlayer).."#FFFFFF : #00FF00"..guiGetText(edit1),255,255,0,true)
end
end)