Flying Cam [GTA: Online Camera in Clouds]

gtaonline
camera
effect
skycamera

#22

Nana did you tried “SwitchInPlayer”?


#24

Right, I just wanted to put something here to avoid confusion.

The native’s _SWITCH_OUT_PLAYER and START_PLAYER_SWITCH both “start” something called a “player switch”. (as per the native’s)

A player switch, as I understand it, is the action of changing the active ped (in single player) from one of the 3 playable characters to another in a way which is unobtrusive to the gameplay.

Rockstar created a native to accomplish this specific task for singleplayer use. This is START_PLAYER_SWITCH and basically does the following actions.

First, step out the camera to the manually specified level (the 4rd argument) when it is ≥1 and ≤3 or, automatically calculate the correct camera level by using the distance between the two given peds (1st and 2nd args) then, move the camera to the x and y position of the ped specified by the 2nd argument and set the active player ped to that ped and finally, step the camera back down when the terrain around the ped is properly loaded.

The forth argument of START_PLAYER_SWITCH is a flags argument that modifies the player switch behaviour in different ways (like skipping the first camera step out sequence or hanging the camera at the last step coming down)

_SWITCH_OUT_PLAYER and _SWITCH_IN_PLAYER are like the two parts/camera movements in a player switch. You can think of _SWITCH_OUT_PLAYER being the 1st, 3rd and 4th arguments of START_PLAYER_SWITCH with _SWITCH_IN_PLAYER being the 2nd.

From what I understand _SWITCH_OUT_PLAYER does the camera step out and sets up the current player switch and _SWITCH_IN_PLAYER does the the camera moving and stepping in.

So basically,

SwitchOutPlayer(PlayerPedId(), 0, 1)
-- move the player ped somewhere
SwitchInPlayer(PlayerPedId())

#25

Where exactly do I add this piece of native?


#26

Try using 0 in the flags argument


#27

Thank for your response. I try make it and this is work, but until I figured out how to make it start before the ped spawns.

AddEventHandler("playerSpawned", function(spawn)
StartPlayerSwitch(PlayerPedId(), PlayerPedId(), 255, 1)
Citizen.Wait(10000) 
StopPlayerSwitch()
end)```

#28

Me too, Added switchout in spawnmanager and switchin in skinchanger. But I’m looking to start the carmera in the sky and not un-zooming when the player spawned like I did.


#29

Are you guys looking for something like this?

(in case the embedded video doesn’t work, here’s the original link: https://streamable.com/z0d1k)


#30

This is not fair man :wink:
I tried to switch out:

  • in spawnmanager on the event NetworkIsPlayerActive
  • in essentialmode on the event NetworkIsSessionStarted()
  • on the event onClientMapStart
    I’m note able to get this effect.
    Even hardcap wasn’t able to give me all the satisfaction I could get by placing correctly two simple commands…

#31

So, you’re looking for what i showed in that video? I’ll release a customizable version of it soon.


#33

Yes! That it. Thank you so much Vespura. I really want to see the implementation and at the same time understand the whole principle of operation.


#34

here it is.