[Plugin] Audio Plugin

Nanory, in such case you don't need to use sscanf at all. Just check:
pawn Код:
if(isnull(params))
    return SendClientMessage(playerid, 0xAFAFAFAA, "USAGE: /play [URL]"), true;
And play:
pawn Код:
Audio_PlayStreamed(i, params, false, false, false);
Reply

Yes you are right, it's only one parameter so you don't need sscanf...
Sry it's my fault, I actually don't think about this...

Thank you for the correction
Reply

Quote:
Originally Posted by Nanory
Посмотреть сообщение
pawn Код:
if(!strlen(params)){return SendClientMessage(playerid,0xAFAFAFAA,"USAGE: /play [url]");}
Using strlen checking in zcmd commands wont work, it will never return 0. Use isnull as I said in my post!
Reply

Hi Guys,

I have a problem with the Audio Client, I installed but it dont work, as I have Windows 7 Professional installed it works fine, now I have Windows 7 Gamer Edition and the Client not works.

- Tomi
Reply

Audio_SetVolume(playerid, handleid, volume);

Does not appear to work. Any gotchas with this function?
Reply

Quote:
Originally Posted by mprofitt
Посмотреть сообщение
Audio_SetVolume(playerid, handleid, volume);

Does not appear to work. Any gotchas with this function?
A better question would be...

Does Audio_SetVolume(playerid, handleid, volume); work with
Audio_Set3DPosition(playerid, handleid, Float:x, Float:y, Float:z, Float:distance); ?
Reply

Error

Audio Plugin: Error binding endpoint for acceptor: Address already in use

Get this error on my server and does not loading
Reply

Thanks But not need... Beacuse appeared in 0.3D Audio xD
Nvm, GOOD WORK !!
Reply

Quote:
Originally Posted by David D
Посмотреть сообщение
Thanks But not need... Beacuse appeared in 0.3D Audio xD
Nvm, GOOD WORK !!
atm this plugin have more functions than 0.3d audio function.
Reply

Gooood!
Reply

Great job, Nice work!
Reply

Has the bug where it resets players files been fixed yet?
Reply

Incognito will you update Radio to let it play on foot by player? i will use your plugin after you update it i hope after 0.3d will be released because actually, functions for SA-MP like PlayStreamForPlayer is not the best thing what i need for audios. I hope you can do that

P.S
Attach3DAudioToPlayer/Vehicle/Object would be freak'n awesome! please do that too because i was asked you about that. I hope it will be done for the new version (because i tried to script it but with SetTimerEx i receive a not too good results).
Reply

Quote:
Originally Posted by tliamg
Посмотреть сообщение
Код:
if(strcmp(cmd, "/play", true) == 0) 
{
     foreach(Player, id)
     {
          if(!Audio_IsClientConnected(id)) continue;
          new play = Audio_Play(id, 1);
          Audio_Set3DPosition(id, play, 1482.2539, -1838.7302, 13.5469, 20.0);
     }
     return 1;
}

public Audio_OnClientConnect(playerid)
{
     Audio_TransferPack(playerid);
     SendClientMessage(playerid, COLOR_WHITE, "DOWNLOAD DATA BEGINS!");
}
public Audio_OnTransferFile(playerid, file[], current, total, result)
{
     new string[128];
     format(string, sizeof(string), "Loading %d/%d", current, total);
     SendClientMessage(playerid, COLOR_WHITE, string);
     if (current == total)
     {
          SendClientMessage(playerid, COLOR_WHITE, "All files have been prepared");
     }
     return 1;
}
Collect data only for id 0, how to improve it, to be extracted the data for all? Please help.
pawn Код:
if(strcmp(cmd, "/play", true) == 0)
{
     foreach(Player, id)
     {
          if(!Audio_IsClientConnected(id)) continue;
          // Check Player position and continue if Player is within range
          new play = Audio_Play(id, 1);
          // Get playerid position for Audio_Set3DPosition , before the foreach loop would be much better
          Audio_Set3DPosition(id, play, x, y, z, 20.0);
     }
     return 1;
}
Reply

Why crashinfo.txt is appeared when i shutted down my server ?
Код:
--------------------------

SA-MP Server: 0.3d-R2-800p



Exception At Address: 0x1000F425



