C++ Level 1
Basic Map
Here's some things that can be gotten if you have a handle to the CXGame instance.
It's alias is often m_pGame .. this depends on where you trying to use it.


• m_pGame = Basics and some common things
• m_pGame->GetSystem( ) = ISystem
• m_pGame->GetSystem( )->GetAISystem( ) = IAISystem
• m_pGame->GetSystem( )->GetI3DEngine( ) = I3DEngine [play with the game engine. It'll be interesting, they said..]
• m_pGame->GetSystem( )->GetIMovieSystem( ) = IMovieSystem [cutscene stuff]
• m_pGame->GetSystem( )->GetIMusicSystem( ) = IMusicSystem
• m_pGame->GetSystem( )->GetIProfileSystem( ) = IFrameProfileSystem [not sure what you're gonna do with this one]
• m_pGame->GetSystem( )->GetIRenderer( ) = IRenderer [sometimes known locally as m_pRenderer. Fancy stuff]
• m_pGame->GetSystem( )->GetIScriptSystem( ) = IScriptSystem [execute script files, get and set global values, etc]
• m_pGame->GetSystem( )->GetISoundSystem( ) = ISoundSystem [play sounds, stop sounds. All sorts of cool sound stuff]

• And a million more things. Also check out other classes and objects. If you need to get a reference to a specific item, ask on the FarCry Labs Discord and we'll try to help.
Game HWND
Where m_pRenderer is an alias for the IRenderer: (HWND)m_pRenderer->GetHWND( ) There's other ways, but this is the one that CryTek provided. This HWND can be used for generic Win32 calls. Think creatively :)
FarOut
Game Title
This sets the game title, and should remain as long as the game continues running.
SetWindowText( HWND , "Far Cry - Another amazing Mod" ); Note: There's multiple ways to get the HWND of the game. Should be documented in FCDB as well
FarOut | Common Knowledge
Add a Hud message
• This uses the m_pClient from CXGame.

m_pClient->AddHudMessage( "This message will appear in the hud." , 50.0f , false ); FarOut
Add a Hud subtitle
• This uses the m_pClient from CXGame.

m_pClient->AddHudSubtitle( "Subtitles from C++? Devious!" , 200.0f ); FarOut
Draw Line
• This uses the IRenderer.
• In this specific case, the IRenderer has an alias of m_pRenderer

m_pRenderer->Set2DMode( true , 800 , 600 );
m_pRenderer->Draw2dLine( 400 , 600 , 400 , 0 );
Common Knowledge
Draw Text
• This uses the IRenderer.
• In this specific case, the IRenderer has an alias of m_pRenderer

Basic and easy: m_pRenderer->Draw2dText( 100 , 250 , "This mod is epic!" , SDrawTextInfo( ) );
If you want more control, then use the following syntax: SDrawTextInfo TextProp;
TextProp.flags = 0; // Flags
TextProp.color[ 0 ] = 1; // R
TextProp.color[ 1 ] = 1; // G
TextProp.color[ 2 ] = 0; // B
TextProp.color[ 3 ] = 1; // A
TextProp.xfont = 0; // Specify a valid CXFont
m_pRenderer->Draw2dText( 100 , 250 , "This mod is epic!" , TextProp );
Note: There's additional options not documented here that may or may not work. There's a third and fancier method, but these should handle basic needs.
FarOut | Common Knowledge
Dealing with trigonometry and angles
The trigonometry functions seem to use radians, so conversions must be performed.

Convert an angle from degrees to radian: DEG2RAD( ANGLE )
Convert an angle from radians to degree: RAD2DEG( ANGLE )
Common Knowledge
The Player
• This gets a reference to the single player character. Can be used to get player position, angles, etc. Also many other things.
• In this specific case, m_pGame is a reference to the CXGame instance
m_pGame->GetMyPlayer( )
• Get the player angles.
Vec3 Angles = m_pGame->GetMyPlayer( )->GetAngles( )
• Get the player rotation angle.
float Rotation = m_pGame->GetMyPlayer( )->GetAngles( ).z
• Get the player's position on the map. Then accessed such as: Pos.x, or Pos.y, or Pos.z
Vec3 Pos = m_pGame->GetMyPlayer( )->GetPos( )
• Set the player's position on the map. It's a simple way to teleport the player.
Vec3 Destination( 100 , 100 , 100 );
m_pGame->GetMyPlayer( )->SetPos( Destination , true );
FarOut | Common Knowledge
Logging
CryLogAlways( "%s" , "This message will show up inside log.txt" );
The first argument is the type of message. %s seems to work fine for strings.
Common Knowledge