cuddly-table-7819
05/04/2023, 1:09 PMc++
#include <a_samp>
#include <sampvoice>
// local chat player 1
new SV_LSTREAM:lstream[MAX_PLAYERS] = { SV_NULL, ... };
public SV_VOID:OnPlayerActivationKeyPress(SV_UINT:playerid, SV_UINT:keyid)
{
// Press 'B'
// local chat player 2
if (keyid == 0x42 && lstream[playerid]) {
SvAttachSpeakerToStream(lstream[playerid], playerid);
}
}
public SV_VOID:OnPlayerActivationKeyRelease(SV_UINT:playerid, SV_UINT:keyid)
{
// Release 'B'
if (keyid == 0x42 && lstream[playerid]) {
SvDetachSpeakerFromStream(lstream[playerid], playerid);
}
}
public OnPlayerConnect(playerid) {
// Checking for plugin availability
if (SvGetVersion(playerid) == SV_NULL)
{
// Could not find plugin sampvoice.
SetPVarInt(playerid, "hasVoiceOnClient", 0);
}
// Checking for a microphone
else if (SvHasMicro(playerid) == SV_FALSE)
{
// The microphone could not be found.
SetPVarInt(playerid, "hasVoiceOnClient", 2);
}
// Create a local stream with an audibility distance of 40.0, an unlimited number of listeners
// and the name 'Local' (the name 'Local' will be displayed in red in the players' speakerlist)
else if ((lstream[playerid] = SvCreateDLStreamAtPlayer(40.0, SV_INFINITY, playerid, 0xff0000ff, "Local")))
{
// Assign microphone activation keys to the player
SvAddKey(playerid, 0x42); // B
//
SetPVarInt(playerid, "hasVoiceOnClient", 1);
}
}
public OnPlayerDisconnect(playerid, reason) {
// Removing the player's local stream after disconnecting
if (lstream[playerid])
{
SvDeleteStream(lstream[playerid]);
lstream[playerid] = SV_NULL;
}
}
most-addition-69460
05/04/2023, 1:11 PMcuddly-table-7819
05/04/2023, 3:04 PM[10:56:56] Filterscripts
[10:56:56] ---------------
[10:56:56] Loading filterscript 'android-checker.amx'...
[10:56:56] [sv:dbg:main:AmxLoad] : net game pointer (value:0x990c460) received
[10:56:56] [sv:dbg:network:bind] : voice server running on port 50507
[10:56:56] Android check has been successfully loaded.
[10:56:56] Loading filterscript 'sampvoice.amx'...
[10:56:56] Loaded 2 filterscripts.
the SetPVarInt(playerid, "hasVoiceOnClient"
are working
only the voice is not working, i can see who has voice installed, but when they talk, no one can listenmost-addition-69460
05/04/2023, 3:57 PMmost-addition-69460
05/04/2023, 3:57 PMgorgeous-tomato-73021
05/04/2023, 5:03 PMcuddly-table-7819
05/04/2023, 7:02 PMcuddly-table-7819
05/04/2023, 7:02 PMcuddly-table-7819
05/04/2023, 7:03 PMgorgeous-tomato-73021
05/04/2023, 7:13 PM