انا ادري وانا سويت لوحة و مشتغلت هذي الاكواد اتمنى المساعدة
ReportW = nil
function Oc ( player )
if ( ReportW == nil ) then
local x, y = guiGetScreenSize()
ReportW = guiCreateWindow((screenW - 432) / 2, (screenH - 370) / 2, 432, 370, "][#[GTA-BJ] Report Panel ! ][", false)
guiWindowSetSizable(ReportW, false)
guiSetProperty(ReportW, "CaptionColour", "FF0214FA")
guiSetVisible (ReportW,false)
GUIEditor.label[1] = guiCreateLabel(10, 27, 78, 22, "Category :", false, ReportW)
guiSetFont(GUIEditor.label[1], "default-bold-small")
guiLabelSetColor(GUIEditor.label[1], 254, 239, 0)
GUIEditor.label[2] = guiCreateLabel(10, 80, 72, 22, "Subject :", false, ReportW)
guiSetFont(GUIEditor.label[2], "default-bold-small")
guiLabelSetColor(GUIEditor.label[2], 254, 239, 0)
Category = guiCreateEdit(88, 25, 228, 28, "Choose", false, ReportW)
Subject = guiCreateEdit(88, 74, 228, 28, "", false, ReportW)
GUIEditor.label[3] = guiCreateLabel(20, 113, 92, 23, "Message! :", false, ReportW)
guiSetFont(GUIEditor.label[3], "default-bold-small")
guiLabelSetColor(GUIEditor.label[3], 253, 0, 0)
Message = guiCreateMemo(9, 136, 307, 176, "", false, ReportW)
Send = guiCreateButton(13, 318, 136, 44, "Send The Message !", false, ReportW)
guiSetProperty(Send, "NormalTextColour", "FFAAAAAA")
Close = guiCreateButton(164, 318, 136, 44, "Close The Window !", false, ReportW)
guiSetProperty(Close, "NormalTextColour", "FFAAAAAA")
Photo = guiCreateStaticImage(288, 25, 28, 28, "dropdown.png", false, ReportW)
Items = guiCreateGridList(87, 25, 229, 88, false, ReportW)
guiGridListAddColumn(Items, "", 0.9)
guiSetVisible ( Items, false )
for i = 1, 5 do
guiGridListAddRow(Items)
end
guiGridListSetItemText(Items, 0, 1, "Question", false, false)
guiGridListSetItemText(Items, 1, 1, "Suggestion", false, false)
guiGridListSetItemText(Items, 2, 1, "Cheater/Moder", false, false)
guiGridListSetItemText(Items, 3, 1, "What This Mod ?", false, false)
guiGridListSetItemText(Items, 4, 1, "Other ...", false, false)
end
)
addEventHandler ( "onClientGUIClick", ReportW, aClientReportClick )
addEventHandler ( "onClientGUIDoubleClick", ReportW, aClientReportDoubleClick )
end
guiBringToFront ( ReportW )
showCursor ( true )
end
addCommandHandler ( "report1", Oc )
function Close ( )
if ( ReportW ) then
removeEventHandler ( "onClientGUIClick", ReportW, aClientReportClick )
removeEventHandler ( "onClientGUIDoubleClick", ReportW, aClientReportDoubleClick )
destroyElement ( ReportW )
ReportW = nil
showCursor ( false )
end
end
function aClientReportDoubleClick ( button )
if ( button == "left" ) then
if ( source == Items ) then
if ( guiGridListGetSelectedItem ( Items ) ~= -1 ) then
local cat = guiGridListGetItemText ( Items, guiGridListGetSelectedItem ( Items ), 1 )
guiSetText ( Items, cat )
guiSetVisible ( Items, false )
end
end
end
end
function aClientReportClick ( button )
if ( source == OcCategory ) then
guiBringToFront ( Photo )
end
if ( source ~= Items ) then
guiSetVisible ( Items, false )
end
if ( button == "left" ) then
if ( source == Send ) then
if ( ( string.len ( guiGetText ( Subject ) ) < 1 ) or ( string.len ( guiGetText ( Message ) ) < 5 ) ) then
aMessageBox ( "error", "Subject/Message missing." )
else
aMessageBox ( "info", "Your message has been submited and will be processed as soon as possible." )
setTimer ( aMessageBoxClose, 3000, 1, true )
local tableOut = {}
tableOut.category = guiGetText ( OcCategory )
tableOut.subject = guiGetText ( Subject )
tableOut.message = guiGetText ( Message )
triggerServerEvent ( "aMessage", getLocalPlayer(), "new", tableOut )
OcClose ()
end
elseif ( source == Subject ) then
elseif ( source == Message ) then
elseif ( source == Close ) then
OcClose ()
elseif ( source == Photo ) then
guiBringToFront ( Items )
guiSetVisible ( Items, true )
end
end
end
بعطيك شيء روح عدل ملف
Admin_report.lua
افضل واسهل