HU/playSoundFrontEnd: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
Line 13: Line 13:
===Required Arguments===  
===Required Arguments===  
*'''thePlayer:''' the [[player]] you want the sound to play for.
*'''thePlayer:''' the [[player]] you want the sound to play for.
*'''sound:''' a whole [[int]] specifying the sound id to play. Valid values are:
*'''sound:''' egy egész [[int]] , amely meghatározza a hang idét a lejátszáshoz. Érvényes értékek:
{{Sounds}}
{{Sounds}}
</section>
</section>

Revision as of 18:48, 21 July 2018

Ez a funkció egy elülső hangot játszik le a megadott játékosnak.

[[{{{image}}}|link=|]] Note: Ezeket a hangokat kilehet kapcsolni a setWorldSoundEnabled-el, tehát ha ezek a hangok nem működnek, ellenőriznie kell, hogy nincsenek-e kikapcsolva.

Syntax

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

OOP Syntax Help! I don't understand this!

Method: player:playSoundFrontEnd(...)

Required Arguments

  • thePlayer: the player you want the sound to play for.
  • sound: egy egész int , amely meghatározza a hang idét a lejátszáshoz. Érvényes értékek:
    • 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

Visszaad egy igaz értéket, ha a hang sikeresen létre lett hozva, egyébként hamis.

Example

Click to collapse [-]
server

Ez a példa egy hangot játszik le mikor egy játékos lerakott.

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

Ez a példa egy hangot játszik le amikor egy játékos beírja a '/sound' parancsot.

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

See Also