Game: Difference between revisions

From Vendetta Lua
Jump to navigationJump to search
No edit summary
 
(2 intermediate revisions by 2 users not shown)
Line 141: Line 141:
GetFlightMode() -> boolean
GetFlightMode() -> boolean
<br><br>
<br><br>
'''Description:''' <br>
'''Description:''' Whether flight-assist mode is active
 
<br><br>
<br><br>
'''Arguments:''' <br>
'''Arguments:''' <br>
?
?
<br><br>
<br><br>
'''Returns:''' <br>
'''Returns:''' true if flight-assist mode is active, false otherwise
?
<br><br>
<br><br>
'''Example:'''<br>
'''Example:'''<br>
Line 210: Line 208:
</source>
</source>


=== GetScreenSize ===
=== GetTurretHealth ===
=== GetTurretHealth ===
'''Definition:'''<br>
'''Definition:'''<br>
Line 278: Line 277:
=== OpenWebBrowser ===
=== OpenWebBrowser ===
'''Definition:'''<br>
'''Definition:'''<br>
OpenWebBrowser() -> ?
OpenWebBrowser(string link) -> ?
<br><br>
<br><br>
'''Description:''' <br>
'''Description:''' <br>
Line 284: Line 283:
<br><br>
<br><br>
'''Arguments:''' <br>
'''Arguments:''' <br>
'''link''' link for the web browser
?
?
<br><br>
<br><br>

Latest revision as of 00:29, 2 August 2023

Functions

DisableInput

Definition:
DisableInput() -> ?

Description:



Arguments:
?

Returns:
?

Example:


EnableInput

Definition:
EnableInput()

Description:



Arguments:
none

Returns:
nothing

Example:
<source lang="lua">Game.EnableInput()</source>

EndPlayback

Definition:
EndPlayback() -> ?

Description:



Arguments:
?

Returns:
?

Example:

GetClientBuildNumber

Definition:
GetClientBuildNumber() -> ?

Description:



Arguments:
?

Returns:
?

Example:

GetClientVersion

Definition:
GetClientVersion() -> ?

Description:



Arguments:
?

Returns:
?

Example:

GetCommandForBind

Definition:
GetCommandForBind() -> ?

Description:



Arguments:
?

Returns:
?

Example:

GetCVar

Definition:
GetCVar(string name) -> result

Description:
Returns the value of a C variable(?)
I'm assuming that the term CVar refers to an ingame variable not directly accessible by Lua

Arguments:
name name of the variable.

Returns:
The value or nil
Example: <source lang="lua"> print(Game.GetCVar("rRenderStationInMenu")) -- output: 1 or 0, ie. true/false if Game.GetCVar("autoaim") == 1 then print("autoaim is on") end print(Game.GetCVar("rHUDxscale")) -- output: 900 if Game.GetCVar("filterchannelmsgs") == 1 then print("Channel Messages are being filtered") end </source>

GetDesiredSpeed

Definition:
GetDesiredSpeed() -> ?

Description:



Arguments:
?

Returns:
?

Example:

GetFlightMode

Definition:
GetFlightMode() -> boolean

Description: Whether flight-assist mode is active

Arguments:
?

Returns: true if flight-assist mode is active, false otherwise

Example:
<source lang="lua"> local a = Game.GetFlightMode() print tostring(a).." ("..type(a)..")" -- outputs: true (boolean) </source>

GetMaxFramerate

Definition:
GetMaxFramerate() -> ?

Description:



Arguments:
?

Returns:
?

Example:

GetNFZMode

Definition:
GetNFZMode() -> ?

Description:



Arguments:
?

Returns:
?

Example:


GetObjectAtScreenPos

Definition:
GetObjectAtScreenPos(float x, y) -> int nodeid, objectid

Description:
Returns nodeid and objectid of a targetable object at specified screen coordinates

Arguments:
x,y - screen coordinates, range from 0 to 1 where 0,0 is top left corner of screen and 1,1 is bottom right

Returns:
nodeid, objectid - ids, as used by radar functions

Example:
<source lang="lua"> radar.SetRadarSelection(Game.GetObjectAtPos(0.5, 0.5)) -- will target object directly in front (also stuff not normally targettable, like station parts) </source>

GetScreenSize

GetTurretHealth

Definition:
GetTurretHealth() -> ?

Description:



Arguments:
?

Returns:
?

Example:


GetTurretObjectID

Definition:
GetTurretObjectID() -> ?

Description:



Arguments:
?

Returns:
?

Example:

IsInstalledFromMarket

Definition:
IsInstalledFromMarket() -> ?

Description:



Arguments:
?

Returns:
?

Example:

IsMobiHandServiceInstalled

Definition:
IsMobiHandServiceInstalled() -> ?

Description:



Arguments:
?

Returns:
?

Example:

OpenWebBrowser

Definition:
OpenWebBrowser(string link) -> ?

Description:



Arguments:
link link for the web browser ?

Returns:
?

Example:

PerformGoogleBilling

Definition:
PerformGoogleBilling() -> ?

Description:



Arguments:
?

Returns:
?

Example:

PerformMobiBilling

Definition:
PerformMobiBilling() -> ?

Description:



Arguments:
?

Returns:
?

Example:


Quit

Definition:
Quit()

Description:



Arguments:
none

Returns:
nothing

Example:
<source lang="lua">Game.Quit()</source>

SetCVar

Definition:
SetCVar(string name, string value) -> ?

Description:



Arguments:

string name - name of existing cvar string value - value to set it to



Returns:

true - if the cvar is valid, false otherwise



Example:

<source lang="lua"> if(Game.SetCVar("fov", "95") == true) then print "fov set to 95" end </source>



SetDesiredSpeed

Definition:
SetDesiredSpeed() -> ?

Description:



Arguments:
?

Returns:
?

Example:

SetInputMode

Definition:
SetInputMode() -> ?

Description:



Arguments:
?

Returns:
?

Example:


SetJumpDest

Definition:
SetJumpDest(sectorid)

Description:



Arguments:
sectorid -- sectorid of jump destination.

Returns:
nothing

Example:
<source lang="lua">Game.SetJumpDest(2902)</source>

SetMaxFramerate

Definition:
SetMaxFramerate() -> ?

Description:



Arguments:
?

Returns:
?

Example:


StartLoginCinematic

Definition:
StartLoginCinematic()

Description:



Arguments:
none

Returns:
none

Example:
<source lang="lua">Game.StartLoginCinematic()</source>

StartPlayback

Definition:
StartPlayback() -> ?

Description:



Arguments:
?

Returns:
?

Example:

StartRecording

Definition:
StartRecording() -> ?

Description:



Arguments:
?

Returns:
?

Example:

StopLoginCinematic

Definition:
StopLoginCinematic()

Description:



Arguments:
none

Returns:
none

Example:
<source lang="lua">Game.StopLoginCinematic()</source>

StopRecording

Definition:
StopRecording() -> ?

Description:



Arguments:
?

Returns:
?

Example: