Plate Posted June 19, 2012 Share Posted June 19, 2012 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
Castillo Posted June 19, 2012 Share Posted June 19, 2012 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
Recommended Posts