Jump to content

مساعده


Recommended Posts

السلام عليكم روحمة الله وبركاته

اخواني اانا سويت لسته وفيها لاعبين

انا ابي طريقه اخلي لكل لاعب رقم معين جنبه

مثلا لسته فيها لاعبين وكل لاعب جنب اسمه بنقه هاذا مثال فقط

انا ابي كل لاعب جنبه رقم 0

وكل ماقلت الاعب شخص يزيد +1

على رقم 0

ولما يصير 1

يزيد +1

ويصير 2

وياريت فهمتو قصدي لو مافهمتو راح اوضح

Link to comment
لوول مآوصصلت الفكرة =]

ض1

شوف انا سويت الحين

list

حق لاعبين مفهوم

ابي لكل لاعب رقم معين جنبه يعني مثلا انا وانت بسيرفر واحد يجي في

list

المتواجدين الي في السيرفر يعني اانا وانت

ويكون جنب اسمي انا في

list

يكون جنب اسمي رقم 0 ويكون خاص فيني انا فقط

وانت جنب اسمك رقم 0 وخاص فيك مايتغير الا لك فقط

والمقصود من الفكره لو قتلت شخص يزيد +1 على 0

يعني انت قتلتني وانت كان رقمك 0 لما تقتلني يزيد 1 ولما تقتلني مره ثانيه يزيد 1 على 1 يعني يصير 2

ها وصلت ؟

Link to comment
  
for i=1,#Players do -- الجدول 
  setElementData(Players[i],"Number",i) 
end 
  

هذا سطر بسيط عشان تعطي كل لاعب رقم مميز

الحين الرقم محفوظ في داتا اللاعب

تقدر تشوفه عن طريق

getElementData 

Link to comment
أخوي سو القريد لست وسو كل شي وانشالله اقدر اساعدك
GUIEditor_Window = {} 
GUIEditor_Grid = {} 
  
GUIEditor_Window[1] = guiCreateWindow(183,114,358,405,"عدد القتل للاعبين",false) 
GUIEditor_Grid[1] = guiCreateGridList(9,24,196,372,false,GUIEditor_Window[1]) 
guiGridListSetSelectionMode(GUIEditor_Grid[1],2) 
  
guiGridListAddColumn(GUIEditor_Grid[1],"اسم الاعبين",0.2) 
  
guiGridListAddColumn(GUIEditor_Grid[1],"الاعب قتل",0.2) 

تحت اسم لاعب يكون اسم لاعبين والحد ألأغصى 20

وتخت الاعب قتل

يكون رقم 0 جنب كل لاعب

وكل لاعب له رقم لحاله

رقم 0 حلو ولما يقتل الاعب شخص يزيد على رقمه 1

وتنحفظ وياريت فهمت ومشكور مقدنا

Link to comment
  
for i=1,#Players do -- الجدول 
  setElementData(Players[i],"Number",i) 
end 
  

هذا سطر بسيط عشان تعطي كل لاعب رقم مميز

الحين الرقم محفوظ في داتا اللاعب

تقدر تشوفه عن طريق

getElementData 

مشكور على المساعده ماقصرت لاكن شوف ردي الي فوق ذي المشاركه

Link to comment
GUIEditor_Window = {} 
GUIEditor_Grid = {} 
  
GUIEditor_Window[1] = guiCreateWindow(183,114,358,405,"عدد القتل للاعبين",false) 
GUIEditor_Grid[1] = guiCreateGridList(9,24,196,372,false,GUIEditor_Window[1]) 
guiGridListSetSelectionMode(GUIEditor_Grid[1],2) 
  
guiGridListAddColumn(GUIEditor_Grid[1],"اسم الاعبين",0.2) 
  
guiGridListAddColumn(GUIEditor_Grid[1],"الاعب قتل",0.2) 

يعني بالمختصر ال

Column ألأول

يكون اسم الاعب

والColumn

الثاني يكون عدد الي قتلهم

وتسلم

Link to comment
GUIEditor_Window = {} 
GUIEditor_Grid = {} 
  
GUIEditor_Window[1] = guiCreateWindow(183,114,358,405,"عدد القتل للاعبين",false) 
GUIEditor_Grid[1] = guiCreateGridList(9,24,196,372,false,GUIEditor_Window[1]) 
guiGridListSetSelectionMode(GUIEditor_Grid[1],2) 
  
theName = guiGridListAddColumn(GUIEditor_Grid[1],"اسم الاعبين",0.2) 
  
theKills = guiGridListAddColumn(GUIEditor_Grid[1],"الاعب قتل",0.2) 
    row = guiGridListAddRow ( GUIEditor_Grid[1]) 
