User Tools

Site Tools


addons:functions

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
addons:functions [2017/04/21 20:34]
atom0s
addons:functions [2017/04/22 00:11] (current)
Line 4: Line 4:
  
 Below are the various functions and namespaces you can make use of while coding your addon(s). Below are the various functions and namespaces you can make use of while coding your addon(s).
 +
 +----
 +
 +==== Namespaces ====
 +
 +These are the global namespaces you can use within an addon:
 +
 +^ Namespace ^ Description ^
 +| [[addons:​functions:​bits]] | Functions to work with bits and bytes. |
 +| [[addons:​functions:​file]] | Functions to work with files and folders. |
 +| [[addons:​functions:​gui]] | Functions to work with the ImGui system. |
 +| [[addons:​functions:​memory]] | Functions to work with the client memory. (Reading and writing.) |
 +| [[addons:​functions:​misc]] | Misc. functions to work with various things. |
 +| [[addons:​functions:​regex]] | Functions related to regular expressions. |
  
 ---- ----
Line 9: Line 23:
  
 Sends a packet to the client as if the server had sent it. Sends a packet to the client as if the server had sent it.
-<code cpp>void AddIncomingPacket(id,​ packet);</​code>+<sxh lua>void AddIncomingPacket(id,​ packet);</​sxh>
   * **Parameters**   * **Parameters**
     * id - (number) The id of the packet being sent.     * id - (number) The id of the packet being sent.
Line 20: Line 34:
  
 Sends a packet to the server as if the client had sent it. Sends a packet to the server as if the client had sent it.
-<code cpp>void AddOutgoingPacket(id,​ packet);</​code>+<sxh lua>void AddOutgoingPacket(id,​ packet);</​sxh>
   * **Parameters**   * **Parameters**
     * id - (number) The id of the packet being sent.     * id - (number) The id of the packet being sent.
Line 31: Line 45:
  
 Parses a string for auto-translate tags and converts them. Parses a string for auto-translate tags and converts them.
-<code cpp>string ParseAutoTranslate(msg,​ useBrackets);</​code>+<sxh lua>string ParseAutoTranslate(msg,​ useBrackets);</​sxh>
   * **Parameters**   * **Parameters**
     * msg - (string) The chat message to parse the auto-translate tags within.     * msg - (string) The chat message to parse the auto-translate tags within.
Line 42: Line 56:
  
 Obtains an entity object from the given index. Obtains an entity object from the given index.
-<code cpp>object GetEntity(index);</​code>+<sxh lua>object GetEntity(index);</​sxh>
   * **Parameters**   * **Parameters**
     * index - (number) The index of the entity to obtain.     * index - (number) The index of the entity to obtain.
Line 52: Line 66:
  
 Obtains the player entity object. Obtains the player entity object.
-<code cpp>object GetPlayerEntity();</​code>+<sxh lua>object GetPlayerEntity();</​sxh>
   * **Parameters**   * **Parameters**
     * //Function has no parameters.//​     * //Function has no parameters.//​
addons/functions.txt · Last modified: 2017/04/22 00:11 (external edit)