For the getElementRotation, since it's a ped, the value is only from 0(facing north) to 360.
anyways, try this:
function binds(player) --forgot the player argument
x,y,z = getElementPosition(player)
rx,ry,rz = getElementRotation(player) -- the player has only one value, so the ry and rz will be nil
bindKey("1", "down", cam1) --lua is case-sensitive
bindKey("2", "down", cam2)
bindKey("3", "down", cam3)
bindKey("4", "down", cam4)
bindKey("5", "down", cam5)
end
addCommandHandler("test", binds)
function cam1()
setCameraMatrix(x,y,z,rx,ry,rz)
end
function cam2()
end
function cam3()
end
function cam4()
end
function cam5()
end