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

AIO: Winter Plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Fun Stuff        Approver:   HamletEagle (36)
tuty
Veteran Member
Join Date: Jul 2008
Location: UK
Old 12-22-2015 , 12:12   AIO: Winter Plugin
Reply With Quote #1


AIO (All-In-One) Winter Plugin


Description

After researching a lot on a variety of forums, I could not find what i needed to customize my server for Winter. Instead of installing 100 plugins, I created an AIO one!
With this plugin you can bring the Christmas Environment to your Counter Strike server! Very customizable, this plugin unique style is beyond all the existing Christmas plugins here.
I know there are a LOT of plugins for winter here, but most of them aren't complete, or they contain bugs. Well in this plugin I tried to create an All-In-One Winter plugin that includes almost all the functionalities for a Christmas Server! Merry Christmas everyone!

What does this plugin contains?
  • Gun Snowball Bullets
  • Custom Sky name for the Christmas Environment
  • Custom Darkness on the map, to make it more Environmental (enables mp_flashlight server cvar)
  • Custom Christmas Bomb Sounds (Planted, Exploded, Defused)
  • Custom BOMB replacement
  • Weather Menu (For those who do not have cl_weather cvar enabled. Plugin offers to set it up for the user, asking USER PERMISSION. No slow-hacking)

  • An AWESOME coloured musical tree on each team spawn that plays music and have lightning styles (YEAH!)
  • Santa Hat for each player, or Admin only.
  • Picking up presents, somethimes you get GLOW on your SANTA HAT (HECK YEAH!)
  • Better models, a variety of customizations and model replacements (Christmas Themed, Grenades, Knife, Bomb)
  • Candy Cane knife replacement with player model ! WOAH.
  • Players will drop Presents when they die!
  • Support for maps that has rain built in! (adding snow environment instead of rain)
  • FUN! FUN! FUN!
  • A variety of configurations, including it's own config file!
  • To see what kind of presents you can pick up, read the configuration file!
  • Grenade glow and trails, customizable by 3 different types: 1. All grenades trail/glow is white, 2. HE has red glow/trail, FB has blue glow/trail and SG has green trail/glow. 3. All grenades have random glow/trail colours


Why is it so unique?
  • Has a lot of Half-Life resources
  • Up to date
  • Own configuration file, with a variety of customizable cvars
  • Different Christmas models, new and unique
  • Musical Christmas Trees, on every map, located to each team spawns!
  • 2 different models for Christmas Trees, Santa Hats!
  • Unseen new snowball models for grenades, with trail and glow effects!
  • 3 different models for presents
  • 2 different unique models for the BOMB replacement




Cvars:

PHP Code:
// --| -------------------------------------------------------------
// --| AIO (All-In-One) Winter plugin by: tuty
// --| Feel free to modify the configuration file as you please
// --| Special thanks to: xPaw, Alka, ConnorMcLeod, VEN, v3x and others
// --| -------------------------------------------------------------

// --| When player shoots with his weapon on the wall, it will leave white snowflakes 
// --| Value: 1 / 0
// --| Explanation: Enabled / Disabled
aio_winter_gun_snowball "1"

// --| If Snowballs are enabled, for how long will snowflakes stay alive?
// --| Value: < your amount > in seconds. Must be a floating point number
// --| Explanation: aio_winter_gun_snowball_duration "10.0" - snowflakes will stay alive for 10 seconds
aio_winter_gun_snowball_duration "5.0"

// --| Change the server sky texture to "space" ( Nice themed christmas sky )
// --| Value: 1 / 0
// --| Explanation: Enabled / Disabled
aio_winter_changesky "1"

// --| Set a nice darkness effect on the map, also enabling player flashlights (Christmas night theme)
// --| Value: 1 / 0
// --| Explanation: Enabled / Disabled
aio_winter_darkness "1"

// --| Enabled custom themed bomb event sounds ( Planted, Exploded, Defused )
// --| Value: 1 / 0
// --| Explanation: Enabled / Disabled
aio_winter_bombsounds "1"

// --| Some clients does not have "cl_weather" variable set to 1, 2 or 3 in their main game client
// --| After they entered the server, yhis will enable a menu, reminding/teaching them how to enable snow effects on their client
// --| Has an option to auto set-up for them, WITH THEIR PERMISSION !
// --| Value: 1 / 0
// --| Explanation: Enabled / Disabled
aio_winter_weathermenu "1"