guiGridListSetItemText ( GUIEditor_Grid[1], row, theName, getPlayerName ( getLocalPlayer()), false, false ) 
guiGridListSetItemText ( GUIEditor_Grid[1], row, theKills , getElementData(getLocalPlayer(),"Kills"), false, false ) 

Link to comment
GUIEditor_Window = {} 
GUIEditor_Grid = {} 
  
local x,y = guiGetScreenSize() 
GUIEditor_Window[1] = guiCreateWindow(x/2-179,y/2-203,358,405,"عدد القتل للاعبين",false) 
GUIEditor_Grid[1] = guiCreateGridList(9,24,340,372,false,GUIEditor_Window[1]) 
guiGridListSetSelectionMode(GUIEditor_Grid[1],2) 
  
guiGridListAddColumn(GUIEditor_Grid[1],"اسم الاعبين",0.6) 
guiGridListAddColumn(GUIEditor_Grid[1],"الاعب قتل",0.3) 
  
function UpdateKill() 
       guiGridListClear(GUIEditor_Grid[1]) 
       for i, player in ipairs (getElementsByType ("player")) do 
              local row = guiGridListAddRow(GUIEditor_Grid[1]) 
              guiGridListSetItemText(GUIEditor_Grid[1], row, 1, getPlayerName(player), false, false) 
              guiGridListSetItemText(GUIEditor_Grid[1], row, 2, getElementData(player,"Kills"), false, false) 
              if i == 20 then break end 
       end 
end 
addEventHandler("onClientResourceStart",resourceRoot,UpdateKill) 
addEventHandler("onClientPlayerWasted",root,UpdateKill) 

Link to comment
GUIEditor_Window = {} 
GUIEditor_Grid = {} 
  
local x,y = guiGetScreenSize() 
GUIEditor_Window[1] = guiCreateWindow(x/2-179,y/2-203,358,405,"عدد القتل للاعبين",false) 
GUIEditor_Grid[1] = guiCreateGridList(9,24,340,372,false,GUIEditor_Window[1]) 
guiGridListSetSelectionMode(GUIEditor_Grid[1],2) 
  
guiGridListAddColumn(GUIEditor_Grid[1],"اسم الاعبين",0.6) 
guiGridListAddColumn(GUIEditor_Grid[1],"الاعب قتل",0.3) 
  
function UpdateKill() 
       guiGridListClear(GUIEditor_Grid[1]) 
       for i, player in ipairs (getElementsByType ("player")) do 
              local row = guiGridListAddRow(GUIEditor_Grid[1]) 
              guiGridListSetItemText(GUIEditor_Grid[1], row, 1, getPlayerName(player), false, false) 
              guiGridListSetItemText(GUIEditor_Grid[1], row, 2, getElementData(player,"Kills"), false, false) 
              if i == 20 then break end 
       end 
end 
addEventHandler("onClientResourceStart",resourceRoot,UpdateKill) 
addEventHandler("onClientPlayerWasted",root,UpdateKill) 

يسلمو والله ماقصرتو

لاكن أخرر طلب ابيها تكون مرتبه من فوق لتحت يعني اكثر شخص قتل يكون فوق ويكون تنازلي يعني الي قتل 10 يكون أألأول والي قتل 9 الثاني وكيذا

وآسف تعبتكم

Link to comment

قولي كيف اطلع المطلوب من هذا

table.sort(table [, comp]) 
  
Sort the elements of a table in-place (i.e. alter the table). 
  
> t = { 3,2,5,1,4 } 
> table.sort(t) 
> = table.concat(t, ", ")  -- display sorted values 
1, 2, 3, 4, 5 
If the table has a specified size only the range specified is sorted, e.g., 
  
> t = { 3,2,5,1,4; n=3 }   -- construct a table with user size of 3 
> table.sort(t)            -- sort will be limited by user size 
> = table.concat(t, ", ")  -- only specified size is concatenated as well 
  
2, 3, 5 
A comparison function can be provided to customise the element sorting. The comparison function must return a boolean value specifying whether the first argument should be before the second argument in the sequence. The default behaviour is for the < comparison to be made. For example, the following behaves the same as no function being supplied: 
  
> t = { 3,2,5,1,4 } 
> table.sort(t, function(a,b) return aend) 
> = table.concat(t, ", ") 
1, 2, 3, 4, 5         
We can see if we reverse the comparison the sequence order is reversed. 
  
> table.sort(t, function(a,b) return a>b end) 
> = table.concat(t, ", ") 
5, 4, 3, 2, 1 

تكفى انا مو متعود الا على الويكي :(

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...