Jump to content

getPlayersInTeam


Plate

Recommended Posts

Posted

Hola tengo una duda esto esta bien?

function showmembers() 
local row = guiGridListAddRow(members) 
   local row, col = guiGridListGetSelectedItem ( members ) 
    if ( row and col and row ~= -1 and col ~= -1 ) then 
        local team = guiGridListGetItemText ( members, row, mlist ) 
guiGridListSetItemText(members, row, mlist, getPlayersInTeam(team), false, false) 
end 
end 
addEventHandler("onClientGUIClick", showlist, showmembers, false) 

Posted

Te lo dijo todo al reves, "team" en tu script es un string, supongo que el nombre de un team, lo que tenes que hacer es obtener el elemento del team usando: getTeamFromName

Luego en guiGridListSetItemText, estas poniendo una tabla como texto, no creo que quieras hacer eso.

Posted
function showmembers() 
   local row, col = guiGridListGetSelectedItem ( clist ) 
    if ( row and col and row ~= -1 and col ~= -1 ) then 
    local team = guiGridListGetItemText ( clist, row, columnC ) 
    for i, v in ipairs (getPlayersInTeam(getTeamFromName(team))) do 
    local row = guiGridListAddRow(members) 
    guiGridListSetItemText(members, row, mlist, getPlayerName(v), false, false) 
end 
end 
addEventHandler("onClientGUIClick", showlist, showmembers, false) 

Posted
Como lo puedo hacer un string Renkon

Quise decir que el team que pide la funcion tiene que ser un elemento TEAM no un strnig.

Me explique mal

Posted
Nop me dice

expected string at argument 4 got table

En esta linea?

guiGridListSetItemText(members, row, mlist, getPlayerName(v), false, false) 

Es impossible, porque getPlayerName devuelve un string.

  • Recently Browsing   0 members

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