Skip to content

Functions

In these examples, the class instance is called sdk_information. This is declared like so:

auto sdk_information = std::make_unique< fantasy_sdk::Channel>( );

SendCommand

Arguments

  • const char *

Remarks

Sends a fantasy.cmd command.

Example

sdk_information->SendCommand( "toggle humanizer" );

GetActivePlayerInformation

Returns

  • struct User

Example

auto localplayer = sdk_information->GetActivePlayerInformation();

std::cout << localplayer.health << std::endl;

IsActivePlayerConnected

Returns

  • boolean - True if the player is connected to a server, false otherwise.

SetPlayerProp

Arguments

  • int/std::string/User - The target's player.
  • std::string - The Netvar property
  • int - The value to set the property to.

Example

auto player_information = sdk_information->GetActivePlayerInformation();

for (auto & i : sdk_information->GetServerPlayerInformation())
{
    if (!strlen(i.name)) continue; /// no invalid players
    if (player_information.team == i.team) continue; /// skip teammates

    sdk_information->SetPlayerProp(i, "m_bSpotted", 1);
}

GetPlayerInformation

Arguments

  • int/std::string - The target player.

Returns

  • struct User
auto on_humanizer_activate( std::string data ) -> bool
{
    /// get the target player information.
    player_information = sdk_information->GetPlayerInformation(data);

    /// visibility check
    auto is_visible = false;
    /// <code></code>

    /// when you return false, the humanizer stops. true, it continues.
    return is_visible;
}

GetPlayerIDByIndex

Arguments

  • int

Returns

  • int

TogglePlayerActiveJump

Arguments

  • bool - True to jump. False to stop jumping.

SetActivePlayerViewAngle

Arguments

  • float
  • float
  • float

Remarks

This function is protected by Astrogalaxy. Angles that will trigger bans are blocked.


IsPlayerInFOV

Arguments

  • int/std::string/User
  • float - The range to check. FANTASY_CAT_SDK_DEFAULT_FOV has the default value.

Returns

  • boolean

Example

auto player_information = sdk_information->GetActivePlayerInformation();

for (auto & i : sdk_information->GetServerPlayerInformation())
{
    if (!strlen(i.name)) continue; /// no invalid players
    if (player_information.team == i.team) continue; /// skip teammates

    if( sdk_information->IsPlayerInFOV( i, FANTASY_CAT_SDK_DEFAULT_FOV ) )
        std::cout << "You can see " << i.name << std::endl;
}

GetServerPlayerInformation

Returns

  • std::array

GetMemberConfiguration

Remarks

  • Refreshes your configuration.
  • This will set sdk_information->User.configuration to your configuration in JSON.

SetActivePlayerPrimaryFire

Remarks

  • Makes your player shoot.

RemoveDrawing

Arguments

  • int - ID of drawing.

Draw

Arguments

  • int - The X position on your CS:GO window.
  • int - The Y position on your CS:GO window.
  • Color - RGB structure.
  • const char * - The text.
  • ... - Arguments.

Returns

  • int - The ID of the new drawing.

Remarks

  • fantasy.x must be enabled for this to work.

Example

/// draw startup message
auto startup_drawing = sdk_information->Draw(100, 100, { 255, 0, 0 }, "Auto-Zeus Started!");

/// sleep for 5 seconds 
std::this_thread::sleep_for(std::chrono::seconds(5));

/// remove the drawing after 5 seconds.
sdk_information->RemoveDrawing(startup_drawing);

OutputConsole

Arguments

  • const char *
  • ...

Remarks

  • Displays a text in your fantasy.debugmode window.

Load_DLL

Arguments

  • const char *

Remarks

  • Injects DLL through kernel driver.
  • This function won't work unless you have fantasy.vac.disruptor loaded.

GetIntConfigurationValue

Arguments

  • const char * - Item name.

Returns

  • int The value found inside your json configuration in form of an integer.

GetBoolConfigurationValue


GetFloatConfigurationValue


GetStringConfigurationValue


GetWeaponIntConfigurationValue

Arguments

  • const char * - Weapon name
  • const char * - Item name.

Returns

  • The value found inside your json configuration in form of an integer.

GetWeaponFloatConfigurationValue


GetWeaponBoolConfigurationValue


GetWeaponStringConfigurationValue


Listen

Arguments

  • FANTASY_SDK_LISTENER- The SDK event.
  • SDK_EVENT_FN/SDK_EVENT_DATA_FN/SDK_EVENT_RET_FN - The callback function.

Remarks

  • This function essentially hooks an activity inside of Astrogalaxy. See globals->events

Example

auto on_humanizer_activate(std::string data) -> bool
{
    return true;
}

auto on_fantasy_cmd(std::string data) -> void
{

}

/// hook humanizer
sdk_information->Listen(fantasy_sdk::SDK_EVENT_HUMANIZER_ACTIVATE, on_humanizer_activate);


/// hook fantasy.cmd
sdk_information_cmd->Listen(fantasy_sdk::SDK_EVENT_ON_FANTASY_CMD, on_fantasy_cmd);

GetOverlayAddress

Returns

  • std::tuple - An std::tuple of the present and reset address of gameoverlayrenderer.dll

Remarks

  • This only works internally.

Load_Plugin

Arguments

  • unsigned short - Resource ID.
  • std::string - Name of plugin or abbreviation.

Remarks

  • Loads a plugin that is packed as a resource option in your .exe or DLL

FindPattern

Arguments

  • void * - The module address.
  • unsigned char * - Pattern.
  • unsigned char * - Mask.
  • unsigned long - Optional. Base address of module.
  • unsigned long - Optional. Base size of module.

Returns

  • unsigned long

GetInterfaceAddress

Arguments

  • const char * - Module.
  • const char * - Interface name.

Returns

  • unsigned long

Remarks

  • This only works internally.

SetGlobalVariable

Arguments

  • const char * - Name
  • const char * - Value

Remarks

  • This function sets a variable that can be accessed by all other plugins.

GetGlobalVariable

Arguments

  • const char * - Name

Returns

  • std::string

GetCurrentMap

Returns

  • std::string

GetCurrentMapDirectory

Returns

  • std::string

GetCurrentMapData

Returns

  • std::tuple - An std::tuple of both GetCurrentMap and GetCurrentMapDirectory

SaveConfiguration


World2Screen

Arguments

  • float
  • float
  • float

Returns

  • std::tuple - An std::tuple of the X and Y location on your screen.

HTTPDownload

Arguments

  • const char * - Address.
  • const char * - Destination file.

Remarks

  • All downloaded files are automatically placed in the plugins folder. Members cannot download files from the internet and place them in random spots on someone's PC.

Execute

Arguments

  • const char *

Remarks

  • Executes/Runs a file in your plugins folder.

FileCreate

Arguments

  • const char *

Remarks

  • Creates a file in your plugins folder.

FileDelete

Arguments

  • const char *

Remarks

  • Deletes a file in your plugins folder.

FileWrite

Arguments

  • const char *
  • std::wstring

Remarks

  • Writes to a file in your plugins folder.

FileRead

Arguments

  • const char *

Returns

  • std::wstring

Remarks

  • Reads a file in your plugins folder.

ToString

Arguments

  • std::wstring

Returns

  • std::string

ToWString

Arguments

  • std::string

Returns

  • std::wstring

GetModule

Arguments

  • std::string

Returns

  • std::tuple - Returns an std::tuple of the module base address and size.

IsVisible

Arguments

  • float - x
  • float - y
  • float - z
  • float - x2
  • float - y2
  • float - z2

Returns

  • boolean - True if the target is visible, false otherwise.