Jump to content

Copiar Texto


Recommended Posts

Assim?
 

addCommandHandler( "clipboard", -- add a command handler for the command
   function( command, ... )
      local text = table.concat({...}, " ") -- if the text has spaces this will turn it into a string
      local success = setClipboard( text ) -- set the clipboard and find out if it worked
      if success then
         outputChatBox( "Clipboard text set to: " .. text, 0, 255, 0 ) -- if it did, tell the player
      else
         outputChatBox( "Failed to set the clipboards text", 255, 0, 0 ) -- if it didn't, tell the player
      end
   end
)

Peguei da Wiki MTA

Tentei e não foi

 

A Meta é assim?
<meta>
    <script src="discord.Lua" type="server"/>
</meta>

 

@DNL291

Link to comment

Tenta isto:

addCommandHandler( "dc", -- add a command handler for the command
   function( )
      local success = setClipboard( "https://discord.gg/y5uZFhw" ) -- set the clipboard and find out if it worked
      if success then
         outputChatBox( "O link do discord foi copiado para o clipboard", 0, 255, 0 ) -- if it did, tell the player
      end
   end
)

 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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