Jump to content

مشكله بكود الاعب


Recommended Posts

السلام عليكم

كود الى يجي اسم الاعب مايشتغل

ليش !

grid = guiCreateGridList ( 5,3,193,416, false, GUIEditor_Window[1] ) -- Create Gridlist 
col = guiGridListAddColumn ( grid, "Players", 0.9 ) -- Create Column 
  
 changeGridListItemToPlayersName = function ( grid, col ) 
        if grid and col then 
             if getElementType ( grid ) == "gui-gridlist" then 
               if guiGridListClear ( grid ) then 
                  for i, v in next, getElementsByType ( "player" ) do 
                        local Row = guiGridListAddRow ( grid ) 
                        guiGridListSetItemText ( grid, Row, col, getPlayerName ( v ), false, false ) 
                    end 
                 end 
              end 
           end 
        end 

Link to comment
  • Replies 94
  • Created
  • Last Reply

Top Posters In This Topic

GUIEditor_Window = {} 
GUIEditor_TabPanel = {} 
GUIEditor_Tab = {} 
GUIEditor_Button = {} 
GUIEditor_Label = {} 
GUIEditor_Grid = {} 
  
GUIEditor_Window[1] = guiCreateWindow(243,67,334,468,"Admin Panel   -   v 1.0",false) 
GUIEditor_TabPanel[1] = guiCreateTabPanel(9,22,313,432,false,GUIEditor_Window[1]) 
GUIEditor_Tab[1] = guiCreateTab("Player",GUIEditor_TabPanel[1]) 
GUIEditor_Grid[1] = guiCreateGridList(5,30,167,369,false,GUIEditor_Tab[1]) 
guiGridListSetSelectionMode(GUIEditor_Grid[1],2) 
  
guiGridListAddColumn(GUIEditor_Grid[1],"Players                                                            ",0.2) 
  
for i = 1, 13 do 
    guiGridListAddRow(GUIEditor_Grid[1]) 
end 
GUIEditor_Button[1] = guiCreateButton(277,8,28,16,"X",false,GUIEditor_Tab[1]) 
GUIEditor_Button[2] = guiCreateButton(197,66,91,22,"Fix",false,GUIEditor_Tab[1]) 
guiSetFont(GUIEditor_Button[2],"default-bold-small") 
GUIEditor_Button[3] = guiCreateButton(198,106,91,22,"Heal Players",false,GUIEditor_Tab[1]) 
guiSetFont(GUIEditor_Button[3],"default-bold-small") 
GUIEditor_Button[4] = guiCreateButton(198,145,91,22,"Heal",false,GUIEditor_Tab[1]) 
guiSetFont(GUIEditor_Button[4],"default-bold-small") 
GUIEditor_Button[5] = guiCreateButton(198,187,91,22,"Kick",false,GUIEditor_Tab[1]) 
guiSetFont(GUIEditor_Button[5],"default-bold-small") 
GUIEditor_Button[6] = guiCreateButton(199,227,91,22,"ban 1 hour",false,GUIEditor_Tab[1]) 
guiSetFont(GUIEditor_Button[6],"default-bold-small") 
GUIEditor_Button[7] = guiCreateButton(199,266,91,22,"Mute",false,GUIEditor_Tab[1]) 
guiSetFont(GUIEditor_Button[7],"default-bold-small") 
GUIEditor_Button[8] = guiCreateButton(199,303,91,22,"Armour",false,GUIEditor_Tab[1]) 
guiSetFont(GUIEditor_Button[8],"default-bold-small") 
GUIEditor_Button[9] = guiCreateButton(199,341,91,22,"remove",false,GUIEditor_Tab[1]) 
guiSetFont(GUIEditor_Button[9],"default-bold-small") 
GUIEditor_Button[10] = guiCreateButton(200,377,91,22,"Add",false,GUIEditor_Tab[1]) 
guiSetFont(GUIEditor_Button[10],"default-bold-small") 
GUIEditor_Label[1] = guiCreateLabel(177,35,129,20,"IP :",false,GUIEditor_Tab[1]) 
guiSetFont(GUIEditor_Label[1],"default-bold-small") 
GUIEditor_Tab[2] = guiCreateTab("About",GUIEditor_TabPanel[1]) 
  
