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

Subplugin Submission [ZP] Addon: Counter-Strike like Buymenu for Zombie Plagie!


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Gameplay        Approver:   Exolent[jNr] (178)
SonicSonedit
Veteran Member
Join Date: Nov 2008
Location: Silent Hill
Old 03-16-2009 , 07:47   [ZP] Addon: Counter-Strike like Buymenu for Zombie Plagie!
Reply With Quote #1

Warning
This plugin is for Zombie Plague Mod, so there is no difference between T's and CT's buymenu + free buyzone.
Also, sorry for bad english.

Plugin Status: release!
Current version: 1.7

Last updated: 22.12.2010 (22nd December 2010)


Description
This plugin replaces default Zombie Plugins weapons menu with customizable, CS-like buymenu.
You can customize it any way you want - you can sell extra-items in rifles submenu, you can sell Antidote bomb human equipment menu, you can do whatever you want! You can set price and name of item without server restart! Just restart round! It also includes some gameplay features, like no death penalty (no death score) for zombies when they die, kill assist for both humans and zombies (infection assist included!) and rounded frags/money bonuses/penalties. You can disable any of this though.

So, what you will get by installing this plugin?

1) Completely customizable buymenu!



2) You'll earn cash by shooting zombie, and cash rate is either customizable!



3) Adding new extra item never was so easy! Simply add extra item name in "todo" param!
Example:
Quote:
zp_cs_buymenu_equiph07_name "Trip Mine"
zp_cs_buymenu_equiph07_cost 6000
zp_cs_buymenu_equiph07_todo "Trip Mine"
By doing so you'll add item named "Trip mine" into equipment menu, when you buy it, you'll get extra item stored in zp_extra_lasermine.amxx - a laser mine!
don't forget to add zp_extra_lasermine.amxx in your plugins-zplague.ini!


4) mp_buytime affects weapon price! You can set multipers for any weapons!
For example, my rifle multiplers is 3, so in the beginning of round you can see this
but later - this

5) Tired of zombs cowardly camping like chiсkenpussies all the round long?
Do you ever thought WHY they are doing this? Well, here is the answer:
a) they will ruin their stats because of dying.
b) when round ends, nothing happens anyway. so blaaah...let's just camp and wait till humans will come out of their hideout, right, my rotten fella?
But this plugin solves both of this problems!
When round ends, if it's a "Draw" roundend, zombie will get some frags/deaths penalty and humans will get some bonus frags! And, ofcourse, $$$
bonuses/penalties. And also by setting zp_cs_zombie_nodeathscore 1 you can disable death count for zombies when they are killed by humans! So there is no more reason to camp for zombs anymore: died? DON'T CARE!! But better care about round results...
It also boosts teamplay.


Just try it, you'll like it!
Please, give me your feedback!


Don't forget to edit
Code:
zp_buy_custom 0
zp_remove_money 0
zp_extra_items 0
in your zombieplague.cfg!


