Jump to content

سؤال لـالفائده1 : جداول


Booo

Recommended Posts

[list=]

[*] بسم الله الرحمن الرحيم

الجميع يعرف سكربت Teleport

الي تختار مكان وتنتقل له .

سؤالي الحين بعد الجدول

teleports = {

[1] = {-2601.62, 617.06, 64.75, 80.93, 0, "San Fierro Hospital", -2570.33, 654.57},

[2] = {-2095.80, 1366.78, 34.92, 69.73, 0, "San Fierro Pier", -2080.80, 1404.56},

[3] = {-1876.42, 790.04, 28.05, 28.05, 0, "San Fierro Rooftop", -1863.34, 804.22}

}

GridList السوال: كيف أضيف اسامي الاماكن لـ

بااستخدام الجداول

window = guiCreateWindow(0.0271,0.2222,0.4854,0.4889,"Teleport menu",true)   
grid1 = guiCreateGridList(0.0286,0.0523,0.2847,0.575,true,window) 
column1 = guiGridListAddColumn(grid1,"Teleport",0.99) 
  
    for k,v in ipairs(teleports) do 
  
    end 
  
-- guiGridListAddRow() 
-- guiGridListSetItemText() 

؟! :mrgreen:

~ الحل ~

teleports = { 
    [1] = {-2601.62, 617.06, 64.75,  80.93, 0, "San Fierro Hospital", -2570.33, 654.57}, 
    [2] = {-2095.80,  1366.78, 34.92, 69.73, 0, "San Fierro Pier", -2080.80, 1404.56}, 
    [3] = {-1876.42, 790.04, 28.05, 28.05, 0, "San Fierro Rooftop", -1863.34, 804.22} 
} 
  
window = guiCreateWindow(0.0271,0.2222,0.4854,0.4889,"Teleport menu",true)  
grid1 = guiCreateGridList(0.0286,0.0523,0.2847,0.575,true,window) 
column1 = guiGridListAddColumn(grid1,"Teleport",0.99) 
  
for k,v in ipairs(teleports) do 
     row = guiGridListAddRow(grid1) 
     guiGridListSetItemText(grid1, row, column1, v[6], false, false) 
end 
  
-- guiGridListAddRow() 
-- guiGridListSetItemText() 

Edited by Guest
Link to comment
استخدم
guiGridListAddRow  
-- و 
guiGridListSetItemText 

داري انك تستخدم

guiGridListAddRow

و

guiGridListSetItemText

ماتشوفها مكتوبه اخر شي بالكود

حاطها علشان مايقمز لي واحد مثلك ويقول استخدمها :mrgreen:

guiGridListSetItemText بس انا سؤالي كيف استخدم

مع الجدول ؟! كيف اضيف اسامي الاماكن

GridList لـ

Link to comment
gridlist = guiCreateGridList(0.344,0.1011,0.7078,0.5005,true,GUIEditor_Window[1]) 
    guiGridListSetSelectionMode(gridlist,2) 
    guiSetVisible(GUIEditor_Window[1],false) 
      name = guiGridListAddColumn(gridlist,"spawn",0.9) 
      local booo1 = guiGridListAddRow ( gridlist ) 
      local booo2 = guiGridListAddRow ( gridlist ) 
      spawn1 = guiGridListSetItemText ( gridlist, booo1, name, "spawn1", false, false ) 
      spawn2 = guiGridListSetItemText ( gridlist, booo2, name, "spawn2", false, false ) 

?

Link to comment

للمعلوميه شباب ترا انا اأعرف الحل ..

بسس هو سؤال للاستفاده

لاأكثر ولا اقل

يعني يااما تكتب الكود كامل والا

السكوت من ذهب :wink:

ولايمنع المحاوله

gridlist = guiCreateGridList(0.344,0.1011,0.7078,0.5005,true,GUIEditor_Window[1]) 
    guiGridListSetSelectionMode(gridlist,2) 
    guiSetVisible(GUIEditor_Window[1],false) 
      name = guiGridListAddColumn(gridlist,"spawn",0.9) 
      local booo1 = guiGridListAddRow ( gridlist ) 
      local booo2 = guiGridListAddRow ( gridlist ) 
      spawn1 = guiGridListSetItemText ( gridlist, booo1, name, "spawn1", false, false ) 
      spawn2 = guiGridListSetItemText ( gridlist, booo2, name, "spawn2", false, false ) 

?

حسإن لإزم تستخدم الجداول

وتكمل على المثال الي كاتبه فوق

الحل ترا سطرين بس :mrgreen:

(خطا الي كاتبه)

Link to comment
للمعلوميه شباب ترا انا اأعرف الحل ..

