Raised This Month: $ Target: $400
 0% 

[ZP50] Addon: Day-Night system ( Updated 1.3)


Post New Thread Reply   
 
Thread Tools Display Modes
Catastrophe
Veteran Member
Join Date: Jul 2012
Location: somewhere between narnia
Old 06-09-2013 , 05:28   Re: [ZP50 + ZP43] Addon: Day-Night system ( Updated 1.2)
Reply With Quote #11

Completely updated, and added more features.

I'd like to know if any servers currently use this plugin. plzz notify me the ip by PM
__________________
You will find everything u need :-

Last edited by Catastrophe; 06-09-2013 at 05:36.
Catastrophe is offline
RateX
Veteran Member
Join Date: Jun 2012
Location: 0o. SEA .o0
Old 06-09-2013 , 12:35   Re: [ZP50 + ZP43] Addon: Day-Night system ( Updated 1.2)
Reply With Quote #12

Cool update.
Suggestion: Instead of mutiply zombies' power, how about their health;)

Last edited by RateX; 06-10-2013 at 07:57.
RateX is offline
Catastrophe
Veteran Member
Join Date: Jul 2012
Location: somewhere between narnia
Old 06-09-2013 , 12:41   Re: [ZP50 + ZP43] Addon: Day-Night system ( Updated 1.2)
Reply With Quote #13

Hm..... i'll add it with next update , ty for idea
But then again.... i'll make it such that their health increases by X(cvar)
__________________
You will find everything u need :-
Catastrophe is offline
Evencelance
Member
Join Date: Dec 2012
Old 06-18-2013 , 11:59   Re: [ZP50 + ZP43] Addon: Day-Night system ( Updated 1.2)
Reply With Quote #14

Please make this plugin only without hud messages because I have a full screen blinks
Evencelance is offline
Old 06-18-2013, 12:31
Catastrophe
This message has been deleted by Catastrophe.
Evencelance
Member
Join Date: Dec 2012
Old 06-18-2013 , 12:44   Re: [ZP50 + ZP43] Addon: Day-Night system ( Updated 1.2)
Reply With Quote #15

Nothing came of it, just blink . You can simply remove this widget in dhud messages ?

Last edited by Evencelance; 06-18-2013 at 12:48.
Evencelance is offline
Catastrophe
Veteran Member
Join Date: Jul 2012
Location: somewhere between narnia
Old 06-18-2013 , 13:07   Re: [ZP50 + ZP43] Addon: Day-Night system ( Updated 1.2)
Reply With Quote #16

I cant understand u, do u want me to make it dhudmessage ?
__________________
You will find everything u need :-
Catastrophe is offline
Catastrophe
Veteran Member
Join Date: Jul 2012
Location: somewhere between narnia
Old 06-18-2013 , 13:11   Re: [ZP50 + ZP43] Addon: Day-Night system ( Updated 1.2)
Reply With Quote #17

Here is the dhudmessage version:-

not tested:-

PHP Code:
#include <amxmodx>
#include <zp50_core>
#include <zp50_class_nemesis>
#include <hamsandwich>
#include <cs_ham_bots_api>se
#include <dhudmessage>

new cvar_ctcvar_nemcvar_nightpowerz_enablecvar_daypowerh_enablecvar_multiplier
new g_timeFloat:begin_timebool:g_is_nightbool:g_is_day

new const TIME[][]= {
 
       
"Morning",
       
"Noon",  
       
"Evening",
       
"Night"

}

