Jump to content

Problema con Spectate


Alexs

Recommended Posts

Hola a Todos, este Script es el que Soren usara en el Paintball:

  
grid = guiCreateGridList(0.8425,0.321111111,0.156875,0.536666667,true) 
columna = guiGridListAddColumn(grid,"Alive Players",1) 
  
function isPlayerAlive ( thePlayer ) return ( getElementHealth ( getLocalPlayer() ) >= 0 ) end 
  
function getAlivePlayersInTeam (  ) 
 local alivePlayers = { } 
for index, player in ipairs ( getPlayersInTeam ( getPlayerTeam( localPlayer ) ) ) do 
  if ( isPlayerAlive ( player ) ) then 
             table.insert ( alivePlayers, player ) 
  end 
 end 
end 
  

Intentamos con eso para meterlos a un GUI con esto:

          local item = guiGridListAddRow ( grid ) 
                 guiGridListSetItemText ( grid, item, columna, getPlayerName (unpack( alivePlayers )), false, false ) 

Pero no funciona, alguna idea? :?

Link to comment
function getAlivePlayersInTeam (  ) 
 local alivePlayers = { } 
for index, player in ipairs ( getPlayersInTeam ( getPlayerTeam( localPlayer ) ) ) do 
  if ( isPlayerAlive ( player ) ) then 
item = guiGridListAddRow ( grid ) 
guiGridListSetItemText ( grid, item, columna, getPlayerName (player), false, false ) 
  end 
 end 
end 
  

Que tal asi?

Link to comment
  • Recently Browsing   0 members

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