FlavioDFG Posted November 13, 2019 Share Posted November 13, 2019 Olá gostaria de saber como faz um script ou algum comando para qnd alguem der /dc um texto seja copiado e depois é so dar Ctrl +V no google para entrar no discord https://discord.gg/y5uZFhw Link to comment
DNL291 Posted November 13, 2019 Share Posted November 13, 2019 setClipboard @FlavioDFG Link to comment
FlavioDFG Posted November 13, 2019 Author Share Posted November 13, 2019 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
DNL291 Posted November 13, 2019 Share Posted November 13, 2019 Mude o script para client no meta.xml. Link to comment
FlavioDFG Posted November 13, 2019 Author Share Posted November 13, 2019 n foi @DNL291 Continua sem acontecer nada @DNL291 Link to comment
DNL291 Posted November 13, 2019 Share Posted November 13, 2019 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now