public 
plugin_init()
{
 
      
register_plugin("[ZP] Addon: Day-Night System""1.2""Catastrophe")

      
register_event("HLTV","event_newround","a","1=0","2=0")

      
RegisterHam(Ham_TakeDamage"player""fw_damage")
      
RegisterHamBots(Ham_TakeDamage"fw_damage")

      
cvar_ct register_cvar("zp_dns_change_time","15.0")
      
cvar_nem register_cvar("zp_dns_nem_night","1")
      
cvar_nightpowerz_enable register_cvar("zp_dns_night_zombie_power","1")
      
cvar_daypowerh_enable register_cvar("zp_dns_day_human_power","0")
      
cvar_multiplier register_cvar("zp_dns_power_multiplier""2.0")


public 
plugin_precache()
{

       
precache_sound("zombie_plague/werewolf1.wav")
}


public 
client_putinserver(id)
{
 
       
set_task(1.0"checkhudmessage"id+672)     

}

public 
client_disconnect(id)
{
             
       
remove_task(id+672)

}

public 
event_newround()
{

       
g_is_night false 
       g_is_day 
true   
       remove_task

       begin_time 
get_gametime() 
       
server_cmd("zp_lighting i")
       
set_task(get_pcvar_float(cvar_ct), "cm1")
       
g_time 0
       

}

public 
cm1()
{

       
server_cmd("zp_lighting l")
       
set_task(get_pcvar_float(cvar_ct), "cm2")
       
g_time 0

}

public 
cm2()
{

       
server_cmd("zp_lighting o")
       
set_task(get_pcvar_float(cvar_ct), "cm3")
       
g_time 0

}

public 
cm3()
{

       
server_cmd("zp_lighting r")
       
set_task(get_pcvar_float(cvar_ct), "cm4")
       
g_time 0

}

public 
cm4()
{

       
server_cmd("zp_lighting v")
       
set_task(get_pcvar_float(cvar_ct), "cm5")
       
g_time 0

}

public 
cm5()
{

       
server_cmd("zp_lighting y")
       
set_task(get_pcvar_float(cvar_ct), "c0")
       
g_time 0
 
}

public 
c0()
{

       
server_cmd("zp_lighting y")
       
set_task(get_pcvar_float(cvar_ct), "c1")
       
g_time 1


}

public 
c1()
{

       
server_cmd("zp_lighting w")
       
set_task(get_pcvar_float(cvar_ct), "c2")
       
g_time 1



}

public 
c2()
{

       
server_cmd("zp_lighting u")
       
set_task(get_pcvar_float(cvar_ct), "c3")
       
g_time 1


}

public 
c3()
{

       
server_cmd("zp_lighting s")
       
set_task(get_pcvar_float(cvar_ct), "c4")
       
g_time 1


}

public 
c4()
{

       
server_cmd("zp_lighting q")
       
set_task(get_pcvar_float(cvar_ct), "c5")
       
g_time 2


}

public 
c5()
{

       
server_cmd("zp_lighting o")
       
set_task(get_pcvar_float(cvar_ct), "c6")
       
g_time 2



}

public 
c6()
{

       
server_cmd("zp_lighting m")
       
set_task(get_pcvar_float(cvar_ct), "c7")
       
g_time 2

 

}

public 
c7()
{

       
server_cmd("zp_lighting j")
       
set_task(get_pcvar_float(cvar_ct), "c8")
       
g_time 2



}

public 
c8()
{

       
server_cmd("zp_lighting h")
       
set_task(get_pcvar_float(cvar_ct), "c9")
       
g_time 2


}

public 
c9()
{

       
server_cmd("zp_lighting f")
       
set_task(get_pcvar_float(cvar_ct), "c10")
       
g_time 2

}

public 
c10()
{

       
server_cmd("zp_lighting d")
       
set_task(get_pcvar_float(cvar_ct), "c11")
       
g_time 2


}

public 
c11()
{

       
server_cmd("zp_lighting b")
       
set_task(get_pcvar_float(cvar_ct), "c12")
       
g_time 2


}

public 
c12()
{

       
g_is_night true  
       g_is_day 
false 
       
       server_cmd
("zp_lighting a")
       
client_cmd(0"spk zombie_plague/werewolf1")
       
g_time 3
    
       
if(get_pcvar_num(cvar_nem) == 1)
       {

        new 
idalive_countname[32]
        
alive_count GetAliveCount()
        
id GetRandomAliveZombie(random_num(1alive_count))   
    
get_user_name(idnamecharsmax(name))

        if(!
zp_class_nemesis_get(id)) 
        {

        
zp_class_nemesis_set(id)

        
client_print(0print_center"The night beckons and %s evolves into a Nemesis !!"name

        }


       }

       else if(
get_pcvar_num(cvar_nem) == 2)
       {

        for(new 
1get_maxplayers(); i++)
        { 

          if(
zp_core_is_zombie(i) && is_user_alive(i) && !zp_class_nemesis_get(i))
          {

             
zp_class_nemesis_set(i)

          }

        }

        
client_print(0print_center"The night beckons and all the zombie become Nemesis !!")  
        

       }
}

public 
checkhudmessage(id)
{

       
id -= 672;

       if( !
g_is_night)
       {

       
set_dhudmessage(01802551.00.00106.01.10.00.0false)
       
show_dhudmessage"Seconds to night: %.f ^nTime: %s",(get_pcvar_float(cvar_ct)*19) - (get_gametime() - begin_time),TIME[g_time])
       }

       else
       {
       
       
set_dhudmessage(250001.00.00106.01.10.00.0,  false)
       
show_dhudmessage"Time: %s",TIME[g_time]) 


       }

       
set_task(0.1"checkhudmessage"id+672); 

}