// --| If the previous cvar is set as Enabled, after how long will display the menu to the player?
// --| Value: < x seconds > in seconds. Must be a floating point number
// --| Explanation: aio_winter_weathermenu "10.0" - Will display the menu after 10 seconds
aio_winter_weathermenu "8.0"

// --| Bomb model replacement with a shiny Snow-Man
// --| Value: 1 / 0
// --| Explanation: Enabled / Disabled
aio_winter_custombomb "1"

// --| A shiny, AWESOME musical tree with custom lights, effects and christmas themed song!
// --| Spawned on each side of CT/T spawns.
// --| Value: 1 / 0 - NOTE: Cvars are affected after map change!
// --| Explanation: Enabled / Disabled
aio_winter_tree "1"

// --| Enable santa hats for each players! Yoinnkss!
// --| Value: 1 / 0
// --| Explanation: Enabled / Disabled
aio_winter_hat "1"

// --| If Santa Hats are enabled, are them only for ADMINS ?
// --| Value: 1 / 0
// --| Explanation: Admin Only / Everyone
aio_winter_hat_adminonly "0"

// --| Spawn Christmas presents on dead enemies. Can be picked up by anyone!
// --| When picked up, you will be granted with a random gift.
// --| Gifts:
// --| * Armor
// --| * Armor + Helmet
// --| * Some Ammunition
// --| * Bonus Health
// --| * Random Grenade (HE, FB, SG)
// --| * Bonus Frag/s
// --| * Invisibility (for a certain amount of time)
// --| * Random Glow
// --| * Random Glow on your Santa Hat (lasts one round, only if hats are enabled)
// --| * Defuser Kit (for CT only)
// --| * Camouflage: [You look like enemy until you die]
// --| * Money ( a certain amount )
// --| Value: 1 / 0
// --| Explanation: Enabled / Disabled
aio_winter_presents "1"

// --| If the gifts are enabled, when you pick up the "Bonus Health", how much HP should be added to player?
// --| Value: < x amount > - from 0 to 99999?
// --| Explanation aio_winter_bonus_health_amount "250" - Adds additional 250 HP to the player
aio_winter_bonus_health_amount "50"

// --| If the gifts are enabled, when you pick up the "Armor" or "Armor + Helmet" how much AP should be added to player?
// --| Value: < x amount > - from 0 to 99999?
// --| Explanation: aio_winter_gift_armor "250" - Adds additional 250 AP to the player
aio_winter_gift_armor "100"

// --| If the gifts are enabled, when you pick up the "Bonus Frag/s" how many frags should be added to player?
// --| Value: < x amount > - from 0 to 99999?
// --| Explanation: aio_winter_bonus_frag "5" - 5 Frags will be added to the player
aio_winter_bonus_frag "2"

// --| If the gifts are enabled, when you pick up the "Invisibility" for how long shall be enabled?
// --| Value: < x amount > - from 0 to 99999?
// --| Explanation: aio_winter_invis_duration "5" - Invisiblity lasts 5 seconds
aio_winter_invis_duration "15"

// --| If the gifts are enabled, when you pick up the "Money" how much cash shall be added to player?
// --| Value: < x amount > - from 0 to 99999?
// --| Explanation: aio_winter_gift_money "1500" - $1500 will be added to the player
aio_winter_gift_money "1500"

// --| Enable support for rainy maps. Removing rain from it and replacing it with snow
// --| Value: 1 / 0
// --| Explanation: Enabled / Disabled
aio_winter_rainymap_support "1"

// --| Replace the default knife model with a candy cane!
// --| Value: 1 / 0
// --| Explanation: Candy Cane / Default Knife
aio_winter_candyknife "1"

// --| Replace all grenades ( Flashbang, He, Smoke ) with a custom Christmas themed model
// --| Also adds render and trail for each of them
// --| Value: 1 / 0
// --| Explanation: Custom Grenades / Default Grenades
aio_winter_grenade "1"

// --| If the previous cvar is enabled, we have three options to set up this one, to differentiate the grenades between them.
// --| Value: 0 / 1 / 2
// --| Explanation: 0 - All grenades has a white glow/trail
// --|             1 - HE Grenade has a red glow/trail, FB Grenade has a blue glow/trail and SG Grenade has a green glow/trail
// --|             2 - All grenades has random glow/trail        
// --| -------------------------------------------------------------------------
aio_winter_grenade_type "0" 




