Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

1 Screenshot

  • 716
  • 19
  • 55.32 kB

About Sound Library Api

Sound Library Api allows you to store & play recorded sounds for players, attach them to npcs, trigger them via in-game events
SoundLibraryApiCommands.png.f3a10f73c958f16cb27062cf82b73e9f.png

Configuration:

{
  "Enable welcome message": true,
  "Welcome message file name": [
    "filename1",
    "filename2",
    "filename3"
  ],
  "Enable Chopper event message": true,
  "Chopper event message file name": [
    "filename1",
    "filename2",
    "filename3"
  ],
  "Enable Airdrop event message": true,
  "Airdrop event message file name": [
    "filename1",
    "filename2",
    "filename3"
  ],
  "Enable Cargoship event message": true,
  "Cargoship event message file name": [
    "filename1",
    "filename2",
    "filename3"
  ],
  "Enable Chinook event message": true,
  "Chinook event message file name": [
    "filename1",
    "filename2",
    "filename3"
  ]
}

Language:

{
  "NoPermission": "<color=#e3e3e3>You do not have permission to use this command</color>",
  "AlreadyRecording": "<color=#e3e3e3>You're already recording. Please save or cancel your previous recording before starting a new one.</color>",
  "InvalidAddSyntax": "<color=#e3e3e3>Invalid Syntax. Ex: <color=#de8732>/sl add soundname</color></color>",
  "AddAlreadyExists": "<color=#e3e3e3>This sound already exists. </color><color=#e3e3e3>Please add <color=#de8732>overwrite</color> to your arguments to allow overwriting an existing sound.</color><color=#e3e3e3>Ex: <color=#de8732>sl add {{0}} overwrite</color></color>",
  "AddRecording": "<color=#e3e3e3>You can now start recording.\n</color><color=#e3e3e3>The recording will automatically start once your start sending audio.\n</color><color=#e3e3e3>Once you have completed you can use <color=#de8732>/sl save</color> or <color=#de8732>/sl cancel</color>.\n</color><color=#e3e3e3>You can listen to your recording using <color=#de8732>/sl play</color>\n</color><color=#e3e3e3>If you want to rerecord your recording use <color=#de8732>/sl reset</color></color>",
  "NotRecording": "<color=#e3e3e3>You're not currently recording.</color>",
  "RecordingSaved": "<color=#e3e3e3>We have saved your recording as '{0}'</color>",
  "CanceledRecording": "<color=#e3e3e3>We have canceled your recording</color>",
  "ResetRecording": "<color=#e3e3e3>Your recording has been reset.</color>",
  "PlayInvalidSyntax": "<color=#e3e3e3>Invalid Syntax. Ex: <color=#de8732>/sl play soundname</color> - to play the sound with the given name.</color>",
  "NoSoundFileFound": "<color=#e3e3e3>No sound file found with name '{0}'</color>",
  "HelpText": "<color=#e3e3e3>Allows players to record sound that can be played back to a player\n<color=#de8732>/sl add soundname</color> - to start the creation of a new sound.\n<color=#de8732>/sl npc add hookActionType fileName</color> - to add one or more filenames to a human npc (hook action types are: <color=#de8732>OnUseNPC/OnEnterNPC/OnLeaveNPC/OnHitNPC</color>)\n<color=#de8732>/sl npc remove hookActionType fileName</color> - to remove a filename from a human npc (hook action types are: <color=#de8732>OnUseNPC/OnEnterNPC/OnLeaveNPC/OnHitNPC</color>)\n<color=#de8732>/sl save</color> - to save your recorded sound.\n<color=#de8732>/sl reset</color> - to clear your current recording.\n<color=#de8732>/sl cancel</color> - to cancel your recording and not save.\n<color=#de8732>/sl play</color> - to player your current recording back to you.\n<color=#de8732>/sl</color> - to view this help text again.</color>",
  "AudioMessagesHelpText": "<color=#e3e3e3><color=#66B2FF>/audio send playerName audioName</color> - Sends an audio message to a player</color>\n<color=#e3e3e3><color=#66B2FF>/audio sendall audioName</color> - Sends an audio message to everyone on the server\n<color=#e3e3e3><color=#66B2FF>/audio sendlooped playerName audioName 2 (loop times amount)</color> - Sends a looped audio message to a player\n<color=#e3e3e3><color=#66B2FF>/audio sendalllooped audioName 2 (loop times amount)</color> - Sends a looped audio message to everyone on the server\n<color=#e3e3e3><color=#66B2FF>/audio files</color> - Shows a list of all audio files on the server\n<color=#e3e3e3><color=#66B2FF>/sl</color> - Shows the help page for the Sound Library API\n<color=#e3e3e3><color=#66B2FF>/audio help</color> - Shows these help messages",
  "PlayingText": "<color=#e3e3e3>Playing the file with the name of <color=#de8732>{0}</color></color>",
  "PlayingAudioMessageText": "<color=#e3e3e3>Playing the file with the name of <color=#66B2FF>{0}</color></color>",
  "InvalidTarget": "<color=#e3e3e3>Invalid target, try using his steamid/name</color>",
  "NullFileName": "<color=#e3e3e3>This file name is null, use /audio files</color>",
  "AvailableFileNames": "<color=#e3e3e3>Available files:\n<color=#66B2FF>{0}</color></color>",
  "FileNameNotFound": "<color=#e3e3e3><color=#66B2FF>{0}</color> does not exist, use <color=#66B2FF>/audio files</color></color>",
  "NpcNotFound": "<color=#e3e3e3>Couldn't find any human npc, make sure you have created one using <color=#de8732>/npc_add</color> and you are looking at it!</color>",
  "InvalidHookActionType": "<color=#e3e3e3><color=#de8732>{0}</color> is invalid, list of hook action types:<color=#de8732>\nOnUseNPC\nOnEnterNPC\nOnLeaveNPC\nOnHitNPC</color></color>",
  "NpcSoundAdded": "<color=#e3e3e3><color=#de8732>{0}</color> was added and will play when <color=#66B2FF>{1}</color> is triggered</color>",
  "NpcSoundRemoved": "<color=#e3e3e3><color=#de8732>{0}</color> was removed from this NPC!</color>",
  "FileNameAlreadyAdded": "<color=#e3e3e3><color=#de8732>{0}</color> was already added to this NPC!</color>"
}

