Example on C++ API

Gtuner Plugins support. MaxAim, MaxRemapper, Combo Magick, Game Rec.

Example on C++ API

Postby Ketechi » Tue Jun 04, 2019 10:26 pm

Hello everyone,

I have a T1 and a T2, I would like to use the T1 API on Visual Studio C++ but to be honest I am new on Visual Studio and C++. I was wondering if someone could give me an example on how to write a simple command.

The command I would like to try is something like this:

if (FFB_1 > 20.0)
set(XB1_RT, 100.0)

The code above is very simple in GtunerIV but I do not know how I would write that in C++ and also I am not sure if I have to create a Header file and include the file in "Direct API Template.cpp" or I write my code inside the "Direct API Template.cpp".

Any help will be appreciated :joia:
User avatar
Staff Sergeant
Staff Sergeant
Posts: 13
Joined: Thu Feb 22, 2018 8:13 pm

Re: Example on C++ API

Postby J2Kbr » Wed Jun 05, 2019 4:41 pm

Assuming you are using the template code as base, the GPC script you posted above can be reproduced in C++ like this:
Code: Select all
if(report.rumble[0] > 20) {
    output[XB1_RT] = 100;
ConsoleTuner Support Team
User avatar
General of the Army
General of the Army
Posts: 20158
Joined: Tue Mar 18, 2014 1:39 pm

Return to Gtuner Plugins Support

Who is online

Users browsing this forum: No registered users and 7 guests