Estou tendo uns problemas com meu VoIP, desde que coloquei nunca consegui nem ouvir ou falar com os players pelo VoIP, abaixo vou deixar umas capturas de tela e os códigos que estou usando.
https://imgur.com/KfCkvUG
Imagem no Mobile, com o Voip Ativo: https://imgur.com/48pwPK4
Código:
Meu Svlog
(10/01/2024 18:33)NandoXs Escreveu: Estou tendo uns problemas com meu VoIP, desde que coloquei nunca consegui nem ouvir ou falar com os players pelo VoIP, abaixo vou deixar umas capturas de tela e os códigos que estou usando.Imagem no Computador, com o Voip Ativo:
https://imgur.com/KfCkvUG
Imagem no Mobile, com o Voip Ativo: https://imgur.com/48pwPK4
Código:
Código:
// voip //
new SV_GSTREAM:gstream;
new SV_LSTREAM:lstream[MAX_PLAYERS] = { SV_NULL, ... };
new keyvoip[MAX_PLAYERS];
// OnGamemode
// voip //
gstream = SvCreateGStream(0xffff0000, "G"); // blue color
// OnPlayerConnect
// voip //
keyvoip[playerid] = 0;
if(!SvGetVersion(playerid))
{
SendClientMessage(playerid, -1, "Seu VOIP nao foi encontrado");
}
else if(!SvHasMicro(playerid))
{
SendClientMessage(playerid, -1, "VOIP: Seu microfone nao foi carregado");
}
else
{
lstream[playerid] = SvCreateDLStreamAtPlayer(40.0, SV_INFINITY, playerid, 0xff0000ff, "L");
SendClientMessage(playerid, -1, "Seu VOIP foi carregado com sucesso!");
sucess(playerid, "Voip Carregado");
if (gstream) SvAttachListenerToStream(gstream, playerid);
keyvoip[playerid] = 1;
}
// OnPlayerDisconnect
// voip //
if(lstream[playerid])
{
SvDeleteStream(lstream[playerid]);
lstream[playerid] = SV_NULL;
}
// OnPlayerSpawn
if(keyvoip[playerid] == 1)
{
SvAddKey(playerid, 0x5A);//Z
SvAddKey(playerid, 0x42);//B
}
// Stocks ( final da GM )
public SV_VOID:OnPlayerActivationKeyPress(SV_UINT:playerid, SV_UINT:keyid)
{
if(keyid == 0x5A && lstream[playerid])
{
SvAttachSpeakerToStream(lstream[playerid], playerid); //local
PlayerTextDrawSetString(playerid, TDFS_p[playerid][1], "Falando");
}
if(keyid == 0x42 && gstream)
{
if(IsPlayerAdmin(playerid))
{
SvAttachSpeakerToStream(gstream, playerid); //global
PlayerTextDrawSetString(playerid, TDFS_p[playerid][1], "Falando");
}
}
}
public SV_VOID:OnPlayerActivationKeyRelease(SV_UINT:playerid,SV_UINT:keyid)
{
if(keyid == 0x5A && lstream[playerid])
{
SvDetachSpeakerFromStream(lstream[playerid], playerid);
PlayerTextDrawSetString(playerid, TDFS_p[playerid][1], "Normal");
}
if(keyid == 0x42 && gstream)
{
if(IsPlayerAdmin(playerid))
{
SvDetachSpeakerFromStream(gstream, playerid);
PlayerTextDrawSetString(playerid, TDFS_p[playerid][1], "Normal");
}
}
}
Meu Svlog
Código:
[20:26:20] : [sv:dbg:network:init] : module initializing...
[20:26:20] : [dbg:raknet:init] : module initializing...
[20:26:20] : [dbg:raknet:init] : module initialized
[20:26:20] : [sv:dbg:network:init] : module initialized
[20:26:20] : [sv:dbg:main:Load] : creating 8 work threads...
[20:26:20] : -------------------------------------------
[20:26:20] : ___ __ __ _
[20:26:20] : / __| __ _ _ __ _ _\ \ / /__ (_) __ ___
[20:26:20] : \__ \/ _` | ' \| '_ \ / _ \| |/ _/ -_)
[20:26:20] : |___/\__,_|_|_|_| .__/\_/\___/|_|\__\___|
[20:26:20] : |_|
[20:26:20] : -------------------------------------------
[20:26:20] : SampVoice by MOR loaded
[20:26:20] : -------------------------------------------
[20:26:22] : [sv:dbg:main:AmxLoad] : net game pointer (value:0x9fb77a0) received
[20:26:22] : [sv:dbg:network:bind] : voice server running on port 45047
[20:26:22] : [sv:dbg:pawn:register] : finding 'OnPlayerActivationKeyPress' callback function...
[20:26:22] : [sv:dbg:pawn:register] : finded 'OnPlayerActivationKeyPress' callback function (index:97)
[20:26:22] : [sv:dbg:pawn:register] : finding 'OnPlayerActivationKeyRelease' callback function...
[20:26:22] : [sv:dbg:pawn:register] : finded 'OnPlayerActivationKeyRelease' callback function (index:98)
[21:13:56] : [sv:dbg:network:connect] : connecting player (1) with address (187.120.135.127) ...
[21:13:56] : [sv:dbg:network:connect] : player (1) assigned key (7f8778bbd59245cc)
[21:13:56] : [sv:dbg:network:receive] : player (1) identified (port:39634)
[21:20:22] : [sv:dbg:network:connect] : disconnecting player (1) ...
[02:00:23] : [sv:dbg:pawn:register] : finding 'OnPlayerActivationKeyPress' callback function...
[02:00:23] : [sv:dbg:pawn:register] : finded 'OnPlayerActivationKeyPress' callback function (index:97)
[02:00:23] : [sv:dbg:pawn:register] : finding 'OnPlayerActivationKeyRelease' callback function...
[02:00:23] : [sv:dbg:pawn:register] : finded 'OnPlayerActivationKeyRelease' callback function (index:98)
[11:02:59] : [sv:dbg:network:connect] : connecting player (0) with address (187.120.135.127) ...
[11:02:59] : [sv:dbg:network:connect] : player (0) assigned key (7f8778bb93c4b42f)
[11:02:59] : [sv:dbg:network:receive] : player (0) identified (port:39330)
[11:04:37] : [sv:dbg:network:connect] : connecting player (1) with address (187.120.135.127) ...
[11:04:37] : [sv:dbg:network:connect] : player (1) assigned key (7f8778bbb9a003a5)
[11:04:37] : [sv:dbg:network:receive] : player (1) identified (port:39683)
[11:07:33] : [sv:dbg:network:connect] : disconnecting player (0) ...
[11:07:40] : [sv:dbg:network:connect] : disconnecting player (1) ...
[11:32:04] : [sv:dbg:network:connect] : connecting player (0) with address (187.120.135.127) ...
[11:32:04] : [sv:dbg:network:connect] : player (0) assigned key (7f8778bbe353c413)
[11:32:04] : [sv:dbg:network:receive] : player (0) identified (port:40112)
[11:33:58] : [sv:dbg:network:connect] : connecting player (1) with address (187.120.135.127) ...
[11:33:58] : [sv:dbg:network:connect] : player (1) assigned key (7f8778bbe22f2442)
[11:33:58] : [sv:dbg:network:receive] : player (1) identified (port:40220)
[11:35:29] : [sv:dbg:network:connect] : disconnecting player (0) ...
[11:42:21] : [sv:dbg:network:connect] : disconnecting player (1) ...