Jump to content

Script help, please


manve1

Recommended Posts

I need help for my script, i know i done the tonumber bit, but i don't know how to make that i get the text from table, i tried using guiGridListGetItemText, but didn't work.

hWnd_Commands = guiCreateWindow( 0.2, 0.2, 0.6, 0.6, "Admin Commands", true ) 
  
hGrid_Admin = guiCreateGridList( 0.1, 0.1, 0.8, 0.6, true, hWnd_Commands ) 
  
local hGrid_Row_Admin = nil; 
  
hColumn_Admin1 = guiGridListAddColumn( hGrid_Admin, "Command", 0.4 ) 
hColumn_Admin2 = guiGridListAddColumn( hGrid_Admin, "Effect", 0.4 ) 
hColumn_Admin3 = guiGridListAddColumn( hGrid_Admin, "Additional Info", 0.4 ) 
  
local hAdmin_Commands = 
{ 
    'kill "name"';  
} 
  
for v in next, hAdmin_Commands do 
    local hGrid_Row_Admin1 = guiGridListAddRow(hGrid_Admin) 
    guiGridListSetItemText(hGrid_Admin, hGrid_Row_Admin1, hColumn_Admin1, tonumber(v), false, false) 
end 

Link to comment
hWnd_Commands = guiCreateWindow( 0.2, 0.2, 0.6, 0.6, "Admin Commands", true ) 
hGrid_Admin = guiCreateGridList( 0.1, 0.1, 0.8, 0.6, true, hWnd_Commands ) 
  
local hGrid_Row_Admin = nil; 
  
hColumn_Admin1 = guiGridListAddColumn( hGrid_Admin, "Command", 0.4 ) 
hColumn_Admin2 = guiGridListAddColumn( hGrid_Admin, "Effect", 0.4 ) 
hColumn_Admin3 = guiGridListAddColumn( hGrid_Admin, "Additional Info", 0.4 ) 
  
local hAdmin_Commands = 
{ 
    'kill "name"'; 
} 
  
for _, cmd in ipairs ( hAdmin_Commands ) do 
    local hGrid_Row_Admin1 = guiGridListAddRow(hGrid_Admin) 
    guiGridListSetItemText(hGrid_Admin, hGrid_Row_Admin1, hColumn_Admin1, cmd, 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...