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

[ZP] Extra Item: Freeze Ability & Immunity v1.0


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
A.Madjid
Junior Member
Join Date: Apr 2011
Old 06-03-2011 , 08:13   [ZP] Extra Item: Freeze Ability & Immunity v1.0
Reply With Quote #1

  • Description :

This plugin adds two extra items to zombie plague mode :

1 - Freaze ability for zombies : it allows them to freeze humans by aiming on their bodies then press "+use" button.

2 - Immunity from freeze abilty for humans : it prevents zombies from freezing humans .( Anti freeze )

Note : Idea comes to me when i have seen the frost zombie class so most credit goes to "Excalibur.007" for his plugin .
and I have tried to transform it to an extra item + some other cvars and stuff .



  • Cvars :
* Freeze Ability *

-enable_plugin 1
Enable/Disable Freeze ability plugin .

-frost_mode 0
There are two modes :
"0" means that zombies don't loose frosts if they aim on non-victim object

"1" means that each press will cause you to loos a frost .

-frost_distance 650
Max distance that zombies can freeze humans .

-freeze_time 3
Seconds of being freezed .

-max_frost 4
Like it said , it's the number of frosts that zombie can obtain when he buys this extra item .
.
-bonus_frost 0
Number of bonus-frosts for each infect . (right now it's off)

-frost_cooldown 0.0
Seconds of waiting between frosts .

-strip_victim_armor 0
Set this to "1" means to strip victim armor when he gets freezed ,"0" means to let everything as usual .

-save_ability_on_death 0
wether to save ability or not when zombie dies .

-enable_freeze_ability_with_survivors 0
Enable/Disable Ability with survivors .
Note : survivor glow will be removed if he gets freezed .

-enable_freeze_ability_with_snipers 0
Enable/Disable Ability with snipers ( zombie_plague advance )
Note : sniper glow will be removed if he gets freezed .

- red_glow 250
- green_glow 0
- blue_glow 0
Set glow color when victim gets freezer, I think red is good because it's a zombie ability, not a human frost nade. (just to make difference)
Note : If you want to set the color just like human frost nade set the following options :
red_glow 0
green_glow 100
blue_glow 250

- glow_size 50
the size of glow color .


* Anti Freeze Ability *

- all_the_map 1
"1" ===> Immunity stills until mapchange .
"0" ===> Immunity only for one round .



  • Credits:

Excalibur.007 =====> His frost zombie class plugin .


  • Important Notes:

1 - This plugin works with both zombie plague 4.3 and zombie plague advance, if you are using zombie plague advance just uncomment the following line
Code:
//#define EDITED_VERSION

2 - You must download the new natives to run this plugin , you can find them here : http://forums.alliedmods.net/showthread.php?t=119431

3 - to disable Immunity plugin just add // to #define IMMUNITY_ABILITY
Code:
#define IMMUNITY_ABILITY

4 - If you want to change the cost of the Freeze ability please edit the line
number 143 and edit in the zpa_extraitems.ini also .
Code:
 new const item_cost = 15

5 - Last thing : I'm beginner at this so if you find any stupid thing in my code don't be surprised and tell me what you think that it's better to do.

  • Some Suggestions:
* Decrease the price of Immunity if you set it to All map .

* Cooldown should be 0.0 since players don't get this ability for free . (unlike zombie frost class)

* Increase the price of the ability in case if you enable to save it on death or to strip victim armor or anything else .

*** ANY WAY IT'S UP TO YOU ... JUST TRY TO MAKE IT FAIR BECAUSE THIS IS THE REAL PURPOSE : TO BALANCE BETWEEN HUMANS AND ZOMBIES. ***

HAVE FUN ...
Attached Files
File Type: sma Get Plugin or Get Source (zp_extra_freeze_with_immunity.sma - 2653 views - 12.5 KB)

Last edited by A.Madjid; 06-03-2011 at 17:14.
A.Madjid is offline
Send a message via Skype™ to A.Madjid
Dolph_Ziggler
BANNED
Join Date: Jun 2011
Old 06-03-2011 , 09:00   Re: [ZP] Extra Item: Freeze Ability & Immunity v1.0
Reply With Quote #2

very nice plugin i like it but the cvar must be _
Dolph_Ziggler is offline
Send a message via MSN to Dolph_Ziggler
bibu
Veteran Member
Join Date: Sep 2010
Old 06-03-2011 , 09:05   Re: [ZP] Extra Item: Freeze Ability & Immunity v1.0
Reply With Quote #3

- Use fm_cmdstart instead of prethink.
- message "You can't freeze survivor" -> "You can't freeze as a survivor." Also for the rest.
- "Impossible, this player has immunity from freeze ability" -> "Target has freeze ability!"
- "You are now immune frome freeze abilities" -> "You are immune to freeze abilities."
- fm_set_rendering -> Use fun's set_user_rendering instead.
- Remove "[ZP]" from the cvars.
- Caching cvars on new round and using bitsums for variables would also optimize the code.
__________________
Selling tons of my own private works.
Accepting paid work for clans and communities.
Don't hesitate to contact me.
bibu is offline
A.Madjid
Junior Member
Join Date: Apr 2011
Old 06-03-2011 , 16:57   Re: [ZP] Extra Item: Freeze Ability & Immunity v1.0
Reply With Quote #4

Quote:
Originally Posted by bibu View Post
- Use fm_cmdstart instead of prethink.
- message "You can't freeze survivor" -> "You can't freeze as a survivor." Also for the rest.
- "Impossible, this player has immunity from freeze ability" -> "Target has freeze ability!"
- "You are now immune frome freeze abilities" -> "You are immune to freeze abilities."
- fm_set_rendering -> Use fun's set_user_rendering instead.
- Remove "[ZP]" from the cvars.
- Caching cvars on new round and using bitsums for variables would also optimize the code.
- i have used fm_cmdstart .. tell me if it's right what i have done .
- also other things are changed .
- last think : your messages are not clear ... like "Target has freeze ability!" i think that target never gets freeze ability . but i have changed mine too to a better one and also other bad messages .
please test it again and tell me about wrong things cuz i have tested it and it works perfect
thnx for everything .
i am busy a little bit this is why i didn't correct it immediately also it's a Little bit hard for me as beginner to do new things like fm_cmd so next time please attach code and explain clearly .

Last edited by A.Madjid; 06-03-2011 at 17:03.
A.Madjid is offline
Send a message via Skype™ to A.Madjid
bibu
Veteran Member
Join Date: Sep 2010
Old 06-05-2011 , 09:46   Re: [ZP] Extra Item: Freeze Ability & Immunity v1.0
Reply With Quote #5

Looks much better now for sure, still I would ask someone to use correct english messages.
__________________
Selling tons of my own private works.
Accepting paid work for clans and communities.
Don't hesitate to contact me.
bibu is offline
yokomo
Surprise Ascot!
Join Date: May 2010
Location: Malaysia
Old 06-05-2011 , 10:00   Re: [ZP] Extra Item: Freeze Ability & Immunity v1.0
Reply With Quote #6

Quote:
Originally Posted by bibu View Post
- Use fm_cmdstart instead of prethink.
- message "You can't freeze survivor" -> "You can't freeze as a survivor." Also for the rest.
- "Impossible, this player has immunity from freeze ability" -> "Target has freeze ability!"
- "You are now immune frome freeze abilities" -> "You are immune to freeze abilities."
- fm_set_rendering -> Use fun's set_user_rendering instead.
- Remove "[ZP]" from the cvars.
- Caching cvars on new round and using bitsums for variables would also optimize the code.
Why need to use many module? fakemeta is enough. moreeeeee module make moreeeee contact.
__________________
Team-MMG CS1.6 Servers:
✅ MultiMod -- 103.179.44.152:27016
✅ Zombie Plague -- 103.179.44.152:27015
✅ Zombie Escape -- 103.179.44.152:27017
✅ Klassik Kombat -- 103.179.44.152:27018
✅ Boss-Battle -- 103.179.44.152:27019
yokomo is offline
A.Madjid
Junior Member
Join Date: Apr 2011
Old 06-05-2011 , 10:41   Re: [ZP] Extra Item: Freeze Ability & Immunity v1.0
Reply With Quote #7

Quote:
Originally Posted by bibu View Post
Looks much better now for sure, still I would ask someone to use correct english messages.
Thank you so much
A.Madjid is offline
Send a message via Skype™ to A.Madjid
bibu
Veteran Member
Join Date: Sep 2010
Old 06-05-2011 , 13:38   Re: [ZP] Extra Item: Freeze Ability & Immunity v1.0
Reply With Quote #8

Quote:
Originally Posted by yokomo View Post
Why need to use many module? fakemeta is enough. moreeeeee module make moreeeee contact.
You should read some topics in the Code Snippets / Tutorials section. Using more modules doesn't mean it will use more CPU. And it's for sure better to use those natives which are the best provided by the modules.

EDIT:

Just for info, if you're checking the variable, you can also do this:

PHP Code:
if(g_has_frost[player])

// or:

if(!g_has_frost[player]) 
__________________
Selling tons of my own private works.
Accepting paid work for clans and communities.
Don't hesitate to contact me.

Last edited by bibu; 06-05-2011 at 13:44.
bibu is offline
cohzor
Junior Member
Join Date: Jul 2009
Old 06-05-2011 , 17:29   Re: [ZP] Extra Item: Freeze Ability & Immunity v1.0
Reply With Quote #9

ty.
cohzor is offline
A.Madjid
Junior Member
Join Date: Apr 2011
Old 06-06-2011 , 05:40   Re: [ZP] Extra Item: Freeze Ability & Immunity v1.0
Reply With Quote #10

Quote:
Originally Posted by bibu View Post
Just for info, if you're checking the variable, you can also do this:

PHP Code:
if(g_has_frost[player])

// or:

if(!g_has_frost[player]) 
sure thnx
A.Madjid is offline
Send a message via Skype™ to A.Madjid
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 16:52.


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