Guten Abend,
ich würde gerne einen einfach Command schreiben der mir die aktuelle Position und Rotation ins Clipboard speichert jedoch erzeugt das Command einen Fehler in der Zeile wo setClipboard gesetzt ist.
[2014-12-18 22:24:49] ERROR: [gamemodes]/vio/usefull/dev_commands.lua:375: attempt to call global 'setClipboard' (a nil value)
Code
function coords_func ( target )
local x, y, z = getElementPosition(target)
setClipboard("X: " ..x.. " Y: "..y.. " Z: "..z.." Rotation: ".. getElementRotation ( target ))
end
addCommandHandler("coords", coords_func)
Hoffentlich kann mir jemand helfen ich hab schon mehrere möglichkeiten ausprobiert.
getPlayerRotation, getPedRotation und getElementRotation