بسس هو سؤال للاستفاده

لاأكثر ولا اقل

يعني يااما تكتب الكود كامل والا

السكوت من ذهب :wink:

ولايمنع المحاوله

gridlist = guiCreateGridList(0.344,0.1011,0.7078,0.5005,true,GUIEditor_Window[1]) 
    guiGridListSetSelectionMode(gridlist,2) 
    guiSetVisible(GUIEditor_Window[1],false) 
      name = guiGridListAddColumn(gridlist,"spawn",0.9) 
      local booo1 = guiGridListAddRow ( gridlist ) 
      local booo2 = guiGridListAddRow ( gridlist ) 
      spawn1 = guiGridListSetItemText ( gridlist, booo1, name, "spawn1", false, false ) 
      spawn2 = guiGridListSetItemText ( gridlist, booo2, name, "spawn2", false, false ) 

?

حسإن لإزم تستخدم الجداول

وتكمل على المثال الي كاتبه فوق

الحل ترا سطرين بس :mrgreen:

(خطا الي كاتبه)

1-حسن مو حسآن

2-لاتقول خطأ اذا الأكود مو المطلوبه :) ..

3-مافهمت مشكلتك في البدايه زين

قول مو ذا المطلوب مو خطأ *_×

Link to comment
teleports = { 
    [1] = {-2601.62, 617.06, 64.75,  80.93, 0, "San Fierro Hospital", -2570.33, 654.57}, 
    [2] = {-2095.80,  1366.78, 34.92, 69.73, 0, "San Fierro Pier", -2080.80, 1404.56}, 
    [3] = {-1876.42, 790.04, 28.05, 28.05, 0, "San Fierro Rooftop", -1863.34, 804.22} 
} 
  
window = guiCreateWindow(0.0271,0.2222,0.4854,0.4889,"Teleport menu",true)  
grid1 = guiCreateGridList(0.0286,0.0523,0.2847,0.575,true,window) 
column1 = guiGridListAddColumn(grid1,"Teleport",0.99) 
  
for k,v in ipairs(teleports) do 
     row = guiGridListAddRow(grid1) 
     guiGridListSetItemText(grid1, row, column1, v[6], false, false) 
end 
  
-- guiGridListAddRow() 
-- guiGridListSetItemText() 

Link to comment
teleports = { 
    [1] = {-2601.62, 617.06, 64.75,  80.93, 0, "San Fierro Hospital", -2570.33, 654.57}, 
    [2] = {-2095.80,  1366.78, 34.92, 69.73, 0, "San Fierro Pier", -2080.80, 1404.56}, 
    [3] = {-1876.42, 790.04, 28.05, 28.05, 0, "San Fierro Rooftop", -1863.34, 804.22} 
} 
  
window = guiCreateWindow(0.0271,0.2222,0.4854,0.4889,"Teleport menu",true)  
grid1 = guiCreateGridList(0.0286,0.0523,0.2847,0.575,true,window) 
column1 = guiGridListAddColumn(grid1,"Teleport",0.99) 
  
for k,v in ipairs(teleports) do 
     row = guiGridListAddRow(grid1) 
     guiGridListSetItemText(grid1, row, column1, v[6], false, false) 
end 
  
-- guiGridListAddRow() 
-- guiGridListSetItemText() 

تابل ؟!

عطهم فرصه يفكرون شوي :mrgreen:

صحيح الحل + لإهنت يغلق

Link to comment
teleports = { 
    [1] = {-2601.62, 617.06, 64.75,  80.93, 0, "San Fierro Hospital", -2570.33, 654.57}, 
    [2] = {-2095.80,  1366.78, 34.92, 69.73, 0, "San Fierro Pier", -2080.80, 1404.56}, 
    [3] = {-1876.42, 790.04, 28.05, 28.05, 0, "San Fierro Rooftop", -1863.34, 804.22} 
} 
  
window = guiCreateWindow(0.0271,0.2222,0.4854,0.4889,"Teleport menu",true)  
grid1 = guiCreateGridList(0.0286,0.0523,0.2847,0.575,true,window) 
column1 = guiGridListAddColumn(grid1,"Teleport",0.99) 
  
for k,v in ipairs(teleports) do 
     row = guiGridListAddRow(grid1) 
     guiGridListSetItemText(grid1, row, column1, v[6], false, false) 
end 
  
-- guiGridListAddRow() 
-- guiGridListSetItemText() 

تابل ؟!

عطهم فرصه يفكرون شوي :mrgreen:

صحيح الحل + لإهنت يغلق

ليه انت كنت تعرف الحل؟

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

Link to comment
Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

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