Registers:

EAX: 0x0000000C	EBX: 0x0000000C	ECX: 0x009D4E88	EDX: 0x100191D0

ESI: 0x099FFD28	EDI: 0x009D4E88	EBP: 0x099FFD10	ESP: 0x099FFCD4

EFLAGS: 0x00010246



Stack:

+0000: 0x009D4E88   0x099FFD28   0x099FFD10   0x1001350D

+0010: 0x42A2E899   0x03111FD8   0x00BA2C18   0x00BA2C18

+0020: 0x099FFD60   0x71A541BE   0x71A541CD   0x00000168

+0030: 0x099FFD34   0x10033008   0xFFFFFFFF   0x099FFD8C

+0040: 0x10019219   0x42A2E96D   0x00000000   0x099FFE94

+0050: 0x099FFC80   0x0000000C   0x099FFD00   0x7C90E920

+0060: 0x099FFD5C   0x10033FA0   0x00000000   0x1001BD95

+0070: 0x099FFDD0   0x0A07F7B8   0x0A07FB90   0x42A2E925

+0080: 0x099FFE94   0x099FFD48   0x099FFDB0   0x10031708

+0090: 0x00000000   0x1001BD1F   0x099FFDC0   0x009D4E88

+00A0: 0x099FFDD0   0x0A07F7B8   0x0A07FB90   0x78583C1B

+00B0: 0x099FFD78   0x00000000   0x099FFE84   0x1001BC91

+00C0: 0x42A2E900   0x099FFDC0   0x099FFDA8   0x42A2E9D5

+00D0: 0x099FFE94   0x099FFDD0   0x42A2E900   0x099FFE74

+00E0: 0x100326A8   0x00000000   0x1001B3E6   0x100191D0

+00F0: 0x009D4E88   0x0A07F7B8   0x0A07FB90   0x000003E3

+0100: 0x10043170   0x099FFE00   0x42A2E991   0x009D4F18

+0110: 0x03111FD8   0x000003E3   0x78583C1B   0x009D0000

+0120: 0x099FFE00   0x00000000   0x00000000   0x100191D0

+0130: 0x009D4E88   0x0A07F7B8   0x0A07FB90   0x000003E3
Reply

The 0.5 client doesn't seem to work for me, once I run the installer and I open sa-mp it starts normal gta and then crashes.

So I tried everything with the 0.4 version, I think I did everything right with the server-side installation.
Using the filterscript for a test, but I can't get to hear anything.
Tried the command: /connected and it says I'm not connected.

Also:

audio.txt
Код:
[18:09:04] SA-MP Audio Plugin loaded
[18:09:32] Connecting to 82.169.211.78:7777 (attempt 1 of 10)...
[18:09:33] Could not connect to 82.169.211.78:7777 (Kan geen verbinding maken omdat de doelcomputer de verbinding actief heeft geweigerd)
[18:09:59] Connecting to 82.169.211.78:7777 (attempt 2 of 10)...
[18:10:01] Could not connect to 82.169.211.78:7777 (Kan geen verbinding maken omdat de doelcomputer de verbinding actief heeft geweigerd)
[18:10:11] Connecting to 82.169.211.78:7777 (attempt 3 of 10)...
[18:10:11] Could not connect to 82.169.211.78:7777 (Kan geen verbinding maken omdat de doelcomputer de verbinding actief heeft geweigerd)
[18:10:21] Connecting to 82.169.211.78:7777 (attempt 4 of 10)...
[18:10:23] Could not connect to 82.169.211.78:7777 (Kan geen verbinding maken omdat de doelcomputer de verbinding actief heeft geweigerd)
[18:11:57] Connecting to 82.169.211.78:7777 (attempt 5 of 10)...
[18:11:58] Could not connect to 82.169.211.78:7777 (Kan geen verbinding maken omdat de doelcomputer de verbinding actief heeft geweigerd)
[18:12:08] Connecting to 82.169.211.78:7777 (attempt 6 of 10)...
[18:12:09] Could not connect to 82.169.211.78:7777 (Kan geen verbinding maken omdat de doelcomputer de verbinding actief heeft geweigerd)
[18:12:19] Connecting to 82.169.211.78:7777 (attempt 7 of 10)...
[18:12:20] Could not connect to 82.169.211.78:7777 (Kan geen verbinding maken omdat de doelcomputer de verbinding actief heeft geweigerd)
[18:12:30] Connecting to 82.169.211.78:7777 (attempt 8 of 10)...
[18:12:31] Could not connect to 82.169.211.78:7777 (Kan geen verbinding maken omdat de doelcomputer de verbinding actief heeft geweigerd)
[18:12:41] Connecting to 82.169.211.78:7777 (attempt 9 of 10)...
[18:12:42] Could not connect to 82.169.211.78:7777 (Kan geen verbinding maken omdat de doelcomputer de verbinding actief heeft geweigerd)
[18:13:48] Connecting to 82.169.211.78:7777 (attempt 10 of 10)...
[18:13:49] Could not connect to 82.169.211.78:7777 (Kan geen verbinding maken omdat de doelcomputer de verbinding actief heeft geweigerd)
[18:20:39] SA-MP Audio Plugin unloaded
I read something about, enough bandwith? But I don't know if that's the problem, can someone help me out with this please?
Reply

