setText
GAMECyberM.clipboard.setText(text)
Writes UTF-8 text to the operating-system clipboard.
Client-only and requires clipboard.write on the resource whose VM performs the call. Text is limited to 256 KiB, must be valid UTF-8 and cannot contain an embedded NUL. The operation is write-only: resources cannot inspect the user's existing clipboard. A temporarily owned clipboard returns false, clipboard_busy; callers should let the player retry instead of polling every frame.
Parameters
- textstringrequired
Returns
- true on success, otherwise false
- reason for the refusal
Example
local ok, reason = CyberM.clipboard.setText("position = { x = 1, y = 2, z = 3 }")Registered in ResourceHost.cpp as LuaClipboardSetText (line 6607).
