Functions - DoktorSAS/IW6X-S1X-Scripting-Guide GitHub Wiki

Functions List

The functions listed below are the functions made available by the X Labs team for script development in Lua. All functions listed can be called directly from the Lua script without being defined within the code. Functions must be linked to an entity or process to be called. In this case the functions come called through the prefix game: since we can consider them like functions belonging to the game.

Function Name Function Call Description
clientprint game:clientprint(player, string ) This function is to make an iPrintLn to the player defined in the function call
oninterval game:oninterval( function, time ) This function can be used to make loops
executecommand game:executecommand( string ) This function is to execute console command dircetly from Lua script
ambientplay game:ambientplay( string ) This function is to start an aimbient sound
ontimeout game:ontimeout( function, int) This function allow to start loop call
setdvar/getdvar game:setdvar( string, value) / game:getdvar( string ) This functions allow you to get/set dvars
Function Name Function Call Description
Function Name Function Call Description