local Admin = {
{"VIP","20"},
}
--------------------
GUIEditor = {
gridlist = {},
label = {}
}
window_system_vip = guiCreateWindow(123, 39, 460, 446, "[نظام الشراء العضويه الخاصه | System Buy Vip]", false)
guiWindowSetSizable(window_system_vip, false)
guiSetAlpha(window_system_vip, 1.00)
guiSetVisible(window_system_vip, false)
guiWindowSetSizable(window_system_vip, false)
guiWindowSetMovable(window_system_vip, true)
logo_vip = guiCreateStaticImage(45, 88, 142, 122, "Back.png", false, window_system_vip)
logo_dimaond = guiCreateStaticImage(260, 88, 130, 122, "guest.png", false, window_system_vip)
GUIEditor.label[1] = guiCreateLabel(201, 128, 53, 37, "And", false, window_system_vip)
guiSetFont(GUIEditor.label[1], "sa-header")
GUIEditor.label[2] = guiCreateLabel(331, 46, 119, 21, "نظام الشراء بل جواهر", false, window_system_vip)
guiLabelSetColor(GUIEditor.label[2], 1, 253, 238)
GUIEditor.label[3] = guiCreateLabel(45, 63, 426, 15, "تحذير اذا قمت بل شراء مرتين متتالين سوف يتم خصم الجواهر وعدم اعطائك شي", false, window_system_vip)
guiLabelSetColor(GUIEditor.label[3], 252, 0, 0)
logo_war = guiCreateStaticImage(9, 52, 41, 42, "warning.png", false, window_system_vip)
buttonbuy = guiCreateButton(302, 352, 148, 32, "شراء العضويه الخاصه (VIP)", false, window_system_vip)
guiSetProperty(buttonbuy, "NormalTextColour", "FF2FFD00")
GUIEditor.gridlist[1] = guiCreateGridList(14, 326, 236, 110, false, window_system_vip)
guiGridListAddColumn(GUIEditor.gridlist[1], "#", 0.5)
guiGridListAddColumn(GUIEditor.gridlist[1], "Diamond", 0.5)
CLOSE = guiCreateButton(407, 413, 43, 23, "X", false, window_system_vip)
guiSetProperty(CLOSE, "NormalTextColour", "FFFC0017")
-------------------Close-----------------
addEventHandler ("onClientGUIClick", root,
function()
if (source == CLOSE) then
guiSetVisible(window_system_vip, false)
showCursor(false)
guiSetInputEnabled(false)
end
end
)
------------------------------------------
for k,v in ipairs ( Admin ) do
local row = guiGridListAddRow(GUIEditor.gridlist[1])
guiGridListSetItemText(GUIEditor.gridlist[1],row,1,v[1],false,false)
guiGridListSetItemText(GUIEditor.gridlist[1],row,2,v[2],false,false)
guiGridListSetItemColor(GUIEditor.gridlist[1],row,1,math.random(0,255),math.random(0,255),math.random(0,255))
guiGridListSetItemColor(GUIEditor.gridlist[1],row,2,math.random(0,255),math.random(0,255),math.random(0,255))
end
xMainFunctions_ = function ( )
local row, col = guiGridListGetSelectedItem ( GUIEditor.gridlist[1] )
local Group = tostring ( guiGridListGetItemText(GUIEditor.gridlist[1],row,1 ));
local Price = tostring ( guiGridListGetItemText(GUIEditor.gridlist[1],row,2 ));
if ( row and col and row ~= -1 and col ~= -1 ) then
triggerServerEvent("Accept:the:request",localPlayer,Group,Price);
else
outputChatBox("تـــم سحب منك 20 جوهرة . اقراء الكلام مره اخري",math.random(0,255),math.random(0,255),math.random(0,255),true);
end
end
-----------------------------------------
addEventHandler ("onClientGUIClick", getRootElement(),
function()
if ( source == buttonbuy ) then
triggerServerEvent("VIP",getLocalPlayer())
end
end
)
addCommandHandler("byvip",function ()
if guiGetVisible(window_system_vip) == true then
guiSetVisible(window_system_vip, false)
showCursor(false)
guiSetInputEnabled(false)
else
if guiGetVisible(window_system_vip) == false then
guiSetVisible(window_system_vip, true)
showCursor(false)
guiSetInputEnabled(true)
playSound("sound.wav")
end
end
end
)