Skip to content

CAU_xChat_fnc_emoji

ConnorAU edited this page Oct 23, 2020 · 3 revisions

Definition:

Contains all code required for the emoji system to work.

Syntax:

  • Command: String - keyword used to call the command
    Supported Commands:
    • getList
      Argument: Bool - true return all emojis, false return only those where the condition passes
      Return: Array of Arrays - [displayName,icon,[keywords],[shortcuts],isMissionEmoji,condition]
    • getItem
      Arguments:
      1 : String - emoji keyword
      2 : Bool - true ignore condition, false return only if the condition passes
      Return: Array - [displayName,icon,[keywords],[shortcuts],isMissionEmoji,condition]
    • getImage
      Argument: String - Emoji keyword (without surrounding : characters)
      Return: String - Returns the emoji image path string wrapped with <img> tags
    • isAvailable
      Argument: Bool - true ignore conditions, false evaluate conditions
      Return: Bool - true if there is at least one emoji available to use

Example 1:

["getList",false] call CAU_xChat_fnc_emoji;
// [["Angry Face","cau\extendedchat\emojipack\twemoji\popular\data\angry.paa",["angry"],[">:(",">:-("],false,"true"],...]

Example 2:

["getItem",["+1",true]] call CAU_xChat_fnc_emoji;
// ["Thumbs Up Sign","cau\extendedchat\emojipack\twemoji\popular\data\+1.paa",["+1","thumbsup"],[],false,"true"]

Example 3:

["getImage","clap"] call CAU_xChat_fnc_emoji; 
// "<img color='#FFFFFF' image='cau\extendedchat\emojipack\twemoji\popular\data\clap.paa'/>"

Example 4:

["isAvailable",true] call CAU_xChat_fnc_emoji;
// true/false