Raised This Month: $51 Target: $400
 12% 

Voice Rooms


Post New Thread Reply   
 
Thread Tools Display Modes
AGoodGuy
Member
Join Date: Sep 2014
Old 06-01-2016 , 11:20   Re: Voice Rooms
Reply With Quote #21

With this plugin, i can make a room voice chat on my server, then member press "K" to voice normal, but only when they go room?

Thanks!
__________________
Without Passion Life Is Nothing

Quote:
“If you can't fly then run, if you can't run then walk, if you can't walk then crawl, but whatever you do, you have to keep moving forward.”― Martin Luther King Jr.
AGoodGuy is offline
siriusmd99
Veteran Member
Join Date: Oct 2013
Location: Republic of Moldova
Old 06-01-2016 , 12:59   Re: Voice Rooms
Reply With Quote #22

Quote:
Originally Posted by AGoodGuy View Post
With this plugin, i can make a room voice chat on my server, then member press "K" to voice normal, but only when they go room?

Thanks!
No, if member is in a room he will be heard by members of that room, if no , he will be heard only by the players who aren't in any room.
Actually players with no room are joined in the server's room which is equal to 0.

Shortly, you can speak by pressing "K" while you are not in any room, you will be heard only by players who are not joined in any room.

Last edited by siriusmd99; 06-01-2016 at 12:59.
siriusmd99 is offline
siriusmd99
Veteran Member
Join Date: Oct 2013
Location: Republic of Moldova
Old 07-08-2016 , 07:11   Re: Voice Rooms
Reply With Quote #23

Added 3 more Translations, now there are 6 Languages available!

Languages:
English,Romanian,Russian,Lithuanian,Brasilian , Dutch

Thanks to :
Airkish, EFFx, Napoleon_be

For more info visit first page.

If someone wants to help me with more translations i will be glad to see them HERE +translators to credits.

Also feel free to ask questions and give suggestions for new updates.

Last edited by siriusmd99; 07-08-2016 at 14:41.
siriusmd99 is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 07-08-2016 , 08:34   Re: Voice Rooms
Reply With Quote #24

Quote:
Originally Posted by siriusmd99 View Post
Added 3 more Translations, now there are 6 Languages available!

Languages:
English,Romanian,Russian,Lithuanian,Brasilian , Dutch

Thanks to :
Airkish, EFFx, Napoleon_be

For more info visit first page.

If someone wants to help me with more translations i will be glad to see them HERE +translators to credits.

Also feel free to ask questions and give suggestions for new updates.
FYI: Dutch != german. German is from germany, Dutch is from Belgium & The Netherlands.

"Deutsch" is german in german xD
__________________

Last edited by Napoleon_be; 07-08-2016 at 08:34.
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
siriusmd99
Veteran Member
Join Date: Oct 2013
Location: Republic of Moldova
Old 07-08-2016 , 14:42   Re: Voice Rooms
Reply With Quote #25

Quote:
Originally Posted by Napoleon_be View Post
FYI: Dutch != german. German is from germany, Dutch is from Belgium & The Netherlands.

"Deutsch" is german in german xD
Lol, you didn't post which language is it and i saw that words are german but looked at your profile and i was like , wtf ? Belgium?
I thought in Belgium is the same german language as in Germany.

Sorry, fixed.
siriusmd99 is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 07-08-2016 , 15:00   Re: Voice Rooms
Reply With Quote #26

Quote:
[NOTE]: You can't send another request to join other room until you recieve an answer from previous one.
Sounds like unneeded limitation. Something to see later, anyway.

Information like this:
Quote:
(Boolean Switcher)

[NOTE]: g_locked boolean will be set to false when you live a room (also when you disconnect the server).
(boolean too)
That's like chinese for non-coder Also I think you mean "leave", not "live". Don't add anything code-related in your presentation. Simply say that room is unlocked while you are not in it or you are disconnected.

Also find a better colour for cvar names, it's unreadable.

Fix your post, after that we can move on to fix your code.