public 
fw_damage(victiminflictorattackerFloat:damagedamagebits)
{

       if(
get_pcvar_num(cvar_nightpowerz_enable) == && g_is_night && is_user_connected(victim) && is_user_connected(attacker) && is_user_alive(victim) && zp_core_is_zombie(attacker))
       {

       
SetHamParamFloat(4damage get_pcvar_num(cvar_multiplier))

       }

       if(
get_pcvar_num(cvar_daypowerh_enable) == && g_is_day && is_user_connected(victim) && is_user_connected(attacker) && is_user_alive(victim) && !zp_core_is_zombie(attacker))
       {

       
SetHamParamFloat(4damage get_pcvar_num(cvar_multiplier))

       }

}


GetAliveCount()
{
    new 
iAliveid
    
    
for (id 1id <= get_maxplayers(); id++)
    {
        if (
is_user_alive(id))
            
iAlive++
    }
    
    return 
iAlive;
}

GetRandomAliveZombie(target_index)
{
    new 
iAliveid
    
    
for (id 1id <= get_maxplayers(); id++)
    {
        if (
is_user_alive(id) && zp_core_is_zombie(id))
            
iAlive++
        
        if (
iAlive == target_index)
            return 
id;
    }
    
    return -
1;

__________________
You will find everything u need :-
Catastrophe is offline
Evencelance
Member
Join Date: Dec 2012
Old 06-18-2013 , 13:54   Re: [ZP50 + ZP43] Addon: Day-Night system ( Updated 1.2)
Reply With Quote #18

Code:
set_dhudmessage(0, 180, 255, 1.0, 0.001, 0, 6.0, 1.1, 0.0, 0.0, false)
show_dhudmessage( 0 , "Seconds to night: %.f ^nTime: %s",(get_pcvar_float(cvar_ct)*19) - (get_gametime() - begin_time),TIME[g_time])

and

       set_dhudmessage(250, 0, 0, 1.0, 0.001, 0, 6.0, 1.1, 0.0, 0.0,  false)
       show_dhudmessage( 0 , "Time: %s",TIME[g_time]) 

Should not be displayed on the screen
I mean this message of informer does not go to the screen
[P/s] Sorry for my very bad English

Last edited by Evencelance; 06-18-2013 at 16:06.
Evencelance is offline
Catastrophe
Veteran Member
Join Date: Jul 2012
Location: somewhere between narnia
Old 06-19-2013 , 00:47   Re: [ZP50 + ZP43] Addon: Day-Night system ( Updated 1.2)
Reply With Quote #19

PHP Code:
#include <amxmodx>
#include <zp50_core>
#include <zp50_class_nemesis>
#include <hamsandwich>
#include <cs_ham_bots_api>se
#include <dhudmessage>

new cvar_ctcvar_nemcvar_nightpowerz_enablecvar_daypowerh_enablecvar_multiplier
new g_timeFloat:begin_timebool:g_is_nightbool:g_is_day

new const TIME[][]= {
 
       
"Morning",
       
"Noon",  
       
"Evening",
       
"Night"

}

public 
plugin_init()
{
 
      
register_plugin("[ZP] Addon: Day-Night System""1.2""Catastrophe")

      
register_event("HLTV","event_newround","a","1=0","2=0")

      
RegisterHam(Ham_TakeDamage"player""fw_damage")
      
RegisterHamBots(Ham_TakeDamage"fw_damage")

      
cvar_ct register_cvar("zp_dns_change_time","15.0")
      
cvar_nem register_cvar("zp_dns_nem_night","1")
      
cvar_nightpowerz_enable register_cvar("zp_dns_night_zombie_power","1")
      
cvar_daypowerh_enable register_cvar("zp_dns_day_human_power","0")
      
cvar_multiplier register_cvar("zp_dns_power_multiplier""2.0")


public 
plugin_precache()
{

       
precache_sound("zombie_plague/werewolf1.wav")
}

public 
event_newround()
{

       
g_is_night false 
       g_is_day 
true   
       remove_task

       begin_time 
get_gametime() 
       
server_cmd("zp_lighting i")
       
set_task(get_pcvar_float(cvar_ct), "cm1")
       
g_time 0
       

}

public 
cm1()
{

       
server_cmd("zp_lighting l")
       
set_task(get_pcvar_float(cvar_ct), "cm2")
       
g_time 0

}

public 
cm2()
{

       
server_cmd("zp_lighting o")
       
set_task(get_pcvar_float(cvar_ct), "cm3")
       
g_time 0

}

public 
cm3()
{

       
server_cmd("zp_lighting r")
       
set_task(get_pcvar_float(cvar_ct), "cm4")
       
g_time 0

}

public 
cm4()
{

       
server_cmd("zp_lighting v")
       
set_task(get_pcvar_float(cvar_ct), "cm5")
       
g_time 0

}

public 
cm5()
{

       
server_cmd("zp_lighting y")
       
set_task(get_pcvar_float(cvar_ct), "c0")
       
g_time 0
 
}

public 
c0()
{

       
server_cmd("zp_lighting y")
       
set_task(get_pcvar_float(cvar_ct), "c1")
       
g_time 1


}

public 
c1()
{

       
server_cmd("zp_lighting w")
       
set_task(get_pcvar_float(cvar_ct), "c2")
       
g_time 1



}

public 
c2()
{

       
server_cmd("zp_lighting u")
       
set_task(get_pcvar_float(cvar_ct), "c3")
       
g_time 1


}

public 
c3()
{

       
server_cmd("zp_lighting s")
       
set_task(get_pcvar_float(cvar_ct), "c4")
       
g_time 1


}

public 
c4()
{

       
server_cmd("zp_lighting q")
       
set_task(get_pcvar_float(cvar_ct), "c5")
       
g_time 2


}

public 
c5()
{

       
server_cmd("zp_lighting o")
       
set_task(get_pcvar_float(cvar_ct), "c6")
       
g_time 2



}

public 
c6()
{

       
server_cmd("zp_lighting m")
       
set_task(get_pcvar_float(cvar_ct), "c7")
       
g_time 2

 

}

public 
c7()
{

       
server_cmd("zp_lighting j")
       
set_task(get_pcvar_float(cvar_ct), "c8")
       
g_time 2



}

public 
c8()
{

       
server_cmd("zp_lighting h")
       
set_task(get_pcvar_float(cvar_ct), "c9")
       
g_time 2


}

public 
c9()
{

       
server_cmd("zp_lighting f")
       
set_task(get_pcvar_float(cvar_ct), "c10")
       
g_time 2

}

public 
c10()
{

       
server_cmd("zp_lighting d")
       
set_task(get_pcvar_float(cvar_ct), "c11")
       
g_time 2


}

public 
c11()
{

       
server_cmd("zp_lighting b")
       
set_task(get_pcvar_float(cvar_ct), "c12")
       
g_time 2


}

public 
c12()
{

       
g_is_night true  
       g_is_day 
false 
       
       server_cmd
("zp_lighting a")
       
client_cmd(0"spk zombie_plague/werewolf1")
       
g_time 3
    
       
if(get_pcvar_num(cvar_nem) == 1)
       {

        new 
idalive_countname[32]
        
alive_count GetAliveCount()
        
id GetRandomAliveZombie(random_num(1alive_count))   
    
get_user_name(idnamecharsmax(name))

        if(!
zp_class_nemesis_get(id)) 
        {

        
zp_class_nemesis_set(id)

        
client_print(0print_center"The night beckons and %s evolves into a Nemesis !!"name

        }


       }

       else if(
get_pcvar_num(cvar_nem) == 2)
       {

        for(new 
1get_maxplayers(); i++)
        { 

          if(
zp_core_is_zombie(i) && is_user_alive(i) && !zp_class_nemesis_get(i))
          {

             
zp_class_nemesis_set(i)

          }

        }

        
client_print(0print_center"The night beckons and all the zombie become Nemesis !!")  
        

       }
}

public 
fw_damage(victiminflictorattackerFloat:damagedamagebits)
{

       if(
get_pcvar_num(cvar_nightpowerz_enable) == && g_is_night && is_user_connected(victim) && is_user_connected(attacker) && is_user_alive(victim) && zp_core_is_zombie(attacker))
       {

       
SetHamParamFloat(4damage get_pcvar_num(cvar_multiplier))

       }

       if(
get_pcvar_num(cvar_daypowerh_enable) == && g_is_day && is_user_connected(victim) && is_user_connected(attacker) && is_user_alive(victim) && !zp_core_is_zombie(attacker))
       {

       
SetHamParamFloat(4damage get_pcvar_num(cvar_multiplier))

       }

}


GetAliveCount()
{
    new 
iAliveid
    
    
for (id 1id <= get_maxplayers(); id++)
    {
        if (
is_user_alive(id))
            
iAlive++
    }
    
    return 
iAlive;
}

GetRandomAliveZombie(target_index)
{
    new 
iAliveid
    
    
for (id 1id <= get_maxplayers(); id++)
    {
        if (
is_user_alive(id) && zp_core_is_zombie(id))
            
iAlive++
        
        if (
iAlive == target_index)
            return 
id;
    }
    
    return -
1;

Here, withlout the hud message...
__________________
You will find everything u need :-
Catastrophe is offline
Evencelance
Member
Join Date: Dec 2012
Old 06-19-2013 , 04:54   Re: [ZP50 + ZP43] Addon: Day-Night system ( Updated 1.2)
Reply With Quote #20



Not compile
Evencelance 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 10:34.


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