IT/playSoundFrontEnd

From Multi Theft Auto: Wiki
Revision as of 22:04, 6 June 2008 by Shadd (talk | contribs)
Jump to navigation Jump to search


« Torna alla Pagina principale italiana .

Questa funzione avvia un suono ad un giocatore.

Sintassi

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

Argomenti richiesti

  • thePlayer: Il player a cui vuoi far sentire il suono.
  • sound: Un valore int contenente l'ID del suono. I valori validi sono:
  • 0 - 20 Suoni di Selezione
  • 27 - 30 Suoni Proiettili
  • 32 - 33 Suoni di Selezione
  • 34 Disturbo Radio
  • 35 Ferma Disturbo Radio
  • 37 - 38 Tick
  • 40 Suoni di Selezione
  • 41 - 42 Tick (munizioni finite)
  • 43 - 45 Countdown
  • 46 Riparazione
  • 47 Rumore Disturbato
  • 48 Ferma Rumore Disturbato
  • 49 Disturbo corto
  • 101 Countdown/Selezione
Click to expand [+]
Client

Valori restituiti

Restituisce true se il suono è stato correttamente eseguito, false altrimenti.

Esempio

Click to collapse [-]
server

Questo esempio esegue un suono quando un giocatore spawna.

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

Questo esempio esegue un suono quando il server attiva un evento client onSoundEvent.

function onSoundEvent ( )
    playSoundFrontEnd ( 16 )
end
addEvent ( "onSoundEvent" )
addEventHandler ( "onSoundEvent", getElementRoot(), onSoundEvent )

Vedere anche