Code Monkey home page Code Monkey logo

samp-sound-array's Introduction

samp-sound-array

sampctl Total Downloads

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!

This repository mainly serves as a backup for the original array by Austin and [NoV]LaZ. Additionally, the original array has been converted to a Pawn array and is accessible as Pawn library.

The sound IDs can be used in PlayerPlaySound. For more information on sound IDs, see the corresponding wiki page.

Installation

Simply install to your project:

sampctl package install WoutProvost/samp-sound-array

Include in your code and begin using the library:

#include <sound>

Usage

GetSoundInfo(soundid, speaker[], dialog[], slen, dlen);

Testing

To test, simply run the package:

sampctl package run

samp-sound-array's People

Contributors

woutprovost avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

samp-sound-array's Issues

Binary search or hash

If this library were to be used in a production server (which is not recommended in the first place), a binary search (or even better, a hash!) should be used in the GetSoundInfo function instead of a linear search, since the array is already sorted anyway.

Direct array access would be a huge waste of space, since the amount of entries (around 7000) is much less than the maximum ID (around 45000).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.