Need some help

I have a darkrp server
So I really want to have it so when players get arrested the badboys song plays for them.
I was wondering if someone could help me with that, I am barely starting out my server and I want it to be as unique as possible.

What you’ll want to do is use the ‘playerArrested’ hook. This run server side every time any player is arrested, see here: http://wiki.darkrp.com/index.php/Hooks/Server/playerArrested

To use the hook, see here: http://wiki.garrysmod.com/page/Hook_Library_Usage

When you say “plays for them”, does that mean only the arrested player can hear the music? You have two options;
“EmitSound” - Sound will be emitted from the arrested player and everyone around them can hear it:

Entity:EmitSound
“PlaySound” - Only the player arrested can hear the sound, however this is client side only:

surface.PlaySound

If you chose to use the “PlaySound” function, then you’ll have to network: http://wiki.garrysmod.com/page/Net_Library_Usage

If you need any further help, you can add me on Steam below my avatar