View difference between Paste ID: qPUBXD4r and BTs3jSBX
SHOW: | | - or go back to the newest paste.
1
-- Setyaw by red-001 
2
minetest.register_chatcommand("setyaw", {
3
	params = "<yaw>",
4
	description = "Set player yaw",
5
	func = function(caller,yaw)
6
		if yaw ~= '' then
7
			local player = minetest.get_player_by_name(caller)
8
			player:set_look_yaw(math.rad(yaw))
9
			return true, "Yaw set to "..yaw
10
		end
11
		return false, "invaild input"
12
	end,
13
})