Scripting/Squirrel/Functions/PlaySoundForWorld
This wiki is using an old backup from 2020
Some information may be old/missing
This Function will Play Sounds for any specific World
Syntax
PlaySoundForWorld(worldID, soundID)
Arguments
- int worldID - The world ID.
- int soundID - The sound ID.
Example
function onPlayerCommand( player, cmd, text );
{
if ( cmd == "playsound" )
{
if ( !text )
{
MessagePlayer("Syntax: /playsound [Sound ID]", player);
}
else
{
PlaySoundForWorld(player.UniqueWorld, text.tointeger());
}
}
}
Notes
Call onPlayerCommand were used in this example. More info about them in the corresponding pages.