Some fixes for ro translation(it just sounds better like that IMO):
Code:
MENU_WANTS_JOIN = \r%s \wvrea sa se alature conferintei tale.
MSG_CVAR_OFF = [AMXX] Serverul a dezactivat aceasta optiune.
MSG_REQUEST = [AMXX] Trebuie sa astepti raspuns la cererea anterioara.
MSG_NO_ROOM = [AMXX] Conferinta selectata nu mai exista.
MSG_REQ_TIMEOUT = [AMXX] Cererea ta a fost respinsa automat deoarece nu a primit niciun raspuns.
MSG_HAS_JOINED = [AMXX] Jucatorul %s s-a alaturat conferintei.
__________________

Last edited by HamletEagle; 07-08-2016 at 15:04.
HamletEagle is offline
siriusmd99
Veteran Member
Join Date: Oct 2013
Location: Republic of Moldova
Old 07-08-2016 , 15:16   Re: Voice Rooms
Reply With Quote #27

Quote:
Originally Posted by HamletEagle View Post
Sounds like unneeded limitation. Something to see later, anyway.

Information like this:

That's like chinese for non-coder Also I think you mean "leave", not "live". Don't add anything code-related in your presentation. Simply say that room is unlocked while you are not in it or you are disconnected.

Also find a better colour for cvar names, it's unreadable.

Fix your post, after that we can move on to fix your code.

Some fixes for ro translation(it just sounds better like that IMO):
Code:
MENU_WANTS_JOIN = \r%s \wvrea sa se alature conferintei tale.
MSG_CVAR_OFF = [AMXX] Serverul a dezactivat aceasta optiune.
MSG_REQUEST = [AMXX] Trebuie sa astepti raspuns la cererea anterioara.
MSG_NO_ROOM = [AMXX] Conferinta selectata nu mai exista.
MSG_REQ_TIMEOUT = [AMXX] Cererea ta a fost respinsa automat deoarece nu a primit niciun raspuns.
MSG_HAS_JOINED = [AMXX] Jucatorul %s s-a alaturat conferintei.
Yea, i fixed the "chinese" thing. And also updated romanian gramatical fixes.
I will wait for full overview of the plugin to fix unreadable code, bugs (if found) or to optimize code and then release new version and fix it.Because it has no sense to fix now unreadable cvars and then something else and have 100 versions.

Also I wanted to say that i didn't use charsmax in some places to avoid bugs or maybe crashes.
I didn't use in some menu string formating to avoid big sized array usage.I thougth if player changes an array size to a bigger value then string will be longer and it could cause problems in menu.

But if it's needed i will change.

Last edited by siriusmd99; 07-08-2016 at 15:18.
siriusmd99 is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 07-08-2016 , 18:28   Re: Voice Rooms
Reply With Quote #28

Quote:
Originally Posted by siriusmd99 View Post
Also I wanted to say that i didn't use charsmax in some places to avoid bugs or maybe crashes.
I didn't use in some menu string formating to avoid big sized array usage.I thougth if player changes an array size to a bigger value then string will be longer and it could cause problems in menu.
That makes absolutely no sense. You should use charsmax for ALL locations where you need to get the max string length for that variable. It is impossible for charsmax to cause a crash at run-time.
__________________
fysiks is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 07-09-2016 , 05:36   Re: Voice Rooms
Reply With Quote #29

I was talking about the color of the cvars in your post, it's unreadable on some screens.

Quote:
Also I wanted to say that i didn't use charsmax in some places to avoid bugs or maybe crashes.
I didn't use in some menu string formating to avoid big sized array usage.I thougth if player changes an array size to a bigger value then string will be longer and it could cause problems in menu.
fysiks already answered that. If someone edit the code without knowing what he is doing, it's not your problem.

Remove anything from your post that contain the word "boolean", it does not really help owners to understand what your plugin does.

1.Wrong use of ML system. When you pass LANG_SERVER it prints in server language. You have to pass player index in order to display in player wanted language.
2.Your ml keys have too common names, consider adding a prefix or something to make them unique(for example VR_YOUR_ML_KEY)
2.Use charsmax() everywhere.
3.Why you send remote as item info and never retrieve it? Just ignore the param.
4.I would do the check when creating the menu, not in handler. If user is not admin and cvar is 1, simply block the menu item by passing 1 << 31 as paccess param.
PHP Code:
if(get_pcvar_num(cvar_admin) && !(get_user_flags(id) & ADMIN_ACCESS)){
    
client_print(idprint_chat"%L"LANG_SERVER"MSG_NO_ACCESS")
    
menu_destroymenu );
    return 