Requirements:
  • I would recomment a sv_downloadurl for fast downloading, since this plugin contains a "few" resources
  • Client side cvar enabled: cl_weather 1/2/3
  • Latest AMX Mod X Version



Installation Guide:
  • Place the AIO_Winter.cfg file into addons/amxmodx/configs folder
  • Place the aio_winter sounds folder into cstrike/sounds/ server directory
  • Place the aio_winter models folder into cstrike/models/ server directory
  • Place the AIO_Winter.amxx file into cstrike/addons/amxmodx/plugins/ server directory
  • Open plugins.ini file located into addons/amxmodx/configs/plugins.ini and add AIO_Winter.amxx then save it.
  • Done.




Credits:
  • xPaw
  • Alka
  • ConnorMcLeod
  • VEN
  • v3x
  • HamletEagle
  • Others





Modules:
  • cstrike
  • engine
  • fakemeta
  • fun
  • hamsandwich





Video Demonstration:

It is a 10 minutes gameplay with bots, you can skip thorough it and see new additions along with the demonstration of this plugin
Video has been uploaded now, so until youtube renders to high quality, expect 360p


https://youtu.be/0HKGO07QhwA

.
Attached Files
File Type: zip resources.zip (2.24 MB, 3096 views)
File Type: cfg AIO_Winter.cfg (5.8 KB, 2407 views)
File Type: sma Get Plugin or Get Source (AIO_Winter.sma - 4486 views - 34.8 KB)
__________________

Last edited by tuty; 12-26-2015 at 13:12.
tuty is offline
Send a message via ICQ to tuty Send a message via AIM to tuty
georgik57
Veteran Member
Join Date: Oct 2008
Location: 🎧Music World
Old 12-22-2015 , 14:20   Re: AIO: Winter Plugin
Reply With Quote #2

Nice job.

My only objection is that all the grenades have the same model and that, for most of the models, you could of made a single model with sub-models in order to have less resources precached so we don't get closer to the almighty 512 limit(which I can help you with if you want).

I also was too lazy to read all the cvars. Are the gameplay-modifying features optional?
__________________
georgik57 is offline
Send a message via MSN to georgik57 Send a message via Yahoo to georgik57 Send a message via Skype™ to georgik57
tuty
Veteran Member
Join Date: Jul 2008
Location: UK
Old 12-22-2015 , 14:40   Re: AIO: Winter Plugin
Reply With Quote #3

I have no clue in 3d modelling so, if you could help me would be great.
Yes, grenades are replaced with same model since all of them act like a snowball.
Check the video. I recorded every aspect during my shitty gameplay where I can't even kill bots lol. And yes, everything listed in there can be disabled.
__________________

Last edited by tuty; 12-22-2015 at 14:42.
tuty is offline
Send a message via ICQ to tuty Send a message via AIM to tuty
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 12-22-2015 , 15:00   Re: AIO: Winter Plugin
Reply With Quote #4

Yes, Christmas stuff

Well, I have some things to say, if you don't mind.

