Day of Defeat Plugins Community
This site is an archive — everything is readable and downloadable, nothing can be posted. Admin
Archive › Old Forum Threads › General › Chat › Xmas Mod
15 posts, 5 people · 5,659 views Thread Rating: ★★★★★
closedXmas Mod
Started by h0_noMan on 12-11-2008, 01:08 PM
H h0_noMan
started this thread
Posts: 80
Threads: 11
Joined: Dec 2007
12-11-2008, 01:08 PM #1

Hi all.rnrnI am actually working on a XmasMod and i am looking for some good idea to have a special Xmas Event on my server.rnrnThis what i have done :rn- Adding a christmas song when connecting to the server (Frank Sinatra - Jingle Bells)rn- Playing some snowy maps (List)rn- A Xmas Items Dropperrn- SantaHat for everyonern- Grenade Models are replaced to Snow GrenadesrnrnSome pictures :rn SantaHatrnSnow GrenadesrnXmas TreernXmas PresentsrnXmas SantarnSnow ManrnrnI am looking for some other Xmas ideas.rnrnThanks to all.

Dr.G
posted here
Posts: 776
Threads: 75
Joined: Nov 2007
12-11-2008, 02:26 PM #2

lol i was think about make presnts trees and snowmen models spawn random all over the maps. could be possible the basics is made in this i belive http://forums.alliedmods.net/showthread.php?p=467887 but other ideas i really havent thought of... maybe ill come up with some later....

Tank
posted here
Posts: 581
Threads: 59
Joined: Jan 2007
12-11-2008, 03:18 PM #3

No x-mas without snow. Don't know if it's possible but I saw a plugin on allied modders where snow was tumbling down from the sky.rnrnPerhaps instead of the throw rock plugin, throw snowballs?

Dr.G
posted here
Posts: 776
Threads: 75
Joined: Nov 2007
12-11-2008, 03:23 PM #4

Yeah! good idea... that should be easy, maybe replacing the model is enough

H h0_noMan
started this thread
Posts: 80
Threads: 11
Joined: Dec 2007
12-11-2008, 03:43 PM #5

I tried to put some snow on maps but i did not find a way to do it.nnI will try the throw rock plugin and replace the model with a snowball.nI have this snowball model : http://www.youtube.com/watch?v=iG-wZrKZigE

Dr.G
posted here
Posts: 776
Threads: 75
Joined: Nov 2007
12-11-2008, 04:17 PM #6

lol just looking at same plugin.. but that model is the whole arm and it for cs... we need to replace the texture on rockgibs.mdl but i dont have photoshop on my comp atm. but the texture is here (attached) it needs to be 160x160 px... snow effect u can get with a sprite.. check this out: http://forums.alliedmods.net/showthread.php?t=3901 it just cycles a sprite infront of the playerrnrn

