PlayerPlaySound
From SA-MP Wiki
PlayerPlaySound
This function plays the specified SoundID to the player. The x, y, z values don't seem to affect the sound on some sounds.
(playerid, soundid, Float:x, Float:y, Float:z)
| playerid | The ID of the player who will hear the sound. |
| soundid | The SoundID of the sound to be played. |
| Float:x | X coordinate. |
| Float:y | Y coordinate. |
| Float:z | Z coordinate. |
This function does not return a specific value.
Note: Only use the coordinates if you want the sound to be played at a certain position. Set coordinates all to 0 to just play the sound
// player punching sound (fits for commands such as /slap well) PlayerPlaySound(playerid, 1130, 0.0, 0.0, 0.0);
Related Functions
The following functions might be useful as well, as they're related to this function in one way or another.
- PlayCrimeReportForPlayer: Play a crime report for a player.