CVARS List
  • General
    • zp_cs_human_income_cash_rate 2.0 - income cash rate for humans. Income cash = dmg * income cash rate. Only affects general attacks, not kill bonus.
    • zp_cs_zombie_income_cash_rate 5.0 - same as above for zombies. Only affects general attacks, not infection bonus.
      zp_cs_nemesis_income_cash_rate 0.5 - same as above for nemesis. affects general attack and kill bonus (nemesis kill bonus = infection bonus * nemesis income cash rate)
      zp_cs_survivor_income_cash_rate 0.2 - same as above for survivor. affects general attack and kill bonus (survivor kill bonus = human kill bonus * survivor income cash rate)
    • zp_cs_moneymax 150000 - self explanatory.
    • zp_cs_money_killbonus 500 - kill bonus for humans/survivor.
    • zp_cs_infectmoneybonus 1500 - infect and kill bonus for zombies/nemesis.
    • zp_cs_deathmoneybonus - money bonus for zombies for diyng. You can set it to 0, but it's strongly recommend to leave about 50% more then humans kill bonus.
    • zp_cs_zombie_nodeathscore 1 - if 1 then when zombies dies, it doesn't receieve death score. So zombie can die without any worries about their stats. If 0 then everything like usual.
    • zp_cs_survivor_canbuy 0 - enables/disables buymenu for survivor.
    • zp_cs_nemesis_canbuy 0 - enables/disables buymenu for nemesis.
    • zp_cs_killassist_enabled - enables kill assist and infection assist.
    • zp_cs_killassist_mindamage_h - minimal damage human has to deal to the zombie to be a killer assistant.
    • zp_cs_killassist_mindamage_z - minamal damage zombie has to deal to the human to be an infection/killer assistant.
  • End round bonuses/penalties
    • zp_cs_money_human_win 3500 - money bonus for humans, if round ended with all zombies being killed.
    • zp_cs_money_human_lose 1000 - money bonus for humans, if round ended with all humans being killed/infected by zombies.
    • zp_cs_money_human_draw 7000 - money bonus for humans, if round ended due round mp_roundtime timeout. So-called "Surviving" or "Draw" round end.
    • zp_cs_money_zombie_win 2500 - money bonus for zombies, if round ended with all humans being killed/infected by zombies.
    • zp_cs_money_zombie_lose 1500 - money bonus for zombies, if round ended with all zombies being killed.
    • zp_cs_money_zombie_draw -1500 - money bonus for zombies, if round ended due round mp_roundtime timeout. So-called "Surviving" or "Draw" round end.
    • zp_cs_drawround_frag_h 5 - bonus frags for humans on "Draw" round end.
    • zp_cs_drawround_frag_z -3 - bonus frags for zombies on "Draw" round end.
    • zp_cs_drawround_death_h 0 - death score penalty for humans on "Draw" round end.
    • zp_cs_drawround_death_z 5 - death score penalty for zombies on "Draw" round end.
  • Mutliples for item prices afrer buytime is over
    • zp_cs_buytime_pistol_mult 3 - do you really need any comments here?
    • zp_cs_buytime_shotgun_mult 3
    • zp_cs_buytime_smgun_mult 3
    • zp_cs_buytime_rifle_mult 3
    • zp_cs_buytime_biggun_mult 1
    • zp_cs_buytime_gren_mult 10
    • zp_cs_buytime_ammo_mult 10

Howto

Main buymenu has 7 submenus:
  • Pistols
  • Shotguns
  • Sub-Machine guns
  • Rifles
  • Heavy Weapons
  • Human Equipment
  • Zombie Equipment

Each of this Submenus generated with zp_cs_buymenu.cfg:

zp_cs_buymenu_<submenu><number>_<param>

Example:
Quote:
zp_cs_buymenu_pistol01_name "9X19mm Sidearm"
zp_cs_buymenu_pistol01_cost 400
zp_cs_buymenu_pistol01_todo zp_cs_buy_glock18
zp_cs_buymenu_pistol02_name "K&M .45 Tactical"
zp_cs_buymenu_pistol02_cost 500
zp_cs_buymenu_pistol02_todo zp_cs_buy_usp
zp_cs_buymenu_pistol03_name "228 Compact"
zp_cs_buymenu_pistol03_cost 600
zp_cs_buymenu_pistol03_todo zp_cs_buy_p228
zp_cs_buymenu_pistol04_name "Night Hawk .50C"
zp_cs_buymenu_pistol04_cost 650
zp_cs_buymenu_pistol04_todo zp_cs_buy_deagle
zp_cs_buymenu_pistol05_name ".40 Dual Elites"
zp_cs_buymenu_pistol05_cost 800
zp_cs_buymenu_pistol05_todo zp_cs_buy_elite
zp_cs_buymenu_pistol06_name "ES Five-Seven"
zp_cs_buymenu_pistol06_cost 750
zp_cs_buymenu_pistol06_todo zp_cs_buy_fiveseven

zp_cs_buymenu_shotgun01_name "Leone 12 Gauge Super"
zp_cs_buymenu_shotgun01_cost 1700
zp_cs_buymenu_shotgun01_todo zp_cs_buy_m3
zp_cs_buymenu_shotgun02_name "Leone YG1265 Auto Shotgun"
zp_cs_buymenu_shotgun02_cost 3000
zp_cs_buymenu_shotgun02_todo zp_cs_buy_xm1014
So, <submenu> strings are:
  • pistol
  • shotgun
  • smgun
  • rifle
  • biggun
  • equiph
  • equipz
<number> is a # of item. Can be set to 01-99.
<param> strings are:
  • name
  • cost
  • todo
Name is item name that will appear in buy menu.
Cost is item price in $$$
todo is a function name to execute, if item was successfully bought.

