Skip to content

Functions

sleep

Arguments

  • n - Miliseconds to pause the Lua thread.

OutputConsole

Arguments

  • const char * buf
  • ...

Remarks

Displays a text in your fantasy.debugmode window.


SetGlobalVariable

Arguments

  • const char * variable_name
  • const char * value

Remarks

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


GetActivePlayerInformation

Returns

A fantasy_sdk_player structure for the local player.


IsActivePlayerConnected

Returns

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


GetGlobalVariable

Arguments

  • const char * variable_name

Returns

The value of the variable if set.


SetActivePlayerViewAngle

Arguments

  • float x, float y, float z

Remarks

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


IsKeyPressed

Arguments

  • key - Virtual key.

Returns

True if the key was pressed, false otherwise.


GetConfiguration

Returns

Returns your configuration in JSON format.


SendClientCommand

Arguments

  • const char * coommand

Remarks

This command sends a command to TF2's console.


GetWindowWidthHeight

Returns

The current game window width and height.


GetPlayerInformation

Arguments

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

Returns

A fantasy_sdk_player structure of the target.


GetPlayerIDByIndex

Arguments

  • int idx - The player index.

Returns

Returns the player's id.


DrawRectangle

Arguments

  • int x, int y, int width, int height, int r, int g, int b, int a

DrawOutlineRectangle

Arguments

  • int x, int y, int width, int height, int r, int g, int b, int a

DrawLine

Arguments

  • int x, int y, int width, int height, int r, int g, int b, int a

DrawText

Arguments

  • int x, int y, string text, int r, int g, int b, int a

DrawCircle

Arguments

  • int x, int y, float r, int s, int r, int g, int b, int a