Scripting/Squirrel/Functions/Player.PlaySound: Difference between revisions

From Vice City Multiplayer
Jump to navigation Jump to search
Caution icon
This wiki is using an old backup from 2020
Some information may be old/missing
(Created page with "This function will play a sound for a specific player == Syntax == <pre>Player.PlaySound( sound )</pre> == Arguments == * ''instance'' '''Player''' - The player to play so...")
 
mNo edit summary
 
(One intermediate revision by one other user not shown)
Line 20: Line 20:
}
}
</source>
</source>
=== Notes ===
Use [[Scripting/Squirrel/Functions/Player.UniqueWorld|Player.UniqueWorld]] to play sound for a specific player.


== Related Functions ==
== Related Functions ==


{{Scripting/Squirrel/Functions/Game_Functions}}
{{Scripting/Squirrel/Functions/Player_Functions}}
[[Category:Scripting/Squirrel/Functions/Player_Functions]]

Latest revision as of 21:00, 17 December 2018

This function will play a sound for a specific player

Syntax

Player.PlaySound( sound )

Arguments

  • instance Player - The player to play sound for
  • int sound - The sound ID

Example

function OnPlayerCommand( player,cmd , text )
{
     if ( cmd == "sound" )
     {
          player.PlaySound( 30 );
     }
}

Related Functions

Player Game Functions

These functions exist for compatibility with the R2 Squirrel server.