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

Solved Round count with sound and restart


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
tarsisd2
Veteran Member
Join Date: Feb 2016
Location: brazil
Old 01-18-2018 , 14:28   Round count with sound and restart
Reply With Quote #1

Hi, i need a plugin like this

1 - every round play sound from vox, like round one (round.wav + one.wav), on 30 Round say Last Round

2 - Hud in top middle like: Round One, Round Two, it goes up to 30 then it should say, Last Round

3 - print_chat every round like - Round: 1 || Map: de_dust2 || Players: 30/32

4 - in case it goes to 30 rounds sv_restart 1 and start all again, don't want it to change mp_timelimit, sometimes we have mapcycle ever 20 minutes or 25, and sometimes we leave 0 on de_dust2, thats when we want this plugin to work its magic!

edit: i already finished what i wanted

thanks guys

Edit: i found this plugin

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); 
    
    new 
CurrentTime[32
    
get_time("%H:%M:%S"CurrentTime31
     
    if(
get_pcvar_num(chat_message) == 1
    {     
        
client_printc(0,  "!g[!tAMX!y-!tMODX!g] !y- !tRound!y: !g%d !y| !tMap!y: !g%s !y| !tPlayers!y: !g%d!y/!g%d !y- !tTime!y: !g%s"rounds_elapsedg_mapp_playernumg_maxplayersCurrentTime);  
    } 
    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 
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();   
    }   
     

to restart round in 30 should i change
PHP Code:
num_to_word(rounds_elapsedrndctstr20); 
to
PHP Code:
num_to_word(rounds_elapsedrndctstr30); 
?

i think this is almost ready, need to add HUD, last round sound voice + msg, and i think there is no need for the language file

Last edited by tarsisd2; 01-19-2018 at 12:00. Reason: solved
tarsisd2 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 04:54.


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