If you want to add an extra-item to buymenu, open your zp_extraitems.ini and copy extra-item name that in square breaks [ ] and then paste it in todo in zp_cs_buymenu.cfg!
Example:
Code:
zp_cs_buymenu_equiph07_name "/yThe Radar Scanner" //name that will appear in the zp-cs-buymenu
zp_cs_buymenu_equiph07_cost 10000 //$$$, you know what to do.
zp_cs_buymenu_equiph07_todo "Radar Scanner" //Extra item "system name",  check it up in your zp_extraitems.ini, the "todo" must be the same as extra-item's name in  zp_extraitems.ini.
There is a build-in function for standart CS Primary weapon, Secondary weapon and gren buying - it start with "zp_cs_buy" and then a name of a weapon follows. Weapon names can be found here: http://wiki.amxmodx.org/CS_Weapons_Information
Simply replace weapon_ with zp_cs_buy_
example: weapon_g3sg1 -> zp_cs_buy_g3sg1, so, to buy g3sg1 you must add
Quote:
zp_cs_buymenu_biggun03_name "g3sg1 autosniper"
zp_cs_buymenu_biggun03_cost 12000
zp_cs_buymenu_biggun03_todo zp_cs_buy_g3sg1
Items added in order.
for example, you add:
Quote:
zp_cs_buymenu_pistol07_name "Solar Scorcher"
zp_cs_buymenu_pistol48_name "Revolver"
zp_cs_buymenu_pistol31_name "Antidote gun"
Y'll see:
Code:
1. Glock                                       
2. USP                                         
 <...>                                          
6. Dual Elites                                 
7. Solar Scorcher  (because it's order number is 07)                            
8. Antidote gun    (number is 31)                           
9. Revolver        (number 48)
Hardcoded functions:
  • zp_cs_buy_<weapon name> - where <weapon_name> is one of following: http://wiki.amxmodx.org/CS_Weapons_Information - actually buys an item from the link above. Can work with undocumented items, but not recommended.
  • zp_cs_HEVsuit - sets player's armor to 100, if its below 90.
  • zp_cs_moarHEVsuit - gives player 100 additional armor, no restrictions.
  • zp_cs_nightvision - buys a nightvision via main ZP plugin, ammo packs ignored.
  • zp_cs_antidote - buys a t-virus antidote via main ZP plugin, ammo packs ignored.
  • zp_cs_zombie_madness - buys a zombie madness via main ZP plugin, ammo packs ignored.
  • If command is nothing of above, it considered as an extra item name and ZP_CS_Buymenu plugin will attemp to purchase this extra-item via main ZP plugin, using it's name to find it's ID - so be carefull, item name must be exactly same as in ZP main plugin extra items list - type exactly "Radar Scanner", neither "radar scanner" nor "RaradScanner" will work.
An external tool (.exe file) for easy editing zp_cs_buymenu.cfg will be uploaded soon!

Don't forget to put zp_cs_buymenu.cfg in cstrike\addons\amxmodx\configs\ folder
and
zp_cs_buymenu.txt in your cstrike\addons\amxmodx\data\lang\ folder !
Attached Files
File Type: sma Get Plugin or Get Source (zp_cs_buymenu.sma - 11051 views - 58.7 KB)
File Type: txt zp_cs_buymenu.txt (4.8 KB, 5977 views)
File Type: cfg zp_cs_buymenu.cfg (7.2 KB, 5630 views)
__________________


Last edited by SonicSonedit; 12-21-2010 at 18:03. Reason: Update
SonicSonedit is offline
Old 03-16-2009, 08:03
mando127
This message has been deleted by mando127. Reason: hes a - karma nub that leaves no names
KadiR
Unnecessary Member
Join Date: Aug 2008
Location: Zürich / Switzerland
Old 03-16-2009 , 08:56   Re: [ZP] ZP_CS_Buymenu
Reply With Quote #2

omg, post it under the zombie subforum :S
KadiR is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 03-16-2009 , 10:22   Re: [ZP] ZP_CS_Buymenu
Reply With Quote #3

Quote:
Originally Posted by SonicSonedit View Post
Plugin will be uploaded tomorrow.
You have 24 hours to upload the plugin or this thread will be trashed.


Quote:
omg, post it under the zombie subforum :S
Why? This is a new plugin and must be submitted through the approval process like every other plugin out there that wishes to be released.
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
SonicSonedit
Veteran Member
Join Date: Nov 2008
Location: Silent Hill
Old 03-17-2009 , 06:09   Re: [ZP] ZP_CS_Buymenu
Reply With Quote #4

Yes, code needs a LOT of optimization, but it's only 1.0

Ammo changes:
Amount is amount of ammo being bought at once, not weapon clip amount or max weapon ammo. 228compact cost 50 -> 30
elites cost 20 -> 50
fiveseven amount 50 -> 20, cost 50 -> 20
scount amount 30 -> 10, cost 80 -> 25
m249 para amount 30 -> 50, cost 60 > 95
krieg 550 autosniper cost 60 -> 85
g3sg1 autosniper amount 30 -> 20


In 1.1 the following cvars will be present:
zp_cs_buytime_<submenu>_multiper - after buytime had passed all item's price in submenu will be multipled by a cvar value.
submenus are:
  • pistol
  • shotgun
  • smgun
  • rifle
  • biggun
  • grenades
  • ammo
If buytime submenu multipler is 0 then, after buytime passed, players can't by anything from that submenu

Grenades will affect nades and flare price in any submenu, not affecting anything other.
Same about ammo.
I don't think human and zombie equipment (antibomb, antidote, zombie madness, infect gren) need afterbuytime multiplers...if you think they need, let me know.

zp_cs_income_cash_rate - for now it's a float constant set to 1.0, but in next version it will be a cvar.
When you deal damage to zombie you automatically earn damage*zp_cs_income_cash_rate money. If 0 - it's disabled.
Also it will be affected by zp_zombie_armor.


Known bug:
sometimes, when you kill zombie you get -300$ instead of +300$ - as the result, if you had more than 16000$ it resets to 16000.
When you buy anything same thing happends.
Will be fixed in 1.2
__________________


Last edited by SonicSonedit; 03-17-2009 at 06:52.
SonicSonedit is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 03-17-2009 , 06:48   Re: [ZP] ZP_CS_Buymenu
Reply With Quote #5

Why all the tabs on lines 44 through 59? Looks like chaos .
__________________
fysiks is offline
SonicSonedit
Veteran Member
Join Date: Nov 2008
Location: Silent Hill
Old 03-17-2009 , 06:59   Re: [ZP] ZP_CS_Buymenu
Reply With Quote #6

There is a certain order in this chaos)
__________________

