voice to radio frequency
# support-forum
c
I tried so many times to create a voice frequency in-game, but every time i make a code it crashes the server... A lot of people of my server ask me this because they play on cellphone (battery, fps stuff) My server is not a RPG server, it would be amazing for every server, specially RPGs servers, so if anybody know how to make it i'm sure it will help a lot people To help i created a filterscript with voice plugin (plug and play) With the command /radio not working ofc Is anybody here know how to make it work? And make this frequencies channels to voice? filterscript: https://hastebin.com/erejawevah.cpp lib: https://github.com/CyberMor/sampvoice
m
I know how to create one...
c
could u help me? you would be helping a lot of other servers
if u give me the way to do it i can do and share to everyone
m
Copy code
c++
new SV_GSTREAM:RadioFrequency[MAX_RADIOFREQ] = { SV_NULL, ... };

if(RadioFrequency[channelid] == SV_NULL) { // THIS WILL CREATE A RADIO CHANNEL IF THE GIVEN CHANNEL ID IS NOT YET CREATED.
  RadioFrequency[channelid] = SvCreateGStream(0xFF00FFFF, "Radio");
  SvAttachListenerToStream(RadioFrequency[channelid], playerid);
} else { // THIS WILL LET THE PLAYER JOIN THE RADIO FREQUENCY CHANNEl IF THE CHANNEL ID IS ALREADY CREATED.
  SvAttachListenerToStream(RadioFrequency[channelid] playerid);
}
Just do experiments on the code it is not exactly the thing that is plug n play but i guess i provided you enough resources to create what you want.
c
in a few days when i get home i'll try it again
if i manage to do it, i'll share here so everybody can use
@modern-orange-82052
i tried the radio voip
but the server crashes when i press B to talk
do u know why?
plugin crash detect shows:
Copy code
[00:25:48] [debug] Server crashed while executing sampvoice.amx
[00:25:48] [debug] AMX backtrace:
[00:25:48] [debug] #0 native SvAttachSpeakerToStream () in sampvoice.so
[00:25:48] [debug] #1 0000788c in public void:OnPlayerActivationKeyPress (playerid=1, keyid=66) at /home/hiwyn/Documents/sampserver/filterscripts/sampvoice.pwn:35
...
line 35 is:
SvAttachSpeakerToStream(frequencyConnected[playerid], playerid);
is anybody knows what i'm doing wrong?
is anybody knows how to do it? i want it very much, but idk what to do 😦
is anybody knows what i'm doing wrong? i want it very much, but idk what to do 😦
@modern-orange-82052 or anybody here, i've update my msg, pls try to help me https://discord.com/channels/231799104731217931/1067623013530472588/1072405482297360496