PLUGIN_HANDLED;

5.
PHP Code:
if(!g_room[id]){
                
g_room[id] = id;
                
room_menu(id);  
                }else{
                if(
g_room[id] == id){
                    
                    for(new 
1<= g_MaxPlayersi++){
                        if(
g_room[i] == id && != id){
                            
g_room[i] = 0;
                            
client_print(iprint_chat"%L"LANG_SERVER"MSG_ROOM_RELEASED")
                        }
                    }
                    
room_menu(id);  
                    }else{
                    
ask_confirm(id)
                }
            } 
Something like this is unreadable AF. Do you think you could allign a bit { and } so you don't give me a headache?
PHP Code:
if(!g_room[id])
            {
                
g_room[id] = id;
                
room_menu(id);      
            }
            else
            {
                if(
g_room[id] == id)
                {    
                    for(new 
1<= g_MaxPlayersi++)
                    {
                        if(
g_room[i] == id && != id)
                        {
                            
g_room[i] = 0;
                            
client_print(iprint_chat"%L"LANG_SERVER"MSG_ROOM_RELEASED")
                        }
                    }
                    
room_menu(id);  
                }
                else
                {
                    
ask_confirm(id)
                }
            } 
Ok, that's about coding style, but what you did makes code harder to understand. It's better if one can see directly where a block starts and where it ends. Do this everywhere.

Another example:
PHP Code:
if(task_exists(id))
            { 
                
client_print(idprint_chat"%L"LANG_SERVER"MSG_REQUEST" )
                
menu_destroymenu );
                }else{ 
                
join_room_menu(id)
            } 
At a quick glance I would say that the if is closed at the end of the block, but there is the bracket for else.

6.
PHP Code:
for(new 1<= g_MaxPlayersi++) 
use get_players.

Just this for now.
__________________
HamletEagle is offline
siriusmd99
Veteran Member
Join Date: Oct 2013
Location: Republic of Moldova
Old 07-09-2016 , 07:42   Re: Voice Rooms
Reply With Quote #30

Quote:
Originally Posted by HamletEagle View Post
I was talking about the color of the cvars in your post, it's unreadable on some screens.

Remove anything from your post that contain the word "boolean", it does not really help owners to understand what your plugin does.

Your ml keys have too common names, consider adding a prefix or something to make them unique(for example VR_YOUR_ML_KEY)

Use charsmax() everywhere.

Something like this is unreadable AF. Do you think you could allign a bit { and } so you don't give me a headache?
Ok , I will fix.


Now here:

Quote:
1.Wrong use of ML system. When you pass LANG_SERVER it prints in server language. You have to pass player index in order to display in player wanted language.
Because when players use voiceroom they speak the same language and it means minimum 80% of players speak in the language server has set. So thats why i didn't use lang_player.
I mean, if speaking about this plugin it has no sense to use lang player because this is not a shop menu or something like this. Foreigners just won't have need to use this plugin.



Quote:
Why you send remote as item info and never retrieve it? Just ignore the param.
Because i use "remote" not in handler but in callback to block menu items which player can't use or don't have right to use. (Player must see items but he can't use them)

Quote:
I would do the check when creating the menu, not in handler. If user is not admin and cvar is 1, simply block the menu item by passing 1 << 31 as paccess param.
Ok, i will make item disabled with callback and a msg like Create Room (Admin Only).

Quote:
for(new i = 1; i <= g_MaxPlayers; i++) use get_players
No sense to use get_players and fill plugin with unececessary lines because i check the room and when player is disconnected room is 0 and i dont need to use additional natives like (is_user_connected). I mean , when i check room it is already analogical to is_user_connected so i better use my way.

Last edited by siriusmd99; 07-09-2016 at 07:43.
siriusmd99 is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 15:31.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode