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

Round DHUD request


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
lexzor
Veteran Member
Join Date: Nov 2020
Old 01-27-2021 , 14:57   Round DHUD request
Reply With Quote #1

hello guys, i have this plugin:

PHP Code:
#include <amxmodx>


#pragma tabsize 0

new my_data_2_store[3]
new 
Restarted 0

public plugin_init(){
    
register_event "SendAudio""t_win""a""2&%!MRAD_terwin" );
    
register_event "SendAudio""ct_win""a""2&%!MRAD_ctwin" );
    
register_event("HLTV""event_new_round""a""1=0""2=0")
    
register_event("TextMsg""eRestart""a""2&#Game_C")
    
    
set_task(1.0,"CheckPlayers",.flags="b")
}
public 
eRestart(){
    if(
Restarted == 2) return PLUGIN_HANDLED
    arrayset
(my_data_2_store,0,charsmax(my_data_2_store))
    ++
Restarted
    
}
public 
event_new_round()    my_data_2_store[0]++
public 
t_win ( )    my_data_2_store ] ++;
public 
ct_win ( )    my_data_2_store ] ++;
public 
CheckPlayers ( ) {
    
set_dhudmessage 51102153, -1.00.0616.03.0 );
    
show_dhudmessage 0"Round: %s%d"my_data_2_store[0]>9?"":"0",my_data_2_store[0] );
        
    
set_dhudmessage 1562550, -1.00.0916.03.0 );
    
show_dhudmessage 0"T: %s%d         -         CT: %s%d"my_data_2_store[1] > "" "0"my_data_2_store ], my_data_2_store[2] > "" "0"my_data_2_store[2] );

the problem is that my server have a csgo competitive mode and after 15 rounds, the swap team plugin use sv_restart 1 to restart game and the plugin restart too. can you help me to avoid that plugin restart after sv_restart of swap team plugin ? i tried something but don't work

Last edited by lexzor; 01-27-2021 at 15:04.
lexzor is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 01-27-2021 , 17:28   Re: Round DHUD request
Reply With Quote #2

Remove:

Code:
register_event("TextMsg", "eRestart", "a", "2&#Game_C")
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
lexzor
Veteran Member
Join Date: Nov 2020
Old 01-28-2021 , 05:17   Re: Round DHUD request
Reply With Quote #3

https://imgur.com/a/2S4YqeI

so i have an warm-up plugin which use sv_restart too, that means i should limit dhud restart at 2 for : game commencing and frist sv_restart for pistol round, but this don't work
PHP Code:
#include <amxmodx>


#pragma tabsize 0

new my_data_2_store[3]
new 
restarted 0

public plugin_init(){
    
register_event "SendAudio""t_win""a""2&%!MRAD_terwin" );
    
register_event "SendAudio""ct_win""a""2&%!MRAD_ctwin" );
    
register_event("HLTV""event_new_round""a""1=0""2=0")
    
register_event("TextMsg""eRestart""a""2&#Game_C""2&#Game_w")
    
    
set_task(1.0,"CheckPlayers",.flags="b")
}
public 
eRestart()
    if(
restarted <2){
    
arrayset(my_data_2_store,0,charsmax(my_data_2_store))
    
restarted++
}
public 
event_new_round()    my_data_2_store[0]++
public 
t_win ( )    my_data_2_store ] ++;
public 
ct_win ( )    my_data_2_store ] ++;
public 
CheckPlayers ( ) {
    
set_dhudmessage 51102153, -1.00.0616.03.0 );
    
show_dhudmessage 0"Round: %s%d"my_data_2_store[0]>9?"":"0",my_data_2_store[0] );
        
    
set_dhudmessage 1562550, -1.00.0916.03.0 );
    
show_dhudmessage 0"T: %s%d         -         CT: %s%d"my_data_2_store[1] > "" "0"my_data_2_store ], my_data_2_store[2] > "" "0"my_data_2_store[2] );

lexzor is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 01-28-2021 , 07:19   Re: Round DHUD request
Reply With Quote #4

Did you not read my comment?
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
lexzor
Veteran Member
Join Date: Nov 2020
Old 01-28-2021 , 08:20   Re: Round DHUD request
Reply With Quote #5

i read id but i have to hook game commencing and sv_restart because if i comment that line in first round the plugin will show: Round - 3
T: 00 - CT:00
lexzor 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 05:07.


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