Voice SAMP - annety -  31/12/2020
 
 
Agora parece que é uma tendencia ter voice no SAMP (uma tendencia ótima e necessária)... 
 
O que eu preciso fazer pro meu servidor suportar voice PC+ANDROID? 
Preciso modificar algo no GM? 
 
Pra mobile achei isso: https://portalsamp.com/showthread.php?tid=565 
Pra PC achei isso: https://github.com/CyberMor/sampvoice 
 
São esses mesmo? 
 
Alguém pode me dar uma estrada pra seguir?
 
 
 
RE: Voice SAMP - NelsonC. -  01/01/2021
 
 
São esses sim.
 
 
 
RE: Voice SAMP - xbruno1000x -  01/01/2021
 
 
 (31/12/2020 16:07)annety Escreveu:  Agora parece que é uma tendencia ter voice no SAMP (uma tendencia ótima e necessária)... 
 
O que eu preciso fazer pro meu servidor suportar voice PC+ANDROID? 
Preciso modificar algo no GM? 
 
Pra mobile achei isso: https://portalsamp.com/showthread.php?tid=565 
Pra PC achei isso: https://github.com/CyberMor/sampvoice 
 
São esses mesmo? 
 
Alguém pode me dar uma estrada pra seguir?  
Vale ressaltar que é necessário instalar o plugin no server-side e o jogador deve instalar um mod no Client-Side. Apesar de ser uma tendência, ainda é muito complicado por em prática. Acredito que no Open-MP será mais prático, visto que será open-source e qualquer um poderá fazer a implementação na plataforma.
 
 
 
RE: Voice SAMP - annety -  14/01/2021
 
 
Fiquei com duas dúvidas e preciso de alguém mais experiente pra me ajudar 
 
1) 
O que tem no client são 4 dlls e um asi... 
Mas detectou vírus em 2 arquivos https://www.virustotal.com/gui/file/6443138c11f3b384ee822af790492216e07b7293a7d1b05f86d7bc43a720ccf2/detection 
 
Por via das dúvidas eu queria compilar o código fonte pra gerar esses arquivos do client... 
É possível? Já que o código tá todo aberto em: 
https://github.com/CyberMor/sampvoice/releases 
Source code (zip) 
 
Como faz pra compilar isso no linux? 
 
2) 
Tem uns trechos de código pra ativar o voice global e local 
Código: 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); 
}
  Tem como criar uma outra opção de voice que é: 
voice global pra todo mundo que tem org[playerid] igual 
 
Pra manter o rádio do jogo com o voice...
 
 
 
RE: Voice SAMP - xbruno1000x -  14/01/2021
 
 
 (14/01/2021 20:11)annety Escreveu:  2) 
Tem uns trechos de código pra ativar o voice global e local 
Código: 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); 
}
  Tem como criar uma outra opção de voice que é: 
voice global pra todo mundo que tem org[playerid] igual 
 
Pra manter o rádio do jogo com o voice... Você teria que utilizar outra tecla, mas é possível sim.
 
 
 
RE: Voice SAMP - annety -  14/01/2021
 
 
 (14/01/2021 21:18)xbruno1000x Escreveu:   (14/01/2021 20:11)annety Escreveu:  2) 
Tem uns trechos de código pra ativar o voice global e local 
Código: 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); 
}
  Tem como criar uma outra opção de voice que é: 
voice global pra todo mundo que tem org[playerid] igual 
 
Pra manter o rádio do jogo com o voice... Você teria que utilizar outra tecla, mas é possível sim.  
Como fica o código? 
Pra ter uma troca de áudio de 1 pra 1 tipo celular (tipo player id 5, com o player id 2) 
 
Ou aquele mesmo exemplo que eu passei de players na msm org[playerid]
 
 
 
RE: Voice SAMP - xbruno1000x -  15/01/2021
 
 
 (14/01/2021 23:38)annety Escreveu:   (14/01/2021 21:18)xbruno1000x Escreveu:   (14/01/2021 20:11)annety Escreveu:  2) 
Tem uns trechos de código pra ativar o voice global e local 
Código: 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); 
}
  Tem como criar uma outra opção de voice que é: 
voice global pra todo mundo que tem org[playerid] igual 
 
Pra manter o rádio do jogo com o voice... Você teria que utilizar outra tecla, mas é possível sim.  
Como fica o código? 
Pra ter uma troca de áudio de 1 pra 1 tipo celular (tipo player id 5, com o player id 2) 
 
Ou aquele mesmo exemplo que eu passei de players na msm org[playerid]  
Eu não tenho esse código pronto, faça e caso tenha dúvidas envie aqui novamente.
 
 
 
RE: Voice SAMP - annety -  15/01/2021
 
 
 (15/01/2021 10:02)xbruno1000x Escreveu:   (14/01/2021 23:38)annety Escreveu:   (14/01/2021 21:18)xbruno1000x Escreveu:   (14/01/2021 20:11)annety Escreveu:  2) 
Tem uns trechos de código pra ativar o voice global e local 
Código: 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); 
}
  Tem como criar uma outra opção de voice que é: 
voice global pra todo mundo que tem org[playerid] igual 
 
Pra manter o rádio do jogo com o voice... Você teria que utilizar outra tecla, mas é possível sim.  
Como fica o código? 
Pra ter uma troca de áudio de 1 pra 1 tipo celular (tipo player id 5, com o player id 2) 
 
Ou aquele mesmo exemplo que eu passei de players na msm org[playerid]  
Eu não tenho esse código pronto, faça e caso tenha dúvidas envie aqui novamente.  
Eu não faço a menor ideia de como fazer isso... 
Alguém fez isso pode compartilhar?
 
 
 
RE: Voice SAMP - Nexus -  19/01/2021
 
 
 (15/01/2021 22:29)annety Escreveu:  Eu não faço a menor ideia de como fazer isso... 
Alguém fez isso pode compartilhar? Sou iniciante em Pawn, mas fiz um código aqui pra tentar te ajudar. 
Faça os testes e diga se funcionou. 
 
Pastebin
 
 
 
RE: Voice SAMP - xbruno1000x -  19/01/2021
 
 
 (19/01/2021 03:43)Nexus Escreveu:   (15/01/2021 22:29)annety Escreveu:  Eu não faço a menor ideia de como fazer isso... 
Alguém fez isso pode compartilhar? Sou iniciante em Pawn, mas fiz um código aqui pra tentar te ajudar. 
Faça os testes e diga se funcionou. 
 
Pastebin Correto, teria que adaptar as pInfo das orgs, mas está praticamente 100%. Acredito que na parte onde o player pressiona o botão, deve ser utilizado a foreach ao invés de playerid. Assim, você consegue "getar" todos os jogadores da ORG, e transmitir o som para eles como um rádio.
 
 
 
 |