View Single Post
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 07-11-2014 , 16:03   Re: Updated List of 3rd Party + New Modes + Tutorials (10/7/2014)
Reply With Quote #76

New update!
Quote:
Adding addon: Happy Hours
This is my first attempt to edit any old plugin. The original thread, here.

If anybody can help me to improve and optimize this plugin, I will be glad. I have tested this plugin.
Quote:
It is working well in ZPA1.6.1, ZP5.0 and above.
Description:

Its purpose is to increase ammo pack gain at some points in time (happy hours). It works in all zombie plague versions. You just have to edit this line:
PHP Code:
// Uncomment this line if you use the zombie plague 4.2 or an older
//#define ZP_42_OR_OLDER 
What new!
Quote:
1. When it is happy hour: "Happy Hour is currently active! Start at: %d o'clock - Ends at: %d o'clock."
2. When it is not happy hour: "Happy Hour is over! Please play again at at: %d o'clock - Ends at: %d o'clock."
3. Adding green hud message: "[Happy Hours] Everyday at: %d o'clock - Ends at: %d o'clock."
Cvar's:
PHP Code:
cvar_init register_cvar("zp_happyinit""16")
cvar_end register_cvar("zp_happyend""20")
cvar_on register_cvar("zp_happyhour""1")
cvar_multi register_cvar("zp_happymultipler",  "2"
Quote:
zp_happyinit 16 // Hour at which the happy hours start, example 2 = 2 am and 14 = 2 pm.
zp_happyend 20 // Hour at which the happy hours end, example 2 = 2 am and 14 = 2 pm.
zp_happyhour 1 // Enable the happy hour.
zp_happymultipler 2 // Multipler of the amount, example amount init is +1 pack, and cvar is 2 : result +2 packs for this player
Changelog:
Code:
July, 12, 2014 - Adding message "Happy Hour is  currently  active! Start at: %d o'clock - Ends at: %d o'clock." when it  is happy  hour.
                 Adding message "Happy Hour is  over! Please play again  at at: %d o'clock - Ends at: %d o'clock."" when  it is not happy hour.
                 Adding message "[Happy Hours] Everyday at: %d o'clock - Ends at: %d o'clock."
                 Adding message "[Happy Hours] The ammo packs is multiplied by %d".
                 Adding hud message "[Happy Hours] Everyday at: %d o'clock - Ends at: %d o'clock."
To do list:
Quote:
1. Adding color to the message.
2. etc
Screenshot:


Quote:
happyhour_1 is for ZP5.0 and above only.
Attached Files
File Type: sma Get Plugin or Get Source (happyhour.sma - 1243 views - 6.3 KB)
File Type: sma Get Plugin or Get Source (happyhour_1.sma - 1153 views - 4.4 KB)

Last edited by zmd94; 07-13-2014 at 00:55.
zmd94 is offline