|Mr|-Talal07-| Posted October 6, 2012 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 ) الي تعرفه قوله Retired.
hassan.k.s.a Posted October 6, 2012 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) http://www.h7server.allalla.com/ -- http://qs-server.tk/ -- http://tfbgaming.net
|Mr|-Talal07-| Posted October 6, 2012 Author Posted October 6, 2012 طيب الرقم حق الي قتله ما يظهر ابي واحد فاهم في التوبات Retired.
hassan.k.s.a Posted October 6, 2012 Posted October 6, 2012 طيب الرقم حق الي قتله ما يظهرابي واحد فاهم في التوبات امم انت مشكلتك تبي تحديث ولا تبي الي يقتل يضهر في السته ^.^ http://www.h7server.allalla.com/ -- http://qs-server.tk/ -- http://tfbgaming.net
TAPL Posted October 6, 2012 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)
|Mr|-Talal07-| Posted October 6, 2012 Author 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) الكود شغال بس ابي بدال اسم الحساب اسم الاعب Retired.
hassan.k.s.a Posted October 6, 2012 Posted October 6, 2012 جرب هذا guiGridListSetItemText(GUIEditor_Grid[1], row, getPlayerName(nametop), tostring(data.name), false, false) http://www.h7server.allalla.com/ -- http://qs-server.tk/ -- http://tfbgaming.net
TAPL Posted October 6, 2012 Posted October 6, 2012 جرب هذا guiGridListSetItemText(GUIEditor_Grid[1], row, getPlayerName(nametop), tostring(data.name), false, false) LoL?
|Mr|-Talal07-| Posted October 6, 2012 Author Posted October 6, 2012 جرب هذا guiGridListSetItemText(GUIEditor_Grid[1], row, getPlayerName(nametop), tostring(data.name), false, false) لا ما يشتغل كذا بدون ما اجرب Retired.
hassan.k.s.a Posted October 6, 2012 Posted October 6, 2012 جرب هذا guiGridListSetItemText(GUIEditor_Grid[1], row, getPlayerName(nametop), tostring(data.name), false, false) LoL? عارف انه غلط لاكن بأنتضار ردك هع http://www.h7server.allalla.com/ -- http://qs-server.tk/ -- http://tfbgaming.net
hassan.k.s.a Posted October 6, 2012 Posted October 6, 2012 جرب هذا guiGridListSetItemText(GUIEditor_Grid[1], row, getPlayerName(nametop), tostring(data.name), false, false) لا ما يشتغل كذا بدون ما اجرب دامك تعرف انه مايشتغل يعني عارف الحل مثلأً ^.^ http://www.h7server.allalla.com/ -- http://qs-server.tk/ -- http://tfbgaming.net
|Mr|-Talal07-| Posted October 6, 2012 Author 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 ) طيب باقي شي ما رديتوا عليه الي هو كيف اخلي اللسته ما تنضغط يعني اضغط ما يحدد في اللسته شي Retired.
3NAD Posted October 6, 2012 Posted October 6, 2012 جرب ذا guiSetProperty او guiGridListSetSelectionMode
|Mr|-Talal07-| Posted October 6, 2012 Author Posted October 6, 2012 جرب ذا guiSetProperty او guiGridListSetSelectionMode طيب اذا كان guiGridListSetSelectionMode وش يكون الرقم Retired.
hassan.k.s.a Posted October 6, 2012 Posted October 6, 2012 guiGridListSetItemText(GUIEditor_Grid[1],row,nametop,name,true,true) http://www.h7server.allalla.com/ -- http://qs-server.tk/ -- http://tfbgaming.net
|Mr|-Talal07-| Posted October 6, 2012 Author Posted October 6, 2012 guiGridListSetItemText(GUIEditor_Grid[1],row,nametop,name,true,true) خلاص مشكور حليتها انا اشوف طريقه تجيب الاسم احسن من ذيك Retired.
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