Jump to content

شرح القريد ليست


Recommended Posts

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

GUIEditor_Window = {} 
GUIEditor_Grid = {} 
  
GUIEditor_Window[1] = guiCreateWindow(458,158,572,555,"",false) 
guiSetVisible ( GUIEditor_Window[1], false ) 
guiSetAlpha(GUIEditor_Window[1],1) 
GUIEditor_Grid[1] = guiCreateGridList(13,32,192,514,false,GUIEditor_Window[1]) 
guiGridListSetSelectionMode(GUIEditor_Grid[1],2) 
  
guiGridListAddColumn(GUIEditor_Grid[1],"player      ",0.5) 

بحااول فيه

Link to comment

سويت كذا وماضبط

:\

GUIEditor_Window = {} 
GUIEditor_Grid = {} 
  
GUIEditor_Window[1] = guiCreateWindow(458,158,572,555,"",false) 
guiSetVisible ( GUIEditor_Window[1], false ) 
guiSetAlpha(GUIEditor_Window[1],1) 
GUIEditor_Grid[1] = guiCreateGridList(13,32,192,514,false,GUIEditor_Window[1]) 
guiGridListSetSelectionMode(GUIEditor_Grid[1],2) 
  
guiGridListAddColumn(GUIEditor_Grid[1],"player      ",0.9) 
  
  
  
  
  
  
changeGridListItemToPlayersName = function ( GridList, Column ) 
    if GridList and Column then  
        if getElementType ( GridList ) == "gui-gridlist" then 
            if guiGridListClear ( GridList ) then  
                for i, v in next, getElementsByType ( "player" ) do  
                    local Row = guiGridListAddRow ( GridList )  
                    guiGridListSetItemText ( GridList, Row, Column, getPlayerName ( v ), false, false );  
                end; 
            end;  
        end;  
    end;  
end; 

Link to comment

طريقة افضل :

addEventHandler("onClientRender",getRootElement(), 
    function ( ) 
        if ( guiGetVisible ( GUIEditor_Window[1] ) == true ) then -- نتحقق النافذهـ مفتوحة 
            guiGridListClear( GUIEditor_Grid[1] )  -- نسوي كلير عشان التكرار مايصير 
                for _,player in ipairs ( getElementsByType("player") ) do -- نجيب كل الاعبين 
                local row = guiGridListAddRow(GUIEditor_Grid[1]) -- نسوي رو 
                guiGridListSetItemText(GUIEditor_Grid[1],row,1,getPlayerName(player),false,false) -- نحط الاسم بالقريد 
            end 
        end 
    end 
) 
Link to comment

ما تنفع طريقتك برستيج. ما راح يقدر يختار من القريد لأنه كل شوي ينمسح

لآزم يسوي تحديث مع الأحداث التالية :

onClientPlayerJoin

onClientPlayerQuit

onClientPlayerChangeNick

Link to comment

GUIEditor_Window = {} 
GUIEditor_Grid = {} 
GUIEditor_Window[1] = guiCreateWindow(458,158,572,555,"",false) 
guiSetVisible ( GUIEditor_Window[1], false ) 
guiSetAlpha(GUIEditor_Window[1],1) 
GUIEditor_Grid[1] = guiCreateGridList(13,32,192,514,false,GUIEditor_Window[1]) 
function List() 
if ( guiGetVisible(GUIEditor_Window[1]) == true ) then 
  guiGridListSetSelectionMode(GUIEditor_Grid[1], 2) 
local Column = guiGridListAddColumn(GUIEditor_Grid[1], "Players List...", 0.85); 
for _,player in ipairs(getElementsByType("player")) do 
local row = guiGridListAddRow(GUIEditor_Grid[1]) 
NamePlayer = guiGridListSetItemText(GUIEditor_Grid[1], row, Column, getPlayerName(player), false, false) 
setTimer(List,10000,0) 
       end 
    end 
end 
Link to comment

حلوو شرح جميل ولاكن لما اضغط علي النك مايجي عليه تحديد !!!

ومعليش اعذرني جديد علي القريد ليست

ممكن توضحلي هنا شوي

guiGridListSetItemText(GUIEditor_Grid[1],row,1,getPlayerName(player),false,false) 

وش ذا رقم 1 الي قدام كلمة راو

وليه بل اخير حطيت

false, false ??

و هذا وش فايدته

row = guiGridListAddRow(GUIEditor_Grid[1])

Link to comment

وش دخل الايديت ؟

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

وطلعو اسماء الاعبين

ابي احدد اسم الاعب بـ القريد الي سويته

بس لما اضغط عليه مايجي علي الاسم خط ازرق زي الادمنيه

ليه ؟

Link to comment
ما تنفع طريقتك برستيج. ما راح يقدر يختار من القريد لأنه كل شوي ينمسح

لآزم يسوي تحديث مع الأحداث التالية :

onClientPlayerJoin

onClientPlayerQuit

onClientPlayerChangeNick

