GLC Posted May 20, 2019 Share Posted May 20, 2019 --------------------- -- Player Ranking List -- --------------------- WindowSiralama2 = guiCreateWindow(245, 115, 450, 500, "Sıralama", false) guiSetProperty(WindowSiralama2, "CaptionColour", "FF1C90E1") guiWindowSetSizable(WindowSiralama2, false) guiWindowSetMovable(WindowSiralama2,false) guiSetVisible(WindowSiralama2, false) guiSetAlpha(WindowSiralama2, 1) centerWindow(WindowSiralama2) KapatButonSiralama2 = guiCreateButton(340, 466, 100, 24, "Kapat", false, WindowSiralama2) guiSetProperty(KapatButonSiralama2, "NormalTextColour", "FF2CFB03") LevelSiralamaButton = guiCreateButton(10, 466, 100, 24, "Level", false, WindowSiralama2) guiSetProperty(LevelSiralamaButton, "NormalTextColour", "FF2CFB03") ParaSiralamaButton = guiCreateButton(120, 466, 100, 24, "Para(Banka)", false, WindowSiralama2) guiSetProperty(ParaSiralamaButton, "NormalTextColour", "FF2CFB03") ZamanSiralamaButton = guiCreateButton(230, 466, 100, 24, "Zaman", false, WindowSiralama2) guiSetProperty(ZamanSiralamaButton, "NormalTextColour", "FF2CFB03") WindowSiralamaList2 = guiCreateGridList(5, 20, 440, 440, false, WindowSiralama2) local column = guiGridListAddColumn(WindowSiralamaList2, "Sıra", 0.20 ) local column1 = guiGridListAddColumn(WindowSiralamaList2, "Oyuncu Adı", 0.40 ) local column2 = guiGridListAddColumn(WindowSiralamaList2, "Level", 0.30 ) guiGridListSetSortingEnabled(WindowSiralamaList2, false) WindowSiralamaList3 = guiCreateGridList(5, 20, 440, 440, false, WindowSiralama2) local column = guiGridListAddColumn(WindowSiralamaList3, "Sıra", 0.20 ) local column1 = guiGridListAddColumn(WindowSiralamaList3, "Oyuncu Adı", 0.40 ) local column2 = guiGridListAddColumn(WindowSiralamaList3, "Para", 0.30 ) guiGridListSetSortingEnabled(WindowSiralamaList3, false) guiSetVisible(WindowSiralamaList3,false) WindowSiralamaList4 = guiCreateGridList(5, 20, 440, 440, false, WindowSiralama2) local column = guiGridListAddColumn(WindowSiralamaList4, "Sıra", 0.20 ) local column1 = guiGridListAddColumn(WindowSiralamaList4, "Oyuncu Adı", 0.40 ) local column2 = guiGridListAddColumn(WindowSiralamaList4, "Zaman", 0.30 ) guiGridListSetSortingEnabled(WindowSiralamaList4, false) guiSetVisible(WindowSiralamaList4,false) addEvent("SetData",true) addEventHandler("SetData",root,function ( Table ) guiGridListClear( WindowSiralamaList2 ) for i = 1,30 do local row = guiGridListAddRow ( WindowSiralamaList2 ) if ( Table [ i ].score ) then ---> fr_client.lua:2192 guiGridListSetItemText( WindowSiralamaList2, row, column, Table[i].sira , false, false ) guiGridListSetItemText( WindowSiralamaList2, row, column1, tostring(Table[i].name) , false, false ) guiGridListSetItemText( WindowSiralamaList2, row, column2, Table [ i ].score , false, false ) guiGridListSetItemColor(WindowSiralamaList2, row, column1, 255, 255, 0) guiGridListSetItemColor(WindowSiralamaList2, row, column2, 0, 180, 255) guiGridListSetItemColor(WindowSiralamaList2, row, column, 255, 0, 0) end end end) addEvent("SetData2",true) addEventHandler("SetData2",root,function ( Table ) guiGridListClear( WindowSiralamaList4 ) for i = 1,30 do local row = guiGridListAddRow ( WindowSiralamaList4 ) if ( Table [ i ].score ) then ---> fr_client.lua:2208 guiGridListSetItemText( WindowSiralamaList4, row, column, Table[i].sira , false, false ) guiGridListSetItemText( WindowSiralamaList4, row, column1, tostring(Table[i].name) , false, false ) guiGridListSetItemText( WindowSiralamaList4, row, column2, Table [ i ].score , false, false ) guiGridListSetItemColor(WindowSiralamaList4, row, column1, 255, 255, 0) guiGridListSetItemColor(WindowSiralamaList4, row, column2, 0, 180, 255) guiGridListSetItemColor(WindowSiralamaList4, row, column, 255, 0, 0) end end end) addEvent("updateTopMoney",true) addEventHandler("updateTopMoney",root,function ( Table ) guiGridListClear( WindowSiralamaList3 ) for i = 1,30 do local row = guiGridListAddRow ( WindowSiralamaList3 ) if ( Table [ i ].score ) then ---> fr_client.lua:2224 guiGridListSetItemText( WindowSiralamaList3, row, column, Table[i].sira , false, false ) guiGridListSetItemText( WindowSiralamaList3, row, column1, tostring(Table[i].name) , false, false ) guiGridListSetItemText( WindowSiralamaList3, row, column2, "$"..formatNumber(tostring(Table[i].score)).."" , false, false ) guiGridListSetItemColor(WindowSiralamaList3, row, column1, 255, 255, 0) guiGridListSetItemColor(WindowSiralamaList3, row, column2, 0, 180, 255) guiGridListSetItemColor(WindowSiralamaList3, row, column, 255, 0, 0) end end end) addEventHandler ( "onClientGUIClick", resourceRoot,function() if source == KapatButonSiralama2 then guiSetVisible(WindowSiralama2,false) elseif source == LevelSiralamaButton then if not durum1 then triggerServerEvent("getTop4", localPlayer) durum1 = true setTimer(function() durum1 = false end,60000,1) end if guiGetVisible(WindowSiralamaList3) then guiSetVisible(WindowSiralamaList3,false) end if guiGetVisible(WindowSiralamaList4) then guiSetVisible(WindowSiralamaList4,false) end guiSetVisible(WindowSiralamaList2,true) elseif source == ParaSiralamaButton then if not durum2 then triggerServerEvent("getTop3", localPlayer) durum2 = true setTimer(function() durum2 = false end,60000,1) end if guiGetVisible(WindowSiralamaList2) then guiSetVisible(WindowSiralamaList2,false) end if guiGetVisible(WindowSiralamaList4) then guiSetVisible(WindowSiralamaList4,false) end guiSetVisible(WindowSiralamaList3,true) elseif source == ZamanSiralamaButton then if not durum3 then triggerServerEvent("getTop4", localPlayer) durum3 = true setTimer(function() durum3 = false end,60000,1) end if guiGetVisible(WindowSiralamaList2) then guiSetVisible(WindowSiralamaList2,false) end if guiGetVisible(WindowSiralamaList3) then guiSetVisible(WindowSiralamaList3,false) end guiSetVisible(WindowSiralamaList4,true) end end) function formatNumber(n) if (not n) then return "Error catching data" end local left,num,right = string.match(n,'^([^%d]*%d)(%d*)(.-)$') return left..(num:reverse():gsub('(%d%d%d)','%1,'):reverse())..right end Can you edit it, please? ERROR: [gameplay]\freeroam\fr_client.lua:2192 attempt to index field '?' (a nil value) ERROR: [gameplay]\freeroam\fr_client.lua:2208: attempt to index field '?' (a nil value) ERROR: [gameplay]\freeroam\fr_client.lua:2224 attempt to index field '?' (a nil value) 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