1.register_forward( FM_Touch, "forward_FM_Touch" ) I would like you to use engine here. FM_Touch catch all touch between all entities, and this is bad for server resources. While you filter them and execute your code only when needed the forward is still fired all the time. With engine you can filter by classnames(touched, toucher) so the forward will be called only when needed.
2.new szMapName[ 25 ]; should be 32, that is the max size used by engine.
3.In the menu you can not use the info param(3 rd one - because you don't need it) thus in menu handler you could use directly item in the switch(so no longer needing menu_item_getinfo).
4.In EVENT_RoundStart and LOGEvent_Round_Start you have the exact same code, you can create a function for this code and call it from the two events. Repeating code is ugly.
5.bacon_GrenadeDeploy make sure iWeaponEntity is valid before retrieving it's pdatas. Also make sure the owner is alive. Same for bacon_KnifeDeploy
6.In EVENT_DeathMsg:
  • You allocate the string each time, but this is an expensive operation. You can cache engfunc( EngFunc_AllocString, "info_target" ) in plugin _init.
  • Returning PLUGIN_HANDLED could make confusions, simply return would be more appropiate.
7.Finding bomb entity by model it's a poor way. You have multiple ways:
  • Hook BombDropevent with correct filters to be sure you get the moment when bomb is planted: register_event("BombDrop", "OnBombDrop", "a", "4=1"). Loop all grenade entities and check if m_bIsC4 offset is true. Then, you got your C4 entity index. I would do it like this.
  • Use orpheu(but I don't think you will, and it's not really needed here) you could hook CGrenade::ShootSatchelCharge. This function creates the bomb entity, so you will have the index.
There are more ways, bot not so reliable.
8.Remove the stock keyword from your functions. That is used for things that may not be needed(like in an include file where not all functions will be used at same time). IMO it's misused in a plugin.
9.UTIL_GiveWeaponAmmo: use cs_get_user_bpammo, and as weapon index to get_user_weapon(id). It should be a bit better.
__________________
HamletEagle is offline
georgik57
Veteran Member
Join Date: Oct 2008
Location: 🎧Music World
Old 12-22-2015 , 15:01   Re: AIO: Winter Plugin
Reply With Quote #5

Quote:
Originally Posted by tuty View Post
I have no clue in 3d modelling so, if you could help me would be great.
Sure. You know where to find me. I'll also tell you when I have free time.

Quote:
Originally Posted by tuty View Post
Yes, grenades are replaced with same model since all of them act like a snowball.
The point was that you can't recognize them. So they either need different models, trails and/or HUD icons.

Quote:
Originally Posted by tuty View Post
Check the video. I recorded every aspect during my shitty gameplay where I can't even kill bots lol. And yes, everything listed in there can be disabled.
xD
Nice ^_^

I also have a few suggestions:
Don't spawn the "snowflake" hit sprite when hitting a player or remove it fast because it looks weird hanging in the air.
Be careful with the light messages because they often lower the client FPS(DLIGHT for example).
__________________
georgik57 is offline
Send a message via MSN to georgik57 Send a message via Yahoo to georgik57 Send a message via Skype™ to georgik57
tuty
Veteran Member
Join Date: Jul 2008
Location: UK
Old 12-22-2015 , 15:03   Re: AIO: Winter Plugin
Reply With Quote #6

Hamlet - was expecting you here
Georgik - thanks for the info, i will add your suggestions

PLUGIN UPDATED.
__________________

Last edited by tuty; 12-23-2015 at 12:08.
tuty is offline
Send a message via ICQ to tuty Send a message via AIM to tuty
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 12-23-2015 , 13:26   Re: AIO: Winter Plugin
Reply With Quote #7

1.You have some indentation problems, please fix them.
2.Recheck point 1 from previous list, please use register_touch.
3.I think you should not limit rain removal only to de_aztec. Maybe there are more maps that use env_rain, so you should remove map check and search for env_rain(find_ent_by_class), if you find one remove it and print the message.
4.szFile[80] I am not sure if 80 is enough, configs dir path can be easely changed from core.ini, you could put more(something like 256, IIRC this is the max dimension of a path).
5.In forward_TouchGift checking both IS_PLAYER and is_user_alive is not needed. Keep only is_user_alive, because the native already check what you were doing with IS_PLAYER.
6.In forward_FM_PlaybackEvent do not make vars in a loop, declare them before.

Well, only this.
__________________

Last edited by HamletEagle; 12-23-2015 at 13:26.
HamletEagle is offline
tuty
Veteran Member
Join Date: Jul 2008
Location: UK
Old 12-23-2015 , 13:28   Re: AIO: Winter Plugin
Reply With Quote #8

okay sharp eye. i used register touch. kappa

indentation problems? what editor you're using? cuz i use notepad and it's all good
__________________

Last edited by tuty; 12-23-2015 at 13:29.
tuty is offline
Send a message via ICQ to tuty Send a message via AIM to tuty
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 12-23-2015 , 13:49   Re: AIO: Winter Plugin
Reply With Quote #9

I still see register_forward( FM_Touch, "forward_FM_Touch" );.
__________________
HamletEagle is offline
tuty
Veteran Member
Join Date: Jul 2008
Location: UK
Old 12-23-2015 , 13:50   Re: AIO: Winter Plugin
Reply With Quote #10

Quote:
Originally Posted by HamletEagle View Post
I still see register_forward( FM_Touch, "forward_FM_Touch" );.
well because i use it to replace grenade w_ model and also to set trails?

updated with fixes.
__________________

Last edited by tuty; 12-23-2015 at 13:52.
tuty is offline
Send a message via ICQ to tuty Send a message via AIM to tuty
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 13:25.


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