Link to comment
سويت كذا وماضبط

:\

GUIEditor_Window = {} 
GUIEditor_Grid = {} 
  
GUIEditor_Window[1] = guiCreateWindow(458,158,572,555,"",false) 
guiSetVisible ( GUIEditor_Window[1], false ) 
guiSetAlpha(GUIEditor_Window[1],1) 
GUIEditor_Grid[1] = guiCreateGridList(13,32,192,514,false,GUIEditor_Window[1]) 
guiGridListSetSelectionMode(GUIEditor_Grid[1],2) 
  
guiGridListAddColumn(GUIEditor_Grid[1],"player      ",0.9) 
  
  
  
  
  
  
changeGridListItemToPlayersName = function ( GridList, Column ) 
    if GridList and Column then  
        if getElementType ( GridList ) == "gui-gridlist" then 
            if guiGridListClear ( GridList ) then  
                for i, v in next, getElementsByType ( "player" ) do  
                    local Row = guiGridListAddRow ( GridList )  
                    guiGridListSetItemText ( GridList, Row, Column, getPlayerName ( v ), false, false );  
                end; 
            end;  
        end;  
    end;  
end; 

==============================

GUIEditor_Window = {} 
GUIEditor_Grid = {} 
  
GUIEditor_Window[1] = guiCreateWindow(458,158,572,555,"",false) 
guiSetVisible ( GUIEditor_Window[1], false ) 
guiSetAlpha(GUIEditor_Window[1],1) 
GUIEditor_Grid[1] = guiCreateGridList(13,32,192,514,false,GUIEditor_Window[1]) 
guiGridListSetSelectionMode(GUIEditor_Grid[1],2) 
 changeGridListItemToPlayersName(GUIEditor_Grid[1],1) 
guiGridListAddColumn(GUIEditor_Grid[1],"player      ",0.9) 
  
  
  
  
  
  
changeGridListItemToPlayersName = function ( GridList, Column ) 
    if GridList and Column then  
        if getElementType ( GridList ) == "gui-gridlist" then 
            if guiGridListClear ( GridList ) then  
                for i, v in next, getElementsByType ( "player" ) do  
                    local Row = guiGridListAddRow ( GridList )  
                    guiGridListSetItemText ( GridList, Row, Column, getPlayerName ( v ), false, false );  
                end; 
            end;  
        end;  
    end;  
end; 

لازم تسوية يتحدث مثلا

يوم يدخل ولا يوم تسوي بايند كي الخ #

Link to comment

الحين انا هذا كودي

GUIEditor_Window = {} 
GUIEditor_Grid = {} 
  
GUIEditor_Window[1] = guiCreateWindow(458,158,572,555,"",false) 
guiSetVisible ( GUIEditor_Window[1], false ) 
guiSetAlpha(GUIEditor_Window[1],1) 
GUIEditor_Grid[1] = guiCreateGridList(13,32,192,514,false,GUIEditor_Window[1]) 
guiGridListSetSelectionMode(GUIEditor_Grid[1],2) 
  
guiGridListAddColumn(GUIEditor_Grid[1],"player      ",0.9) 
  
  
  
  
  
  
    addEventHandler("onClientRender",getRootElement(), 
        function ( ) 
            if ( guiGetVisible ( GUIEditor_Window[1] ) == true ) then -- نتحقق النافذهـ مفتوحة 
                guiGridListClear( GUIEditor_Grid[1] )  -- نسوي كلير عشان التكرار مايصير 
                    for _,player in ipairs ( getElementsByType("player") ) do -- نجيب كل الاعبين 
                    local row = guiGridListAddRow(GUIEditor_Grid[1]) -- نسوي رو 
                    guiGridListSetItemText(GUIEditor_Grid[1],row,1,getPlayerName(player),false,false) -- نحط الاسم بالقريد 
                end 
            end 
        end 
    ) 

يشتغل بس مايمديني احدد اسم الاعب

Link to comment

سويت كذا وخرب ماعاد يجيب اسماء الاعبين

GUIEditor_Window = {} 
GUIEditor_Grid = {} 
  
GUIEditor_Window[1] = guiCreateWindow(458,158,572,555,"",false) 
guiSetVisible ( GUIEditor_Window[1], false ) 
guiSetAlpha(GUIEditor_Window[1],1) 
GUIEditor_Grid[1] = guiCreateGridList(13,32,192,514,false,GUIEditor_Window[1]) 
guiGridListSetSelectionMode(GUIEditor_Grid[1],2) 
  
guiGridListAddColumn(GUIEditor_Grid[1],"player      ",0.9) 
  
  
  
  
  
  
changeGridListItemToPlayersName = function ( GridList, Column ) 
    if GridList and Column then 
        if getElementType ( GridList ) == "gui-gridlist" then 
            if guiGridListClear ( GridList ) then 
                for i, v in next, getElementsByType ( "player" ) do 
                    local Row = guiGridListAddRow ( GridList ) 
                    guiGridListSetItemText ( GridList, Row, Column, getPlayerName ( v ), false, false ); 
                end; 
            end; 
        end; 
    end; 
