A7M8D Posted July 25, 2017 Share Posted July 25, 2017 السلام عليكم عندي كود فيه مشكلة addEventHandler( "onClientResourceStart",root, function () triggerServerEvent("ReSend",localPlayer) end ) -- GUI Elements addEvent("Add", true) addEventHandler("Add", root, function(one,Hours) guiSetVisible(GUIEditor.gridlist[1], false) guiSetVisible(GUIEditor.gridlist[1], true) guiGridListClear(GUIEditor.gridlist[1]) local item = guiGridListAddRow(GUIEditor.gridlist[1]) local itemName = guiGridListSetItemText(GUIEditor.gridlist[1], item, 1, one ..'- ' .. getPlayerName(Hours[one].name), false, false) local itemName2 = guiGridListSetItemText(GUIEditor.gridlist[1], item, 2, Hours[one].time, false, false) guiGridListSetItemColor(GUIEditor.gridlist[1], item, 1, 255, 0, 0) guiGridListSetItemColor(GUIEditor.gridlist[1], item, 2, 0, 255, 0) end ) -- S function getHours() playersTable = {} ; for i, v in ipairs(getElementsByType('player')) do local Acc = getPlayerAccount ( v ) if ( Acc ) and not isGuestAccount ( Acc ) then local playerData = getAccountData ( Acc, "Hours" ) or 0 local Hour, Min, Sec = unpack( split ( playerData, ":" ) ) table.insert(playersTable, {name = v, time = playerData}) end end table.sort ( playersTable, function ( a, b ) return ( tostring ( a.time ) or "" ) > ( tostring ( b.time ) or "" ) end ) return playersTable end addEvent("ReSend", true) addEventHandler("ReSend", root, function() setTimer ( Timer, 1000, 0 ) end ) function Timer () local Hours = getHours() for one = 1, #getElementsByType('player') do if one >= 30 then return end if (Hours[1]) then triggerClientEvent(root,"Add",root,one,Hours) end end end Link to comment
iMr.WiFi..! Posted July 25, 2017 Share Posted July 25, 2017 سطر 15 فيه غلط .. وعندك بعد استقبال مسوي اخفاء واظهار بنفس الوقت .. , وارسل الديبق ان وجد بعد التصحيح Link to comment
A7M8D Posted July 25, 2017 Author Share Posted July 25, 2017 تمام بس سطر 15 مفهمتش الخطا و كلاينت و لا سيرفر Link to comment
iMr.WiFi..! Posted July 25, 2017 Share Posted July 25, 2017 8 hours ago, #MR.NaiF said: تمام بس سطر 15 مفهمتش الخطا و كلاينت و لا سيرفر سيرفر , مسوي السورت خاطئ,, Link to comment
A7M8D Posted July 26, 2017 Author Share Posted July 26, 2017 12 hours ago, iMr.WiFi..! said: سيرفر , مسوي السورت خاطئ,, مفهمتش بس شكرا انا حليت المشكلة من زمان Link to comment
#BrosS Posted July 26, 2017 Share Posted July 26, 2017 23 minutes ago, #MR.NaiF said: مفهمتش بس شكرا انا حليت المشكلة من زمان Programming Skills : 80 % أنت قربت تختم البرمجة وماتعرف السورس 1 Link to comment
A7M8D Posted July 26, 2017 Author Share Posted July 26, 2017 المشكلة مكنتش من هنا اصلا وانا حليتها خلاص شكرا @#BrosS Link to comment
iMr.WiFi..! Posted July 26, 2017 Share Posted July 26, 2017 4 hours ago, #MR.NaiF said: المشكلة مكنتش من هنا اصلا وانا حليتها خلاص شكرا @#BrosS الكذب على النفس مابينفعك -.- , وبتوفيق لك : ) Link to comment
A7M8D Posted July 26, 2017 Author Share Posted July 26, 2017 المشكلة مش من هنا والمود اشتغل استخدمت المنت داتا المود كله كلاينت Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now