Quote:
Originally Posted by sheenidgs
Посмотреть сообщение
Why crashinfo.txt is appeared when i shutted down my server ?
Код:
--------------------------

SA-MP Server: 0.3d-R2-800p



Exception At Address: 0x1000F425



Registers:

EAX: 0x0000000C	EBX: 0x0000000C	ECX: 0x009D4E88	EDX: 0x100191D0

ESI: 0x099FFD28	EDI: 0x009D4E88	EBP: 0x099FFD10	ESP: 0x099FFCD4

EFLAGS: 0x00010246



Stack:

+0000: 0x009D4E88   0x099FFD28   0x099FFD10   0x1001350D

+0010: 0x42A2E899   0x03111FD8   0x00BA2C18   0x00BA2C18

+0020: 0x099FFD60   0x71A541BE   0x71A541CD   0x00000168

+0030: 0x099FFD34   0x10033008   0xFFFFFFFF   0x099FFD8C

+0040: 0x10019219   0x42A2E96D   0x00000000   0x099FFE94

+0050: 0x099FFC80   0x0000000C   0x099FFD00   0x7C90E920

+0060: 0x099FFD5C   0x10033FA0   0x00000000   0x1001BD95

+0070: 0x099FFDD0   0x0A07F7B8   0x0A07FB90   0x42A2E925

+0080: 0x099FFE94   0x099FFD48   0x099FFDB0   0x10031708

+0090: 0x00000000   0x1001BD1F   0x099FFDC0   0x009D4E88

+00A0: 0x099FFDD0   0x0A07F7B8   0x0A07FB90   0x78583C1B

+00B0: 0x099FFD78   0x00000000   0x099FFE84   0x1001BC91

+00C0: 0x42A2E900   0x099FFDC0   0x099FFDA8   0x42A2E9D5

+00D0: 0x099FFE94   0x099FFDD0   0x42A2E900   0x099FFE74

+00E0: 0x100326A8   0x00000000   0x1001B3E6   0x100191D0

+00F0: 0x009D4E88   0x0A07F7B8   0x0A07FB90   0x000003E3

+0100: 0x10043170   0x099FFE00   0x42A2E991   0x009D4F18

+0110: 0x03111FD8   0x000003E3   0x78583C1B   0x009D0000

+0120: 0x099FFE00   0x00000000   0x00000000   0x100191D0

+0130: 0x009D4E88   0x0A07F7B8   0x0A07FB90   0x000003E3
Use Audio_DestroyTCPServer(); in public OnGameModeExit() of your gamemode.
Reply

Quote:
Originally Posted by jesse237
Посмотреть сообщение
The 0.5 client doesn't seem to work for me, once I run the installer and I open sa-mp it starts normal gta and then crashes.

So I tried everything with the 0.4 version, I think I did everything right with the server-side installation.
Using the filterscript for a test, but I can't get to hear anything.
Tried the command: /connected and it says I'm not connected.

Also:

