شوف انا سويت كود وكل شيء بعد الترجمه الطويله طبعاً
لاكن المود مو شغال مدري ليش
شسوفو الوظيفه
Client --
addCommandHandler('رتب',function()
guiSetVisible(GUIEditor.window[1], not guiGetVisible(GUIEditor.window[1]))
showCursor(guiGetVisible(GUIEditor.window[1]))
end
)
function black()
for k, v in ipairs ( List ) 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)
guiGridListSetItemData(GUIEditor.gridlist[1], row, 1, v[3])
guiGridListSetItemColor(GUIEditor.gridlist[1], row, 1, 255, 159, 0)
guiGridListSetItemColor(GUIEditor.gridlist[1], row, 2, 146, 0, 255)
end
end
setTimer (black, 3000, 1)
addEventHandler("onClientGUIClick", GUIEditor.button[1],
function()
if isTimer(timer) then
mSeconds,_,__ = getTimerDetails(timer)
total = mSeconds / 60 / 1000
outputChatBox("You need to wait "..math.ceil(total).." minutes",255, 159, 0)
return
end
timer = setTimer(function() end,5 * 1000 * 60,1)
local row, col = guiGridListGetSelectedItem(GUIEditor.gridlist[1])
if row and col and row ~= -1 and col ~= -1 then
local data = guiGridListGetItemData(GUIEditor.gridlist[1], row, 1)
local time = guiGridListGetItemText(GUIEditor.gridlist[1], row, 2)
triggerServerEvent('GiveAdmin',localPlayer,data,time) -- ,و هنا ربطت بالسيرفر
end
Server --
xAddToGroupFunction_ = function ( Group,Price,Name )
local account = getAccountName(getPlayerAccount(source)); -- واخيراً عرفت ليش لازم كذا بعد الترجمه لازم يجيب الحساب عشان يضعه فيObject
if isGuestAccount(getPlayerAccount(source)) then return outputChatBox(" يجب عليك التسجيل اولاَ ",source,0,171,233,true); end
if isObjectInACLGroup("user."..account, aclGetGroup(tostring(Group))) then return outputChatBox(" لديك هذهـ الرتبة فعـلاً ",source,255,153,0,true); end
local sValue = getElementData( source,'PlayTime' )
if not sValue then sValue = '0:0:0' end
local data = split(sValue,':')
local hour = tonumber( data[1] )
if hour == nil or not tonumber(hour) then hour = 0 end
if ( hour >= tonumber(Price)) then
aclGroupAddObject (aclGetGroup( tostring(Group)),"user."..account);
outputChatBox(" تم اضافة الرتبة بنجاح "..Name,source,0,171,233,true);
else
outputChatBox(" ليس لديك ساعات كافية ",source,255,153,0,true);
end
end
addEvent("Accept:the:request",true)
addEventHandler("Accept:the:request",root,xAddToGroupFunction_)
حلولي الخطأ الموجود