Human NPC Integration example:
 

{
  "Npc Data": {
    "303133854": {
      "Action type of the npc & Filenames that are played": {
        "OnUseNPC": [
          "testing",
          "testing"
        ]
      }
    },
    "986905907": {
      "Action type of the npc & Filenames that are played": {
        "OnEnterNPC": [
          "testing"
        ]
      }
    },
    "1543143931": {
      "Action type of the npc & Filenames that are played": {
        "OnHitNPC": [
          "messagesound"
        ]
      }
    },
    "1205925446": {
      "Action type of the npc & Filenames that are played": {
        "OnUseNPC": [
          "testing",
          "pop"
        ],
        "OnHitNPC": [
          "testing"
        ]
      }
    },
    "45461627": {
      "Action type of the npc & Filenames that are played": {
        "OnUseNPC": [
          "messagesound"
        ],
        "OnHitNPC": [
          "messagesound"
        ]
      }
    },
    "942954162": {
      "Action type of the npc & Filenames that are played": {
        "OnHitNPC": [
          "waveeffect",
          "messagesound"
        ],
        "OnEnterNPC": [
          "messagesound"
        ]
      }
    }
  }
}

OnUseNPC.png.4c22368e748d6b1e6d3b7bf4f4b507eb.png

Recording & Playing Audio Files Video:

 

Human NPC Integration Video:

 

Permissions:

soundlibraryapi.use - In order to use /sl

soundlibraryapi.audio - In order to use /audio

Console Command:
audio.message

Important:

Does the audio played by the npc stutters or skips frames? Make sure you recorded the audio with the volume being as high as possible and the server does not perform poorly, there are cases where a server lags and the voice data losses quality/stutters


supreme's Other Downloads


User Feedback

About Us

Codefling is a forward-thinking platform for developers to share and monetize their work from plugins to game assets and everything in-between.

2065 files sold to 246 customers and $26874.99 of payments processed this year!

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.