The online racing simulator
Buttons On View Change
(3 posts, started )
Buttons On View Change
hi guys am a new Coder learning C#

i have an insim from the forums as a base, but i'm having a problem figuring out how to get which camera view the client is in.

i would like it if the clients camera is in "In-car view" for it to show a button and when the clients view has changed by pressing "V" that it delete that button. would it be possible for somebody to give me an example of how to code it, i know that it's gotta be in


// A player changed it's camera
private void CCH_CameraChanged(Packets.IS_CCH CCH)
{
}

just unsure on how to do it


EDIT:


private void CCH_CameraChanged(Packets.IS_CCH CCH)
{

//C.UniqueID = CCH.PLID;
if (CCH.Camera == Enums.View.VIEW_FOLLOW)// Arcade
{

Connections[GetConnIdx(CCH.PLID)].Cam = 0;
}
if (CCH.Camera == Enums.View.VIEW_HELI)// Helicopter
{


Connections[GetConnIdx(CCH.PLID)].Cam = 1;
}
if (CCH.Camera == Enums.View.VIEW_CAM)// TV Cam
{


Connections[GetConnIdx(CCH.PLID)].Cam = 2;
}
if (CCH.Camera == Enums.View.VIEW_DRIVER)// Cockpit
{


Connections[GetConnIdx(CCH.PLID)].Cam = 3;
}
if (CCH.Camera == Enums.View.VIEW_CUSTOM)// Custom Cam
{

Connections[GetConnIdx(CCH.PLID)].Cam = 4;
}

}

i have this now and it doesnt seem to change the .Cam id to any int that is there any ideas?
so many views and not a post?
#3 - Krayy
This has been asked a few times by others (myself included), as we were trying to do something similar. Bottom line is that if you are using a dedicated host, the CCH packets don't get sent at all, and if you are using a client, the CCH packets only get sent to the host each time you change viewpoint. Other LFS clients won't get the packets.

It seems to be a glaring oversight, but essentially we cannot do anything about it

Buttons On View Change
(3 posts, started )
FGED GREDG RDFGDR GSFDG