AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Approved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=8)
-   -   Round Message w/ VOX v1.3 (https://forums.alliedmods.net/showthread.php?t=89385)

dorin2oo7 04-05-2009 18:06

Round Message w/ VOX v1.3
 
2 Attachment(s)
Round Message w/ VOX v1.3
by Teascu Dorin


[IMG]http://img237.**************/img237/8720/descriptionz.png[/IMG]

Displays colored chat message every round start about Round #, current map and # players/maxslots.
Plays the round # in vox sounds. No download needed.


[IMG]http://img690.**************/img690/6929/settings.png[/IMG]

.:: Installing ::.

  1. Copy round_chat_msg.amxx into mod_dir/addons/amxmodx/plugins (mod_dir = cstrike, czero, dod etc)
  2. Copy round_message.txt goes to mod_dir/addons/amxmodx/data/lang
  3. Open plugins.ini from mod_dir/addons/amxmodx/configs
  4. Add at the end of the list on a new line like follows:
    Code:

    round_chat_msg.amxx
  5. Save and close plugins.ini
  6. Restart Server or Change Map


.:: Available CVAR`s ::.
  • amx_playsound "1"
    • Enable / Disable vox sound playing (Def: 1 - ON)
  • amx_chatmessage "1"
    • Enable / Disable chat message (Def: 1 - ON)


[IMG]http://img694.**************/img694/5438/notes.png[/IMG]

You can change/modify chat message colors in the language *.txt file located in addons/amxmodx/data/lang named round_message.txt !
Message colors usage:
- !y - Yellow (Normal chat color)
- !t - Team Color (Red=T, Blue=CT, Grey=Spec)
- !g - Green


[IMG]http://img690.**************/img690/4107/snapshots.png[/IMG]

Round start message:
[IMG]http://img246.**************/img246/2869/roundstart.jpg[/IMG]


[IMG]http://img694.**************/img694/4868/mlang.png[/IMG]

Code:

[en] English - Teascu Dorin
[ro] Romanian - Teascu Dorin
[es] Spanish - fezh
[de] German - KadiR and master4life
[pl] Polish - Bagieta
[fr] French - arkshine and wiiiton
[ru] Russian - xPaw
[nl] Dutch - crazyeffect
[bg] Bulgarian - papyrus_kn
[sv] Swedish - D-TOX
[tr] Turkish - TowerTurk [ C * ]
[bp] Brazilian Portuguesse - dark22

Any translation is welcomed !!!


[IMG]http://img691.**************/img691/5334/creditsk.png[/IMG]

Alka - stock color print
v3x - for teaching me how to use num_to_word (vox sounds)


[IMG]http://img694.**************/img694/1227/change.png[/IMG]

Code:

Legend: f - fixed | ! - added | c - changed | r - removed

v1.0
- First release
 
v1.1
- Rewrite plugin
- ! Multilingual

v1.2
- c to cache values of get_mapname and get_maxplayers globally
- c the color stock checking
- ! new languages

v1.3
- ! cvar round_version

.:: Game Monitor ::.

Server that using This Plugin


[IMG]http://img690.**************/img690/3448/downloade.png[/IMG]

Nextra 04-05-2009 18:23

Re: Round Message w/ VOX v2.0
 
Hey, nice idea. Here are some things you could/should change:

- Cache the values of get_mapname, get_maxplayers and get_user_msgid( "SayText" ) globally, they will not change midgame.
- Do some identing, you forgot it after the show_rounds_message function.
- I believe you do not have to check is_user_connected when looping through the players based on an get_players array as the native already does this.
- Statics for the print function could also be a good idea.
- Make the thing multilang.


Why do you abort when the current playercount equals maxplayers?

dorin2oo7 04-05-2009 18:29

Re: Round Message w/ VOX v2.0
 
if I didn't do playercount equals maxplayers it was only playing the sound and no message :(

alan_el_more 04-05-2009 18:30

Re: Round Message w/ VOX v2.0
 
GJ :D
i like this plugin :)

Nextra 04-05-2009 18:33

Re: Round Message w/ VOX v2.0
 
Quote:

Originally Posted by dorin2oo7 (Post 798348)
if I didn't do playercount equals maxplayers it was only playing the sound and no message :(

At least better than nothing. There has to be an error causing this that you should find and fix. Do some more debugging to find the issue.

dorin2oo7 04-05-2009 18:34

Re: Round Message w/ VOX v2.0
 
That was the problem that i didn't had any errors even with debug :D

Nextra 04-05-2009 18:49

Re: Round Message w/ VOX v2.0
 
I don't mean the standard error debugging of AMXX. There can be an error within your routine, those things do not necessarily throw an error.

You should add some log_amx to see which events happen and which don't so you see where the problem resides.

For example this will show you which players you cycled through, if one is missing you know where the problem resides and you can attempt to fix it:

PHP Code:

for( 0num;i++ )
{
    
index players[i]
    
log_amx"Player %d"index )

    
//...



dorin2oo7 04-10-2009 17:49

Re: Round Message w/ VOX v1.1
 
New UPDATE

Quote:

Originally Posted by dorin2oo7 (Post 798319)
v1.1 - Rewrite plugin
- Added Multilingual


fezh 04-10-2009 18:25

Re: Round Message w/ VOX v1.1
 
Code:

[es]
RND_MSG = !y[AMXX] Ronda: !t%d !y- Mapa: !t%s !y| Jugadores: !g%d!y/!g%d !y!


Nextra 04-10-2009 19:57

Re: Round Message w/ VOX v2.0
 
This still applies:
Quote:

Originally Posted by Nextra (Post 798341)
- Cache the values of get_mapname and get_maxplayers globally, they will not change midgame.

Additionally, you should follow this Wiki Entry. You are using players[i] multiple times so it is much better to do the following:

PHP Code:

new index;

for (new 
count i++)
{
    
index players[i];
    if (
is_user_connected(index))
    {
        
message_begin(MSG_ONE_UNRELIABLEsay_text,_index);
        
write_byte(index);
        
write_string(msg);
    }        




All times are GMT -4. The time now is 01:13.

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