Jump to content

Tema pasado ["2"]


Plate

Recommended Posts

Hola necesito ayuda coon esto no me funciona ( es sobre agregar players a los teams)

function teamsa ( thePlayer, playerName ) 
    local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) 
        local pname = getPlayerFromName ( playerName ) 
        local teams = getTeamFromName ( 'Umbrella') 
    if isObjectInACLGroup ("user.".. accName, aclGetGroup ( "LiderUmbrella" ) ) and (pname) and ( teams ) then 
            setPlayerTeam(playerName, teams) 
           end 
        end 
addCommandHandler ( "quitarumbrella", teamsa ) 

que esta mal?

lo que pasa es que no agrega a los players al team con el comando /agregarumbrella

Link to comment

El segundo argumento de addCommandHandler server side es el nombre del comando.

function teamsa ( thePlayer, cmd, playerName ) 
    local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) 
    local player = getPlayerFromName ( playerName ) 
    local teams = getTeamFromName ( 'Umbrella') 
    if isObjectInACLGroup ("user.".. accName, aclGetGroup ( "LiderUmbrella" ) ) and ( player ) and ( teams ) then 
        setPlayerTeam ( player, teams ) 
    end 
end 
addCommandHandler ( "quitarumbrella", teamsa ) 

Link to comment
  • Recently Browsing   0 members

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