SA-MP Forums Archive
Custom Sounds - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Custom Sounds (/showthread.php?tid=134707)



Custom Sounds - Christopher Mooney - 17.03.2010

Hey, i am currently making a Roleplay mod from scratch and i am currenting working on a Prison System where Police Officers will drive prisoners to Prison and Gang members can try and ram the van off the road but i want to make a Escape Alert Sound how can i do it?


Re: Custom Sounds - Hiitch - 17.03.2010

Hmm, I am not sure what you can do for this, but here is a rough coding scenario.

A player escapes, check the players position, or simple use playertopoint.

When that player is at that point, or their position is there, where you checked (GetPlayerPos / PlayerToPoint), play the sound, and send an alert to all online cops, and some players, if you want: (Create a loop for both the cops, and players if you want. PlayerPlaySound(loop, sound), SendClientMessage).

Good luck.

For more information..

Key points:

https://sampwiki.blast.hk/wiki/PlayerPlaySound <- for sounds
https://sampwiki.blast.hk/wiki/SoundID <- will help alot with finding the right sound

https://sampwiki.blast.hk/wiki/GetPlayerPos <- will help get the players position
Any more information can be found at http://wiki.sa-mp.com Just search.


Re: Custom Sounds - Correlli - 17.03.2010

You can use the audio plugin for custom sounds.