ES/PlaySoundFrontEnd

From Multi Theft Auto: Wiki
Jump to navigation Jump to search

Esta funcion reproduce un sonido para un jugador especifico. Nota: Este sonido puede ser desactivado con setWorldSoundEnabled si la funcion no reproduce el sonido, usted debe de revisar si el sonido esta desactivado o no

Syntax

Click to collapse [-]
Server
bool playSoundFrontEnd ( player thePlayer, int sonido )   

Argumentos Obligatorios

  • thePlayer: El player para el cual usted quiere reproducir ese sonido.
  • sound: El ID [ int ] especifico del sonido que quiere reproducir, los ID validos son los siguientes:
    • 0 - 20 Selection sounds
    • 27 - 30 Bullet sounds
    • 32 - 33 Selection sounds
    • 34 Radio static
    • 35 Stop Radio static
    • 37 - 38 Tick
    • 40 Selection sounds
    • 41 - 42 Tick (no ammo)
    • 43 - 45 Race countdown
    • 46 Repair
    • 47 White noise static
    • 48 Stop White noise static
    • 49 Static short
    • 101 Countdown/selection
Click to expand [+]
Client

Returns

Devuelve true si el sonido se ha reproducido satisfactoriamente, false si no ha sido reproducido.

Ejemplo

Click to collapse [-]
server

Este ejemplo reproduce un sonido cuando el jugador spawnea.

function onPlayerSpawn ( theSpawnpoint, theTeam )
    playSoundFrontEnd ( source, 16 )
end
addEventHandler ( "onPlayerSpawn", getRootElement(), onPlayerSpawn )
Click to collapse [-]
client

Este ejemplo reproduce un sonido cuando el jugador utiliza el comando '/sound'.

function onSoundEvent ( )
    playSoundFrontEnd ( 16 )
end
addCommandHandler("sound", onSoundEvent)

Vea También