DE/playSoundFrontEnd

From Multi Theft Auto: Wiki
Revision as of 08:38, 21 August 2012 by Leyynen (talk | contribs)
Jump to navigation Jump to search

Diese Funktion spielt einen gewissen Sound für einen bestimmten Spieler ab.

Syntax

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

Benötigte Argumente

  • thePlayer: Der Spieler, der den Sound hören soll
  • sound: Ein int der für den Sound steht. Richtige ID's sind:
    • 0 - 20 Auswahl Sounds
    • 27 - 30 Geschoss Sounds
    • 32 - 33 Auswahl Sounds
    • 34 statisches Radio
    • 35 Stop statisches Radio
    • 37 - 38 Tick
    • 40 Auswahl Sounds
    • 41 - 42 Tick (Keine Munition)
    • 43 - 45 Rennen Countdown
    • 46 Reparatur
    • 47 statisches weißes Rauschen
    • 48 Stop statisches weißes Rauschen
    • 49 statisch Kurz
    • 101 Countdown/Auswahl
Click to expand [+]
Client

Rückgaben

Gibt true wieder, wenn der Sound erfolgreich abgespielt wurde. 'false', wenn nicht.

Beispiel

Click to collapse [-]
server

Dieses Beispiel spielt einen Sound ab, wenn der Spieler spawnt.

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

Dieses Beispiel spielt einen Sound ab, wenn der Spieler '/sound' verwendet.

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

Siehe auch


Beispiel

Click to collapse [-]
server

In diesem Beispiel wird ein Sound abgespielt, wenn ein Spieler spawnt.

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

In diesem Beispiel wird ein Sound abgespielt, wenn der Client den Command /sound eingibt.

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

Andere Funktionen