Initial Specate

This commit is contained in:
VegaZ
2021-04-17 22:51:35 +02:00
parent 8d231c8359
commit 6a28cbe60d
3 changed files with 40 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
let cam: CameraMp = mp.cameras.new('spectateCam');;
mp.events.add("SERVER:ADMIN_SPECTATE", (targetPlayer) => {
cam.attachTo(targetPlayer.handle, 10.0, 0.0, 10.0, true);
cam.setActive(true);
});
mp.events.add("SERVER:ADMIN_STOP_SPECTATE", () => {
if (cam.isActive() == true) {
cam.setActive(false);
}
});