mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-13 06:51:51 +00:00
add 'player.respawn' command
This commit is contained in:
parent
adabe781c5
commit
a105a4f2c7
1 changed files with 10 additions and 0 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue