19/02/2021 09:01 
	
	
	
		Eu tentei esse código:
Compilou certinho, aí eu adicionei o plugin no server.cfg:
Aí quando eu fui iniciar o servidor, não abre mais...
./samp03svr
	
	
	
	
Código:
// samp_voice 1
#include <sampvoice>
// samp_voice 2
new SV_GSTREAM:gstream = SV_NULL;
new SV_LSTREAM:lstream[MAX_PLAYERS] = { SV_NULL, ... };
#define MAX_RADIOS 999999
new player_frequency[MAX_PLAYERS];
new SV_GSTREAM:rstream[MAX_RADIOS] = { SV_NULL, ... };
// samp_voice 3
/*
    The public OnPlayerActivationKeyPress and OnPlayerActivationKeyRelease
    are needed in order to redirect the player's audio traffic to the
    corresponding streams when the corresponding keys are pressed.
*/
public SV_VOID:OnPlayerActivationKeyPress(SV_UINT:playerid, SV_UINT:keyid) 
{
    // 'X' - https://docs.microsoft.com/en-us/windows/win32/inputdev/virtual-key-codes
    new fid = player_frequency[playerid];
    if(keyid == 0x58 && rstream[fid])
    {
        SvAttachSpeakerToStream(rstream[fid], playerid);
    }
    // Attach player to local stream as speaker if 'Z' key is pressed
    else if (keyid == 0x5A && lstream[playerid])
    {
        SvAttachSpeakerToStream(lstream[playerid], playerid);
    }
    // Attach the player to the global stream as a speaker if the 'B' key is pressed
    else if (keyid == 0x42 && gstream)
    {
        SvAttachSpeakerToStream(gstream, playerid);
    }
}
public SV_VOID:OnPlayerActivationKeyRelease(SV_UINT:playerid, SV_UINT:keyid)
{
    // 'X' - https://docs.microsoft.com/en-us/windows/win32/inputdev/virtual-key-codes
    new fid = player_frequency[playerid];
    if (keyid == 0x58 && rstream[fid])
    {
        SvDetachSpeakerFromStream(rstream[fid], playerid);
    }
    // Detach the player from the local stream if the 'Z' key is released
    else if (keyid == 0x5A && lstream[playerid])
    {
        SvDetachSpeakerFromStream(lstream[playerid], playerid);
    }
    // Detach the player from the global stream if the 'B' key is released
    else if(admin[playerid] >= 2 && keyid == 0x42 && gstream)
    {
        SvDetachSpeakerFromStream(gstream, playerid);
    }
}
// samp_voice 4
public OnPlayerConnect(playerid)
{
    // Checking for plugin availability
    if (SvGetVersion(playerid) == SV_NULL)
    {
        SendClientMessage(playerid, -1, "Could not find plugin sampvoice.");
    }
    // Checking for a microphone
    else if (SvHasMicro(playerid) == SV_FALSE)
    {
        SendClientMessage(playerid, -1, "The microphone could not be found.");
    }
    // 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")))
    {
        SendClientMessage(playerid, -1, "Press X to talk to radio chat and Z to talk to local chat.");
        if(admin[playerid] >= 2) {
            SendClientMessage(playerid, -1, "Press B to talk to global.");
        }
        // Attach the player to the global stream as a listener
        if (gstream) SvAttachListenerToStream(gstream, playerid);
        // listener radio
        if (lstream[playerid])
        {
           SvAttachListenerToStream(lstream[playerid], playerid)
        }
        // Assign microphone activation keys to the player
        SvAddKey(playerid, 0x42); // [B] global
        SvAddKey(playerid, 0x5A); // [Z] local
        SvAddKey(playerid, 0x58); // [X] radio
    }
}
// samp_voice 5
public OnPlayerDisconnect(playerid, reason)
{
    // Removing the player's local stream after disconnecting
    if (lstream[playerid])
    {
        SvDeleteStream(lstream[playerid]);
        lstream[playerid] = SV_NULL;
    }
    // remove radio stream
    new fid = player_frequency[playerid];
    if (rstream[fid])
    {
        SvDeleteStream(rstream[fid]);
        rstream[fid] = SV_NULL;
    }
    // remove global stream (tá certo isso aqui? n tinha)
    if (gstream)
    {
        SvDeleteStream(gstream);
        gstream = SV_NULL;
    }
}
// samp_voice 6
public OnGameModeInit()
{
    // samp_voice 6
    // Uncomment the line to enable debug mode
    // SvDebug(SV_TRUE);
    gstream = SvCreateGStream(0xffff0000, "Global");
}
// samp_voice 7
public OnGameModeExit()
{
    if (gstream) SvDeleteStream(gstream);
}
// samp_voice 8
CMD:frequencia(playerid, params[]) {
    if(admin[playerid] < 6) return 0;
    new fid, string[80];
    if(sscanf(params,"i", fid)) return SendClientMessage(playerid, -1, "Use: /frequencia [id]");
    format(string, sizeof(string), "AdmCmd: %s voice frequency %s.", PlayerName(playerid), fid );
    ABroadCast(COLOR_LIGHTRED, string, 6);
    player_frequency[playerid] = fid;
    return 1;
}Compilou certinho, aí eu adicionei o plugin no server.cfg:
Código:
plugins crashdetect.so mysql.so sscanf.so YSF.so streamer.so pawnraknet.so sampvoice.soAí quando eu fui iniciar o servidor, não abre mais...
./samp03svr
Código:
[log-core] fatal signal '11' (SIGSEGV) catched   
Segmentation fault