audio.txt
Код:
[18:09:04] SA-MP Audio Plugin loaded
[18:09:32] Connecting to 82.169.211.78:7777 (attempt 1 of 10)...
[18:09:33] Could not connect to 82.169.211.78:7777 (Kan geen verbinding maken omdat de doelcomputer de verbinding actief heeft geweigerd)
[18:09:59] Connecting to 82.169.211.78:7777 (attempt 2 of 10)...
[18:10:01] Could not connect to 82.169.211.78:7777 (Kan geen verbinding maken omdat de doelcomputer de verbinding actief heeft geweigerd)
[18:10:11] Connecting to 82.169.211.78:7777 (attempt 3 of 10)...
[18:10:11] Could not connect to 82.169.211.78:7777 (Kan geen verbinding maken omdat de doelcomputer de verbinding actief heeft geweigerd)
[18:10:21] Connecting to 82.169.211.78:7777 (attempt 4 of 10)...
[18:10:23] Could not connect to 82.169.211.78:7777 (Kan geen verbinding maken omdat de doelcomputer de verbinding actief heeft geweigerd)
[18:11:57] Connecting to 82.169.211.78:7777 (attempt 5 of 10)...
[18:11:58] Could not connect to 82.169.211.78:7777 (Kan geen verbinding maken omdat de doelcomputer de verbinding actief heeft geweigerd)
[18:12:08] Connecting to 82.169.211.78:7777 (attempt 6 of 10)...
[18:12:09] Could not connect to 82.169.211.78:7777 (Kan geen verbinding maken omdat de doelcomputer de verbinding actief heeft geweigerd)
[18:12:19] Connecting to 82.169.211.78:7777 (attempt 7 of 10)...
[18:12:20] Could not connect to 82.169.211.78:7777 (Kan geen verbinding maken omdat de doelcomputer de verbinding actief heeft geweigerd)
[18:12:30] Connecting to 82.169.211.78:7777 (attempt 8 of 10)...
[18:12:31] Could not connect to 82.169.211.78:7777 (Kan geen verbinding maken omdat de doelcomputer de verbinding actief heeft geweigerd)
[18:12:41] Connecting to 82.169.211.78:7777 (attempt 9 of 10)...
[18:12:42] Could not connect to 82.169.211.78:7777 (Kan geen verbinding maken omdat de doelcomputer de verbinding actief heeft geweigerd)
[18:13:48] Connecting to 82.169.211.78:7777 (attempt 10 of 10)...
[18:13:49] Could not connect to 82.169.211.78:7777 (Kan geen verbinding maken omdat de doelcomputer de verbinding actief heeft geweigerd)
[18:20:39] SA-MP Audio Plugin unloaded
I read something about, enough bandwith? But I don't know if that's the problem, can someone help me out with this please?
Make sure the server has allowed the TCP port 7777(or the server's SA-MP UDP port) to be transmitted if you are not testing it on your localhost server. If you crash after installing 0.5, try to go to your GTA:SA folder, and pull everything out from the plugins folder (not including the DLLs that the server uses).

Quote:
Originally Posted by SDraw
Посмотреть сообщение
Use Audio_DestroyTCPServer(); in public OnGameModeExit() of your gamemode.
I don't know this. I guess it has been included in the include file, just like Audio_CreateTCPServer
Reply

Quote:
Originally Posted by leong124
Посмотреть сообщение
I don't know this. I guess it has been included in the include file, just like Audio_CreateTCPServer
But only creating of TCP server is included in include file.
PHP код:
public OnGameModeInit()
{
    if (!
Audio_g_CTS)
    {
        
Audio_g_CTS true;
        
Audio_g_OPC = (funcidx("Audio_OnPlayerConnect") != -1);
        
Audio_g_OPDC = (funcidx("Audio_OnPlayerDisconnect") != -1);
        
Audio_CreateTCPServer(GetServerVarAsInt("port"));
    }
    if (
funcidx("Audio_OnGameModeInit") != -1)
    {
        return 
CallLocalFunction("Audio_OnGameModeInit""");
    }
    return 
1;
}
#if defined _ALS_OnGameModeInit
    #undef OnGameModeInit
#else
    #define _ALS_OnGameModeInit
#endif
#define OnGameModeInit Audio_OnGameModeInit
forward Audio_OnGameModeInit(); 
But about destroying TCP server on gamemode exit - nothing.
Reply

Is it possible to convert my old script with audio plugin 0.4 to 0.5? IF yes tell me please how its possible
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)