├── .gitattributes ├── .gitignore ├── .vscode └── tasks.json ├── CHANGELOG.md ├── README.md ├── pawn.json ├── sound.inc └── test.pwn /.gitattributes: -------------------------------------------------------------------------------- 1 | *.pwn linguist-language=Pawn 2 | *.inc linguist-language=Pawn 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # 2 | # Package only files 3 | # 4 | 5 | # Compiled Bytecode, precompiled output and assembly 6 | *.amx 7 | *.lst 8 | *.asm 9 | 10 | # Vendor directory for dependencies 11 | dependencies/ 12 | 13 | # Dependency versions lockfile 14 | pawn.lock 15 | 16 | 17 | # 18 | # Server/gamemode related files 19 | # 20 | 21 | # compiled settings file 22 | # keep `samp.json` file on version control 23 | # but make sure the `rcon_password` field is set externally 24 | # you can use the environment variable `SAMP_RCON_PASSWORD` to do this. 25 | server.cfg 26 | 27 | # Plugins directory 28 | plugins/ 29 | 30 | # binaries 31 | *.exe 32 | *.dll 33 | *.so 34 | announce 35 | samp03svr 36 | samp-npc 37 | 38 | # logs 39 | logs/ 40 | server_log.txt 41 | crashinfo.txt 42 | 43 | # Ban list 44 | samp.ban 45 | 46 | # 47 | # Common files 48 | # 49 | 50 | *.sublime-workspace 51 | -------------------------------------------------------------------------------- /.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "2.0.0", 3 | "tasks": [ 4 | { 5 | "label": "build only", 6 | "type": "shell", 7 | "command": "sampctl package build", 8 | "group": { 9 | "kind": "build", 10 | "isDefault": true 11 | }, 12 | "isBackground": false, 13 | "presentation": { 14 | "reveal": "silent", 15 | "panel": "dedicated" 16 | }, 17 | "problemMatcher": "$sampctl" 18 | }, 19 | { 20 | "label": "build watcher", 21 | "type": "shell", 22 | "command": "sampctl package build --watch", 23 | "group": "build", 24 | "isBackground": true, 25 | "presentation": { 26 | "reveal": "silent", 27 | "panel": "dedicated" 28 | }, 29 | "problemMatcher": "$sampctl" 30 | }, 31 | { 32 | "label": "run tests", 33 | "type": "shell", 34 | "command": "sampctl package run", 35 | "group": { 36 | "kind": "test", 37 | "isDefault": true 38 | }, 39 | "isBackground": true, 40 | "presentation": { 41 | "reveal": "silent", 42 | "panel": "dedicated" 43 | }, 44 | "problemMatcher": "$sampctl" 45 | }, 46 | { 47 | "label": "run tests watcher", 48 | "type": "shell", 49 | "command": "sampctl package run --watch", 50 | "group": "test", 51 | "isBackground": true, 52 | "presentation": { 53 | "reveal": "silent", 54 | "panel": "dedicated" 55 | }, 56 | "problemMatcher": "$sampctl" 57 | } 58 | ] 59 | } 60 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | ## 1.0.0 4 | - Initial release 5 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # samp-sound-array 2 | ![sampctl](https://img.shields.io/badge/sampctl-samp--sound--array-2f2f2f.svg?style=for-the-badge) 3 | ![Total Downloads](https://img.shields.io/github/downloads/WoutProvost/samp-sound-array/total.svg?label=total%20downloads) 4 | 5 | **NOTICE:** It is not recommended to include this library! If you need the string corresponding to a given sound ID, just copy these string literals to your script! The provided `GetSoundInfo` function is not intended to be used in a production server! 6 | 7 | This repository mainly serves as a backup for the [original](http://pastebin.com/A1PbQZPd) array by Austin and [NoV]LaZ. Additionally, the original array has been converted to a Pawn array and is accessible as Pawn library. 8 | 9 | The sound IDs can be used in [PlayerPlaySound](https://team.sa-mp.com/wiki/PlayerPlaySound). For more information on sound IDs, see the corresponding [wiki](https://team.sa-mp.com/wiki/Sound_IDs) page. 10 | 11 | ## Installation 12 | Simply install to your project: 13 | ```bash 14 | sampctl package install WoutProvost/samp-sound-array 15 | ``` 16 | 17 | Include in your code and begin using the library: 18 | ```pawn 19 | #include 20 | ``` 21 | 22 | ## Usage 23 | ```pawn 24 | GetSoundInfo(soundid, speaker[], dialog[], slen, dlen); 25 | ``` 26 | 27 | ## Testing 28 | To test, simply run the package: 29 | ```bash 30 | sampctl package run 31 | ``` 32 | -------------------------------------------------------------------------------- /pawn.json: -------------------------------------------------------------------------------- 1 | { 2 | "user": "WoutProvost", 3 | "repo": "samp-sound-array", 4 | "entry": "test.pwn", 5 | "output": "test.amx", 6 | "dependencies": [ 7 | "sampctl/samp-stdlib" 8 | ] 9 | } -------------------------------------------------------------------------------- /test.pwn: -------------------------------------------------------------------------------- 1 | #include "sound.inc" 2 | 3 | main() { 4 | new speaker[MAX_SOUND_SPEAKER + 1], dialog[MAX_SOUND_DIALOG + 1]; 5 | GetSoundInfo(35451, speaker, dialog, sizeof(speaker), sizeof(dialog)); 6 | printf("%s: %s", speaker, dialog); 7 | } --------------------------------------------------------------------------------