diff --git a/xmas/content/materials/models/johny-srka/black_felt.vmt b/xmas/content/materials/models/johny-srka/black_felt.vmt new file mode 100644 index 00000000..9c9da282 --- /dev/null +++ b/xmas/content/materials/models/johny-srka/black_felt.vmt @@ -0,0 +1,6 @@ +"VertexLitGeneric" +{ + "$basetexture" "models\johny-srka\black_felt" + "model" 1 + "$envmapmode" 1 +} diff --git a/xmas/content/materials/models/johny-srka/black_felt.vtf b/xmas/content/materials/models/johny-srka/black_felt.vtf new file mode 100644 index 00000000..28fe5b4b Binary files /dev/null and b/xmas/content/materials/models/johny-srka/black_felt.vtf differ diff --git a/xmas/content/materials/models/johny-srka/fabricpatterns0017_m.vmt b/xmas/content/materials/models/johny-srka/fabricpatterns0017_m.vmt new file mode 100644 index 00000000..7ec400c6 --- /dev/null +++ b/xmas/content/materials/models/johny-srka/fabricpatterns0017_m.vmt @@ -0,0 +1,6 @@ +"VertexLitGeneric" +{ + "$basetexture" "models\johny-srka\fabricpatterns0017_m" + "model" 1 + "$envmapmode" 1 +} diff --git a/xmas/content/materials/models/johny-srka/fabricpatterns0017_m.vtf b/xmas/content/materials/models/johny-srka/fabricpatterns0017_m.vtf new file mode 100644 index 00000000..df7d7a55 Binary files /dev/null and b/xmas/content/materials/models/johny-srka/fabricpatterns0017_m.vtf differ diff --git a/xmas/content/materials/models/johny-srka/snowfloor002a.vmt b/xmas/content/materials/models/johny-srka/snowfloor002a.vmt new file mode 100644 index 00000000..1ca7792c --- /dev/null +++ b/xmas/content/materials/models/johny-srka/snowfloor002a.vmt @@ -0,0 +1,6 @@ +"VertexLitGeneric" +{ + "$basetexture" "models\johny-srka\snowfloor002a" + "model" 1 + "$envmapmode" 1 +} diff --git a/xmas/content/materials/models/johny-srka/snowfloor002a.vtf b/xmas/content/materials/models/johny-srka/snowfloor002a.vtf new file mode 100644 index 00000000..574f78e7 Binary files /dev/null and b/xmas/content/materials/models/johny-srka/snowfloor002a.vtf differ diff --git a/xmas/content/materials/models/johny-srka/wood_old.vmt b/xmas/content/materials/models/johny-srka/wood_old.vmt new file mode 100644 index 00000000..d353f0eb --- /dev/null +++ b/xmas/content/materials/models/johny-srka/wood_old.vmt @@ -0,0 +1,6 @@ +"VertexLitGeneric" +{ + "$basetexture" "models\johny-srka\wood_old" + "$envmapmode" 1 + "$model" 1 +} diff --git a/xmas/content/materials/models/johny-srka/wood_old.vtf b/xmas/content/materials/models/johny-srka/wood_old.vtf new file mode 100644 index 00000000..798b8864 Binary files /dev/null and b/xmas/content/materials/models/johny-srka/wood_old.vtf differ diff --git a/xmas/content/materials/models/models_kit/xmas/xmastree_misca.vmt b/xmas/content/materials/models/models_kit/xmas/xmastree_misca.vmt new file mode 100644 index 00000000..352473db --- /dev/null +++ b/xmas/content/materials/models/models_kit/xmas/xmastree_misca.vmt @@ -0,0 +1,6 @@ +"vertexlitGeneric" +{ + "$basetexture" "models/models_kit/xmas/xmastree_miscA" + "$alphatest" "1" + "$nocull" "1" +} diff --git a/xmas/content/materials/models/models_kit/xmas/xmastree_misca.vtf b/xmas/content/materials/models/models_kit/xmas/xmastree_misca.vtf new file mode 100644 index 00000000..ccd2b314 Binary files /dev/null and b/xmas/content/materials/models/models_kit/xmas/xmastree_misca.vtf differ diff --git a/xmas/content/materials/models/models_kit/xmas/xmastree_misca_skin2.vmt b/xmas/content/materials/models/models_kit/xmas/xmastree_misca_skin2.vmt new file mode 100644 index 00000000..e18f422d --- /dev/null +++ b/xmas/content/materials/models/models_kit/xmas/xmastree_misca_skin2.vmt @@ -0,0 +1,6 @@ +"vertexlitGeneric" +{ + "$basetexture" "models/models_kit/xmas/xmastree_miscA_skin2" + "$alphatest" "1" + "$nocull" "1" +} \ No newline at end of file diff --git a/xmas/content/materials/models/models_kit/xmas/xmastree_misca_skin2.vtf b/xmas/content/materials/models/models_kit/xmas/xmastree_misca_skin2.vtf new file mode 100644 index 00000000..ea30bb64 Binary files /dev/null and b/xmas/content/materials/models/models_kit/xmas/xmastree_misca_skin2.vtf differ diff --git a/xmas/content/materials/models/models_kit/xmas/xmastree_miscb.vmt b/xmas/content/materials/models/models_kit/xmas/xmastree_miscb.vmt new file mode 100644 index 00000000..f936d636 --- /dev/null +++ b/xmas/content/materials/models/models_kit/xmas/xmastree_miscb.vmt @@ -0,0 +1,6 @@ +"vertexlitGeneric" +{ + "$basetexture" "models/models_kit/xmas/xmastree_miscB" + "$envmap" "env_cubemap" + "$envmapmask" "models/models_kit/xmas/xmastree_miscB_spec" +} diff --git a/xmas/content/materials/models/models_kit/xmas/xmastree_miscb.vtf b/xmas/content/materials/models/models_kit/xmas/xmastree_miscb.vtf new file mode 100644 index 00000000..6c4c5c0b Binary files /dev/null and b/xmas/content/materials/models/models_kit/xmas/xmastree_miscb.vtf differ diff --git a/xmas/content/materials/models/models_kit/xmas/xmastree_miscb_skin2.vmt b/xmas/content/materials/models/models_kit/xmas/xmastree_miscb_skin2.vmt new file mode 100644 index 00000000..0669e050 --- /dev/null +++ b/xmas/content/materials/models/models_kit/xmas/xmastree_miscb_skin2.vmt @@ -0,0 +1,6 @@ +"vertexlitGeneric" +{ + "$basetexture" "models/models_kit/xmas/xmastree_miscB_skin2" + "$envmap" "env_cubemap" + "$envmapmask" "models/models_kit/xmas/xmastree_miscB_spec" +} diff --git a/xmas/content/materials/models/models_kit/xmas/xmastree_miscb_skin2.vtf b/xmas/content/materials/models/models_kit/xmas/xmastree_miscb_skin2.vtf new file mode 100644 index 00000000..e0f3345e Binary files /dev/null and b/xmas/content/materials/models/models_kit/xmas/xmastree_miscb_skin2.vtf differ diff --git a/xmas/content/materials/models/models_kit/xmas/xmastree_miscb_spec.vtf b/xmas/content/materials/models/models_kit/xmas/xmastree_miscb_spec.vtf new file mode 100644 index 00000000..9d36b082 Binary files /dev/null and b/xmas/content/materials/models/models_kit/xmas/xmastree_miscb_spec.vtf differ diff --git a/xmas/content/materials/models/player/stenli/smite/fenrir/body.vmt b/xmas/content/materials/models/player/stenli/smite/fenrir/body.vmt new file mode 100644 index 00000000..fe7b2a32 --- /dev/null +++ b/xmas/content/materials/models/player/stenli/smite/fenrir/body.vmt @@ -0,0 +1,31 @@ + +"VertexLitGeneric" +{ + "$basetexture" "models\player\stenli\smite\fenrir\body" + "$bumpmap" "models\player\stenli\smite\fenrir\body_n" + + + "$model" "1" + "$phong" "1" + "$phongexponent" "88" + "$phongboost" "0.08" + "$phongTint" "[5 3 3]" + "$phongfresnelranges" "[.05 .1 .2]" + "$nocull" 1 + + + "$detail" "models\player\stenli\smite\fenrir\body_s" + "$detailscale" "1" + "$detailblendfactor" "0.5" + "$detailblendmode" "3" + + + + "$rimlight" "1" + "$rimlightexponent" "88" + "$rimlightboost" "0.2" + "$rimmask" "1" + + +} + diff --git a/xmas/content/materials/models/player/stenli/smite/fenrir/body.vtf b/xmas/content/materials/models/player/stenli/smite/fenrir/body.vtf new file mode 100644 index 00000000..73614908 Binary files /dev/null and b/xmas/content/materials/models/player/stenli/smite/fenrir/body.vtf differ diff --git a/xmas/content/materials/models/player/stenli/smite/fenrir/body_n.vtf b/xmas/content/materials/models/player/stenli/smite/fenrir/body_n.vtf new file mode 100644 index 00000000..071a1b63 Binary files /dev/null and b/xmas/content/materials/models/player/stenli/smite/fenrir/body_n.vtf differ diff --git a/xmas/content/materials/models/player/stenli/smite/fenrir/body_s.vtf b/xmas/content/materials/models/player/stenli/smite/fenrir/body_s.vtf new file mode 100644 index 00000000..28d21599 Binary files /dev/null and b/xmas/content/materials/models/player/stenli/smite/fenrir/body_s.vtf differ diff --git a/xmas/content/materials/models/player/stenli/smite/fenrir/lights.vmt b/xmas/content/materials/models/player/stenli/smite/fenrir/lights.vmt new file mode 100644 index 00000000..a042b836 --- /dev/null +++ b/xmas/content/materials/models/player/stenli/smite/fenrir/lights.vmt @@ -0,0 +1,31 @@ +"VertexLitGeneric" + +{ + "$basetexture" "models\player\stenli\smite\fenrir\body" + "$bumpmap" "models\player\stenli\smite\fenrir\body_n" + + + + "$model" "1" + "$phong" "1" + "$phongexponent" "88" + "$phongboost" "5" + "$phongTint" "[3 3 3]" + "$phongfresnelranges" "[.05 .1 .2]" + "$nocull" 1 + + "$detail" "models\player\stenli\smite\fenrir\body_s" + "$detailscale" "1" + "$detailblendfactor" "0.3" + "$detailblendmode" "1" + + + + "$rimlight" "1" + "$rimlightexponent" "88" + "$rimlightboost" "0.2" + "$rimmask" "1" + + +} + diff --git a/xmas/content/materials/models/player/vad36lollipop/hat.vmt b/xmas/content/materials/models/player/vad36lollipop/hat.vmt new file mode 100644 index 00000000..fd13fe80 --- /dev/null +++ b/xmas/content/materials/models/player/vad36lollipop/hat.vmt @@ -0,0 +1,13 @@ +vertexlitgeneric +{ +$baseTexture "models\player\vad36lollipop\hat" +$bumpmap "models\player\vad36lollipop\hat_n" +//$phong 1 +//$phongboost "2.5" +//$phongexponent 5 +//$phongtint "[.85 .85 1]" +//$phongfresnelranges "[.3 .65 30]" +$ambientocclusion 1 +$nocull 1 +$diffuseexp "1.5" +} diff --git a/xmas/content/materials/models/player/vad36lollipop/hat.vtf b/xmas/content/materials/models/player/vad36lollipop/hat.vtf new file mode 100644 index 00000000..d7834a4e Binary files /dev/null and b/xmas/content/materials/models/player/vad36lollipop/hat.vtf differ diff --git a/xmas/content/materials/models/player/vad36lollipop/hat_n.vtf b/xmas/content/materials/models/player/vad36lollipop/hat_n.vtf new file mode 100644 index 00000000..cd129e43 Binary files /dev/null and b/xmas/content/materials/models/player/vad36lollipop/hat_n.vtf differ diff --git a/xmas/content/materials/models/player/vad36lollipop/tx_ch_main_juliet_cloth.vmt b/xmas/content/materials/models/player/vad36lollipop/tx_ch_main_juliet_cloth.vmt new file mode 100644 index 00000000..e95ab348 --- /dev/null +++ b/xmas/content/materials/models/player/vad36lollipop/tx_ch_main_juliet_cloth.vmt @@ -0,0 +1,13 @@ +vertexlitgeneric +{ +$baseTexture "models\player\vad36lollipop\tx_ch_main_juliet_cloth" +$bumpmap "models\player\vad36lollipop\tx_ch_main_juliet_cloth_n" +//$phong 1 +//$phongboost "2.5" +//$phongexponent 5 +//$phongtint "[.85 .85 1]" +//$phongfresnelranges "[.3 .65 30]" +$ambientocclusion 1 +$nocull 1 +$diffuseexp "1.5" +} diff --git a/xmas/content/materials/models/player/vad36lollipop/tx_ch_main_juliet_cloth.vtf b/xmas/content/materials/models/player/vad36lollipop/tx_ch_main_juliet_cloth.vtf new file mode 100644 index 00000000..3d1c1cc8 Binary files /dev/null and b/xmas/content/materials/models/player/vad36lollipop/tx_ch_main_juliet_cloth.vtf differ diff --git a/xmas/content/materials/models/player/vad36lollipop/tx_ch_main_juliet_cloth_n.vtf b/xmas/content/materials/models/player/vad36lollipop/tx_ch_main_juliet_cloth_n.vtf new file mode 100644 index 00000000..64165f3d Binary files /dev/null and b/xmas/content/materials/models/player/vad36lollipop/tx_ch_main_juliet_cloth_n.vtf differ diff --git a/xmas/content/materials/models/player/vad36lollipop/tx_ch_main_juliet_hair_d_cos11.vmt b/xmas/content/materials/models/player/vad36lollipop/tx_ch_main_juliet_hair_d_cos11.vmt new file mode 100644 index 00000000..e7905136 --- /dev/null +++ b/xmas/content/materials/models/player/vad36lollipop/tx_ch_main_juliet_hair_d_cos11.vmt @@ -0,0 +1,14 @@ +vertexlitgeneric +{ +$baseTexture "models\player\vad36lollipop\TX_CH_Main_Juliet_Hair_D_Cos11" +$bumpmap "models\player\vad36lollipop\TX_CH_Main_Juliet_Hair_N_Cos11" +$alphatest 1 +$phong 1 +$phongboost "2.5" +$phongexponent 5 +$phongtint "[.85 .85 1]" +$phongfresnelranges "[.3 .65 30]" +$ambientocclusion 1 +$nocull 1 +$diffuseexp "1.5" +} diff --git a/xmas/content/materials/models/player/vad36lollipop/tx_ch_main_juliet_hair_d_cos11.vtf b/xmas/content/materials/models/player/vad36lollipop/tx_ch_main_juliet_hair_d_cos11.vtf new file mode 100644 index 00000000..9b6e9f8b Binary files /dev/null and b/xmas/content/materials/models/player/vad36lollipop/tx_ch_main_juliet_hair_d_cos11.vtf differ diff --git a/xmas/content/materials/models/player/vad36lollipop/tx_ch_main_juliet_hair_n_cos11.vtf b/xmas/content/materials/models/player/vad36lollipop/tx_ch_main_juliet_hair_n_cos11.vtf new file mode 100644 index 00000000..35cb68b1 Binary files /dev/null and b/xmas/content/materials/models/player/vad36lollipop/tx_ch_main_juliet_hair_n_cos11.vtf differ diff --git a/xmas/content/materials/models/player/vad36lollipop/tx_ch_main_juliet_skin_d_cos11.vmt b/xmas/content/materials/models/player/vad36lollipop/tx_ch_main_juliet_skin_d_cos11.vmt new file mode 100644 index 00000000..18931b59 --- /dev/null +++ b/xmas/content/materials/models/player/vad36lollipop/tx_ch_main_juliet_skin_d_cos11.vmt @@ -0,0 +1,14 @@ +vertexlitgeneric +{ +$baseTexture "models\player\vad36lollipop\TX_CH_Main_Juliet_Skin_D_Cos11" +$bumpmap "models\player\vad36lollipop\TX_CH_Main_Juliet_Skin_N_Cos11" +$alphatest 1 +//$phong 1 +//$phongboost "2.5" +//$phongexponent 5 +//$phongtint "[.85 .85 1]" +//$phongfresnelranges "[.3 .65 30]" +$ambientocclusion 1 +$nocull 1 +$diffuseexp "1.5" +} diff --git a/xmas/content/materials/models/player/vad36lollipop/tx_ch_main_juliet_skin_d_cos11.vtf b/xmas/content/materials/models/player/vad36lollipop/tx_ch_main_juliet_skin_d_cos11.vtf new file mode 100644 index 00000000..5862d62e Binary files /dev/null and b/xmas/content/materials/models/player/vad36lollipop/tx_ch_main_juliet_skin_d_cos11.vtf differ diff --git a/xmas/content/materials/models/player/vad36lollipop/tx_ch_main_juliet_skin_n_cos11.vtf b/xmas/content/materials/models/player/vad36lollipop/tx_ch_main_juliet_skin_n_cos11.vtf new file mode 100644 index 00000000..23909ddf Binary files /dev/null and b/xmas/content/materials/models/player/vad36lollipop/tx_ch_main_juliet_skin_n_cos11.vtf differ diff --git a/xmas/content/materials/models/player/vad36santa/Santa_D.vmt b/xmas/content/materials/models/player/vad36santa/Santa_D.vmt new file mode 100644 index 00000000..a8af8913 --- /dev/null +++ b/xmas/content/materials/models/player/vad36santa/Santa_D.vmt @@ -0,0 +1,11 @@ +"VertexLitGeneric" +{ + "$baseTexture" "models/player/vad36santa/Santa_D" + "$bumpmap" "models/player/vad36santa/Santa_N" + + "$phong" "1" + "$phongboost" ".05" + "$phongexponent" "50" + "$phongfresnelranges" "[.8 .8 .6]" + +} diff --git a/xmas/content/materials/models/player/vad36santa/Santa_D.vtf b/xmas/content/materials/models/player/vad36santa/Santa_D.vtf new file mode 100644 index 00000000..a127e3c7 Binary files /dev/null and b/xmas/content/materials/models/player/vad36santa/Santa_D.vtf differ diff --git a/xmas/content/materials/models/player/vad36santa/Santa_D_B.vmt b/xmas/content/materials/models/player/vad36santa/Santa_D_B.vmt new file mode 100644 index 00000000..b8bac673 --- /dev/null +++ b/xmas/content/materials/models/player/vad36santa/Santa_D_B.vmt @@ -0,0 +1,11 @@ +"VertexLitGeneric" +{ + "$baseTexture" "models/player/vad36santa/Santa_D_B" + "$bumpmap" "models/player/vad36santa/Santa_N" + + "$phong" "1" + "$phongboost" ".05" + "$phongexponent" "50" + "$phongfresnelranges" "[.8 .8 .6]" + +} diff --git a/xmas/content/materials/models/player/vad36santa/Santa_D_B.vtf b/xmas/content/materials/models/player/vad36santa/Santa_D_B.vtf new file mode 100644 index 00000000..ac33c617 Binary files /dev/null and b/xmas/content/materials/models/player/vad36santa/Santa_D_B.vtf differ diff --git a/xmas/content/materials/models/player/vad36santa/Santa_N.vtf b/xmas/content/materials/models/player/vad36santa/Santa_N.vtf new file mode 100644 index 00000000..1a516a3c Binary files /dev/null and b/xmas/content/materials/models/player/vad36santa/Santa_N.vtf differ diff --git a/xmas/content/materials/models/weapons/v_models/eq_fraggrenade/bonnet.vmt b/xmas/content/materials/models/weapons/v_models/eq_fraggrenade/bonnet.vmt new file mode 100644 index 00000000..7365fffd --- /dev/null +++ b/xmas/content/materials/models/weapons/v_models/eq_fraggrenade/bonnet.vmt @@ -0,0 +1,5 @@ +VertexLitGeneric +{ + "$basetexture" "models\weapons\v_models\eq_fraggrenade\bonnet" +} + diff --git a/xmas/content/materials/models/weapons/v_models/eq_fraggrenade/bonnet.vtf b/xmas/content/materials/models/weapons/v_models/eq_fraggrenade/bonnet.vtf new file mode 100644 index 00000000..f945023d Binary files /dev/null and b/xmas/content/materials/models/weapons/v_models/eq_fraggrenade/bonnet.vtf differ diff --git a/xmas/content/materials/models/weapons/v_models/ornament/ornament.vmt b/xmas/content/materials/models/weapons/v_models/ornament/ornament.vmt new file mode 100644 index 00000000..b5c36e92 --- /dev/null +++ b/xmas/content/materials/models/weapons/v_models/ornament/ornament.vmt @@ -0,0 +1,8 @@ +VertexLitGeneric +{ + "$basetexture" "models\weapons\v_models\ornament\ornament" + "$envmap" "env_cubemap" + "$envmapmask" "models\weapons\v_models\ornament\reflect" + + +} diff --git a/xmas/content/materials/models/weapons/v_models/ornament/ornament.vtf b/xmas/content/materials/models/weapons/v_models/ornament/ornament.vtf new file mode 100644 index 00000000..2aef9046 Binary files /dev/null and b/xmas/content/materials/models/weapons/v_models/ornament/ornament.vtf differ diff --git a/xmas/content/materials/models/weapons/v_models/ornament/reflect.vtf b/xmas/content/materials/models/weapons/v_models/ornament/reflect.vtf new file mode 100644 index 00000000..a5d8f263 Binary files /dev/null and b/xmas/content/materials/models/weapons/v_models/ornament/reflect.vtf differ diff --git a/xmas/content/materials/models/weapons/v_models/snooball/s.vmt b/xmas/content/materials/models/weapons/v_models/snooball/s.vmt new file mode 100644 index 00000000..74edf8f1 --- /dev/null +++ b/xmas/content/materials/models/weapons/v_models/snooball/s.vmt @@ -0,0 +1,7 @@ +VertexLitGeneric +{ + "$basetexture" "models\weapons\v_models\snooball\s" + "$bumpmap" "models\weapons\v_models\snooball\s_norm" + +} + diff --git a/xmas/content/materials/models/weapons/v_models/snooball/s.vtf b/xmas/content/materials/models/weapons/v_models/snooball/s.vtf new file mode 100644 index 00000000..40812c13 Binary files /dev/null and b/xmas/content/materials/models/weapons/v_models/snooball/s.vtf differ diff --git a/xmas/content/materials/models/weapons/v_models/snooball/s_norm.vtf b/xmas/content/materials/models/weapons/v_models/snooball/s_norm.vtf new file mode 100644 index 00000000..f7a7c4d8 Binary files /dev/null and b/xmas/content/materials/models/weapons/v_models/snooball/s_norm.vtf differ diff --git a/xmas/content/materials/models/weapons/v_models/xmas_candy/cane.vmt b/xmas/content/materials/models/weapons/v_models/xmas_candy/cane.vmt new file mode 100644 index 00000000..e8c868b7 --- /dev/null +++ b/xmas/content/materials/models/weapons/v_models/xmas_candy/cane.vmt @@ -0,0 +1,5 @@ +VertexLitGeneric +{ + "$basetexture" "models\weapons\v_models\xmas_candy\cane" + +} diff --git a/xmas/content/materials/models/weapons/v_models/xmas_candy/cane.vtf b/xmas/content/materials/models/weapons/v_models/xmas_candy/cane.vtf new file mode 100644 index 00000000..ca8d2900 Binary files /dev/null and b/xmas/content/materials/models/weapons/v_models/xmas_candy/cane.vtf differ diff --git a/xmas/content/materials/models/zombieden/xmas/gift.vmt b/xmas/content/materials/models/zombieden/xmas/gift.vmt new file mode 100644 index 00000000..17896e3a --- /dev/null +++ b/xmas/content/materials/models/zombieden/xmas/gift.vmt @@ -0,0 +1,21 @@ +"vertexlitGeneric" +{ + "$basetexture" "models/ZombiEden/xmas/gift" + + "$phong" "1" + "$phongexponent" "12" + "$phongboost" "1" + "$lightwarptexture" "models/ZombiEden/xmas/gift_lightwarp" + "$phongfresnelranges" "[.3 .5 .6]" + "$halflambert" "1" + + // Rim lighting parameters + "$rimlight" "1" // To enable rim lighting (requires phong) + "$rimlightexponent" "4" // Exponent for phong component of rim lighting + "$rimlightboost" "1" // Boost for ambient cube component of rim lighting + "$selfillumfresnel" "3" + + "$selfillumfresnelminmaxexp" "[0 2 3]" + "$selfillum" "1" + "$selfillumtint" "[1.3 1.3 1.3]" +} diff --git a/xmas/content/materials/models/zombieden/xmas/gift.vtf b/xmas/content/materials/models/zombieden/xmas/gift.vtf new file mode 100644 index 00000000..3bfd9102 Binary files /dev/null and b/xmas/content/materials/models/zombieden/xmas/gift.vtf differ diff --git a/xmas/content/materials/models/zombieden/xmas/gift_2.vmt b/xmas/content/materials/models/zombieden/xmas/gift_2.vmt new file mode 100644 index 00000000..b6272c10 --- /dev/null +++ b/xmas/content/materials/models/zombieden/xmas/gift_2.vmt @@ -0,0 +1,21 @@ +"vertexlitGeneric" +{ + "$basetexture" "models/ZombiEden/xmas/gift_2" + + "$phong" "1" + "$phongexponent" "12" + "$phongboost" "1" + "$lightwarptexture" "models/ZombiEden/xmas/gift_lightwarp" + "$phongfresnelranges" "[.3 .5 .6]" + "$halflambert" "1" + + // Rim lighting parameters + "$rimlight" "1" // To enable rim lighting (requires phong) + "$rimlightexponent" "4" // Exponent for phong component of rim lighting + "$rimlightboost" "1" // Boost for ambient cube component of rim lighting + "$selfillumfresnel" "3" + + "$selfillumfresnelminmaxexp" "[0 2 3]" + "$selfillum" "1" + "$selfillumtint" "[1.3 1.3 1.3]" +} diff --git a/xmas/content/materials/models/zombieden/xmas/gift_2.vtf b/xmas/content/materials/models/zombieden/xmas/gift_2.vtf new file mode 100644 index 00000000..6214141f Binary files /dev/null and b/xmas/content/materials/models/zombieden/xmas/gift_2.vtf differ diff --git a/xmas/content/materials/models/zombieden/xmas/gift_lightwarp.vtf b/xmas/content/materials/models/zombieden/xmas/gift_lightwarp.vtf new file mode 100644 index 00000000..412b4980 Binary files /dev/null and b/xmas/content/materials/models/zombieden/xmas/gift_lightwarp.vtf differ diff --git a/xmas/content/models/johny-srka/snowman.dx80.vtx b/xmas/content/models/johny-srka/snowman.dx80.vtx new file mode 100644 index 00000000..f18357bc Binary files /dev/null and b/xmas/content/models/johny-srka/snowman.dx80.vtx differ diff --git a/xmas/content/models/johny-srka/snowman.dx90.vtx b/xmas/content/models/johny-srka/snowman.dx90.vtx new file mode 100644 index 00000000..eaa0df1a Binary files /dev/null and b/xmas/content/models/johny-srka/snowman.dx90.vtx differ diff --git a/xmas/content/models/johny-srka/snowman.mdl b/xmas/content/models/johny-srka/snowman.mdl new file mode 100644 index 00000000..c35876fe Binary files /dev/null and b/xmas/content/models/johny-srka/snowman.mdl differ diff --git a/xmas/content/models/johny-srka/snowman.phy b/xmas/content/models/johny-srka/snowman.phy new file mode 100644 index 00000000..04675773 Binary files /dev/null and b/xmas/content/models/johny-srka/snowman.phy differ diff --git a/xmas/content/models/johny-srka/snowman.sw.vtx b/xmas/content/models/johny-srka/snowman.sw.vtx new file mode 100644 index 00000000..ee943265 Binary files /dev/null and b/xmas/content/models/johny-srka/snowman.sw.vtx differ diff --git a/xmas/content/models/johny-srka/snowman.vvd b/xmas/content/models/johny-srka/snowman.vvd new file mode 100644 index 00000000..e7bd7bd7 Binary files /dev/null and b/xmas/content/models/johny-srka/snowman.vvd differ diff --git a/xmas/content/models/models_kit/xmas/xmas_teddybear.dx80.vtx b/xmas/content/models/models_kit/xmas/xmas_teddybear.dx80.vtx new file mode 100644 index 00000000..97517833 Binary files /dev/null and b/xmas/content/models/models_kit/xmas/xmas_teddybear.dx80.vtx differ diff --git a/xmas/content/models/models_kit/xmas/xmas_teddybear.dx90.vtx b/xmas/content/models/models_kit/xmas/xmas_teddybear.dx90.vtx new file mode 100644 index 00000000..1559e66c Binary files /dev/null and b/xmas/content/models/models_kit/xmas/xmas_teddybear.dx90.vtx differ diff --git a/xmas/content/models/models_kit/xmas/xmas_teddybear.mdl b/xmas/content/models/models_kit/xmas/xmas_teddybear.mdl new file mode 100644 index 00000000..c8d36f65 Binary files /dev/null and b/xmas/content/models/models_kit/xmas/xmas_teddybear.mdl differ diff --git a/xmas/content/models/models_kit/xmas/xmas_teddybear.phy b/xmas/content/models/models_kit/xmas/xmas_teddybear.phy new file mode 100644 index 00000000..2b03e88b Binary files /dev/null and b/xmas/content/models/models_kit/xmas/xmas_teddybear.phy differ diff --git a/xmas/content/models/models_kit/xmas/xmas_teddybear.sw.vtx b/xmas/content/models/models_kit/xmas/xmas_teddybear.sw.vtx new file mode 100644 index 00000000..d89637da Binary files /dev/null and b/xmas/content/models/models_kit/xmas/xmas_teddybear.sw.vtx differ diff --git a/xmas/content/models/models_kit/xmas/xmas_teddybear.vvd b/xmas/content/models/models_kit/xmas/xmas_teddybear.vvd new file mode 100644 index 00000000..a75cba2c Binary files /dev/null and b/xmas/content/models/models_kit/xmas/xmas_teddybear.vvd differ diff --git a/xmas/content/models/models_kit/xmas/xmas_teddybear.xbox.vtx b/xmas/content/models/models_kit/xmas/xmas_teddybear.xbox.vtx new file mode 100644 index 00000000..0f2b59cb Binary files /dev/null and b/xmas/content/models/models_kit/xmas/xmas_teddybear.xbox.vtx differ diff --git a/xmas/content/models/models_kit/xmas/xmastree_mini.dx80.vtx b/xmas/content/models/models_kit/xmas/xmastree_mini.dx80.vtx new file mode 100644 index 00000000..c5d1a0f0 Binary files /dev/null and b/xmas/content/models/models_kit/xmas/xmastree_mini.dx80.vtx differ diff --git a/xmas/content/models/models_kit/xmas/xmastree_mini.dx90.vtx b/xmas/content/models/models_kit/xmas/xmastree_mini.dx90.vtx new file mode 100644 index 00000000..6b16d3a2 Binary files /dev/null and b/xmas/content/models/models_kit/xmas/xmastree_mini.dx90.vtx differ diff --git a/xmas/content/models/models_kit/xmas/xmastree_mini.mdl b/xmas/content/models/models_kit/xmas/xmastree_mini.mdl new file mode 100644 index 00000000..cd61d477 Binary files /dev/null and b/xmas/content/models/models_kit/xmas/xmastree_mini.mdl differ diff --git a/xmas/content/models/models_kit/xmas/xmastree_mini.phy b/xmas/content/models/models_kit/xmas/xmastree_mini.phy new file mode 100644 index 00000000..acd88cfe Binary files /dev/null and b/xmas/content/models/models_kit/xmas/xmastree_mini.phy differ diff --git a/xmas/content/models/models_kit/xmas/xmastree_mini.sw.vtx b/xmas/content/models/models_kit/xmas/xmastree_mini.sw.vtx new file mode 100644 index 00000000..bd1e339b Binary files /dev/null and b/xmas/content/models/models_kit/xmas/xmastree_mini.sw.vtx differ diff --git a/xmas/content/models/models_kit/xmas/xmastree_mini.vvd b/xmas/content/models/models_kit/xmas/xmastree_mini.vvd new file mode 100644 index 00000000..62323e23 Binary files /dev/null and b/xmas/content/models/models_kit/xmas/xmastree_mini.vvd differ diff --git a/xmas/content/models/player/stenli/smite/fenrir.dx80.vtx b/xmas/content/models/player/stenli/smite/fenrir.dx80.vtx new file mode 100644 index 00000000..83f6121d Binary files /dev/null and b/xmas/content/models/player/stenli/smite/fenrir.dx80.vtx differ diff --git a/xmas/content/models/player/stenli/smite/fenrir.dx90.vtx b/xmas/content/models/player/stenli/smite/fenrir.dx90.vtx new file mode 100644 index 00000000..5e91eeaf Binary files /dev/null and b/xmas/content/models/player/stenli/smite/fenrir.dx90.vtx differ diff --git a/xmas/content/models/player/stenli/smite/fenrir.mdl b/xmas/content/models/player/stenli/smite/fenrir.mdl new file mode 100644 index 00000000..e24eee87 Binary files /dev/null and b/xmas/content/models/player/stenli/smite/fenrir.mdl differ diff --git a/xmas/content/models/player/stenli/smite/fenrir.phy b/xmas/content/models/player/stenli/smite/fenrir.phy new file mode 100644 index 00000000..b89f7d91 Binary files /dev/null and b/xmas/content/models/player/stenli/smite/fenrir.phy differ diff --git a/xmas/content/models/player/stenli/smite/fenrir.sw.vtx b/xmas/content/models/player/stenli/smite/fenrir.sw.vtx new file mode 100644 index 00000000..4099c15a Binary files /dev/null and b/xmas/content/models/player/stenli/smite/fenrir.sw.vtx differ diff --git a/xmas/content/models/player/stenli/smite/fenrir.vvd b/xmas/content/models/player/stenli/smite/fenrir.vvd new file mode 100644 index 00000000..be31d350 Binary files /dev/null and b/xmas/content/models/player/stenli/smite/fenrir.vvd differ diff --git a/xmas/content/models/player/vad36lollipop/lolli_new.dx80.vtx b/xmas/content/models/player/vad36lollipop/lolli_new.dx80.vtx new file mode 100644 index 00000000..ccc8004d Binary files /dev/null and b/xmas/content/models/player/vad36lollipop/lolli_new.dx80.vtx differ diff --git a/xmas/content/models/player/vad36lollipop/lolli_new.dx90.vtx b/xmas/content/models/player/vad36lollipop/lolli_new.dx90.vtx new file mode 100644 index 00000000..74cebd80 Binary files /dev/null and b/xmas/content/models/player/vad36lollipop/lolli_new.dx90.vtx differ diff --git a/xmas/content/models/player/vad36lollipop/lolli_new.mdl b/xmas/content/models/player/vad36lollipop/lolli_new.mdl new file mode 100644 index 00000000..ca3b4b6e Binary files /dev/null and b/xmas/content/models/player/vad36lollipop/lolli_new.mdl differ diff --git a/xmas/content/models/player/vad36lollipop/lolli_new.phy b/xmas/content/models/player/vad36lollipop/lolli_new.phy new file mode 100644 index 00000000..dab7cfaf Binary files /dev/null and b/xmas/content/models/player/vad36lollipop/lolli_new.phy differ diff --git a/xmas/content/models/player/vad36lollipop/lolli_new.sw.vtx b/xmas/content/models/player/vad36lollipop/lolli_new.sw.vtx new file mode 100644 index 00000000..b1a5aaa3 Binary files /dev/null and b/xmas/content/models/player/vad36lollipop/lolli_new.sw.vtx differ diff --git a/xmas/content/models/player/vad36lollipop/lolli_new.vvd b/xmas/content/models/player/vad36lollipop/lolli_new.vvd new file mode 100644 index 00000000..09c5f568 Binary files /dev/null and b/xmas/content/models/player/vad36lollipop/lolli_new.vvd differ diff --git a/xmas/content/models/player/vad36santa/red.dx80.vtx b/xmas/content/models/player/vad36santa/red.dx80.vtx new file mode 100644 index 00000000..e4944643 Binary files /dev/null and b/xmas/content/models/player/vad36santa/red.dx80.vtx differ diff --git a/xmas/content/models/player/vad36santa/red.dx90.vtx b/xmas/content/models/player/vad36santa/red.dx90.vtx new file mode 100644 index 00000000..d79e1c85 Binary files /dev/null and b/xmas/content/models/player/vad36santa/red.dx90.vtx differ diff --git a/xmas/content/models/player/vad36santa/red.mdl b/xmas/content/models/player/vad36santa/red.mdl new file mode 100644 index 00000000..2119a672 Binary files /dev/null and b/xmas/content/models/player/vad36santa/red.mdl differ diff --git a/xmas/content/models/player/vad36santa/red.phy b/xmas/content/models/player/vad36santa/red.phy new file mode 100644 index 00000000..f4fd4091 Binary files /dev/null and b/xmas/content/models/player/vad36santa/red.phy differ diff --git a/xmas/content/models/player/vad36santa/red.sw.vtx b/xmas/content/models/player/vad36santa/red.sw.vtx new file mode 100644 index 00000000..6c7a6bc7 Binary files /dev/null and b/xmas/content/models/player/vad36santa/red.sw.vtx differ diff --git a/xmas/content/models/player/vad36santa/red.vvd b/xmas/content/models/player/vad36santa/red.vvd new file mode 100644 index 00000000..f91c6b84 Binary files /dev/null and b/xmas/content/models/player/vad36santa/red.vvd differ diff --git a/xmas/content/models/weapons/w_ornament_thrown.dx80.vtx b/xmas/content/models/weapons/w_ornament_thrown.dx80.vtx new file mode 100644 index 00000000..27624f84 Binary files /dev/null and b/xmas/content/models/weapons/w_ornament_thrown.dx80.vtx differ diff --git a/xmas/content/models/weapons/w_ornament_thrown.dx90.vtx b/xmas/content/models/weapons/w_ornament_thrown.dx90.vtx new file mode 100644 index 00000000..748825aa Binary files /dev/null and b/xmas/content/models/weapons/w_ornament_thrown.dx90.vtx differ diff --git a/xmas/content/models/weapons/w_ornament_thrown.mdl b/xmas/content/models/weapons/w_ornament_thrown.mdl new file mode 100644 index 00000000..9cf99159 Binary files /dev/null and b/xmas/content/models/weapons/w_ornament_thrown.mdl differ diff --git a/xmas/content/models/weapons/w_ornament_thrown.phy b/xmas/content/models/weapons/w_ornament_thrown.phy new file mode 100644 index 00000000..d8c35f58 Binary files /dev/null and b/xmas/content/models/weapons/w_ornament_thrown.phy differ diff --git a/xmas/content/models/weapons/w_ornament_thrown.sw.vtx b/xmas/content/models/weapons/w_ornament_thrown.sw.vtx new file mode 100644 index 00000000..ea628bf6 Binary files /dev/null and b/xmas/content/models/weapons/w_ornament_thrown.sw.vtx differ diff --git a/xmas/content/models/weapons/w_ornament_thrown.vvd b/xmas/content/models/weapons/w_ornament_thrown.vvd new file mode 100644 index 00000000..0d2b4fed Binary files /dev/null and b/xmas/content/models/weapons/w_ornament_thrown.vvd differ diff --git a/xmas/content/models/weapons/w_revenge_xmas_candy.dx80.vtx b/xmas/content/models/weapons/w_revenge_xmas_candy.dx80.vtx new file mode 100644 index 00000000..5abf677e Binary files /dev/null and b/xmas/content/models/weapons/w_revenge_xmas_candy.dx80.vtx differ diff --git a/xmas/content/models/weapons/w_revenge_xmas_candy.dx90.vtx b/xmas/content/models/weapons/w_revenge_xmas_candy.dx90.vtx new file mode 100644 index 00000000..a32ec3fe Binary files /dev/null and b/xmas/content/models/weapons/w_revenge_xmas_candy.dx90.vtx differ diff --git a/xmas/content/models/weapons/w_revenge_xmas_candy.mdl b/xmas/content/models/weapons/w_revenge_xmas_candy.mdl new file mode 100644 index 00000000..a5d803c6 Binary files /dev/null and b/xmas/content/models/weapons/w_revenge_xmas_candy.mdl differ diff --git a/xmas/content/models/weapons/w_revenge_xmas_candy.phy b/xmas/content/models/weapons/w_revenge_xmas_candy.phy new file mode 100644 index 00000000..50c67cf3 Binary files /dev/null and b/xmas/content/models/weapons/w_revenge_xmas_candy.phy differ diff --git a/xmas/content/models/weapons/w_revenge_xmas_candy.sw.vtx b/xmas/content/models/weapons/w_revenge_xmas_candy.sw.vtx new file mode 100644 index 00000000..d1f1824d Binary files /dev/null and b/xmas/content/models/weapons/w_revenge_xmas_candy.sw.vtx differ diff --git a/xmas/content/models/weapons/w_revenge_xmas_candy.vvd b/xmas/content/models/weapons/w_revenge_xmas_candy.vvd new file mode 100644 index 00000000..cd3f6a2b Binary files /dev/null and b/xmas/content/models/weapons/w_revenge_xmas_candy.vvd differ diff --git a/xmas/content/models/weapons/w_santa_hat_thrown.dx80.vtx b/xmas/content/models/weapons/w_santa_hat_thrown.dx80.vtx new file mode 100644 index 00000000..1400ad68 Binary files /dev/null and b/xmas/content/models/weapons/w_santa_hat_thrown.dx80.vtx differ diff --git a/xmas/content/models/weapons/w_santa_hat_thrown.dx90.vtx b/xmas/content/models/weapons/w_santa_hat_thrown.dx90.vtx new file mode 100644 index 00000000..35754a05 Binary files /dev/null and b/xmas/content/models/weapons/w_santa_hat_thrown.dx90.vtx differ diff --git a/xmas/content/models/weapons/w_santa_hat_thrown.mdl b/xmas/content/models/weapons/w_santa_hat_thrown.mdl new file mode 100644 index 00000000..441feffc Binary files /dev/null and b/xmas/content/models/weapons/w_santa_hat_thrown.mdl differ diff --git a/xmas/content/models/weapons/w_santa_hat_thrown.phy b/xmas/content/models/weapons/w_santa_hat_thrown.phy new file mode 100644 index 00000000..7f0caffe Binary files /dev/null and b/xmas/content/models/weapons/w_santa_hat_thrown.phy differ diff --git a/xmas/content/models/weapons/w_santa_hat_thrown.sw.vtx b/xmas/content/models/weapons/w_santa_hat_thrown.sw.vtx new file mode 100644 index 00000000..f2b747be Binary files /dev/null and b/xmas/content/models/weapons/w_santa_hat_thrown.sw.vtx differ diff --git a/xmas/content/models/weapons/w_santa_hat_thrown.vvd b/xmas/content/models/weapons/w_santa_hat_thrown.vvd new file mode 100644 index 00000000..ca19f93e Binary files /dev/null and b/xmas/content/models/weapons/w_santa_hat_thrown.vvd differ diff --git a/xmas/content/models/weapons/w_snowball_thrown.dx80.vtx b/xmas/content/models/weapons/w_snowball_thrown.dx80.vtx new file mode 100644 index 00000000..10facd33 Binary files /dev/null and b/xmas/content/models/weapons/w_snowball_thrown.dx80.vtx differ diff --git a/xmas/content/models/weapons/w_snowball_thrown.dx90.vtx b/xmas/content/models/weapons/w_snowball_thrown.dx90.vtx new file mode 100644 index 00000000..720e1c78 Binary files /dev/null and b/xmas/content/models/weapons/w_snowball_thrown.dx90.vtx differ diff --git a/xmas/content/models/weapons/w_snowball_thrown.mdl b/xmas/content/models/weapons/w_snowball_thrown.mdl new file mode 100644 index 00000000..418b85c7 Binary files /dev/null and b/xmas/content/models/weapons/w_snowball_thrown.mdl differ diff --git a/xmas/content/models/weapons/w_snowball_thrown.phy b/xmas/content/models/weapons/w_snowball_thrown.phy new file mode 100644 index 00000000..f539e370 Binary files /dev/null and b/xmas/content/models/weapons/w_snowball_thrown.phy differ diff --git a/xmas/content/models/weapons/w_snowball_thrown.sw.vtx b/xmas/content/models/weapons/w_snowball_thrown.sw.vtx new file mode 100644 index 00000000..894542e5 Binary files /dev/null and b/xmas/content/models/weapons/w_snowball_thrown.sw.vtx differ diff --git a/xmas/content/models/weapons/w_snowball_thrown.vvd b/xmas/content/models/weapons/w_snowball_thrown.vvd new file mode 100644 index 00000000..c36acce2 Binary files /dev/null and b/xmas/content/models/weapons/w_snowball_thrown.vvd differ diff --git a/xmas/content/models/xmas/giftbox.dx80.vtx b/xmas/content/models/xmas/giftbox.dx80.vtx new file mode 100644 index 00000000..981eea4c Binary files /dev/null and b/xmas/content/models/xmas/giftbox.dx80.vtx differ diff --git a/xmas/content/models/xmas/giftbox.dx90.vtx b/xmas/content/models/xmas/giftbox.dx90.vtx new file mode 100644 index 00000000..1e238376 Binary files /dev/null and b/xmas/content/models/xmas/giftbox.dx90.vtx differ diff --git a/xmas/content/models/xmas/giftbox.mdl b/xmas/content/models/xmas/giftbox.mdl new file mode 100644 index 00000000..bb1fc07d Binary files /dev/null and b/xmas/content/models/xmas/giftbox.mdl differ diff --git a/xmas/content/models/xmas/giftbox.phy b/xmas/content/models/xmas/giftbox.phy new file mode 100644 index 00000000..69ddb354 Binary files /dev/null and b/xmas/content/models/xmas/giftbox.phy differ diff --git a/xmas/content/models/xmas/giftbox.sw.vtx b/xmas/content/models/xmas/giftbox.sw.vtx new file mode 100644 index 00000000..853cbb88 Binary files /dev/null and b/xmas/content/models/xmas/giftbox.sw.vtx differ diff --git a/xmas/content/models/xmas/giftbox.vvd b/xmas/content/models/xmas/giftbox.vvd new file mode 100644 index 00000000..9843a541 Binary files /dev/null and b/xmas/content/models/xmas/giftbox.vvd differ diff --git a/xmas/content/sound/unl1/season/hohohoho.wav b/xmas/content/sound/unl1/season/hohohoho.wav new file mode 100644 index 00000000..818db243 Binary files /dev/null and b/xmas/content/sound/unl1/season/hohohoho.wav differ diff --git a/xmas/scripting/xmas.sp b/xmas/scripting/xmas.sp new file mode 100644 index 00000000..8a5b7767 --- /dev/null +++ b/xmas/scripting/xmas.sp @@ -0,0 +1,848 @@ +#include +#include +#include +#include +#include +#include + +#pragma semicolon 1 +#pragma newdecls required + +Handle g_hCVar_CollectablesEnabled = INVALID_HANDLE; +Handle g_hCVar_RandomIntervalMin = INVALID_HANDLE; +Handle g_hCVar_RandomIntervalMax = INVALID_HANDLE; +Handle g_hCVar_InfectionEffectEnabled = INVALID_HANDLE; +Handle g_hCVar_MilestoneInfection = INVALID_HANDLE; +Handle g_hCVar_MilestoneGrenade = INVALID_HANDLE; +Handle g_hCVar_MilestoneSkin = INVALID_HANDLE; +Handle g_hCVar_HighscoreDisplay = INVALID_HANDLE; +Handle g_hCVar_PlayerRequirement = INVALID_HANDLE; +Handle g_hCVar_EntityLimit = INVALID_HANDLE; + +bool g_bEnabled = true; +float g_fPropOrigin[3]; + +public Plugin myinfo = +{ + name = "Unloze Season Event", + author = "Neon", + description = "Unloze Season Event", + version = "1.1", + url = "https://steamcommunity.com/id/n3ontm" +}; + +public void OnPluginStart() +{ + g_hCVar_CollectablesEnabled = CreateConVar("sm_unloze_season_collectables_enabled", "1", "Spawn Collectables.", 0, true, 0.0, true, 1.0); + g_hCVar_RandomIntervalMin = CreateConVar("sm_unloze_season_random_interval_min", "60", "Minimum Interval between spawning Collectables.", 0, true, 0.0); + g_hCVar_RandomIntervalMax = CreateConVar("sm_unloze_season_random_interval_max", "120", "Maximum Interval between spawning Collectables.", 0, true, 0.0); + g_hCVar_InfectionEffectEnabled = CreateConVar("sm_unloze_season_infection_effect_enabled", "1", "Spawn Props on Infection.", 0, true, 0.0, true, 1.0); + g_hCVar_MilestoneInfection = CreateConVar("sm_unloze_season_milestone_infection", "25", "Amount of Collectables you need to unlock the Infection Effect.", 0, true, 0.0); + g_hCVar_MilestoneGrenade = CreateConVar("sm_unloze_season_milestone_grenade", "75", "Amount of Collectables you need to unlock the Grenade Skin.", 0, true, 0.0); + g_hCVar_MilestoneSkin = CreateConVar("sm_unloze_season_milestone_skin", "150", "Amount of Collectables you need to unlock the Skin(s).", 0, true, 0.0); + g_hCVar_HighscoreDisplay = CreateConVar("sm_unloze_season_highscore_display", "5", "Amount of Players to display via sm_highscore", 0, true, 0.0); + g_hCVar_PlayerRequirement = CreateConVar("sm_unloze_season_player_requirement", "10", "Amount of Players needed to spawn Collectables.", 0, true, 0.0); + g_hCVar_EntityLimit = CreateConVar("sm_unloze_season_entity_limit", "2000", "Entity Safety Limit.", 0, true, 0.0); + + for(int client = 1; client <= MaxClients; client++) + { + if(IsClientInGame(client) && !IsFakeClient(client) && IsClientAuthorized(client)) + OnClientPostAdminFilter(client); + } + HookEvent("round_start", OnRoundStart, EventHookMode_Post); + RegConsoleCmd("sm_presents", Command_Collected, "Shows the total amount of presents you have collected so far"); + RegConsoleCmd("sm_highscore", Command_HighScore, "Shows the HighScore"); + RegAdminCmd("sm_reload_season", Command_ReloadFlags, ADMFLAG_ROOT); +} + +public void OnMapStart() +{ + AddFileToDownloadsTable("models/player/stenli/smite/fenrir.phy"); + AddFileToDownloadsTable("models/player/stenli/smite/fenrir.sw.vtx"); + AddFileToDownloadsTable("models/player/stenli/smite/fenrir.vvd"); + AddFileToDownloadsTable("models/player/stenli/smite/fenrir.dx80.vtx"); + AddFileToDownloadsTable("models/player/stenli/smite/fenrir.dx90.vtx"); + AddFileToDownloadsTable("models/player/stenli/smite/fenrir.mdl"); + AddFileToDownloadsTable("materials/models/player/stenli/smite/fenrir/body.vmt"); + AddFileToDownloadsTable("materials/models/player/stenli/smite/fenrir/body.vtf"); + AddFileToDownloadsTable("materials/models/player/stenli/smite/fenrir/body_n.vtf"); + AddFileToDownloadsTable("materials/models/player/stenli/smite/fenrir/body_s.vtf"); + AddFileToDownloadsTable("materials/models/player/stenli/smite/fenrir/lights.vmt"); + PrecacheModel("models/player/stenli/smite/fenrir.mdl"); + + AddFileToDownloadsTable("models/player/vad36lollipop/lolli_new.vvd"); + AddFileToDownloadsTable("models/player/vad36lollipop/lolli_new.dx80.vtx"); + AddFileToDownloadsTable("models/player/vad36lollipop/lolli_new.dx90.vtx"); + AddFileToDownloadsTable("models/player/vad36lollipop/lolli_new.mdl"); + AddFileToDownloadsTable("models/player/vad36lollipop/lolli_new.phy"); + AddFileToDownloadsTable("models/player/vad36lollipop/lolli_new.sw.vtx"); + AddFileToDownloadsTable("materials/models/player/vad36lollipop/tx_ch_main_juliet_skin_d_cos11.vtf"); + AddFileToDownloadsTable("materials/models/player/vad36lollipop/tx_ch_main_juliet_skin_n_cos11.vtf"); + AddFileToDownloadsTable("materials/models/player/vad36lollipop/hat.vmt"); + AddFileToDownloadsTable("materials/models/player/vad36lollipop/hat.vtf"); + AddFileToDownloadsTable("materials/models/player/vad36lollipop/hat_n.vtf"); + AddFileToDownloadsTable("materials/models/player/vad36lollipop/tx_ch_main_juliet_cloth.vmt"); + AddFileToDownloadsTable("materials/models/player/vad36lollipop/tx_ch_main_juliet_cloth.vtf"); + AddFileToDownloadsTable("materials/models/player/vad36lollipop/tx_ch_main_juliet_cloth_n.vtf"); + AddFileToDownloadsTable("materials/models/player/vad36lollipop/tx_ch_main_juliet_hair_d_cos11.vmt"); + AddFileToDownloadsTable("materials/models/player/vad36lollipop/tx_ch_main_juliet_hair_d_cos11.vtf"); + AddFileToDownloadsTable("materials/models/player/vad36lollipop/tx_ch_main_juliet_hair_n_cos11.vtf"); + AddFileToDownloadsTable("materials/models/player/vad36lollipop/tx_ch_main_juliet_skin_d_cos11.vmt"); + PrecacheModel("models/player/vad36lollipop/lolli_new.mdl"); + + AddFileToDownloadsTable("models/player/vad36santa/red.dx80.vtx"); + AddFileToDownloadsTable("models/player/vad36santa/red.dx90.vtx"); + AddFileToDownloadsTable("models/player/vad36santa/red.mdl"); + AddFileToDownloadsTable("models/player/vad36santa/red.phy"); + AddFileToDownloadsTable("models/player/vad36santa/red.sw.vtx"); + AddFileToDownloadsTable("models/player/vad36santa/red.vvd"); + AddFileToDownloadsTable("materials/models/player/vad36santa/Santa_N.vtf"); + AddFileToDownloadsTable("materials/models/player/vad36santa/Santa_D.vmt"); + AddFileToDownloadsTable("materials/models/player/vad36santa/Santa_D.vtf"); + AddFileToDownloadsTable("materials/models/player/vad36santa/Santa_D_B.vmt"); + AddFileToDownloadsTable("materials/models/player/vad36santa/Santa_D_B.vtf"); + PrecacheModel("models/player/vad36santa/red.mdl"); + + AddFileToDownloadsTable("models/zombieden/xmas/giftbox.dx80.vtx"); + AddFileToDownloadsTable("models/zombieden/xmas/giftbox.dx90.vtx"); + AddFileToDownloadsTable("models/zombieden/xmas/giftbox.mdl"); + AddFileToDownloadsTable("models/zombieden/xmas/giftbox.phy"); + AddFileToDownloadsTable("models/zombieden/xmas/giftbox.sw.vtx"); + AddFileToDownloadsTable("models/zombieden/xmas/giftbox.vvd"); + AddFileToDownloadsTable("materials/models/zombieden/xmas/gift.vmt"); + AddFileToDownloadsTable("materials/models/zombieden/xmas/gift.vtf"); + AddFileToDownloadsTable("materials/models/zombieden/xmas/gift_2.vmt"); + AddFileToDownloadsTable("materials/models/zombieden/xmas/gift_2.vtf"); + AddFileToDownloadsTable("materials/models/zombieden/xmas/gift_lightwarp.vtf"); + PrecacheModel("models/zombieden/xmas/giftbox.mdl"); + + AddFileToDownloadsTable("models/models_kit/xmas/xmastree_mini.dx80.vtx"); + AddFileToDownloadsTable("models/models_kit/xmas/xmastree_mini.dx90.vtx"); + AddFileToDownloadsTable("models/models_kit/xmas/xmastree_mini.mdl"); + AddFileToDownloadsTable("models/models_kit/xmas/xmastree_mini.phy"); + AddFileToDownloadsTable("models/models_kit/xmas/xmastree_mini.sw.vtx"); + AddFileToDownloadsTable("models/models_kit/xmas/xmastree_mini.vvd"); + AddFileToDownloadsTable("materials/models/models_kit/xmas/xmastree_misca.vmt"); + AddFileToDownloadsTable("materials/models/models_kit/xmas/xmastree_misca.vtf"); + AddFileToDownloadsTable("materials/models/models_kit/xmas/xmastree_misca_skin2.vmt"); + AddFileToDownloadsTable("materials/models/models_kit/xmas/xmastree_misca_skin2.vtf"); + AddFileToDownloadsTable("materials/models/models_kit/xmas/xmastree_miscb.vmt"); + AddFileToDownloadsTable("materials/models/models_kit/xmas/xmastree_miscb.vtf"); + AddFileToDownloadsTable("materials/models/models_kit/xmas/xmastree_miscb_skin2.vmt"); + AddFileToDownloadsTable("materials/models/models_kit/xmas/xmastree_miscb_skin2.vtf"); + AddFileToDownloadsTable("materials/models/models_kit/xmas/xmastree_miscb_spec.vtf"); + PrecacheModel("models/models_kit/xmas/xmastree_mini.mdl"); + + AddFileToDownloadsTable("models/models_kit/xmas/xmas_teddybear.dx80.vtx"); + AddFileToDownloadsTable("models/models_kit/xmas/xmas_teddybear.dx90.vtx"); + AddFileToDownloadsTable("models/models_kit/xmas/xmas_teddybear.mdl"); + AddFileToDownloadsTable("models/models_kit/xmas/xmas_teddybear.phy"); + AddFileToDownloadsTable("models/models_kit/xmas/xmas_teddybear.sw.vtx"); + AddFileToDownloadsTable("models/models_kit/xmas/xmas_teddybear.vvd"); + AddFileToDownloadsTable("materials/models/models_kit/xmas/xmastree_misca.vmt"); + AddFileToDownloadsTable("materials/models/models_kit/xmas/xmastree_misca.vtf"); + AddFileToDownloadsTable("materials/models/models_kit/xmas/xmastree_misca_skin2.vmt"); + AddFileToDownloadsTable("materials/models/models_kit/xmas/xmastree_misca_skin2.vtf"); + AddFileToDownloadsTable("materials/models/models_kit/xmas/xmastree_miscb.vmt"); + AddFileToDownloadsTable("materials/models/models_kit/xmas/xmastree_miscb.vtf"); + AddFileToDownloadsTable("materials/models/models_kit/xmas/xmastree_miscb_skin2.vmt"); + AddFileToDownloadsTable("materials/models/models_kit/xmas/xmastree_miscb_skin2.vtf"); + AddFileToDownloadsTable("materials/models/models_kit/xmas/xmastree_miscb_spec.vtf"); + PrecacheModel("models/models_kit/xmas/xmas_teddybear.mdl"); + + AddFileToDownloadsTable("models/weapons/w_revenge_xmas_candy.dx80.vtx"); + AddFileToDownloadsTable("models/weapons/w_revenge_xmas_candy.dx90.vtx"); + AddFileToDownloadsTable("models/weapons/w_revenge_xmas_candy.mdl"); + AddFileToDownloadsTable("models/weapons/w_revenge_xmas_candy.phy"); + AddFileToDownloadsTable("models/weapons/w_revenge_xmas_candy.sw.vtx"); + AddFileToDownloadsTable("models/weapons/w_revenge_xmas_candy.vvd"); + AddFileToDownloadsTable("materials/models/weapons/v_models/xmas_candy/cane.vmt"); + AddFileToDownloadsTable("materials/models/weapons/v_models/xmas_candy/cane.vtf"); + PrecacheModel("models/weapons/w_revenge_xmas_candy.mdl"); + + AddFileToDownloadsTable("models/johny-srka/snowman.dx80.vtx"); + AddFileToDownloadsTable("models/johny-srka/snowman.dx90.vtx"); + AddFileToDownloadsTable("models/johny-srka/snowman.mdl"); + AddFileToDownloadsTable("models/johny-srka/snowman.phy"); + AddFileToDownloadsTable("models/johny-srka/snowman.sw.vtx"); + AddFileToDownloadsTable("models/johny-srka/snowman.vvd"); + AddFileToDownloadsTable("materials/models/johny-srka/black_felt.vmt"); + AddFileToDownloadsTable("materials/models/johny-srka/black_felt.vtf"); + AddFileToDownloadsTable("materials/models/johny-srka/fabricpatterns0017_m.vmt"); + AddFileToDownloadsTable("materials/models/johny-srka/fabricpatterns0017_m.vtf"); + AddFileToDownloadsTable("materials/models/johny-srka/snowfloor002a.vmt"); + AddFileToDownloadsTable("materials/models/johny-srka/snowfloor002a.vtf"); + AddFileToDownloadsTable("materials/models/johny-srka/wood_old.vmt"); + AddFileToDownloadsTable("materials/models/johny-srka/wood_old.vtf"); + PrecacheModel("models/johny-srka/snowman.mdl"); + + AddFileToDownloadsTable("models/weapons/w_snowball_thrown.dx80.vtx"); + AddFileToDownloadsTable("models/weapons/w_snowball_thrown.dx90.vtx"); + AddFileToDownloadsTable("models/weapons/w_snowball_thrown.mdl"); + AddFileToDownloadsTable("models/weapons/w_snowball_thrown.phy"); + AddFileToDownloadsTable("models/weapons/w_snowball_thrown.sw.vtx"); + AddFileToDownloadsTable("models/weapons/w_snowball_thrown.vvd"); + AddFileToDownloadsTable("materials/models/weapons/v_models/snooball/s.vmt"); + AddFileToDownloadsTable("materials/models/weapons/v_models/snooball/s.vtf"); + AddFileToDownloadsTable("materials/models/weapons/v_models/snooball/s_norm.vtf"); + PrecacheModel("models/weapons/w_snowball_thrown.mdl"); + + AddFileToDownloadsTable("models/weapons/w_ornament_thrown.dx80.vtx"); + AddFileToDownloadsTable("models/weapons/w_ornament_thrown.dx90.vtx"); + AddFileToDownloadsTable("models/weapons/w_ornament_thrown.mdl"); + AddFileToDownloadsTable("models/weapons/w_ornament_thrown.phy"); + AddFileToDownloadsTable("models/weapons/w_ornament_thrown.sw.vtx"); + AddFileToDownloadsTable("models/weapons/w_ornament_thrown.vvd"); + AddFileToDownloadsTable("materials/models/weapons/v_models/ornament/ornament.vmt"); + AddFileToDownloadsTable("materials/models/weapons/v_models/ornament/ornament.vtf"); + AddFileToDownloadsTable("materials/models/weapons/v_models/ornament/reflect.vtf"); + PrecacheModel("models/weapons/w_ornament_thrown.mdl"); + + AddFileToDownloadsTable("models/weapons/w_santa_hat_thrown.dx80.vtx"); + AddFileToDownloadsTable("models/weapons/w_santa_hat_thrown.dx90.vtx"); + AddFileToDownloadsTable("models/weapons/w_santa_hat_thrown.mdl"); + AddFileToDownloadsTable("models/weapons/w_santa_hat_thrown.phy"); + AddFileToDownloadsTable("models/weapons/w_santa_hat_thrown.sw.vtx"); + AddFileToDownloadsTable("models/weapons/w_santa_hat_thrown.vvd"); + AddFileToDownloadsTable("materials/models/weapons/v_models/eq_fraggrenade/bonnet.vmt"); + AddFileToDownloadsTable("materials/models/weapons/v_models/eq_fraggrenade/bonnet.vtf"); + PrecacheModel("models/weapons/w_santa_hat_thrown.mdl"); + + AddFileToDownloadsTable("sound/unl1/season/hohohoho.wav"); + PrecacheSound("sound/unl1/season/hohohoho.wav"); + + float fRandomInterval = GetRandomFloat(GetConVarFloat(g_hCVar_RandomIntervalMin), GetConVarFloat(g_hCVar_RandomIntervalMax)); + CreateTimer(fRandomInterval, SpawnCollectable, INVALID_HANDLE, TIMER_FLAG_NO_MAPCHANGE); +} + +public void OnClientPostAdminFilter(int client) +{ + CheckMYSQL(client); +} + +public void OnRoundStart(Event hEvent, const char[] sEvent, bool bDontBroadcast) +{ + CreateTimer(10.0, CheckPlayerCount, INVALID_HANDLE, TIMER_FLAG_NO_MAPCHANGE); +} + +public Action CheckPlayerCount(Handle timer) +{ + g_bEnabled = true; + if (GetClientCount(true) < GetConVarInt(g_hCVar_PlayerRequirement)) + { + g_bEnabled = false; + CPrintToChatAll("{green}[Unloze XMAS] {white}Minimum Player Requirement to spawn Presents: {green}%d {white} - Currently online: {red}%d{white}.", GetConVarInt(g_hCVar_PlayerRequirement), GetClientCount(true)); + } +} + +public Action Command_ReloadFlags(int client, int args) +{ + for(int i = 1; i <= MaxClients; i++) + { + if(IsClientInGame(i) && !IsFakeClient(i) && IsClientAuthorized(i)) + OnClientPostAdminFilter(i); + } + CPrintToChat(client, "{green}[Unloze XMAS] {white}Flags have been reloaded!"); + return Plugin_Handled; +} + +public Action Command_HighScore(int client, int args) +{ + char error[255]; + Database db; + if (SQL_CheckConfig("season")) + { + db = SQL_Connect("season", true, error, sizeof(error)); + } + if (db == null) + { + LogError("Could not connect to database: %s", error); + delete db; + return Plugin_Handled; + } + + char sName[MAX_NAME_LENGTH]; + char sQuery[255]; + char sBuffer[2048] = "{green}[Unloze XMAS] {white}TOP COLLECTORS:\n"; + char sTempBuffer[1024] = ""; + int iCollected; + int iField; + + Format(sQuery, sizeof(sQuery), "SELECT * from season_table order by collected desc limit %d", GetConVarInt(g_hCVar_HighscoreDisplay)); + DBResultSet rs; + if ((rs = SQL_Query(db, sQuery)) == null) + { + CPrintToChat(client, "{green}[Unloze XMAS] {white}Error! Could not connect to MYSQL-DB!"); + delete db; + delete rs; + return Plugin_Handled; + } + + for(int i = 1; i <= GetConVarInt(g_hCVar_HighscoreDisplay); i++) + { + rs.FetchRow(); + rs.FieldNameToNum("name", iField); + rs.FetchString(iField, sName , sizeof(sName)); + rs.FieldNameToNum("collected", iField); + iCollected = rs.FetchInt(iField); + Format(sTempBuffer, sizeof(sTempBuffer), "{green}%d: %s - {red}%d \n", i, sName, iCollected); + StrCat(sBuffer, sizeof(sBuffer), sTempBuffer); + } + CPrintToChat(client, sBuffer); + delete db; + delete rs; + return Plugin_Handled; +} + +public Action Command_Collected(int client, int args) +{ + int iCollected = CheckMYSQL(client); + CPrintToChat(client, "{green}[Unloze XMAS] {white}You have collected {green}%d {white}presents so far.", iCollected); + + if ((iCollected > GetConVarInt(g_hCVar_MilestoneInfection)) && (iCollected > GetConVarInt(g_hCVar_MilestoneSkin))) + CPrintToChat(client, "{green}[Unloze XMAS] {white}You have unlocked {red}all rewards{white} already."); + if (iCollected < GetConVarInt(g_hCVar_MilestoneInfection)) + CPrintToChat(client, "{green}[Unloze XMAS] {white}You need to collect {green}%d {white}more presents to unlock {red}INFECTION EFFECTS{white}.", GetConVarInt(g_hCVar_MilestoneInfection) - iCollected); + if (iCollected < GetConVarInt(g_hCVar_MilestoneGrenade)) + CPrintToChat(client, "{green}[Unloze XMAS] {white}You need to collect {green}%d {white}more presents to unlock {red}GRENADE SKINS{white}.", GetConVarInt(g_hCVar_MilestoneGrenade) - iCollected); + if (iCollected < GetConVarInt(g_hCVar_MilestoneSkin)) + CPrintToChat(client, "{green}[Unloze XMAS] {white}You need to collect {green}%d {white}more presents to unlock {red}XMAS PLAYER SKINS{white}.", GetConVarInt(g_hCVar_MilestoneSkin) - iCollected); + + return Plugin_Handled; +} + +public int CheckMYSQL(int client) +{ + if (client == -1) + return -1; + + char error[255]; + Database db; + if (SQL_CheckConfig("season")) + { + db = SQL_Connect("season", true, error, sizeof(error)); + } + if (db == null) + { + CPrintToChat(client, "{green}[Unloze XMAS] {white}Error! Could not connect to MYSQL-DB!"); + delete db; + return -1; + } + + char sSID[64]; + GetClientAuthId(client, AuthId_Steam2, sSID, sizeof(sSID)); + char sQuery[255]; + Format(sQuery, sizeof(sQuery), "SELECT collected FROM season_table WHERE steam_auth = '%s'", sSID); + DBResultSet rs; + if ((rs = SQL_Query(db, sQuery)) == null) + { + delete db; + delete rs; + return -1; + + } + int iCollected; + if (!(rs.RowCount > 0)) + { + iCollected = 0; + } + else + { + int iField; + rs.FetchRow(); + rs.FieldNameToNum("collected", iField); + iCollected = rs.FetchInt(iField); + } + delete rs; + delete db; + CheckAndAddFlag(client, iCollected); + return iCollected; +} + +public Action SpawnCollectable(Handle timer) +{ + + float fRandomInterval = GetRandomFloat(GetConVarFloat(g_hCVar_RandomIntervalMin), GetConVarFloat(g_hCVar_RandomIntervalMax)); + CreateTimer(fRandomInterval, SpawnCollectable, INVALID_HANDLE, TIMER_FLAG_NO_MAPCHANGE); + + if (!GetConVarBool(g_hCVar_CollectablesEnabled) || !(g_bEnabled)) + return; + + int target = GetTargetClient(); + GetClientAbsOrigin(target, g_fPropOrigin); + int iRotating = SpawnRotating(); + int iParticle = SpawnParticle(); + int iProp = SpawnProp(); + int iHitbox = SpawnHitbox(iRotating, iParticle); + int iTrigger = SpawnTrigger(iHitbox); + int iAmbient = SpawnAmbientHohohoho(); + SetVariantString("!activator"); + AcceptEntityInput(iProp, "SetParent", iRotating); + SetVariantString("!activator"); + AcceptEntityInput(iHitbox, "SetParent", iRotating); + SetVariantString("!activator"); + AcceptEntityInput(iTrigger, "SetParent", iRotating); + + AcceptEntityInput(iTrigger, "Enable"); + + int iEntityLimit = GetConVarInt(g_hCVar_EntityLimit); + + if ((iRotating > iEntityLimit) || (iParticle > iEntityLimit) || (iProp > iEntityLimit) || (iHitbox > iEntityLimit) || (iTrigger > iEntityLimit) || (iAmbient > iEntityLimit)) + { + AcceptEntityInput(iHitbox, "FireUser2"); + CPrintToChatAll("{green}[Unloze XMAS] {white}Present removed due to {red}critical amount of entities{white}!"); + } +} + +public int GetTargetClient() +{ + int[] iEligibleClients = new int[MaxClients]; + int iClientCount = 0; + for(int i = 1; i <= MaxClients; i++) + { + if(IsClientInGame(i) && IsPlayerAlive(i) && (ZR_IsClientHuman(i))) + { + iEligibleClients[iClientCount] = i; + iClientCount += 1; + } + } + if (iClientCount == 0) + return -1; + int randomIndex = GetRandomInt(0, iClientCount - 1); + return iEligibleClients[randomIndex]; +} + +public void HookCallbackTrigger(const char[] output, int caller, int activator, float delay) +{ + if (!ZR_IsClientHuman(activator)) + { + UnhookSingleEntityOutput(caller, "OnStartTouch", HookCallbackTrigger); + AcceptEntityInput(caller, "FireUser1"); + CPrintToChatAll("{green}[Unloze XMAS] {white}Zombies {red}destroyed{white} a present!"); + + } +} + +public void HookCallback(const char[] output, int caller, int activator, float delay) +{ + UpdateMYSQL(); +} + +public bool UpdateMYSQL() +{ + char error[255]; + Database db; + if (SQL_CheckConfig("season")) + { + db = SQL_Connect("season", true, error, sizeof(error)); + } + if (db == null) + { + LogError("Could not connect to database: %s", error); + delete db; + return false; + } + for (int client = 1; client <= MaxClients; client++) + { + if (Client_IsValid(client) && IsClientInGame(client) && IsPlayerAlive(client) && !IsFakeClient(client) && !IsClientSourceTV(client)&& ZR_IsClientHuman(client)) + { + char sSID[64]; + char sName[MAX_NAME_LENGTH]; + GetClientAuthId(client, AuthId_Steam2, sSID, sizeof(sSID)); + GetClientName(client, sName, sizeof(sName)); + + char sQuery[255]; + Format(sQuery, sizeof(sQuery), "SELECT collected FROM season_table WHERE steam_auth = '%s'", sSID); + DBResultSet rs; + if ((rs = SQL_Query(db, sQuery)) == null) + { + delete db; + delete rs; + return false; + + } + int iCollected; + if (!(rs.RowCount > 0)) + { + iCollected = 0; + Format(sQuery, sizeof(sQuery), "INSERT INTO season_table (steam_auth, name, collected) VALUES ('%s', '%s', '%d')", sSID, sName, iCollected); + SQL_FastQuery(db, sQuery); + } + else + { + int iField; + rs.FetchRow(); + rs.FieldNameToNum("collected", iField); + iCollected = rs.FetchInt(iField); + } + iCollected += 1; + Format(sQuery, sizeof(sQuery), "UPDATE season_table SET name='%s', collected='%d' WHERE steam_auth='%s'", sName, iCollected, sSID); + SQL_FastQuery(db, sQuery); + delete rs; + CheckAndAddFlag(client, iCollected); + CPrintToChat(client, "{green}[Unloze XMAS] {white}Your Team opened a present! You have collected {green}%d {white}presents so far.", iCollected); + if (iCollected == GetConVarInt(g_hCVar_MilestoneInfection)) + CPrintToChat(client, "{green}[Unloze XMAS] {white}Congratulations! You have unlocked {red}INFECTION EFFECTS{white}!"); + + if (iCollected == GetConVarInt(g_hCVar_MilestoneGrenade)) + CPrintToChat(client, "{green}[Unloze XMAS] {white}Congratulations! You have unlocked {red}GRENADE SKINS{white}!"); + + if (iCollected == GetConVarInt(g_hCVar_MilestoneSkin)) + CPrintToChat(client, "{green}[Unloze XMAS] {white}Congratulations! You have unlocked {red}XMAS SKINS{white}!"); + } + } + delete db; + return true; +} + +public void CheckAndAddFlag(int client, int iCollected) +{ + if (iCollected >= GetConVarInt(g_hCVar_MilestoneSkin)) + { + AddUserFlags(client, Admin_Custom4); + } +} + +public int SpawnTrigger(int iHitbox) +{ + char StrOutput1[128]; + Format(StrOutput1, sizeof(StrOutput1), "season_hitbox_%i,FireUser2,,0,1", iHitbox); + + int Entity; + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("trigger_multiple")) == INVALID_ENT_REFERENCE) + return -1; + + // Generate unique id for the entity + char StrEntityName[64]; + Format(StrEntityName, sizeof(StrEntityName), "trigger_multiple_%i", Entity); + + // Setup entity + DispatchKeyValue(Entity, "targetname", StrEntityName); + DispatchKeyValue(Entity, "spawnflags", "1"); + DispatchKeyValue(Entity, "startdisabled", "1"); + DispatchKeyValueVector(Entity, "origin", g_fPropOrigin); + DispatchKeyValue(Entity, "OnUser1", StrOutput1); + DispatchSpawn(Entity); + ActivateEntity(Entity); + + SetEntityModel(Entity, "models/zombieden/xmas/giftbox.mdl"); + float fMinbounds[3] = {-16.0, -16.0, -1.0}; + float fMaxbounds[3] = {16.0, 16.0, 32.0}; + SetEntPropVector(Entity, Prop_Send, "m_vecMins", fMinbounds); + SetEntPropVector(Entity, Prop_Send, "m_vecMaxs", fMaxbounds); + SetEntProp(Entity, Prop_Send, "m_nSolidType", 2); + int enteffects = GetEntProp(Entity, Prop_Send, "m_fEffects"); + enteffects |= 32; + SetEntProp(Entity, Prop_Send, "m_fEffects", enteffects); + HookSingleEntityOutput(Entity, "OnStartTouch", HookCallbackTrigger, false); + return Entity; +} + +public int SpawnRotating() +{ + int Entity; + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("func_rotating")) == INVALID_ENT_REFERENCE) + return -1; + + // Generate unique id for the entity + char StrEntityName[64]; + Format(StrEntityName, sizeof(StrEntityName), "season_rotating_%i", Entity); + + // Setup entity + DispatchKeyValue(Entity, "targetname", StrEntityName); + DispatchKeyValue(Entity, "maxspeed", "20"); + DispatchKeyValue(Entity, "spawnflags", "65"); + DispatchKeyValueVector(Entity, "origin", g_fPropOrigin); + DispatchSpawn(Entity); + ActivateEntity(Entity); + + SetEntityModel(Entity, "models/zombieden/xmas/giftbox.mdl"); + float fMinbounds[3] = {-1.00, -1.00, -1.00}; + float fMaxbounds[3] = {1.00, 1.00, 1.00}; + SetEntPropVector(Entity, Prop_Send, "m_vecMins", fMinbounds); + SetEntPropVector(Entity, Prop_Send, "m_vecMaxs", fMaxbounds); + SetEntProp(Entity, Prop_Send, "m_nSolidType", 2); + int enteffects = GetEntProp(Entity, Prop_Send, "m_fEffects"); + enteffects |= 32; + SetEntProp(Entity, Prop_Send, "m_fEffects", enteffects); + return Entity; +} + +public int SpawnProp() +{ + int Entity; + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("prop_dynamic_override")) == INVALID_ENT_REFERENCE) + return -1; + + // Setup entity + DispatchKeyValue(Entity, "targetname", "season_prop"); + DispatchKeyValue(Entity, "model", "models/zombieden/xmas/giftbox.mdl"); + DispatchKeyValue(Entity, "modelscale", "0.8"); + DispatchKeyValue(Entity, "disableshadows", "1"); + DispatchKeyValue(Entity, "disablereceiveshadows", "1"); + DispatchKeyValue(Entity, "DisableBoneFollowers", "1"); + DispatchKeyValueVector(Entity, "origin", g_fPropOrigin); + + DispatchSpawn(Entity); + ActivateEntity(Entity); + + int iRandomSkin = GetRandomInt(0, 1); + if (iRandomSkin == 0) + { + SetVariantString("0"); + } + else if (iRandomSkin == 1) + { + SetVariantString("1"); + } + AcceptEntityInput(Entity, "Skin"); + return Entity; +} + +public int SpawnParticle() +{ + int Entity; + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("info_particle_system")) == INVALID_ENT_REFERENCE) + return -1; + + // Generate unique id for the entity + char StrEntityName[64]; + Format(StrEntityName, sizeof(StrEntityName), "season_particle_%i", Entity); + + // Setup entity + DispatchKeyValue(Entity, "targetname", StrEntityName); + DispatchKeyValue(Entity, "effect_name", "achieved"); + DispatchKeyValueVector(Entity, "origin", g_fPropOrigin); + DispatchSpawn(Entity); + ActivateEntity(Entity); + return Entity; +} + +public int SpawnHitbox(int iRotatingParent, int iParticleParent) +{ + char StrOutput1[128]; + Format(StrOutput1, sizeof(StrOutput1), "season_rotating_%i,KillHierarchy,,2.5,1", iRotatingParent); + + char StrOutput2[128]; + Format(StrOutput2, sizeof(StrOutput2), "season_particle_%i,Start,,0,1", iParticleParent); + + char StrOutput3[128]; + Format(StrOutput3, sizeof(StrOutput3), "season_rotating_%i,KillHierarchy,,59.0,1", iRotatingParent); + + char StrOutput4[128]; + Format(StrOutput4, sizeof(StrOutput4), "season_sound_hohohoho,Kill,,59.0,1"); + + char StrOutput5[128]; + Format(StrOutput5, sizeof(StrOutput5), "season_rotating_%i,KillHierarchy,,0,1", iRotatingParent); + + char StrOutput6[128]; + Format(StrOutput6, sizeof(StrOutput6), "season_sound_hohohoho,Kill,,0,1"); + + int Entity; + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("func_physbox_multiplayer")) == INVALID_ENT_REFERENCE) + return -1; + + // Generate unique id for the entity + char StrEntityName[64]; + Format(StrEntityName, sizeof(StrEntityName), "season_hitbox_%i", Entity); + + // Setup entity + DispatchKeyValue(Entity, "targetname", StrEntityName); + DispatchKeyValue(Entity, "model", "models/zombieden/xmas/giftbox.mdl"); + DispatchKeyValue(Entity, "modelscale", "0.8"); + DispatchKeyValue(Entity, "disableshadows", "1"); + DispatchKeyValue(Entity, "disablereceiveshadows", "1"); + DispatchKeyValue(Entity, "DisableBoneFollowers", "1"); + DispatchKeyValue(Entity, "rendermode", "10"); + DispatchKeyValue(Entity, "PerformanceMode", "1"); + DispatchKeyValue(Entity, "material", "3"); + DispatchKeyValue(Entity, "health", "200"); + DispatchKeyValue(Entity, "physdamagescale", "1.0"); + DispatchKeyValueVector(Entity, "origin", g_fPropOrigin); + DispatchKeyValue(Entity, "OnBreak", StrOutput1); + DispatchKeyValue(Entity, "OnBreak", StrOutput2); + DispatchKeyValue(Entity, "OnBreak", "season_sound_hohohoho,PlaySound,,0,1"); + DispatchKeyValue(Entity, "OnBreak", "season_sound_hohohoho,Kill,,2.4,1"); + DispatchKeyValue(Entity, "OnUser1", StrOutput3); + DispatchKeyValue(Entity, "OnUser1", StrOutput4); + DispatchKeyValue(Entity, "OnUser2", StrOutput5); + DispatchKeyValue(Entity, "OnUser2", StrOutput6); + DispatchSpawn(Entity); + ActivateEntity(Entity); + AcceptEntityInput(Entity, "FireUser1"); + HookSingleEntityOutput(Entity, "OnBreak", HookCallback, true); + return Entity; +} + +public int SpawnAmbientHohohoho() +{ + int Entity; + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("ambient_generic")) == INVALID_ENT_REFERENCE) + return -1; + + // Setup entity + DispatchKeyValue(Entity, "targetname", "season_sound_hohohoho"); + DispatchKeyValueVector(Entity, "origin", g_fPropOrigin); + DispatchKeyValue(Entity, "spawnflags", "49"); + DispatchKeyValue(Entity, "radius", "2000"); + DispatchKeyValue(Entity, "message", "unl1/season/hohohoho.wav"); + DispatchKeyValue(Entity, "volume", "10"); + DispatchKeyValue(Entity, "health", "10"); + DispatchKeyValue(Entity, "pitch", "100"); + DispatchKeyValue(Entity, "pitchstart", "100"); + DispatchSpawn(Entity); + ActivateEntity(Entity); + return Entity; +} + +public void ZR_OnClientInfected(int client, int attacker, bool motherInfect, bool respawnOverride, bool respawn) +{ + if (GetConVarBool(g_hCVar_InfectionEffectEnabled) && ((CheckMYSQL(client) >= GetConVarInt(g_hCVar_MilestoneInfection)) || CheckMYSQL(attacker) >= GetConVarInt(g_hCVar_MilestoneInfection))) + { + float fInfectionOrigin[3]; + GetClientAbsOrigin(client, fInfectionOrigin); + + int EntityProp; + EntityProp = CreateEntityByName("prop_dynamic_override"); + DispatchKeyValue(EntityProp, "targetname", "season_infection_prop"); + + int iRandomSkin = GetRandomInt(0, 4); + if (iRandomSkin == 0) + { + DispatchKeyValue(EntityProp, "model", "models/models_kit/xmas/xmastree_mini.mdl"); + DispatchKeyValue(EntityProp, "modelscale", "0.35"); + DispatchKeyValue(EntityProp, "angles", "0 0 0"); + } + else if (iRandomSkin == 1) + { + DispatchKeyValue(EntityProp, "model", "models/weapons/w_revenge_xmas_candy.mdl"); + DispatchKeyValue(EntityProp, "modelscale", "1.2"); + DispatchKeyValue(EntityProp, "angles", "-27 0 0"); + } + else if (iRandomSkin == 2) + { + DispatchKeyValue(EntityProp, "model", "models/johny-srka/snowman.mdl"); + DispatchKeyValue(EntityProp, "modelscale", "0.45"); + DispatchKeyValue(EntityProp, "angles", "0 0 0"); + } + else if (iRandomSkin == 3) + { + DispatchKeyValue(EntityProp, "model", "models/weapons/w_santa_hat_thrown.mdl"); + DispatchKeyValue(EntityProp, "modelscale", "2.7"); + DispatchKeyValue(EntityProp, "angles", "0 0 -90"); + fInfectionOrigin[2] += 7; + } + else if (iRandomSkin == 4) + { + DispatchKeyValue(EntityProp, "model", "models/models_kit/xmas/xmas_teddybear.mdl"); + DispatchKeyValue(EntityProp, "modelscale", "0.7"); + } + + DispatchKeyValue(EntityProp, "disableshadows", "1"); + DispatchKeyValue(EntityProp, "disablereceiveshadows", "1"); + DispatchKeyValue(EntityProp, "DisableBoneFollowers", "1"); + DispatchKeyValueVector(EntityProp, "origin", fInfectionOrigin); + DispatchSpawn(EntityProp); + ActivateEntity(EntityProp); + + int EntityRotating; + EntityRotating = CreateEntityByName("func_rotating"); + DispatchKeyValue(EntityRotating, "targetname", "season_infection_rotating"); + DispatchKeyValue(EntityRotating, "maxspeed", "13"); + DispatchKeyValue(EntityRotating, "spawnflags", "65"); + DispatchKeyValueVector(EntityRotating, "origin", fInfectionOrigin); + DispatchKeyValue(EntityRotating, "OnUser1", "!self,KillHierarchy,,45,1"); + DispatchKeyValue(EntityRotating, "OnUser2", "!self,KillHierarchy,,0,1"); + DispatchSpawn(EntityRotating); + ActivateEntity(EntityRotating); + + SetEntityModel(EntityRotating, "models/models_kit/xmas/xmastree_mini.mdl"); + float fMinbounds[3] = {-1.00, -1.00, -1.00}; + float fMaxbounds[3] = {1.00, 1.00, 1.00}; + SetEntPropVector(EntityRotating, Prop_Send, "m_vecMins", fMinbounds); + SetEntPropVector(EntityRotating, Prop_Send, "m_vecMaxs", fMaxbounds); + SetEntProp(EntityRotating, Prop_Send, "m_nSolidType", 2); + int enteffects = GetEntProp(EntityRotating, Prop_Send, "m_fEffects"); + enteffects |= 32; + SetEntProp(EntityRotating, Prop_Send, "m_fEffects", enteffects); + + SetVariantString("!activator"); + AcceptEntityInput(EntityProp, "SetParent", EntityRotating); + AcceptEntityInput(EntityRotating, "FireUser1"); + + int iEntityLimit = GetConVarInt(g_hCVar_EntityLimit); + if ((EntityRotating > iEntityLimit) || (EntityProp > iEntityLimit)) + { + AcceptEntityInput(EntityRotating, "FireUser2"); + CPrintToChatAll("{green}[Unloze XMAS] {white}Infection Effect removed due to {red}critical amount of entities{white}!"); + } + } +} + +public void OnEntityCreated(int entity, const char[] classname) +{ + if (StrContains(classname, "_projectile", false) != -1) + SDKHook(entity, SDKHook_SpawnPost, ProjectileSpawned); + +} + +public void ProjectileSpawned(int Entity) +{ + int iOwner = GetEntPropEnt(Entity, Prop_Data, "m_hOwnerEntity"); + if(0 < iOwner <= MaxClients && IsClientInGame(iOwner)) + { + if (CheckMYSQL(iOwner) >= GetConVarInt(g_hCVar_MilestoneGrenade)) + { + int iRandomSkin = GetRandomInt(0, 3); + if (iRandomSkin == 0) + { + SetEntityModel(Entity, "models/weapons/w_snowball_thrown.mdl"); + SetVariantString("modelscale 3.0"); + AcceptEntityInput(Entity, "AddOutput"); + } + else if (iRandomSkin == 1) + { + SetEntityModel(Entity, "models/zombieden/xmas/giftbox.mdl"); + SetVariantString("modelscale 0.6"); + AcceptEntityInput(Entity, "AddOutput"); + iRandomSkin = GetRandomInt(0, 1); + if (iRandomSkin == 0) + { + SetVariantString("0"); + } + else if (iRandomSkin == 1) + { + SetVariantString("1"); + } + AcceptEntityInput(Entity, "Skin"); + } + else if (iRandomSkin == 2) + { + SetEntityModel(Entity, "models/weapons/w_ornament_thrown.mdl"); + SetVariantString("modelscale 2.0"); + AcceptEntityInput(Entity, "AddOutput"); + } + else if (iRandomSkin == 3) + { + SetEntityModel(Entity, "models/weapons/w_santa_hat_thrown.mdl"); + SetVariantString("modelscale 2.3"); + AcceptEntityInput(Entity, "AddOutput"); + } + } + } +} + +int IsValidClient(int client, bool nobots = true) +{ + if (client <= 0 || client > MaxClients || !IsClientConnected(client) || (nobots && IsFakeClient(client))) + { + return false; + } + return IsClientInGame(client); +} \ No newline at end of file