♦ Bom, este é concerteza um dos melhores GameModes de drift feito até hoje, foi um gamemode que eu produzi no final do ano de 2012 para o server que fez muito sucesso com esse GM ( The Brasil Drift ), este gamemode foi utilizado por cerca de um ano e meio (1 Ano e 5/7 Meses), porém o server fechou e eu já tenho uma nova versão do gamemode caso o server reabra, e eu não quiz deixar esse gamemode parado no pc sem utilidade. Então porque não postar aqui, é um gamemode feito em strcmp(eu usava na época), sistema de salvamento em DOF2 e é um GM muito completo, diversos sistemas, sistema de admin(Feito por mim)
♦ Bom é um ótimo GM então façam bom proveito, e não retirem os créditos.
♦ Informações
♦ O Gamemode contém 15321 Linhas.
♦ 46 Teleportes.
♦ 41 Comandos.
♦ 66 Comandos Admins.
♦ Alguns Sistemas
♦ Admin: comandos /menuadmin.
♦ Lz (LastZone Parceria da TBD): comandos /cmdlz.
♦ TmD (2º Clan da The Brasil Drift): comandos /cmdtmd
Encontrei uma filterscript na qual cria progress bar, porém queria que ele duplicasse pra eu pegar as posições correta pra montar um sistema.
Se alguém saber uma FS que tenha opção de duplicar, ficaria grato.
Estou tentando adicionar sampvoice ao meu servidor. Depois de fazer algumas mudanças no código original, compilei e não recebi nenhum erro, mas quando tento utilizar o plugin no servidor, o microfone é acionado, mas o nome do jogador no canto esquerdo da tela e o microfone acima do personagem não aparecem e nenhum som é reproduzido.
Gostaria de saber se cometi algum erro nas modificações que fiz.
Código original:
Código:
#include <sampvoice>
new SV_GSTREAM:gstream = SV_NULL;
new SV_LSTREAM:lstream[MAX_PLAYERS] = { SV_NULL, ... };
/*
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)
{
// 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);
}
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 Z to talk to global chat and B to talk to local chat.");
// Attach the player to the global stream as a listener
if (gstream) SvAttachListenerToStream(gstream, playerid);
// Assign microphone activation keys to the player
SvAddKey(playerid, 0x42);
SvAddKey(playerid, 0x5A);
}
}
public OnPlayerDisconnect(playerid, reason)
{
// Removing the player's local stream after disconnecting
if (lstream[playerid])
{
SvDeleteStream(lstream[playerid]);
lstream[playerid] = SV_NULL;
}
}
public OnGameModeInit()
{
// Uncomment the line to enable debug mode
// SvDebug(SV_TRUE);
public OnGameModeExit()
{
if (gstream) SvDeleteStream(gstream);
}
Exemplo do código modificado:
Código:
#include <sampvoice>
new SV_LSTREAM:lstream[MAX_PLAYERS] = { SV_NULL, ... };
/*
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)
{
// Attach player to local stream as speaker if 'B' key is pressed
if (keyid == 0x42 && lstream[playerid]) SvAttachSpeakerToStream(lstream[playerid], 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);
}
public OnPlayerSpawn(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
{
lstream[playerid] = SvCreateDLStreamAtPlayer(40.0, SV_INFINITY, playerid, 0xff0000ff, "Local");
SendClientMessage(playerid, -1, "Press B to talk to local chat.");
// Assign microphone activation keys to the player
SvAddKey(playerid, 0x42);
}
}
public OnPlayerDisconnect(playerid, reason)
{
// Removing the player's local stream after disconnecting
if (lstream[playerid])
{
SvDeleteStream(lstream[playerid]);
lstream[playerid] = SV_NULL;
}
}
public OnGameModeInit()
{
// Uncomment the line to enable debug mode
// SvDebug(SV_TRUE);
}