engine
Note
The methods here might be converted into global functions in the future.
Methods
float GetCurTime()
-- Gets the current time.string GetCurMapName()
-- Gets the current map name.int GetCurLoadType()
-- Gets the current load type.void ClientCommand(string &in)
-- Executes client commands in place of the player.float CalcDistance(CP3SObj@, CP3SObj@)
-- Calculates distance between 2 objects.float CalcDistanceZ(CP3SObj@, CP3SObj@)
-- Calculates Z distance between 2 objects.array<CP3SObj@>& GetArrayOfNPCs()
-- Gets all the NPCs on the level, and puts them into an array.array<CP3SObj@>& GetArrayOfPlayers()
-- Gets all the connected and spawned Players.array<CP3SObj@>& GetArrayOfEntitiesRadius(CP3SObj@, float)
-- Gets all the NPCs in a specified radius around an object.- CR
array<CP3SObj@>& GetArrayOfSavedFSMEntities(CP3SObj@)
-- Gets all the saved FSM entities of an object. - CR
array<CP3SObj@>& GetArrayOfInventory(CP3SObj@)
-- Gets the array of an object's inventory. array<CP3SObj@>& GetArrayOfWeapons(CP3SObj@ owner)
-- Gets the array of an object's weapons. If the game is not CR then it only gets the Player's weapons.array<CP3SObj@>& GetArrayOfP3SObjs()
-- Gets all the P3S Objects in the map.void DelayedExecution(float, string &in, string &in, CP3SObj@)
-- Executes a function with delay.bool IsMultiplayer()
-- Returns true if game is Multiplayer.void AddGlobalBool(bool bSet, int iNum)
-- Adds a global boolean which never resets.int GetGlobalBool(int iNum)
-- Gets the global boolean. Returns -1 if it doesn't exist.void AddStaticBool(bool bSet, int iNum)
-- Adds a static boolean which will reset after a new game.int GetStaticBool(int iNum)
-- Gets the static boolean. Returns -1 if it doesn't exist.