Jump to content

how ?


3ssol

Recommended Posts

السلام عليكم

شباب انا اعرف اسوي قريد ليست

بس ماعرف اسوي زي هدا

لاهنتو ممكن واحد يشرحلي ع مثال بسيط

الي بيتفلسف لايرد

Edited by Guest
Link to comment

تقدر تسويه بـ GUIEditor

guiGridListAddColumn  

مثال من الويكي :

function clientsideResourceStart () 
        local playerList = guiCreateGridList ( 0.80, 0.10, 0.15, 0.60, true ) -- Create the grid list 
        local column = guiGridListAddColumn( playerList, "Player", 0.85 ) -- Create a 'players' column in the list 
        if ( column ) then -- If the column was successfully created 
                for id, playeritem in ipairs(getElementsByType("player")) do  
                --Loop through all the players, adding them to the table 
                        local row = guiGridListAddRow ( playerList ) 
                        guiGridListSetItemText ( playerList, row, column, getPlayerName ( playeritem ), false, false ) 
                end 
        end 
end 
addEventHandler ( "onClientResourceStart", getRootElement(), clientsideResourceStart ) 

Link to comment

جرب هالكود,

local List = guiCreateGridList ( 0.80, 0.10, 0.15, 0.60, true ) 
local column = guiGridListAddColumn(List, "Weapon", 0.50 )  
local column2 = guiGridListAddColumn(List, "Money", 0.20 ) 

Weapon = الكولومن الاول,

Money = الكولومن الثاني,

هي على حسب الترتيب,

يعني لو حطيته كذا,

local List = guiCreateGridList ( 0.80, 0.10, 0.15, 0.60, true ) 
local column2 = guiGridListAddColumn(List, "Money", 0.20 ) 
local column = guiGridListAddColumn(List, "Weapon", 0.50 ) 

Money = الكولومن الاول ,

Weapon = الكولومن الثاني,

بالنسبه للاحداثيات, هذي حق طول الكولومن,

local column = guiGridListAddColumn(List, "Weapon", 0.100 ) 
Link to comment

اخوي ذا بيست

صح

بس لو انا سويت جدول ابي احط داخله اسم السلاح والسعر

كيف احط السعر داخل الكولمن حق

الـ

money

و السلاح

داخل

weapon

ممكن مثال بسسيط لاهنت وجزاك الله خير

ي الذيب

Link to comment

مثال,

table = { 
    { 'AK-47',200 } 
} 
  
Grid = guiCreateGridList(...) 
local Column = guiGridListAddColumn(Grid, 'Weapon', 0.20 ) 
local Column2 = guiGridListAddColumn(Grid, 'Money', 0.50 ) 
  
for k,v in ipairs( table ) do 
local Row = guiGridListAddRow(Grid) 
guiGridListSetItemText(Grid,Row,Column, v[1], false, false ) 
guiGridListSetItemText(Grid,Row,Column2, v[2], false, false ) 
end 
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...