AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Zombie Plague Mod (https://forums.alliedmods.net/forumdisplay.php?f=126)
-   -   [ZP] Extra Item: Freeze Ability & Immunity v1.0 (https://forums.alliedmods.net/showthread.php?t=158323)

A.Madjid 06-03-2011 08:13

[ZP] Extra Item: Freeze Ability & Immunity v1.0
 
1 Attachment(s)
  • 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 ...

Dolph_Ziggler 06-03-2011 09:00

Re: [ZP] Extra Item: Freeze Ability & Immunity v1.0
 
very nice plugin i like it :D but the cvar must be _

bibu 06-03-2011 09:05

Re: [ZP] Extra Item: Freeze Ability & Immunity v1.0
 
- 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.

A.Madjid 06-03-2011 16:57

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

Originally Posted by bibu (Post 1480520)
- 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 .

bibu 06-05-2011 09:46

Re: [ZP] Extra Item: Freeze Ability & Immunity v1.0
 
Looks much better now for sure, still I would ask someone to use correct english messages. :)

yokomo 06-05-2011 10:00

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

Originally Posted by bibu (Post 1480520)
- 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.

A.Madjid 06-05-2011 10:41

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

Originally Posted by bibu (Post 1481730)
Looks much better now for sure, still I would ask someone to use correct english messages. :)

Thank you so much :wink:

bibu 06-05-2011 13:38

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

Originally Posted by yokomo (Post 1481732)
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]) 


cohzor 06-05-2011 17:29

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

A.Madjid 06-06-2011 05:40

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

Originally Posted by bibu (Post 1481874)
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 :up:


All times are GMT -4. The time now is 16:22.

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