Jump to content

Problema con Spectate


Alexs

Recommended Posts

Posted

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? :?

Developer @ MYVAL

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

Eso no tiene el menor sentido.

Mira el ejemplo aca:

https://wiki.multitheftauto.com/wiki/GuiGridListAddRow

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

Simplemente aprende del ejemplo de la wiki.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted
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?

Developer @ MYVAL

Posted

Ahi deberia funcionar.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

  • Recently Browsing   0 members

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