Wisam Posted March 16, 2016 Share Posted March 16, 2016 So i made this script that lets you use 3 commands to get the local player position, rotation and camera matrix, the command gets the coordinates but the problem is idk why its not copying them on the clipboard also the camera matrix command here's the script outputChatBox("==================================== ",root,0,200,0) outputChatBox("Element position finder started, here are the commands you can use: ",root,0,200,0) outputChatBox("* /gp - to get your exact x,y,z coordinates",root,20,200,30) outputChatBox("* /gr - to get your exact rotation ",root,20,200,30) outputChatBox("* /cm - to get the exact view of the camera matrix ",root,20,200,30) outputChatBox("==================================== ",root,0,200,0) local plr = localPlayer addCommandHandler("gp", function() local x,y,z = getElementPosition(plr) msg1 = outputChatBox("Your position coordinates are: "..x..","..y..","..z.." | Copied to your clipboard just do Ctrl+V", 0,255,0) setClipboard(msg1) end ) addCommandHandler("gr", function() local xr,yr,zr = getElementRotation(plr) msg2 = outputChatBox("Your position coordinates are: "..xr..","..yr..","..zr.."| Copied to your clipboard just do Ctrl+V",0,255,0) " setClipboard(msg2) end ) addCommandHandler("cm", function() local camx,camy,camz,camxr,camyr,camzr = getCameraMatrix(plr) msg3 = outputChatBox("Your camera matrix coordinates are: "..camx..","..camy..","..camz..","..camxr..","..camyr..","..camzr.."| Copied to your clipboard just do Ctrl+V",0,255,0) " setClipboard(msg3) end ) Link to comment
EstrategiaGTA Posted March 16, 2016 Share Posted March 16, 2016 outputChatBox("==================================== ",root,0,200,0) outputChatBox("Element position finder started, here are the commands you can use: ",root,0,200,0) outputChatBox("* /gp - to get your exact x,y,z coordinates",root,20,200,30) outputChatBox("* /gr - to get your exact rotation ",root,20,200,30) outputChatBox("* /cm - to get the exact view of the camera matrix ",root,20,200,30) outputChatBox("==================================== ",root,0,200,0) local plr = localPlayer addCommandHandler("gp", function() local x,y,z = getElementPosition(plr) msg1 = outputChatBox("Your position coordinates are: "..x..","..y..","..z.." | Copied to your clipboard just do Ctrl+V", 0,255,0) setClipboard(msg1) end ) addCommandHandler("gr", function() local xr,yr,zr = getElementRotation(plr) msg2 = outputChatBox("Your position coordinates are: "..xr..","..yr..","..zr.."| Copied to your clipboard just do Ctrl+V",0,255,0) setClipboard(msg2) end ) addCommandHandler("cm", function() local camx,camy,camz,camxr,camyr,camzr = getCameraMatrix(plr) msg3 = outputChatBox("Your camera matrix coordinates are: "..camx..","..camy..","..camz..","..camxr..","..camyr..","..camzr.."| Copied to your clipboard just do Ctrl+V",0,255,0) setClipboard(msg3) end ) That will fix your string errors... But also, I just saw you are using: setClipboard (msg3) msg3 = outputChatBox (...) This will copy to your clipboard outputChatBox (etc)... And you don't want that, do you? Link to comment
Anubhav Posted March 17, 2016 Share Posted March 17, 2016 Wrong wrong. setClipboard is a client sided function. On top of that you are using client sided outputChatBox and server sided outputChatBox. You have to trigger a event from a server side to client side. triggerClientEvent. GL fixing it! 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