---- 
bindKey ( "F2" , "down" , function() 
 if ( guiGetVisible ( GUIEditor_Window[1] ) == true ) then 
 guiSetVisible ( GUIEditor_Window[1] ,false ) 
 showCursor (false ) 
 guiSetInputEnabled(false) 
 elseif ( guiGetVisible ( GUIEditor_Window[1] ) == false ) then 
 guiSetVisible ( GUIEditor_Window[1] ,true ) 
 showCursor (false ) 
 guiSetInputEnabled(true) 
 playSound("open.wav") 
 end 
 end 
 ) 
------ 
grid = guiCreateGridList ( 5,30,167,369, false, GUIEditor_Window[1] ) -- Create Gridlist 
col = guiGridListAddColumn ( grid, "Players", 0.9 ) -- Create Column 
  
 changeGridListItemToPlayersName = function ( grid, col ) 
        if grid and col then 
             if getElementType ( grid ) == "gui-gridlist" then 
               if guiGridListClear ( grid ) then 
                  for i, v in next, getElementsByType ( "player" ) do 
                        local Row = guiGridListAddRow ( grid ) 
                        guiGridListSetItemText ( grid, Row, col, getPlayerName ( v ), false, false ) 
                    end 
                 end 
              end 
           end 
        end 
      

Link to comment

كذا)

grid = guiCreateGridList ( 5,30,167,369, false, GUIEditor_Window[1] ) -- Create Gridlist 
col = guiGridListAddColumn ( grid, "Players", 0.9 ) -- Create Column 
  
 changeGridListItemToPlayersName = function ( grid, col ) 
        if grid and col then 
             if getElementType ( grid ) == "gui-gridlist" then 
               if guiGridListClear ( grid ) then 
                  for i, v in next, getElementsByType ( "player" ) do 
                        local Row = guiGridListAddRow ( grid ) 
                        guiGridListSetItemText ( grid, Row, col, getPlayerName ( v ), false, false ) 
                    end 
                 end 
              end 
           end 
        end 
changeGridListItemToPlayersName ( grid, col ) 
      

Link to comment
 changeGridListItemToPlayersName = function ( grid, col ) 
        if grid and col then 
             if getElementType ( grid ) == "gui-gridlist" then 
               if guiGridListClear ( grid ) then 
                  for i, v in next, getElementsByType ( "player" ) do 
                        local Row = guiGridListAddRow ( grid ) 
                        guiGridListSetItemText ( grid, Row, col, getPlayerName ( v ), false, false ) 
                    end 
                 end 
              end 
           end 
        end 
  
grid = guiCreateGridList ( 5,30,167,369, false, GUIEditor_Window[1] ) -- Create Gridlist 
col = guiGridListAddColumn ( grid, "Players", 0.9 ) -- Create Column 
 changeGridListItemToPlayersName ( grid, col ) 
  
  
  
      

اذا ماضبط اطرح كامل الكود #

Link to comment

جرب ذا

GUIEditor_Window = {} 
GUIEditor_TabPanel = {} 
GUIEditor_Tab = {} 
GUIEditor_Button = {} 
GUIEditor_Label = {} 
GUIEditor_Grid = {} 
  
 changeGridListItemToPlayersName = function ( grid, col ) 
        if grid and col then 
             if getElementType ( grid ) == "gui-gridlist" then 
               if guiGridListClear ( grid ) then 
                  for i, v in next, getElementsByType ( "player" ) do 
                        local Row = guiGridListAddRow ( grid ) 
                        guiGridListSetItemText ( grid, Row, col, getPlayerName ( v ), false, false ) 
                    end 
                 end 
              end 
           end 
        end 
  
GUIEditor_Window[1] = guiCreateWindow(243,67,334,468,"Admin Panel   -   v 1.0",false) 
GUIEditor_TabPanel[1] = guiCreateTabPanel(9,22,313,432,false,GUIEditor_Window[1]) 
GUIEditor_Tab[1] = guiCreateTab("Player",GUIEditor_TabPanel[1]) 
GUIEditor_Grid[1] = guiCreateGridList(5,30,167,369,false,GUIEditor_Tab[1]) 
guiGridListSetSelectionMode(GUIEditor_Grid[1],2) 
  
