Jump to content

Samp Voice Plugin (Versiunea noua)


Criaz40k

Recommended Posts

 

Samp Voice Plugin

SVP

Salutare, aceasta este noua versiune de samp voice, varianta cea veche postata de mine fiind inactiva, din nou, este doar un plugin imprumutat de la rusi, si netestat, succes la implementat :)


                  TUTORIAL DE INSTALARE

 Pentru inceput deschideti server.cfg si adaugati pe linia plugins urmatorul lucru:

Quote

 

 plugins sampvoice

 

Mai apoi trebuie sa adaugati include-ul in gamemode:

Quote

#include <sampvoice>

Apoi avem urmatoarele definitii

Quote

 

#if defined _sampvoice_included

#define SV_KEY_B 0x42 

#define SV_KEY_Z 0x5A 

 

Adaugam urmatoarele variabile

Quote

 

#if defined _sampvoice_included

new SV_GSTREAM:gstream = SV_NULL,

SV_LSTREAM:lstream[MAX_PLAYERS] = { SV_NULL, ... };

#endif

 

Adaugam acest cod in OnGamemodeInit

Quote

 

#if defined _sampvoice_included

gstream = SvCreateGStream(0xFF0000FF, "Global");

#endif

 

Adaugam acest cod in OnGamemodeExit
 

Quote

 

#if defined _sampvoice_included

if (gstream != SV_NULL) {

SvDeleteStream(gstream);

gstream = SV_NULL; }

#endif

 

Adaugam asta la OnPlayerConnect
 

Quote

 

#if defined _sampvoice_included

if (SvGetVersion(playerid) == SV_NULL) {

SendClientMessage(playerid, -1, "Не удалось обнаружить плагин sampvoice");

} else if (SvHasMicro(playerid) == SV_FALSE) {

SendClientMessage(playerid, -1, "Не удалось обнаружить микрофон");

} else {

if (gstream != SV_NULL) {

SvAttachListenerToStream(gstream, playerid);

SvAddKey(playerid, SV_KEY_B);

}

if ((lstream[playerid] = SvCreateDLStreamAtPlayer(40.0, SV_INFINITY, playerid, 0x00FFFFFF, "Local")) != SV_NULL)

SvAddKey(playerid, SV_KEY_Z);

}

}

#endif

 

Iar apoi acest cod la finalul gamemode ului

 

9NS05OO.png

LINK DOWNLOAD: https://github.com/CyberMor/sampvoice/releases/download/v3.1/sv_server_037.zip

Link to comment
Share on other sites

  • 3 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.