Squirrel/Server/Functions/Sounds/PlaySuspectLastSeen
From Liberty Unleashed Wiki
(Difference between revisions)
(Created page with '{{Squirrel/Title|PlaySuspectLastSeen}} This function plays a 'suspect last seen' message. == Syntax == <code>bool PlaySuspectLastSeen( player plr, Vector pos )</code> <code>boo…') |
|||
Line 15: | Line 15: | ||
== Example == | == Example == | ||
− | + | This code will play the "suspect last seen" message when they use the '/lastseen' command. | |
− | + | ||
<code lang="squirrel"> | <code lang="squirrel"> | ||
− | + | function onPlayerCommand( player, cmd, text ) | |
+ | { | ||
+ | if( cmd == "lastseen" ) | ||
+ | { | ||
+ | PlaySuspectLastSeen(player, player.Pos); | ||
+ | } | ||
+ | } | ||
</code> | </code> | ||
=== Notes === | === Notes === | ||
− | + | The event [[Squirrel/Server/Events/Player/onPlayerCommand|onPlayerCommand]] was used in this example. More info about them in corresponding pages. | |
== Related Functions == | == Related Functions == | ||
{{Squirrel/Server/Functions/Sounds}} | {{Squirrel/Server/Functions/Sounds}} |
Latest revision as of 14:03, 31 July 2011
This function plays a 'suspect last seen' message.
[edit] Syntax
bool PlaySuspectLastSeen( player plr, Vector pos )
bool PlaySuspectLastSeen( player plr, float x, float y, float z )
[edit] Arguments
- plr - The player to play the sound for
- pos - The position of where the suspect was last seen
- x, y, z - The position of where the suspect was last seen as floats
[edit] Example
This code will play the "suspect last seen" message when they use the '/lastseen' command.
function onPlayerCommand( player, cmd, text ) { if( cmd == "lastseen" ) { PlaySuspectLastSeen(player, player.Pos); } }
[edit] Notes
The event onPlayerCommand was used in this example. More info about them in corresponding pages.
[edit] Related Functions
- FindSound
- PlayFrontEndSound
- PlayFrontEndTrack
- PlaySuspectLastSeen
- Sound.Close
- Sound.Open
- Sound.Play
- Sound.Pause
- Sound.Stop
- StopFrontEndTrack