Raised This Month: $ Target: $400
 0% 

ZP 5.0 Countdown Help needed!


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Natsheh
Veteran Member
Join Date: Sep 2012
Old 09-04-2017 , 08:53   Re: ZP 5.0 Countdown Help needed!
Reply With Quote #1

Quote:
Originally Posted by kristi View Post
Okay thx for the error log now its fixed i fixed the code on the phone....
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !

Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
Debrizor
Junior Member
Join Date: Sep 2017
Old 09-04-2017 , 09:02   Re: ZP 5.0 Countdown Help needed!
Reply With Quote #2

Quote:
Originally Posted by Natsheh View Post
Okay thx for the error log now its fixed i fixed the code on the phone....

haha, it works... kinda. When you spawn in it counts down from 15 and says 15 over and over again so it loops... then crash (reliable channel overflowed)
Debrizor is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 09-04-2017 , 09:08   Re: ZP 5.0 Countdown Help needed!
Reply With Quote #3

Quote:
Originally Posted by Debrizor View Post
haha, it works... kinda. When you spawn in it counts down from 15 and says 15 over and over again so it loops... then crash (reliable channel overflowed)
Which code you have tested mine or his?


Im sure there is nothing wrong with the code...
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !


Last edited by Natsheh; 09-04-2017 at 09:10.
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
Old 09-04-2017, 09:11
Debrizor
This message has been deleted by Debrizor.
Debrizor
Junior Member
Join Date: Sep 2017
Old 09-04-2017 , 09:12   Re: ZP 5.0 Countdown Help needed!
Reply With Quote #5

Quote:
Originally Posted by Natsheh View Post
Which code you have tested mine or his?


Im sure there is nothing wrong with the code...

i tested your fixed code

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

#define PLUGIN "[ZP] Infection Countdown Remix[Martis]" 
#define VERSION "1.3" 
#define AUTHOR "Dels" 

new Float:countdown_timercvar_countdown_sound,  zp_gamemode_delay;
new 
g_msgsync;
const 
TASK_ID 16099

new const 
speak[][] = {  
    
"fvox/one.wav",  
    
"fvox/two.wav",  
    
"fvox/three.wav",  
    
"fvox/four.wav",  
    
"fvox/five.wav",  
    
"fvox/six.wav",  
    
"fvox/seven.wav",  
    
"fvox/eight.wav",  
    
"fvox/nine.wav"
    
"fvox/ten.wav"
    
"fvox/eleven.wav"
    
"fvox/twelve.wav"
    
"fvox/thirteen.wav"
    
"fvox/fourteen.wav"
    
"fvox/fifteen.wav" 
    


public 
plugin_init() 

    
register_plugin(PLUGINVERSIONAUTHOR);     
    
register_event("HLTV""event_round_start""a""1=0""2=0"); 
    
register_dictionary("zp_countdown_remix.txt"); 
     
    
//needed for smooth countdown display 
    
g_msgsync CreateHudSyncObj(); 
     
    
//cvars 
    
cvar_countdown_sound register_cvar("countdown_sound""1"); //1 to enable, 0 to disable 

     
zp_gamemode_delay get_cvar_pointer("zp_gamemode_delay");
}
  
public 
plugin_precache() 

    for(new 
isizeof speak;i++)
    {
             
precache_sound(speak[i]);
    }


public 
event_round_start() 

     if(!
get_pcvar_num(cvar_countdown_sound)) return
    
//bugfix 
    
remove_task(TASK_ID); 
     
    
countdown_timer float((get_pcvar_num(zp_gamemode_delay) - sizeof speak)); 
    if(
countdown_timer 0.0set_task(countdown_timer"precountdown"TASK_ID);
    else 
precountdown()
}
public 
precountdown()
{
           
countdown_timer floatclamp(get_pcvar_float(zp_gamemode_delay), 0.0float(sizeof speak)); 
           
countdown()
           if(
countdown_timer 0.0set_task(1.0"precountdown"TASK_ID__"a"floatround(countdown_timer));
}
public 
countdown() 
{
    
countdown_timer-= 1.0;
    if (
countdown_timer >= 0.0
    {
        
client_cmd(0"spk %s"speak[floatround(countdown_timer)]); 
             
        
set_hudmessage(17900, -1.00.2820.021.00.010.110);
            
ShowSyncHudMsg(0g_msgsync"%L"LANG_PLAYER"COUNTDOWN_MSG"floatround(countdown_timer)+1);
    }
    else 
remove_task(TASK_ID);

Debrizor 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 09:56.


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