|Mr|-Talal07-| Posted October 6, 2012 Share Posted October 6, 2012 السلام عليكم ورحمه الله و بركاته شباب انا كنت ابي اسوي توب للزومبي و ما اشتغل ما ابي اطول عليكم الكودات + ابيه ما يقدر يحدد على اللسته + ابيه يتحدث --- Client Side --- addEventHandler("onClientResourceStart",getResourceRootElement(getThisResource()), function () triggerServerEvent("onGetTop",getLocalPlayer()) end ) addEvent("onClient",true) addEventHandler("onClient",getRootElement(), function (name,data) local row = guiGridListAddRow(GUIEditor_Grid[1]) guiGridListSetItemText(GUIEditor_Grid[1],row,nametop,name,false,false) guiGridListSetItemText(GUIEditor_Grid[1],row,datatop,data,false,false) end ) --- Server Side --- addEvent("onGetTop",true) addEventHandler("onGetTop",getRootElement(), function () top = {} for i,v in ipairs(getElementsByType("player")) do local name = getPlayerName(v) local account = getPlayerAccount(v) if account then for s,a in ipairs(getAccounts()) do local data = getAccountData(a,"Zombie kills") table.insert(top,data) table.sort(top) triggerClientEvent(source,"onClient",source,name,top) end end end end ) الي تعرفه قوله Link to comment
hassan.k.s.a Posted October 6, 2012 Share Posted October 6, 2012 addEventHandler("onClientResourceStart",getResourceRootElement(getThisResource()), function Timer() triggerServerEvent("onGetTop",getLocalPlayer()) end) setTimer(Timer,10000,0) addEvent("onClient",true) addEventHandler("onClient",getRootElement(), function (name,data) local row = guiGridListAddRow(GUIEditor_Grid[1]) guiGridListSetItemText(GUIEditor_Grid[1],row,nametop,name,false,false) guiGridListSetItemText(GUIEditor_Grid[1],row,datatop,data,false,false) end) Link to comment
|Mr|-Talal07-| Posted October 6, 2012 Author Share Posted October 6, 2012 طيب الرقم حق الي قتله ما يظهر ابي واحد فاهم في التوبات Link to comment
hassan.k.s.a Posted October 6, 2012 Share Posted October 6, 2012 طيب الرقم حق الي قتله ما يظهرابي واحد فاهم في التوبات امم انت مشكلتك تبي تحديث ولا تبي الي يقتل يضهر في السته ^.^ Link to comment
TAPL Posted October 6, 2012 Share Posted October 6, 2012 جرب -- Client Side -- triggerServerEvent("onGetTop", localPlayer) addEvent("onClient",true) addEventHandler("onClient", root, function (top) for i, data in ipairs(top) do local row = guiGridListAddRow(GUIEditor_Grid[1]) guiGridListSetItemText(GUIEditor_Grid[1], row, nametop, tostring(data.name), false, false) guiGridListSetItemText(GUIEditor_Grid[1], row, datatop, tostring(data.kills), false, true) end end) -- Server Side -- addEvent("onGetTop",true) addEventHandler("onGetTop", root, function() top = {} for s,a in ipairs(getAccounts()) do local accName = getAccountName(a) local Zkill = getAccountData(a, "Zombie kills") or 0 table.insert(top, {name = accName, kills = Zkill} ) end table.sort(top,function(a,b) return (tonumber(a.kills)or 0) > (tonumber(b.kills)or 0) end) setTimer(function(player) triggerClientEvent(player, "onClient", player, top) end, 1000, 1, source) end) Link to comment
|Mr|-Talal07-| Posted October 6, 2012 Author Share Posted October 6, 2012 جرب-- Client Side -- triggerServerEvent("onGetTop", localPlayer) addEvent("onClient",true) addEventHandler("onClient", root, function (top) for i, data in ipairs(top) do local row = guiGridListAddRow(GUIEditor_Grid[1]) guiGridListSetItemText(GUIEditor_Grid[1], row, nametop, tostring(data.name), false, false) guiGridListSetItemText(GUIEditor_Grid[1], row, datatop, tostring(data.kills), false, true) end end) -- Server Side -- addEvent("onGetTop",true) addEventHandler("onGetTop", root, function() top = {} for s,a in ipairs(getAccounts()) do local accName = getAccountName(a) local Zkill = getAccountData(a, "Zombie kills") or 0 table.insert(top, {name = accName, kills = Zkill} ) end table.sort(top,function(a,b) return (tonumber(a.kills)or 0) > (tonumber(b.kills)or 0) end) setTimer(function(player) triggerClientEvent(player, "onClient", player, top) end, 1000, 1, source) end) الكود شغال بس ابي بدال اسم الحساب اسم الاعب Link to comment
hassan.k.s.a Posted October 6, 2012 Share Posted October 6, 2012 جرب هذا guiGridListSetItemText(GUIEditor_Grid[1], row, getPlayerName(nametop), tostring(data.name), false, false) Link to comment
TAPL Posted October 6, 2012 Share Posted October 6, 2012 جرب هذا guiGridListSetItemText(GUIEditor_Grid[1], row, getPlayerName(nametop), tostring(data.name), false, false) LoL? Link to comment
|Mr|-Talal07-| Posted October 6, 2012 Author Share Posted October 6, 2012 جرب هذا guiGridListSetItemText(GUIEditor_Grid[1], row, getPlayerName(nametop), tostring(data.name), false, false) لا ما يشتغل كذا بدون ما اجرب Link to comment
hassan.k.s.a Posted October 6, 2012 Share Posted October 6, 2012 جرب هذا guiGridListSetItemText(GUIEditor_Grid[1], row, getPlayerName(nametop), tostring(data.name), false, false) LoL? عارف انه غلط لاكن بأنتضار ردك هع Link to comment
hassan.k.s.a Posted October 6, 2012 Share Posted October 6, 2012 جرب هذا guiGridListSetItemText(GUIEditor_Grid[1], row, getPlayerName(nametop), tostring(data.name), false, false) لا ما يشتغل كذا بدون ما اجرب دامك تعرف انه مايشتغل يعني عارف الحل مثلأً ^.^ Link to comment
|Mr|-Talal07-| Posted October 6, 2012 Author Share Posted October 6, 2012 كيف ذا يمشي الحال مع التعديل الكود السابق addEventHandler("onPlayerLogin",getRootElement(), function () local account = getPlayerAccount(source) if not isGuestAccount(account) then setAccountData(account,"PName",getPlayerName(source) or "N/A") end end ) طيب باقي شي ما رديتوا عليه الي هو كيف اخلي اللسته ما تنضغط يعني اضغط ما يحدد في اللسته شي Link to comment
3NAD Posted October 6, 2012 Share Posted October 6, 2012 جرب ذا guiSetProperty او guiGridListSetSelectionMode Link to comment
|Mr|-Talal07-| Posted October 6, 2012 Author Share Posted October 6, 2012 جرب ذا guiSetProperty او guiGridListSetSelectionMode طيب اذا كان guiGridListSetSelectionMode وش يكون الرقم Link to comment
|Mr|-Talal07-| Posted October 6, 2012 Author Share Posted October 6, 2012 خلاص حليتها مشكورين Link to comment
hassan.k.s.a Posted October 6, 2012 Share Posted October 6, 2012 guiGridListSetItemText(GUIEditor_Grid[1],row,nametop,name,true,true) Link to comment
|Mr|-Talal07-| Posted October 6, 2012 Author Share Posted October 6, 2012 guiGridListSetItemText(GUIEditor_Grid[1],row,nametop,name,true,true) خلاص مشكور حليتها انا اشوف طريقه تجيب الاسم احسن من ذيك 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