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

Round Message w/ VOX v1.3


Post New Thread Reply   
 
Thread Tools Display Modes
ANTICHRISTUS
kingdom of weird stuff
Join Date: Jun 2010
Location: My kingdom is not in thi
Old 06-16-2015 , 16:17   Re: Round Message w/ VOX v1.3
Reply With Quote #51

Make sure what's changing it, check your related files .ini or .cfg files.
__________________

Last edited by ANTICHRISTUS; 06-16-2015 at 16:18.
ANTICHRISTUS is offline
nooberlin
Junior Member
Join Date: Jun 2015
Old 06-18-2015 , 14:04   Re: Round Message w/ VOX v1.3
Reply With Quote #52

Quote:
Originally Posted by ANTICHRISTUS View Post
Make sure what's changing it, check your related files .ini or .cfg files.
Thanx! Ready!

Another question: where i need set maxrounds cvar? In server.cfg or in plugin .sma file?

I found this parameter: num_to_word(rounds_elapsed, rndctstr, 30);

30 rounds, and in server.cfg 30 rounds... But I have bug - I have warmup plugin too, and plugin say 1 round and start warmup round, then restart and one more time say 1 round... But when 30 round is finish, then say 31 round and make restart... Why?

Can anybody help me to change the code, i need that plugin rounds will stop when start warmup round, and after restart thisround start working. But when 30 round is finished, than just restart the map and do not say and show 31/30 round.. And when working warmup plugin, i need all weapons restricted, because, when someone buy weapons and die, then another player can get this weapon and use it...

rounds plugin code:

PHP Code:
#include <amxmodx>
#include <amxmisc>

#define VERSION "1.3"


new rounds_elapsed;
new 
play_sound;
new 
chat_message;
new 
g_maxplayers;
new 
g_map[32]
new 
say_text;

public 
plugin_init()
{
    
/* Register plugin and author */
    
register_plugin("Vox Round Say"VERSION"God@Dorin")
    
    
    
/* Register plugin version by cvar */
    
register_cvar("round_version"VERSIONFCVAR_SERVER FCVAR_SPONLY);
    
set_cvar_string("round_version"VERSION);

    
/* Register new round events */
    
register_event("HLTV""new_round""a""1=0""2=0");
    
register_event("TextMsg""restart_round""a""2=#Game_will_restart_in");

    
/* Register language file */
    
register_dictionary("round_message.txt");

    
/* Register plugin cvars */
    
play_sound register_cvar("amx_playsound","1");
    
chat_message register_cvar("amx_chatmessage","1");
    
g_maxplayers get_maxplayers();
    
get_mapname(g_map31)
    
    
say_text get_user_msgid("SayText");
}
public 
new_round()
{
    
rounds_elapsed += 1;
    
    new 
p_playernum;
    
p_playernum get_playersnum(1);
    
    if(
get_pcvar_num(chat_message) == 1)
    {    
        
client_printc(0"%L"0"RND_MSG"rounds_elapsedg_mapp_playernumg_maxplayers); 
    }
    if(
get_pcvar_num(play_sound) == 1)
    {
        new 
rndctstr[21]
        
num_to_word(rounds_elapsedrndctstr30);
        
client_cmd(0"spk ^"vox/round %s^"",rndctstr)
    }    
    return 
PLUGIN_CONTINUE;
}
public 
restart_round()
{
    
rounds_elapsed 0;    
}
stock client_printc(const id, const string[], {FloatSqlResul,_}:...) {
    
    new 
msg[191], players[32], count 1;
    
vformat(msgsizeof msg 1string3);
    
    
replace_all(msg,190,"!g","^4");
    
replace_all(msg,190,"!y","^1");
    
replace_all(msg,190,"!t","^3");
    
    if(
id)
        
players[0] = id;
    else
        
get_players(players,count,"ch");
    
    new 
index;
    for (new 
count i++)
    {
        
index players[i];
        
message_begin(MSG_ONE_UNRELIABLEsay_text,_index);
        
write_byte(index);
        
write_string(msg);
        
message_end();  
    }  
    
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1048\\ f0\\ fs16 \n\\ par }
*/ 
warmup plugin code:

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <dhudmessage>
#include <hamsandwich>
#include <fun>
 
new TimerSecondsCvar
new bool:g_knife true
 
public plugin_init()
{
    
register_plugin"Auto rr" "1.0""ill" )
    
    
register_event("DeathMsg""on_death""a")
    
