Portal SAMP
[Ajuda] erro no voip: [sv:dbg:main:AmxLoad] : failed to bind voice server - Versão de Impressão

+- Portal SAMP (https://portalsamp.com)
+-- Fórum: SA-MP (https://portalsamp.com/forumdisplay.php?fid=5)
+--- Fórum: Área de suporte (https://portalsamp.com/forumdisplay.php?fid=6)
+--- Tópico: [Ajuda] erro no voip: [sv:dbg:main:AmxLoad] : failed to bind voice server (/showthread.php?tid=1436)



erro no voip: [sv:dbg:main:AmxLoad] : failed to bind voice server - J.E - 22/07/2021

Boa noite estou com um erro na minha gm por conta do voip quando ligo a gm acontece isso:

Código:
==================

  Loaded.
Loading plugin: sampvoice
[sv:dbg:network:init] : module initializing...
[dbg:raknet:init] : module initializing...
[dbg:raknet:init] : installed hook to 'GetRakServerInterface' function (ptr:00450220)
[dbg:raknet:init] : installed hook to 'OnPlayerDisconnect' function (ptr:0046D970)
[dbg:raknet:init] : module initialized
[sv:dbg:network:init] : module initialized
-------------------------------------------
  ___                __  __    _
  / __| __ _ _ __  _ _\ \ / /__ (_) __ ___
  \__ \/ _` | '  \| '_ \  / _ \| |/ _/ -_)
  |___/\__,_|_|_|_| .__/\_/\___/|_|\__\___|
                  |_|
-------------------------------------------
          SampVoice by MOR loaded
-------------------------------------------
  Loaded.
Loading plugin: cashdetect
  Failed.
Loaded 6 plugins.


Started server on port: 7777, with maxplayers: 100 lanmode is OFF.


Filterscripts
---------------
  Loading filterscript 'rcon.amx'...
[sv:dbg:main:AmxLoad] : net game pointer (value:02559B58) received
[sv:dbg:network:bind] : voice server running on port 62231
  Loading filterscript 'bare.amx'...
  Error: Function not registered: 'SvCreateGStream'
  Error: Function not registered: 'SvDeleteStream'
  Error: Function not registered: 'SvGetVersion'
  Error: Function not registered: 'SvHasMicro'
  Error: Function not registered: 'SvCreateDLStreamAtPlayer'
  Error: Function not registered: 'SvAttachListenerToStream'
  Error: Function not registered: 'SvAddKey'
  Error: Function not registered: 'SvAttachSpeakerToStream'
  Error: Function not registered: 'SvDetachSpeakerFromStream'
[sv:dbg:main:AmxLoad] : failed to bind voice server
  Loaded 2 filterscripts.

  Error: Function not registered: 'WP_Hash'
[sv:dbg:main:AmxLoad] : failed to bind voice server
E estou utilizando essa linha de codigos na minha FS.
Código:
#include <a_samp>
#include <sampvoice>

main() {}

new SV_GSTREAM:gstream = SV_NULL;
new SV_LSTREAM:lstream[MAX_PLAYERS] = { SV_NULL, ... };

public OnGameModeInit()
{
    // Uncomment the line to enable debug mode
    // SvDebug(SV_TRUE);

    gstream = SvCreateGStream(0xffff0000, "Global");
}

public OnGameModeExit()
{
    if (gstream) SvDeleteStream(gstream);
}

public OnPlayerConnect(playerid)
{
    if(!SvGetVersion(playerid))
    {
        SendClientMessage(playerid, -1, "Seu VOIP não foi encontrado");
    }
    else if(!SvHasMicro(playerid))
    {
        SendClientMessage(playerid, -1, "VOIP: Seu microfone não foi carregado");
    }
    else if((lstream[playerid] = SvCreateDLStreamAtPlayer(40.0, SV_INFINITY, playerid, 0xff0000ff, "L")))
    {
        SendClientMessage(playerid, -1, "Seu VOIP foi carregado com sucesso!");
        if (gstream) SvAttachListenerToStream(gstream, playerid);
        SvAddKey(playerid, 0x5A);//Z
        SvAddKey(playerid, 0x42);//B
    }
    return 1;

}

public OnPlayerDisconnect(playerid, reason)
{
    // Removing the player's local stream after disconnecting
    if (lstream[playerid])
    {
        SvDeleteStream(lstream[playerid]);
        lstream[playerid] = SV_NULL;
    }
    return 1;
}

public SV_VOID:OnPlayerActivationKeyPress(SV_UINT:playerid, SV_UINT:keyid)
{
    // Attach player to local stream as speaker if 'B' key is pressed
    if (keyid == 0x42 && lstream[playerid]) SvAttachSpeakerToStream(lstream[playerid], playerid);
    // Attach the player to the global stream as a speaker if the 'Z' key is pressed
    if (keyid == 0x5A && gstream) SvAttachSpeakerToStream(gstream, playerid);
}

public SV_VOID:OnPlayerActivationKeyRelease(SV_UINT:playerid, SV_UINT:keyid)
{
    // Detach the player from the local stream if the 'B' key is released
    if (keyid == 0x42 && lstream[playerid]) SvDetachSpeakerFromStream(lstream[playerid], playerid);
    // Detach the player from the global stream if the 'Z' key is released
    if (keyid == 0x5A && gstream) SvDetachSpeakerFromStream(gstream, playerid);
}



RE: erro no voip: [sv:dbg:main:AmxLoad] : failed to bind voice server - yoda - 31/07/2021

Uma duvida, está tentando em uma vps linux?


RE: erro no voip: [sv:dbg:main:AmxLoad] : failed to bind voice server - xbruno1000x - 31/07/2021

Pelo que eu vi no log, você está usando o Raknet. Ele não é compatível com o SAMPVoice. Terá que removê-lo.


RE: erro no voip: [sv:dbg:main:AmxLoad] : failed to bind voice server - MisteriumBr - 08/12/2022

Bruno, parece que estou com o mesmo problema, posso retirar o Raknet sem me preocupar ele server pra que?


RE: erro no voip: [sv:dbg:main:AmxLoad] : failed to bind voice server - xbruno1000x - 08/12/2022

(08/12/2022 09:11)MisteriumBr Escreveu: Bruno, parece que estou com o mesmo problema, posso retirar o Raknet sem me preocupar ele server pra que?

Não, se o raknet está no seu gamemode e retirá-lo, provavelmente haverá perdas de sistemas. Para o gamemode funcionar sem o raknet, terá que remover os códigos relacionados a ele.

Para usar o voip, com certeza terá que remover o raknet, mas é importante testar se o servidor é capaz de suportar antes de fazer qualquer mudança. Use um gamemode como o Bare, que já vem com o SA-MP para realizar testes e ver se o voip roda normalmente.