Plate Posted July 20, 2012 Share Posted July 20, 2012 hola como se podria hacer para que en este script aparesca el nombre del player que lo agrego al team y el nombre del que fue agregado ? addEvent("grupos",true) function grupos(player, groupname) local account = getPlayerAccount(player) if ( not isGuestAccount ( account ) ) then local group = aclGetGroup ( groupname ) if ( group ) then local isInACLGroup = isObjectInACLGroup ( "user." .. getAccountName ( account ), group) if ( not isInACLGroup ) then aclGroupAddObject ( group, "user."..getAccountName ( account ) ) local pname = getPlayerName(player) setPlayerTeam ( player, USS ) outputChatBox(tostring(pname) .." has added '".. getPlayerName(player .."' to " .. groupname .. ".", getRootElement(), 0, 255 ,255 ) elseif ( isInACLGroup ) then aclGroupRemoveObject ( group, "user."..getAccountName ( account ) ) local pname2 = getPlayerName(player) outputChatBox (tostring(pname2) .." has removed " ..getPlayerName(player).. " from " .. groupname .. ".", getRootElement(), 0, 255 ,255 ) setPlayerTeam(player, nil) end else outputChatBox ( "El " .. groupname .. " No existe.", source, 255, 0 ,0 ) end else outputChatBox ( "El jugador no esta logeado.", source, 255, 100 ,100 ) end end addEventHandler("grupos", getRootElement(), grupos) Link to comment
Castillo Posted July 20, 2012 Share Posted July 20, 2012 outputChatBox(tostring(pname) .." has added '".. getPlayerName(player .."' to " .. groupname .. ".", getRootElement(), 0, 255 ,255 ) Te falta un parentesis en getPlayerName, ademas podrias usar directamente "pname", ya que la definiste anteriormente. Link to comment
Plate Posted July 21, 2012 Author Share Posted July 21, 2012 Alguien me puede contestar porfaaaa Link to comment
Plate Posted July 21, 2012 Author Share Posted July 21, 2012 sisi pero no hace lo que yo quiero que haga por que cuando alguien agrega a el otro un ejemplo yo agrego a EL_X enves de Plate agrego a EL_X a S.T.A.R.S aparece EL_X agrego a EL_X a S.T.A.R.S Link to comment
Recommended Posts