column = guiGridListAddColumn(GUIEditor_Grid[1],"Players                                                            ",0.2) 
  
GUIEditor_Button[1] = guiCreateButton(277,8,28,16,"X",false,GUIEditor_Tab[1]) 
GUIEditor_Button[2] = guiCreateButton(197,66,91,22,"Fix",false,GUIEditor_Tab[1]) 
guiSetFont(GUIEditor_Button[2],"default-bold-small") 
GUIEditor_Button[3] = guiCreateButton(198,106,91,22,"Heal Players",false,GUIEditor_Tab[1]) 
guiSetFont(GUIEditor_Button[3],"default-bold-small") 
GUIEditor_Button[4] = guiCreateButton(198,145,91,22,"Heal",false,GUIEditor_Tab[1]) 
guiSetFont(GUIEditor_Button[4],"default-bold-small") 
GUIEditor_Button[5] = guiCreateButton(198,187,91,22,"Kick",false,GUIEditor_Tab[1]) 
guiSetFont(GUIEditor_Button[5],"default-bold-small") 
GUIEditor_Button[6] = guiCreateButton(199,227,91,22,"ban 1 hour",false,GUIEditor_Tab[1]) 
guiSetFont(GUIEditor_Button[6],"default-bold-small") 
GUIEditor_Button[7] = guiCreateButton(199,266,91,22,"Mute",false,GUIEditor_Tab[1]) 
guiSetFont(GUIEditor_Button[7],"default-bold-small") 
GUIEditor_Button[8] = guiCreateButton(199,303,91,22,"Armour",false,GUIEditor_Tab[1]) 
guiSetFont(GUIEditor_Button[8],"default-bold-small") 
GUIEditor_Button[9] = guiCreateButton(199,341,91,22,"remove",false,GUIEditor_Tab[1]) 
guiSetFont(GUIEditor_Button[9],"default-bold-small") 
GUIEditor_Button[10] = guiCreateButton(200,377,91,22,"Add",false,GUIEditor_Tab[1]) 
guiSetFont(GUIEditor_Button[10],"default-bold-small") 
GUIEditor_Label[1] = guiCreateLabel(177,35,129,20,"IP :",false,GUIEditor_Tab[1]) 
guiSetFont(GUIEditor_Label[1],"default-bold-small") 
GUIEditor_Tab[2] = guiCreateTab("About",GUIEditor_TabPanel[1]) 
 function nameplayers() 
changeGridListItemToPlayersName(GUIEditor_Grid[1],column) 
end 
addEventHandler ( "onClientPlayerChangeNick",root,nameplayers) 
addEventHandler ( "onClientPlayerJoin",root,nameplayers) 
addEventHandler ( "onClientPlayerQuit",root,nameplayers) 
---- 
bindKey ( "F2" , "down" , function() 
 if ( guiGetVisible ( GUIEditor_Window[1] ) == true ) then 
 guiSetVisible ( GUIEditor_Window[1] ,false ) 
 showCursor (false ) 
 guiSetInputEnabled(false) 
 elseif ( guiGetVisible ( GUIEditor_Window[1] ) == false ) then 
 guiSetVisible ( GUIEditor_Window[1] ,true ) 
 showCursor (false ) 
 guiSetInputEnabled(true) 
 playSound("open.wav") 
 end 
 end 
 ) 

Link to comment

 changeGridListItemToPlayersName = function ( grid, col ) 
        if grid and col then 
             if getElementType ( grid ) == "gui-gridlist" then 
               if guiGridListClear ( grid ) then 
                  for i, v in next, getElementsByType ( "player" ) do 
                        local Row = guiGridListAddRow ( grid ) 
                        guiGridListSetItemText ( grid, Row, col, getPlayerName ( v ), false, false ) 
                    end 
                 end 
              end 
           end 
        end 
  
GUIEditor_Window = {} 
GUIEditor_TabPanel = {} 
GUIEditor_Tab = {} 
GUIEditor_Button = {} 
GUIEditor_Label = {} 
GUIEditor_Grid = {} 
  