SonicSonedit is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 03-17-2009 , 07:07   Re: [ZP] ZP_CS_Buymenu
Reply With Quote #7

This is what I see (no line wrapping either )

__________________
fysiks is offline
beckham9224
Senior Member
Join Date: Feb 2009
Location: Asia, Mongolia
Old 03-17-2009 , 07:40   Re: [ZP] ZP_CS_Buymenu
Reply With Quote #8

nice idea mate
beckham9224 is offline
SonicSonedit
Veteran Member
Join Date: Nov 2008
Location: Silent Hill
Old 03-17-2009 , 07:45   Re: [ZP] ZP_CS_Buymenu
Reply With Quote #9

Armor, nightvision and cvar to change income cash rate will be ready by tomorrow.
__________________

SonicSonedit is offline
SonicSonedit
Veteran Member
Join Date: Nov 2008
Location: Silent Hill
Old 03-19-2009 , 08:22   Re: [ZP] ZP_CS_Buymenu
Reply With Quote #10

Plugin Status: Release!

And so and so, it's ready!
So, what you will get by installing this plugin?
1) Completely customizable buymenu!
2) You'll earn cash by shooting zombie, and cash rate is either customizable!
3) Adding new extra item never was so easy! Simply add plugin name in "todo" param!
Example:
Quote:
zp_cs_buymenu_equiph07_name "Trip Mine"
zp_cs_buymenu_equiph07_cost 6000
zp_cs_buymenu_equiph07_todo zp_extra_lasermine.amxx
By doing so you'll add item names "Trip mine" into equipment menu, when you buy it, you'll get extra item stored in zp_extra_lasermine.amxx!
don't forget to add zp_extra_lasermine.amxx in your plugins-zplague.ini!
4) mp_buytime affects weapon price! You can set multipers for any weapons!



Please, give me your feedback!
__________________

SonicSonedit is offline
Reply


Thread Tools
Display Modes

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 08:07.


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