#StrOnG_,) Posted April 17, 2015 Share Posted April 17, 2015 ألسسلام عليكم كيفكم شباب ؟ أن شاء الله بخير . المهم أنا سويت توب القتل بس احتاج كود جلب اسماء اللأعبين + كم قتل أتمنى فهمتوني وشكراً Link to comment
iMr.SFA7 Posted April 17, 2015 Share Posted April 17, 2015 ألسسلام عليكمكيفكم شباب ؟ أن شاء الله بخير . المهم أنا سويت توب القتل بس احتاج كود جلب اسماء اللأعبين + كم قتل أتمنى فهمتوني وشكراً لو تدور بالقسم بتلقى اكثر من 100 موضوع طلب اسماء اللاعبين.. viewtopic.php?f=160&t=87087 local List = اسم القريد ليست addEventHandler("onClientResourceStart", resourceRoot, function ( ) local players = getElementsByType("player") for _ , player in ipairs ( players ) do local name = string.gsub( getPlayerName( player ), "#%x%x%x%x%x%x", "" ) local row = guiGridListAddRow( List ) guiGridListSetItemText( List, row, 1, name ) end end ) Link to comment
#StrOnG_,) Posted April 17, 2015 Author Share Posted April 17, 2015 شكراً لك , + بس كود عدد قتل اللاعب جنب أسمه لو سمحت Link to comment
#StrOnG_,) Posted April 17, 2015 Author Share Posted April 17, 2015 جربت الكود , بس ما يجيب اسم اللآعب Link to comment
iMr.SFA7 Posted April 17, 2015 Share Posted April 17, 2015 جربت الكود , بس ما يجيب اسم اللآعب ورني الي سويته ؟ Link to comment
#StrOnG_,) Posted April 17, 2015 Author Share Posted April 17, 2015 (edited) GUIEditor = { button = {}, label = {} } addEventHandler("onClientResourceStart", resourceRoot, function() wnd = guiCreateGridList(219, 103, 345, 445, false) guiGridListAddColumn(wnd, "=[ Top Kill By ~|Strong|~ ]=", 0.9) guiSetAlpha(wnd, 0.84) GUIEditor.label[2] = guiCreateLabel(6, 35, 82, 16, "Player Name :", false, wnd) guiSetFont(GUIEditor.label[2], "default-bold-small") guiLabelSetColor(GUIEditor.label[2], 255, 0, 0) GUIEditor.label[3] = guiCreateLabel(226, 34, 32, 17, "Kills : ", false, wnd) guiLabelSetColor(GUIEditor.label[3], 255, 0, 0) GUIEditor.button[1] = guiCreateButton(0.46, 0.06, 0.05, 0.94, "", true, wnd) guiSetAlpha(GUIEditor.button[1], 0.52) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA") end ) function OpenWin() if guiGetVisible ( wnd ) then guiSetVisible ( wnd, false ) showCursor(false) guiSetInputEnabled(false) else guiSetVisible ( wnd, true ) showCursor(true) guiSetInputEnabled(true) end end bindKey("F7", "down", OpenWin) ----------------------------------------------------------------- ---------- local List = wnd addEventHandler("onClientResourceStart", resourceRoot, function ( ) local players = getElementsByType("player") for _ , player in ipairs ( players ) do local name = string.gsub( getPlayerName( player ), "#%x%x%x%x%x%x", "" ) local row = guiGridListAddRow( List ) guiGridListSetItemText( List, row, 1, name ) end end ) Edited April 17, 2015 by Guest Link to comment
iMr.SFA7 Posted April 17, 2015 Share Posted April 17, 2015 طيب ابي أفهم وين النافذة لو سمحت ؟ Link to comment
#StrOnG_,) Posted April 17, 2015 Author Share Posted April 17, 2015 GUIEditor = { button = {}, label = {} } addEventHandler("onClientResourceStart", resourceRoot, function() wnd = guiCreateGridList(219, 103, 345, 445, false) guiGridListAddColumn(wnd, "=[ Top Kill By ~|Strong|~ ]=", 0.9) guiSetAlpha(wnd, 0.84) GUIEditor.label[2] = guiCreateLabel(6, 35, 82, 16, "Player Name :", false, wnd) guiSetFont(GUIEditor.label[2], "default-bold-small") guiLabelSetColor(GUIEditor.label[2], 255, 0, 0) GUIEditor.label[3] = guiCreateLabel(226, 34, 32, 17, "Kills : ", false, wnd) guiLabelSetColor(GUIEditor.label[3], 255, 0, 0) GUIEditor.button[1] = guiCreateButton(0.46, 0.06, 0.05, 0.94, "", true, wnd) guiSetAlpha(GUIEditor.button[1], 0.52) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA") end ) Link to comment
iMr.SFA7 Posted April 17, 2015 Share Posted April 17, 2015 مافي نافذة بس على كل حال خذ تمت التجربة , شغال GUIEditor = { button = {}, label = {} } addEventHandler("onClientResourceStart", resourceRoot, function() wnd = guiCreateGridList(219, 103, 345, 445, false) guiGridListAddColumn(wnd, "=[ Top Kill By ~|Strong|~ ]=", 0.9) guiSetAlpha(wnd, 0.84) GUIEditor.label[2] = guiCreateLabel(6, 35, 82, 16, "Player Name :", false, wnd) guiSetFont(GUIEditor.label[2], "default-bold-small") guiLabelSetColor(GUIEditor.label[2], 255, 0, 0) GUIEditor.label[3] = guiCreateLabel(226, 34, 32, 17, "Kills : ", false, wnd) guiLabelSetColor(GUIEditor.label[3], 255, 0, 0) GUIEditor.button[1] = guiCreateButton(0.46, 0.06, 0.05, 0.94, "", true, wnd) guiSetAlpha(GUIEditor.button[1], 0.52) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA") end ) addEventHandler("onClientRender", root, function() dxDrawText("", 272, 254, 326, 291, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", false, false, false, false, false) end ) function OpenWin() if guiGetVisible ( wnd ) then guiSetVisible ( wnd, false ) showCursor(false) guiSetInputEnabled(false) else guiSetVisible ( wnd, true ) showCursor(true) guiSetInputEnabled(true) end end bindKey("F7", "down", OpenWin) function players() guiGridListClear(wnd) for i,v in ipairs(getElementsByType("player")) do local row = guiGridListAddRow(wnd) guiGridListSetItemText(wnd,row,1,getPlayerName(v),false,false) end end addEventHandler("onClientResourceStart",resourceRoot,players) addEventHandler("onClientPlayerJoin",root,players) addEventHandler("onClientPlayerChangeNick",root,players) Link to comment
#StrOnG_,) Posted April 17, 2015 Author Share Posted April 17, 2015 شكراً لك بس بقي كود عدد قتل اللآعب يضهر جنب أسمه أذا معك اتمنى ما تقصر معي Link to comment
</Mr.Tn6eL> Posted April 17, 2015 Share Posted April 17, 2015 عشان تعرف كم الاعب قتل "onPlayerWasted" setElementData getElementData Link to comment
#Mr.alkmasha Posted April 18, 2015 Share Posted April 18, 2015 عشان تعرف كم الاعب قتل "onPlayerWasted" setElementData getElementData ممكن تشرح الطريقه؟ Link to comment
The Killer Posted April 18, 2015 Share Posted April 18, 2015 addEventHandler ("onPlayerWasted", root, function (_, killer) if (killer and getElementType (killer) == "player") then setElementData (killer, "kills", (getElementData (killer, "kills") or 0) + 1) end end ) 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