add 'player.respawn' command
This commit is contained in:
parent
adabe781c5
commit
a105a4f2c7
@ -142,3 +142,13 @@ console.add_command(
|
|||||||
return tostring(w*h*d).." blocks set"
|
return tostring(w*h*d).." blocks set"
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
|
|
||||||
|
console.add_command(
|
||||||
|
"player.respawn player:sel=$obj.id",
|
||||||
|
"Respawn player entity",
|
||||||
|
function (args, kwargs)
|
||||||
|
local eid = entities.spawn("base:player", {player.get_pos(args[1])}):get_uid()
|
||||||
|
player.set_entity(args[1], eid)
|
||||||
|
return "spawned new player entity #"..tostring(eid)
|
||||||
|
end
|
||||||
|
)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user