GUIEditor_Window[1] = guiCreateWindow(243,67,334,468,"Admin Panel   -   v 1.0",false) 
guiSetVisible(GUIEditor_Window[1],false) 
GUIEditor_TabPanel[1] = guiCreateTabPanel(9,22,313,432,false,GUIEditor_Window[1]) 
GUIEditor_Tab[1] = guiCreateTab("Player",GUIEditor_TabPanel[1]) 
GUIEditor_Grid[1] = guiCreateGridList(5,30,167,369,false,GUIEditor_Tab[1]) 
guiGridListSetSelectionMode(GUIEditor_Grid[1],2) 
guiGridListAddColumn(GUIEditor_Grid[1],"Players",0.-- s8) -->                                                     
GUIEditor_Button[1] = guiCreateButton(277,8,28,16,"X",false,GUIEditor_Tab[1]) 
GUIEditor_Button[2] = guiCreateButton(197,66,91,22,"Fix",false,GUIEditor_Tab[1]) 
guiSetFont(GUIEditor_Button[2],"default-bold-small") 
GUIEditor_Button[3] = guiCreateButton(198,106,91,22,"Heal Players",false,GUIEditor_Tab[1]) 
guiSetFont(GUIEditor_Button[3],"default-bold-small") 
GUIEditor_Button[4] = guiCreateButton(198,145,91,22,"Heal",false,GUIEditor_Tab[1]) 
guiSetFont(GUIEditor_Button[4],"default-bold-small") 
GUIEditor_Button[5] = guiCreateButton(198,187,91,22,"Kick",false,GUIEditor_Tab[1]) 
guiSetFont(GUIEditor_Button[5],"default-bold-small") 
GUIEditor_Button[6] = guiCreateButton(199,227,91,22,"ban 1 hour",false,GUIEditor_Tab[1]) 
guiSetFont(GUIEditor_Button[6],"default-bold-small") 
GUIEditor_Button[7] = guiCreateButton(199,266,91,22,"Mute",false,GUIEditor_Tab[1]) 
guiSetFont(GUIEditor_Button[7],"default-bold-small") 
GUIEditor_Button[8] = guiCreateButton(199,303,91,22,"Armour",false,GUIEditor_Tab[1]) 
guiSetFont(GUIEditor_Button[8],"default-bold-small") 
GUIEditor_Button[9] = guiCreateButton(199,341,91,22,"remove",false,GUIEditor_Tab[1]) 
guiSetFont(GUIEditor_Button[9],"default-bold-small") 
GUIEditor_Button[10] = guiCreateButton(200,377,91,22,"Add",false,GUIEditor_Tab[1]) 
guiSetFont(GUIEditor_Button[10],"default-bold-small") 
GUIEditor_Label[1] = guiCreateLabel(177,35,129,20,"IP :",false,GUIEditor_Tab[1]) 
guiSetFont(GUIEditor_Label[1],"default-bold-small") 
GUIEditor_Tab[2] = guiCreateTab("About",GUIEditor_TabPanel[1]) 
  
  
bindKey ( "F2" , "down" ,  
function() 
    guiSetVisible(GUIEditor_Window[1],not guiGetVisible(GUIEditor_Window[1])) 
    showCursor(guiGetVisible(GUIEditor_Window[1])) 
        if ( guiGetVisible(GUIEditor_Window[1]) == true ) then 
            playSound("open.wav") 
            changeGridListItemToPlayersName(GUIEditor_Grid[1],1) 
        end 
    end 
) 
Link to comment
 changeGridListItemToPlayersName = function ( grid, col ) 
        if grid and col then 
             if getElementType ( grid ) == "gui-gridlist" then 
               if guiGridListClear ( grid ) then 
                  for i, v in next, getElementsByType ( "player" ) do 
                        local Row = guiGridListAddRow ( grid ) 
                        guiGridListSetItemText ( grid, Row, col, getPlayerName ( v ), false, false ) 
                    end 
                 end 
              end 
           end 
        end 
  
GUIEditor_Window = {} 
GUIEditor_TabPanel = {} 
GUIEditor_Tab = {} 
GUIEditor_Button = {} 
GUIEditor_Label = {} 
GUIEditor_Grid = {} 
  
