Teleport back after `/c` command
leon0399 opened this issue · 4 comments
Add feature to make game remember, where /c
(camera) was run by players, and teleport them back after running /s
(survival)
In fact,
__command()->(print('This camera acts the same as /c, except it will tp you back to the start location!'));
global_pos=l(0,0,0);
c()->(
player=player();
run('gamemode spectator '+player);
modify(player, 'effect', 'night_vision', 1000000, 255, false, false);
modify(player, 'effect', 'conduit_power', 1000000, 255, false, false);
global_pos=pos(player)
);
s()->(
player=player();
run('gamemode survival '+player);
modify(player, 'effect', 'night_vision', 0);
modify(player, 'effect', 'conduit_power', 0);
modify(player,'pos',global_pos)
)
I put that in a file called cam.sc, so it is short (/cam c
for camera and /cam s
for survival)
It gives effects and stuff as well.
@Ghoulboy78 oh wow, awesome, didn't even thought about it!