Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <amxmodx>
- #define Sound "events/friend_died.wav"
- public plugin_init() {
- register_plugin("Play Sound","1.0","Seroff");
- register_clcmd("sond","snd");
- }
- public snd(id){
- play_sound(id, Sound);
- }
- stock play_sound(id, sound[], pitch = PITCH_NORM, bool:reliable = false)
- {
- static msg_index
- if(!msg_index) msg_index = get_user_msgid("SendAudio")
- message_begin(reliable ? (id ? MSG_ONE : MSG_ALL) : (id ? MSG_ONE_UNRELIABLE : MSG_BROADCAST), msg_index, _, id)
- write_byte(id)
- write_string(sound)
- write_short(pitch)
- message_end()
- }
Advertisement
Add Comment
Please, Sign In to add comment