In cod4 this was the code to switch Between 3rd Person View And 1st Person View
Code:
at the _globallogic script add
bottom of spanwplayer:
____________________________________________
self setClientDvar("cg_thirdPerson", 1);
self thread thirdPersonADS();
____________________________________________
add this function to end of the _globallogic script:
____________________________________________
thirdPersonADS() // called from spawnePlayer()
{
self endon( "killed_player" );
self endon( "joined_spectators" );
self endon( "disconnect" );
lastAds = false;
while (isPlayer(self) && self.sessionstate == "playing")
{
wait .05;
curAds = self playerAds();
if (curAds && curAds != lastAds)
self setClientDvar("cg_thirdPerson", 0);
else if (!curAds && curAds != lastAds)
{
if (!self meleeButtonPressed())
self setClientDvar("cg_thirdPerson", 1);
}
lastAds = curAds;
}
}
so change the code when you enter in the helicopter to use thirdPersonADS script and when you exit to become first person again