About This File
This script allows you to move the game camera in the air and back like in GTA:ONLINE
Installation:
- Download file.
- Unzip folder into your client_packages.
- Add require('MoveSkyCamera/index.js'); to client_packages/index.js.
Usage:
Calling on serverside
player.call('moveSkyCamera', [player, moveTo, switchType, showGUI]);
Calling on clientside
mp.events.call('moveSkyCamera', player, moveTo, switchType, showGUI);
Reference:
player = Ped; player handle
moveTo = String; 'up' or 'down'
switchType = Int; 0, 1, 2 or 3
0: 1 step towards ped
1: 3 steps out from ped (Recommended)
2: 1 step out from ped
3: 1 step towards ped
showGUI = Boolean; Show chat and minimap during camera movement?
Note: When using param moveTo as 'down', it's not necessary to add switchType and showGUI.
Examples:
mp.events.addCommand('movecam', (player) => { // Make camera to go up in to the sky player.call('moveSkyCamera', [player, 'up', 1, false]); // After 5 seconds, camera start to go back to player. setTimeout(() => { player.position = new mp.Vector3(0,0,10); // Set your position if you want player.call('moveSkyCamera', [player, 'down']); }, 5000); });