register_event"CurWeapon""EventCurWeapon""be""2!29" )
    
   
RegisterHam(Ham_Spawn"player""fw_PlayerSpawn_Post"1)
    
    
SecondsCvar register_cvar("auto_rr_time","60")
 
    
Timer get_pcvar_num(SecondsCvar)
    
set_task(1.0"start_rr_timer"___"a"Timer)
}
 
public 
plugin_precache()
{
   
precache_sound("misc/warmup.mp3")
}
 
public 
fw_PlayerSpawn_Post(id)
{
   if(!
is_user_alive(id))
        return
       
   if(
g_knife)
      
set_user_health(id35)
}
 
public 
on_death()
{
   new 
victim
   victim 
read_data(2)
    
   if(
g_knife)
      
set_task(1.0"fnRevivePlayer"victim)
}
 
public 
client_putinserver(id)
{
   if(
g_knife)
      
set_task(3.0"Start_sound"id)
}
 
public 
Start_sound(id)
{
   if(
g_knife)
   {
      
client_cmd(id"mp3 play sound/misc/warmup.mp3")
      if(!
is_user_alive(id) && (get_user_team(id) == || get_user_team(id) == 2) ) 
         
ExecuteHamB(Ham_CS_RoundRespawnid)
   }
}
 
public 
fnRevivePlayer(id
{
   if(!
is_user_alive(id)) 
      
ExecuteHamB(Ham_CS_RoundRespawnid)
}
 
public 
EventCurWeapon(id)
{
   if(
g_knife
      
engclient_cmd(id"weapon_knife")
}
 
public 
start_rr_timer()
{
    
Timer--
     
    
set_dhudmessage(135206235, -1.00.0800.00.01)
    
show_dhudmessage(0"WarmUp!^nRestart after %d seconds"Timer)
 
    if(
Timer 1)
    {
      
server_cmd("sv_restartround 1")
      
set_task(3.0"rr_end")
      
client_cmd(0"mp3 stop");
      
g_knife false
    
}
}
 
public 
rr_end()
{
    
set_dhudmessagerandom_num(0255), random_num(0255), random_num(0255), -1.00.7826.03.00.11.5false )
    
show_dhudmessage(0"LIVE! LIVE! LIVE!")


Last edited by nooberlin; 06-18-2015 at 14:07. Reason: notifications
nooberlin is offline
ANTICHRISTUS
kingdom of weird stuff
Join Date: Jun 2010
Location: My kingdom is not in thi
Old 06-18-2015 , 15:59   Re: Round Message w/ VOX v1.3
Reply With Quote #53

Quote:
Originally Posted by nooberlin View Post
Another question: where i need set maxrounds cvar? In server.cfg or in plugin .sma file?
amxx.cfg seems good.
__________________
ANTICHRISTUS is offline
nooberlin
Junior Member
Join Date: Jun 2015
Old 06-19-2015 , 12:32   Re: Round Message w/ VOX v1.3
Reply With Quote #54

Quote:
Originally Posted by ANTICHRISTUS View Post
amxx.cfg seems good.

// Max. time to which map can be extended
//
// Default value: 90
amx_extendmap_max 90

// Step for each extending
//
// Default value: 15
amx_extendmap_step 15

Nothing there...
nooberlin is offline
ANTICHRISTUS
kingdom of weird stuff
Join Date: Jun 2010
Location: My kingdom is not in thi
Old 06-20-2015 , 18:42   Re: Round Message w/ VOX v1.3
Reply With Quote #55

I have understood: "Where to put plugin's cvars", the answer was amxx.cfg.
__________________
ANTICHRISTUS is offline
nooberlin
Junior Member
Join Date: Jun 2015
Old 06-21-2015 , 03:50   Re: Round Message w/ VOX v1.3
Reply With Quote #56

The plugin have cvars?
I have one problem, in the end of last round, mp_maxrounds 30. Plugin say: round 31 of 30 and make restart map. Wtf?
nooberlin is offline
ANTICHRISTUS
kingdom of weird stuff
Join Date: Jun 2010
Location: My kingdom is not in thi
Old 06-21-2015 , 07:07   Re: Round Message w/ VOX v1.3
Reply With Quote #57

Quote:
Originally Posted by nooberlin View Post
The plugin have cvars?
IDK, gave you a default answer.
Quote:
I have one problem
Make sure which plugin/module is doing this.
__________________
ANTICHRISTUS is offline
Old 01-10-2016, 09:22
akire101
This message has been deleted by akire101. Reason: better new topic, different job
undertaker5
Member
Join Date: Sep 2013
Location: Denmark
Old 03-17-2020 , 11:05   Re: Round Message w/ VOX v1.3
Reply With Quote #58

When im alone in my server and someone joins it doesnt reset (example: round is 6 and there is 10 rounds left, then someone joins then everything resets, even roundsleft plugin but not this plugin) pls fix
undertaker5 is offline
undertaker5
Member
Join Date: Sep 2013
Location: Denmark
Old 04-02-2020 , 11:05   Re: Round Message w/ VOX v1.3
Reply With Quote #59

Here is a fix for my problem

PHP Code:
#include <amxmodx>
#include <amxmisc>

#define VERSION "1.3"


new rounds_elapsed;
new 
g_pcvarMaxRounds
new play_sound;
new 
chat_message;
new 
g_maxplayers;
new 
g_map[32]
new 
say_text;

public 
plugin_init()
{
    
/* Register plugin and author */
    
register_plugin("Vox Round Say"VERSION"God@Dorin")
    
    
    
/* Register plugin version by cvar */
    
register_cvar("round_version"VERSIONFCVAR_SERVER FCVAR_SPONLY);
    
set_cvar_string("round_version"VERSION);

    
/* Register new round events */
    
register_logevent("eRoundEnd"2"0=World triggered""1=Round_Start")
    
register_event("TextMsg""eRestart""a""2&#Game_C""2&#Game_w")

    
/* Register language file */
    
register_dictionary("round_message.txt");

    
/* Register plugin cvars */
    
play_sound register_cvar("amx_playsound","1");
    
chat_message register_cvar("amx_chatmessage","1");
    
g_maxplayers get_maxplayers();
    
get_mapname(g_map31)
    
    
say_text get_user_msgid("SayText");

    
/* Register plugin client commands */
    
register_clcmd("say timeleft""clcmd_RoundsLeft")
    
register_clcmd("say /timeleft""clcmd_RoundsLeft")
    
register_clcmd("say /roundsleft""clcmd_RoundsLeft")
    
register_clcmd("say_team /timeleft""clcmd_RoundsLeft")
    
register_clcmd("say_team /roundsleft""clcmd_RoundsLeft")
}

public 
plugin_cfg()
    
g_pcvarMaxRounds get_cvar_pointer("mp_maxrounds")

public 
eRestart()
    
rounds_elapsed 0

public eRoundEnd()
{
    
rounds_elapsed += 1;
    
    new 
p_playernum;
    
p_playernum get_playersnum(1);
    
    if(
get_pcvar_num(chat_message) == 1)
    {    
        
client_printc(0"%L"0"RND_MSG"rounds_elapsedget_pcvar_num(g_pcvarMaxRounds), g_mapp_playernumg_maxplayers);
    }
    if(
get_pcvar_num(play_sound) == 1)
    {
        new 
rndctstr[21]
        
num_to_word(rounds_elapsedrndctstr20);
        
client_cmd(0"spk ^"vox/round %s^"",rndctstr)
    }    
    return 
PLUGIN_CONTINUE;
}

public 
clcmd_RoundsLeft(id)
{
    
client_printc(id"%L"0"RND_LFT"get_pcvar_num(g_pcvarMaxRounds) - rounds_elapsed);
}

stock client_printc(const id, const string[], {FloatSqlResul,_}:...) {
    
    new 
msg[191], players[32], count 1;
    
vformat(msgsizeof msg 1string3);
    
    
replace_all(msg,190,"!g","^4");
    
replace_all(msg,190,"!y","^1");
    
replace_all(msg,190,"!t","^3");
    
    if(
id)
        
players[0] = id;
    else
        
get_players(players,count,"ch");
    
    new 
index;
    for (new 
count i++)
    {
        
index players[i];
        
message_begin(MSG_ONE_UNRELIABLEsay_text,_index);
        
write_byte(index);
        
write_string(msg);
        
message_end();  
    }  
    

undertaker5 is offline
McTavish
Senior Member
Join Date: May 2021
Old 12-06-2021 , 04:24   Re: Round Message w/ VOX v1.3
Reply With Quote #60

Quote:
Originally Posted by dorin2oo7 View Post
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]
Thank You !!
McTavish is offline
Reply


Thread Tools
Display Modes

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 05:07.


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