end; 

Link to comment
GUIEditor_Window = {} 
GUIEditor_Grid = {} 
GUIEditor_Window[1] = guiCreateWindow(458,158,572,555,"",false) 
guiSetVisible ( GUIEditor_Window[1], false ) 
guiSetAlpha(GUIEditor_Window[1],1) 
GUIEditor_Grid[1] = guiCreateGridList(13,32,192,514,false,GUIEditor_Window[1]) 
function List() 
if ( guiGetVisible(GUIEditor_Window[1]) == true ) then 
  guiGridListSetSelectionMode(GUIEditor_Grid[1], 2) 
local Column = guiGridListAddColumn(GUIEditor_Grid[1], "Players List...", 0.85); 
for _,player in ipairs(getElementsByType("player")) do 
local row = guiGridListAddRow(GUIEditor_Grid[1]) 
NamePlayer = guiGridListSetItemText(GUIEditor_Grid[1], row, Column, getPlayerName(player), false, false) 
setTimer(List,10000,0) 
       end 
    end 
end 

ولا طقيت له خبر -_-

Link to comment
سويت كذا وماضبط

:\

GUIEditor_Window = {} 
GUIEditor_Grid = {} 
  
GUIEditor_Window[1] = guiCreateWindow(458,158,572,555,"",false) 
guiSetVisible ( GUIEditor_Window[1], false ) 
guiSetAlpha(GUIEditor_Window[1],1) 
GUIEditor_Grid[1] = guiCreateGridList(13,32,192,514,false,GUIEditor_Window[1]) 
guiGridListSetSelectionMode(GUIEditor_Grid[1],2) 
  
guiGridListAddColumn(GUIEditor_Grid[1],"player      ",0.9) 
  
  
  
  
  
  
changeGridListItemToPlayersName = function ( GridList, Column ) 
    if GridList and Column then  
        if getElementType ( GridList ) == "gui-gridlist" then 
            if guiGridListClear ( GridList ) then  
                for i, v in next, getElementsByType ( "player" ) do  
                    local Row = guiGridListAddRow ( GridList )  
                    guiGridListSetItemText ( GridList, Row, Column, getPlayerName ( v ), false, false );  
                end; 
            end;  
        end;  
    end;  
end; 

==============================

GUIEditor_Window = {} 
GUIEditor_Grid = {} 
  
GUIEditor_Window[1] = guiCreateWindow(458,158,572,555,"",false) 
guiSetVisible ( GUIEditor_Window[1], false ) 
guiSetAlpha(GUIEditor_Window[1],1) 
GUIEditor_Grid[1] = guiCreateGridList(13,32,192,514,false,GUIEditor_Window[1]) 
guiGridListSetSelectionMode(GUIEditor_Grid[1],2) 
 changeGridListItemToPlayersName(GUIEditor_Grid[1],1) 
guiGridListAddColumn(GUIEditor_Grid[1],"player      ",0.9) 
  
  
  
  
  
  
changeGridListItemToPlayersName = function ( GridList, Column ) 
    if GridList and Column then  
        if getElementType ( GridList ) == "gui-gridlist" then 
            if guiGridListClear ( GridList ) then  
                for i, v in next, getElementsByType ( "player" ) do  
                    local Row = guiGridListAddRow ( GridList )  
                    guiGridListSetItemText ( GridList, Row, Column, getPlayerName ( v ), false, false );  
                end; 
            end;  
        end;  
    end;  
end; 

لازم تسوية يتحدث مثلا

يوم يدخل ولا يوم تسوي بايند كي الخ #

Link to comment

حول كود المود لـ UTF-8

GUIEditor_Window = {} 
GUIEditor_Grid = {} 
  
 changeGridListItemToPlayersName = function ( GridList, Column ) 
    if GridList and Column then -- Check Parematers 
        if getElementType ( GridList ) == "gui-gridlist" then -- Check The Type of ' GridList ' 
            if guiGridListClear ( GridList ) then 
                for i, v in next, getElementsByType ( "player" ) do -- Get Everything by Type ' player '  
                    guiGridListSetItemText ( GridList, guiGridListAddRow ( GridList ), Column, getPlayerName ( v ), false, false ); 
                end; 
            end; 
        end; 
    end; 
end; 
  
GUIEditor_Window[1] = guiCreateWindow(458,158,572,555,"",false) 
guiSetVisible( GUIEditor_Window[1],true ) 
guiSetAlpha(GUIEditor_Window[1],1) 
GUIEditor_Grid[1] = guiCreateGridList(13,32,192,514,false,GUIEditor_Window[1]) 
guiGridListSetSelectionMode(GUIEditor_Grid[1],2) 
guiGridListAddColumn(GUIEditor_Grid[1],"player      ",0.9) 
changeGridListItemToPlayersName(GUIEditor_Grid[1],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...