SA-MP Forums Archive
[HELP] Sound issue - 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: [HELP] Sound issue (/showthread.php?tid=113547)



[HELP] Sound issue - WThieves - 14.12.2009

Hello everyone i've made a script with gates and commands, only i want to play a sound when the commands are typed.
I've tried lots of things but i cant get it to work, and if the commands are typed, i'd like to make the sound only hearable for the player that used the command, how do i do this all?
Also, i trid to make a sound hearable for only admins or such, but i couldn't get that to work either (duhh..).
If someone could help me i'd apprecciate it.


Re: [HELP] Sound issue - WThieves - 14.12.2009

I have this:
Quote:

if (strcmp(cmdtext, "/Dac1", true)==0)
{
GetPlayerPos(playerid, s[X], s[Y] ,s[Z]);
PlayerPlaySound(playerid, 1158, 0, 0, 0);
MoveObject(carry, -2533.359375, 3040.3, 8.9499998092651, 1.0);
SendClientMessage(playerid, BLUE, "Aircraftcarrier elevator 1 downed, over.");
return 1;
}




Re: [HELP] Sound issue - WThieves - 15.12.2009

Someone please help!


Re: [HELP] Sound issue - dice7 - 15.12.2009

that will play the sound to the one who typed the cmd


Re: [HELP] Sound issue - WThieves - 15.12.2009

Quote:
Originally Posted by dice7
that will play the sound to the one who typed the cmd
]
Yes but it doesn't work, do you know how to get it to work?


Re: [HELP] Sound issue - yom - 15.12.2009

You play the sound too far away so you can't hear it, and maybe this sound id doesn't work.


Re: [HELP] Sound issue - WThieves - 15.12.2009

Thank you the sound id was wrong, but now i have another problem
If i play teh sound it keeps repeating itsself and it uses way too long time to play,
Could you help me out here??


Re: [HELP] Sound issue - patchkinson - 15.12.2009

dont let it loop
go to wiki.sa-mp.com and search for playerplaysound


Re: [HELP] Sound issue - yom - 15.12.2009

Some sounds are looping, and you have to stop it by playing sound id <your sound id + 1>.

Exemple from AudioEvents.txt:
Код:
SOUND_GARAGE_DOOR_START 1153

SOUND_GARAGE_DOOR_STOP 1154
If you want to stop it when the object reach it's destination, play the sound which stop the loop, under OnObjectMoved.