ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Client functions
  3. setClipboard

Function

setClipboard

ClientInput and controlsIdentical to MTA:SA

Puts text into the player's system clipboard (e.g. an invite code or a server address). In the current client version the function is not wired to the game yet and returns false with a console warning.

Syntax

bool setClipboard(string text)

Arguments

textstring
The text to copy.

Returns

true if the text reached the clipboard.

Example

addCommandHandler("discord", function()
    if setClipboard("https://discord.gg/przyklad") then
        outputChatBox("Link skopiowany.")
    end
end)

See also