GUIEditor_Window[1] = guiCreateWindow(243,67,334,468,"Admin Panel   -   v 1.0",false) 
guiSetVisible(GUIEditor_Window[1],false) 
GUIEditor_TabPanel[1] = guiCreateTabPanel(9,22,313,432,false,GUIEditor_Window[1]) 
GUIEditor_Tab[1] = guiCreateTab("Player",GUIEditor_TabPanel[1]) 
GUIEditor_Grid[1] = guiCreateGridList(5,30,167,369,false,GUIEditor_Tab[1]) 
guiGridListSetSelectionMode(GUIEditor_Grid[1],2) 
guiGridListAddColumn(GUIEditor_Grid[1],"Players",0.-- s8) -->                                                     
GUIEditor_Button[1] = guiCreateButton(277,8,28,16,"X",false,GUIEditor_Tab[1]) 
GUIEditor_Button[2] = guiCreateButton(197,66,91,22,"Fix",false,GUIEditor_Tab[1]) 
guiSetFont(GUIEditor_Button[2],"default-bold-small") 
GUIEditor_Button[3] = guiCreateButton(198,106,91,22,"Heal Players",false,GUIEditor_Tab[1]) 
guiSetFont(GUIEditor_Button[3],"default-bold-small") 
GUIEditor_Button[4] = guiCreateButton(198,145,91,22,"Heal",false,GUIEditor_Tab[1]) 
guiSetFont(GUIEditor_Button[4],"default-bold-small") 
GUIEditor_Button[5] = guiCreateButton(198,187,91,22,"Kick",false,GUIEditor_Tab[1]) 
guiSetFont(GUIEditor_Button[5],"default-bold-small") 
GUIEditor_Button[6] = guiCreateButton(199,227,91,22,"ban 1 hour",false,GUIEditor_Tab[1]) 
guiSetFont(GUIEditor_Button[6],"default-bold-small") 
GUIEditor_Button[7] = guiCreateButton(199,266,91,22,"Mute",false,GUIEditor_Tab[1]) 
guiSetFont(GUIEditor_Button[7],"default-bold-small") 
GUIEditor_Button[8] = guiCreateButton(199,303,91,22,"Armour",false,GUIEditor_Tab[1]) 
guiSetFont(GUIEditor_Button[8],"default-bold-small") 
GUIEditor_Button[9] = guiCreateButton(199,341,91,22,"remove",false,GUIEditor_Tab[1]) 
guiSetFont(GUIEditor_Button[9],"default-bold-small") 
GUIEditor_Button[10] = guiCreateButton(200,377,91,22,"Add",false,GUIEditor_Tab[1]) 
guiSetFont(GUIEditor_Button[10],"default-bold-small") 
GUIEditor_Label[1] = guiCreateLabel(177,35,129,20,"IP :",false,GUIEditor_Tab[1]) 
guiSetFont(GUIEditor_Label[1],"default-bold-small") 
GUIEditor_Tab[2] = guiCreateTab("About",GUIEditor_TabPanel[1]) 
  
  
bindKey ( "F2" , "down" ,  
function() 
    guiSetVisible(GUIEditor_Window[1],not guiGetVisible(GUIEditor_Window[1])) 
    showCursor(guiGetVisible(GUIEditor_Window[1])) 
        if ( guiGetVisible(GUIEditor_Window[1]) == true ) then 
            playSound("open.wav") 
            changeGridListItemToPlayersName(GUIEditor_Grid[1],1) 
        end 
    end 
) 
changeGridListItemToPlayersName = function ( grid, col ) 
        if grid and col then 
             if getElementType ( grid ) == "gui-gridlist" then 
               if guiGridListClear ( grid ) then 
                  for i, v in next, getElementsByType ( "player" ) do 
                        local Row = guiGridListAddRow ( grid ) 
                        guiGridListSetItemText ( grid, Row, col, getPlayerName ( v ), false, false ) 
                    end 
                 end 
              end 
           end 
        end 
  
GUIEditor_Window = {} 
GUIEditor_TabPanel = {} 
GUIEditor_Tab = {} 
GUIEditor_Button = {} 
GUIEditor_Label = {} 
GUIEditor_Grid = {} 
  
