هذا الكود كامل ركبه وبتجي اسماء اللاعبين كلها
local key = "F6" -- " استبدل اف6 بالزر اللي تبيه يفتح اللوحة لاتحذف هذي
function guiGridListPrintPlayerNames( GridList )
local players = getElementsByType("player")
for k, v in ipairs ( players ) do
if guiGridListClear(GridList) then
local row = guiGridListAddRow(GridList)
if row then
local name = guiGridListSetItemText(GridList, row, 1, getPlayerName(v), false, false)
local color = guiGridListSetItemColor(GridList, row, 1, 0, 255, 0)
end
end
end
end
GUIEditor = {
edit = {},
button = {},
window = {},
label = {},
gridlist = {}
}
addEventHandler("onClientResourceStart", resourceRoot,
function()
GUIEditor.window[1] = guiCreateWindow(169, 85, 449, 464, "ساعات", false)
guiWindowSetSizable(GUIEditor.window[1], false)
GUIEditor.gridlist[1] = guiCreateGridList(9, 20, 150, 434, false, GUIEditor.window[1])
guiGridListAddColumn(GUIEditor.gridlist[1], "Players", 0.9)
GUIEditor.button[1] = guiCreateButton(167, 41, 117, 55, "اعطاء ساعات", false, GUIEditor.window[1])
GUIEditor.button[2] = guiCreateButton(316, 41, 117, 55, "سحب ساعات", false, GUIEditor.window[1])
GUIEditor.edit[1] = guiCreateEdit(263, 116, 134, 57, "", false, GUIEditor.window[1])
GUIEditor.label[1] = guiCreateLabel(429, 344, 201, 15, "", false, GUIEditor.window[1])
GUIEditor.label[2] = guiCreateLabel(163, 339, 292, 30, "الكلمةةء الساعات المدة", false, GUIEditor.window[1])
GUIEditor.edit[2] = guiCreateEdit(331, 365, 78, 28, "", false, GUIEditor.window[1])
GUIEditor.edit[3] = guiCreateEdit(238, 365, 78, 28, "", false, GUIEditor.window[1])
GUIEditor.edit[4] = guiCreateEdit(153, 369, 78, 28, "", false, GUIEditor.window[1])
GUIEditor.button[3] = guiCreateButton(350, 417, 89, 37, "اغلاق اللوحة", false, GUIEditor.window[1])
GUIEditor.label[3] = guiCreateLabel(165, 425, 145, 24, "Mood By : KilleR", false, GUIEditor.window[1])
end
)
bindKey(key, "down",
function()
guiSetVisible( GUIEditor.window[1] , not guiGetVisible(GUIEditor.window[1]) )
showCursor( not guiGetVisible(GUIEditor.window[1]( )
setTimer(guiGridListPrintPlayerNames, 1000, 1, GUIEditor.gridlist[1])
end
)