How do I make a command play a sound?

Started by WheatleyGAMING, Sep 13, 2016, 12:09 PM

Previous topic - Next topic

WheatleyGAMING

So I saw a troll mod made by @Zihad-VCMP  and changed it as much as I could to see what I could do because I only started coding for VCMP 15 hours ago lmao. But I thought of a really good idea but I need to ask this,how do I script something that makes a command play a sound from the sound folder?

KAKAN

#1
1st of all, put the sounds in: server_dir/store/sounds The folder name might be sound instead of sounds so try both.
Rename your sound file to: sID_Name.wav. The IDs start from 50000( i think ).
So, the first name would be: s50000_MyProSong.wav.
After that, in your script, use player.PlaySound( ID ); to play for a specific player or PlaySoundForWorld( worldID, soundID );.
For example: player.PlaySound( 50000 );. Here's more info on the custom sound( for server, I didn't check the client update list ): http://forum.vc-mp.org/?topic=2338.0
NOTE:: VCMP supports only .wav files for now


:edit: Ok well, I got the full docs for the client custom sound system. Here are the links:-
Link #1( for client, includes most of the info ): http://forum.vc-mp.org/?topic=2046.0
Link #2( for server, the command to play the sound from the server ): http://forum.vc-mp.org/?topic=2338.0
oh no