public is_user_outside(id)rn{rn	new Float:origin[3]rn	entity_get_vector ( id, EV_VEC_origin, origin )rn	return (is_point_outside(origin))rn}
rnrn
public start_snow(Float:time,Float:frequency)rn{rn	if(!task_exists(117))rn{rn		set_task(frequency,"snow_handle",117,"",0,"b")rn		set_task(time,"stop_snow")rn		weather = 3;rn	}rn	return 1;rn}rnrnpublic stop_snow(id)rn{rn	remove_task(117);rn	weather = 0;rn}rnrnpublic snow_handle(id)rn{rn	for(new i=0;i < get_cvar_num("sv_snow_multiplier");i++) rn		for(new a; a < get_maxplayers(); a++) rn			if(is_user_alive(a) && is_user_outside(a) ) snow_effect(a);rn}rnrnpublic snow_effect(id)rn{ rn	new vec[3] rn	new aimvec[3] rn	new snoweffvec[3]rn	new lengthrn	new speed = random_num(50,300)rnrn	// Get their origin.rn	get_user_origin(id,vec) rnrn	// Get the origin in front of them (I think)rn	get_user_origin(id,aimvec,get_cvar_num("sv_weather_aim")) rnrn	snoweffvec[0]=aimvec[0]-vec[0] + random_num(-500,500)rn	snoweffvec[1]=aimvec[1]-vec[1] + random_num(-500,500)rn	snoweffvec[2]=aimvec[2]-vec[2] + random_num(-100,100)rnrn	length=sqrt(snoweffvec[0]*snoweffvec[0]+snoweffvec[1]*snoweffvec[1]+snoweffvec[2]*snoweffvec[2]) rnrn	snoweffvec[0]=snoweffvec[0]*speed/length rn	snoweffvec[1]=snoweffvec[1]*speed/length rn	snoweffvec[2]=snoweffvec[2]*speed/length rnrn	message_begin( MSG_ONE,SVC_TEMPENTITY,{0,0,0},id) rn	write_byte( 17 ) // additive sprite, plays 1 cyclern	write_coord(snoweffvec[0]+vec[0]) rn	write_coord(snoweffvec[1]+vec[1]) rn	write_coord(snoweffvec[2]+vec[2])rn	write_short( snow ) rn	write_byte( 14 ) // byte (scale in 0.1's)  rn	write_byte( 255 ) //  byte (brightness) rn	message_end()rnrn	return PLUGIN_HANDLEDrn}
rnrnBTW how give ppl the hat? :D I was thinkin about making a small script that tells this plugin to do it http://forums.alliedmods.net/showthread.php?p=507822rnrndamn cant attach the texture here.. ill get it up in a min.

Dr.G
posted here
Posts: 776
Threads: 75
Joined: Nov 2007
12-11-2008, 04:21 PM #7

This is the texture from the CS model...rnrn

H h0_noMan
started this thread
Posts: 80
Threads: 11
Joined: Dec 2007
12-11-2008, 04:33 PM #8

This is the party i take to attach the hat to the player.nnDon't forget to precache the modelnn

n#define XMAS_HAT_MODEL "models/xmas_mod/xmas_hat.mdl"nnew g_HatEnt[33];nnpublic giveHat(player)n{n	// Get PlayerNamen	new playerName[32];n	get_user_name(player, playerName, 31);n	n	if(g_HatEnt[player] < 1)n	{n		g_HatEnt[player] = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, "info_target"));nn		if(g_HatEnt[player] > 0) n		{n			set_pev(g_HatEnt[player], pev_movetype, MOVETYPE_FOLLOW);n			set_pev(g_HatEnt[player], pev_aiment, player);n			set_pev(g_HatEnt[player], pev_rendermode, kRenderNormal);n			set_pev(g_HatEnt[player], pev_renderamt, 0.0);n			engfunc(EngFunc_SetModel, g_HatEnt[player], XMAS_HAT_MODEL);n		}nn	}else{n		engfunc(EngFunc_SetModel, g_HatEnt[player], XMAS_HAT_MODEL);n	}n}nnpublic client_connect(id)n{n	if(g_HatEnt[id] > 0)n		engfunc(EngFunc_RemoveEntity,g_HatEnt[id]);n		n	g_HatEnt[id] = 0;n}nnpublic client_disconnect(id)n{n	if(g_HatEnt[id] > 0)n		engfunc(EngFunc_RemoveEntity,g_HatEnt[id]);n		n	g_HatEnt[id] = 0;n}nnpublic client_putinserver(id)n	giveHat(id);n
nnnEdit : This is the texture i used to make my snow grenades model.nI am working on a snowball model for Dod.

Dr.G
posted here
Posts: 776
Threads: 75
Joined: Nov 2007
12-11-2008, 06:10 PM #9

Cool thanks again :)rnrnwith jeds half life model viewer iam pretty sure u can just replace the texture, it just needs to be same size as the one u replace

H h0_noMan
started this thread
Posts: 80
Threads: 11
Joined: Dec 2007
12-11-2008, 06:34 PM #10

I have windows vista and i tested all half life model and no one works.nnI am trying to get 3DS Max to see the SMD files.

Dr.G
posted here
Posts: 776
Threads: 75
Joined: Nov 2007
12-11-2008, 07:06 PM #11

milkshape3D might be better, 3dsmax is a heavy one....rnrn*edit*rnrncheck out this thread https://www.dodplugins.net/forums/showthread.php?t=1369

H h0_noMan
started this thread
Posts: 80
Threads: 11
Joined: Dec 2007
12-11-2008, 07:39 PM #12

Milkshape3D doesn't work too.nnI want to make a SnowBall Fight Mod to Dod and i have to edit the CS Model to adapt and create a SnowFight Map too.

Tank
posted here
Posts: 581
Threads: 59
Joined: Jan 2007
12-11-2008, 08:54 PM #13

This was the plugin I was referring to. In all honesty, haven't looked a second at this plugin as I already have 8 plugins waiting for a fix so I can start using them.rnrnHowever, perhaps you can do something with it. I also want to place my compliments to all of you, but especially to h0_noMan, you are a fine addition to this community and I really love this idea.rnrnOh, almost forgot, here's the link: http://forums.alliedmods.net/showthread.php?t=80382&highlight=snow

=|[76AD]|= TatsuSaisei
posted here
Posts: 794
Threads: 54
Joined: May 2005
12-21-2008, 01:28 AM #14

Be sure to come check out my server this month....n n208.100.45.56:27015n nI have been decorating for the past 2 years now ... n nMerry Christmas !!n nHappy Holidays !!

diamond-optic
posted here
Posts: 2,068
Threads: 103
Joined: May 2005
12-21-2008, 01:31 AM #15

meet me under the mistletoe!

Archive › Old Forum Threads › General › Chat › Xmas Mod
DoD Plugins Archive · Repository · Old Forum Threads · Maps · Admin · built 14 Sep 2026 00:34 UTC