This shows you the differences between two versions of the page.
Next revision | Previous revision Next revision Both sides next revision | ||
addons:functions [2017/04/21 20:26] atom0s created |
addons:functions [2017/04/21 20:34] atom0s |
||
---|---|---|---|
Line 6: | Line 6: | ||
---- | ---- | ||
- | + | ==== AddIncomingPacket ==== | |
- | ==== Global Functions ==== | + | |
- | + | ||
- | **AddIncomingPacket** | + | |
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. | ||
Line 19: | Line 16: | ||
* //Function does not return a value.// | * //Function does not return a value.// | ||
- | + | ---- | |
- | **AddOutgoingPacket** | + | ==== AddOutgoingPacket ==== |
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. | ||
Line 29: | Line 26: | ||
* **Returns** | * **Returns** | ||
* //Function does not return a value.// | * //Function does not return a value.// | ||
+ | |||
+ | ---- | ||
+ | ==== ParseAutoTranslate ==== | ||
+ | |||
+ | Parses a string for auto-translate tags and converts them. | ||
+ | <code cpp>string ParseAutoTranslate(msg, useBrackets);</code> | ||
+ | * **Parameters** | ||
+ | * msg - (string) The chat message to parse the auto-translate tags within. | ||
+ | * useBrackets - (bool) True if the resulting string should include the brackets, false otherwise. | ||
+ | * **Returns** | ||
+ | * string - The parsed string. | ||
+ | |||
+ | ---- | ||
+ | ==== GetEntity ==== | ||
+ | |||
+ | Obtains an entity object from the given index. | ||
+ | <code cpp>object GetEntity(index);</code> | ||
+ | * **Parameters** | ||
+ | * index - (number) The index of the entity to obtain. | ||
+ | * **Returns** | ||
+ | * object - The entity object if valid, nil otherwise. | ||
+ | |||
+ | ---- | ||
+ | ==== GetPlayerEntity ==== | ||
+ | |||
+ | Obtains the player entity object. | ||
+ | <code cpp>object GetPlayerEntity();</code> | ||
+ | * **Parameters** | ||
+ | * //Function has no parameters.// | ||
+ | * **Returns** | ||
+ | * object - The entity object if valid, nil otherwise. | ||
+ | |||
+ | ---- |