GUIEditor_Window[1] = guiCreateWindow(243,67,334,468,"Admin Panel   -   v 1.0",false) 
guiSetVisible(GUIEditor_Window[1],false) 
GUIEditor_TabPanel[1] = guiCreateTabPanel(9,22,313,432,false,GUIEditor_Window[1]) 
GUIEditor_Tab[1] = guiCreateTab("Player",GUIEditor_TabPanel[1]) 
GUIEditor_Grid[1] = guiCreateGridList(5,30,167,369,false,GUIEditor_Tab[1]) 
guiGridListSetSelectionMode(GUIEditor_Grid[1],2) 
guiGridListAddColumn(GUIEditor_Grid[1],"Players",0.-- s8) --> -->                                                     
GUIEditor_Button[1] = guiCreateButton(277,8,28,16,"X",false,GUIEditor_Tab[1]) 
GUIEditor_Button[2] = guiCreateButton(197,66,91,22,"Fix",false,GUIEditor_Tab[1]) 
guiSetFont(GUIEditor_Button[2],"default-bold-small") 
GUIEditor_Button[3] = guiCreateButton(198,106,91,22,"Heal Players",false,GUIEditor_Tab[1]) 
guiSetFont(GUIEditor_Button[3],"default-bold-small") 
GUIEditor_Button[4] = guiCreateButton(198,145,91,22,"Heal",false,GUIEditor_Tab[1]) 
guiSetFont(GUIEditor_Button[4],"default-bold-small") 
GUIEditor_Button[5] = guiCreateButton(198,187,91,22,"Kick",false,GUIEditor_Tab[1]) 
guiSetFont(GUIEditor_Button[5],"default-bold-small") 
GUIEditor_Button[6] = guiCreateButton(199,227,91,22,"ban 1 hour",false,GUIEditor_Tab[1]) 
guiSetFont(GUIEditor_Button[6],"default-bold-small") 
GUIEditor_Button[7] = guiCreateButton(199,266,91,22,"Mute",false,GUIEditor_Tab[1]) 
guiSetFont(GUIEditor_Button[7],"default-bold-small") 
GUIEditor_Button[8] = guiCreateButton(199,303,91,22,"Armour",false,GUIEditor_Tab[1]) 
guiSetFont(GUIEditor_Button[8],"default-bold-small") 
GUIEditor_Button[9] = guiCreateButton(199,341,91,22,"remove",false,GUIEditor_Tab[1]) 
guiSetFont(GUIEditor_Button[9],"default-bold-small") 
GUIEditor_Button[10] = guiCreateButton(200,377,91,22,"Add",false,GUIEditor_Tab[1]) 
guiSetFont(GUIEditor_Button[10],"default-bold-small") 
GUIEditor_Label[1] = guiCreateLabel(177,35,129,20,"IP :",false,GUIEditor_Tab[1]) 
guiSetFont(GUIEditor_Label[1],"default-bold-small") 
GUIEditor_Tab[2] = guiCreateTab("About",GUIEditor_TabPanel[1]) 
  
  
bindKey ( "F2" , "down" , 
function() 
    guiSetVisible(GUIEditor_Window[1],not guiGetVisible(GUIEditor_Window[1])) 
    showCursor(guiGetVisible(GUIEditor_Window[1])) 
        if ( guiGetVisible(GUIEditor_Window[1]) == true ) then 
            playSound("open.wav") 
            changeGridListItemToPlayersName(GUIEditor_Grid[1],1) 
        end 
    end 
) 

Link to comment
ابي لما ادق عليه مثلا زر الكيك

مايجيني السبب ولا شي

ع طول كيك

والباند على باند ساعه

والميوت دقيقه

يعني لما احدد على اسم الاعب وادق كيك على طول ياخذ كيك

setPlayerMuted 
kickPlayer 
banPlayer 
"onClientGUIClick" 
triggerServerEvent 

Link to comment
ممكن الاكواد جاهزه
by 3NAD on Mon Apr 15, 2013 8:08 pm

في حآل قام عضو بـ طلب كود ..

لآ يسمح لأي عضو بـ طرح الوظائف جاهزة إلا بعد محاولة صاحب الطلب أو عجزه عن صناعة الوظيفة

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...