Audio Plugin - 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: Audio Plugin (
/showthread.php?tid=249475)
Audio Plugin - Unknown123 - 19.04.2011
pawn Код:
#include <a_samp>
#include <audio>
#include <zcmd>
#include <sscanf2>
#define COLOR_RED 0xFF0000FF
#define COLOR_YELLOW 0xFFFF00FF
public OnFilterScriptInit()
{
Audio_SetPack("default_pack", true);
return 1;
}
COMMAND:play(playerid, params[])
{
new audioid;
if(sscanf(params, "d", audioid)) return SendClientMessage(playerid, COLOR_YELLOW, "USAGE: /play (audioid)");
{
Audio_Play(playerid, audioid, false, false, false);
return 1;
}
}
COMMAND:stop(playerid, params[])
{
new handleid;
if(sscanf(params, "d", handleid)) return SendClientMessage(playerid, COLOR_YELLOW, "USAGE: /stop (handleid)");
{
Audio_Stop(playerid, handleid);
return 1;
}
}
audio.ini
Код:
[default_pack]
1 = test.wav
2 = test2.wav
3 = test3.wav
archive = CR
archive = SCRIPT
Folder! audiopacks/default_pack:
Код:
test.wav
test2.wav
test3.wav
And yeas, the plugin get loaded (but no sound ingame)
Re: Audio Plugin -
marinov - 19.04.2011
more info ? whats not working ?
Re: Audio Plugin -
Donya - 19.04.2011
do you have 1 = test.wav
2 = test2.wav
3 = test3.wav in the default pack folder?
Re: Audio Plugin - Unknown123 - 19.04.2011
Quote:
Originally Posted by Donya
do you have 1 = test.wav
2 = test2.wav
3 = test3.wav in the default pack folder?
|
Yes i have the
test.wav
test1.wav
test2.wav
in my default pack folder..
i also have
1 = test.wav
2 = test2.wav
3 = test3.wav
in the audio.ini file
¤oops for got to add info: My problem is that i dont hear any sdond ingame¤
Re: Audio Plugin -
Incognito - 19.04.2011
Is the audio pack transferring to you? Did you read this part of the tutorial?
Quote:
Originally Posted by Incognito
In your gamemode, make sure that these things are present:
pawn Код:
public OnGameModeInit() { // Set the audio pack when the gamemode loads Audio_SetPack("default_pack", true); }
public Audio_OnClientConnect(playerid) { // Transfer the audio pack when the player connects Audio_TransferPack(playerid); }
public Audio_OnSetPack(audiopack[]) { for (new i = 0; i < MAX_PLAYERS; i++) { // Transfer the audio pack to all players when it is set Audio_TransferPack(i); } }
That will ensure that audio packs are set and transferred correctly (more information is available in the example filterscript).
|