Raised This Month: $ Target: $400
 0% 

Christmas!


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
superang
Senior Member
Join Date: Apr 2009
Location: Portugal
Old 11-18-2009 , 10:47   Christmas!
Reply With Quote #1

Hey everyone.
Can someone do a plug-in that in the server snows, and all guys when they connect have a Christmas hat?

Hat Attached.
Attached Files
File Type: zip santahat2.zip (12.1 KB, 3030 views)
__________________
superang is offline
Send a message via MSN to superang
soolt
BANNED
Join Date: Aug 2009
Location: Lithuania
Old 11-18-2009 , 12:59   Re: Christmas!
Reply With Quote #2

I need too but that christmas hat will be invisible with human class on wc3ft mod.
soolt is offline
Send a message via Skype™ to soolt
T-z3P
Senior Member
Join Date: Apr 2008
Location: Iasi, Romania
Old 11-19-2009 , 06:59   Re: Christmas!
Reply With Quote #3

Take a look on this :
Code:
http://forums.alliedmods.net/showthread.php?t=81172
and
Code:
http://forums.alliedmods.net/showthread.php?t=80382
__________________


T-z3P is offline
Send a message via Yahoo to T-z3P Send a message via Skype™ to T-z3P
superang
Senior Member
Join Date: Apr 2009
Location: Portugal
Old 11-19-2009 , 14:04   Re: Christmas!
Reply With Quote #4

Yeah its like a fusion from both plugins.
Plugin winter has unnecessary bomb sounds, and xpaw plugin is just prefect but i dont wanna use both plugins.
__________________
superang is offline
Send a message via MSN to superang
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 11-19-2009 , 15:14   Re: Christmas!
Reply With Quote #5

Have fun.

Code:
#include < amxmodx > #include < engine > #include < cstrike > #include < hamsandwich > new const g_szHatModel[ CsTeams ][ ] = {     "",     "models/santahat.mdl",     "models/santahat_blue.mdl",     "" }; new g_iHats[ 33 ]; public plugin_init( ) {     register_plugin( "Santa Hat + Snow", "1.3", "xPaw" );         register_cvar( "santa_hat", "1.3", FCVAR_SERVER );         register_event( "TeamInfo", "EventTeamInfo", "a" );         RegisterHam( Ham_Spawn, "player", "FwdHamPlayerSpawn", 1 ); } public plugin_precache( ) { //  create_entity( "env_snow" );         precache_model( g_szHatModel[ CS_TEAM_T ] );     precache_model( g_szHatModel[ CS_TEAM_CT ] ); } public client_disconnect( id )     if( is_valid_ent( g_iHats[ id ] ) )         remove_entity( g_iHats[ id ] ); public FwdHamPlayerSpawn( const id ) {     if( is_user_alive( id ) ) {         new iEntity = g_iHats[ id ];                 if( !is_valid_ent( iEntity ) ) {             if( !( iEntity = g_iHats[ id ] = create_entity( "info_target" ) ) )                 return;                         new CsTeams:iTeam = cs_get_user_team( id );                         if( iTeam != CS_TEAM_T && iTeam != CS_TEAM_CT )                 iTeam = CS_TEAM_T;                         entity_set_model( iEntity, g_szHatModel[ iTeam ] );             entity_set_int( iEntity, EV_INT_movetype, MOVETYPE_FOLLOW );             entity_set_edict( iEntity, EV_ENT_aiment, id );         }     } } public EventTeamInfo( ) {     new id = read_data( 1 ), iEntity = g_iHats[ id ];         if( !is_valid_ent( iEntity ) ) {         if( iEntity > 0 )             g_iHats[ id ] = 0;                 return;     }         new szTeam[ 2 ];     read_data( 2, szTeam, 1 );         if( szTeam[ 0 ] == 'C' )         entity_set_model( iEntity, g_szHatModel[ CS_TEAM_CT ] );     else         entity_set_model( iEntity, g_szHatModel[ CS_TEAM_T ] ); }
Attached Files
File Type: zip SantaHatModels.zip (24.4 KB, 8577 views)
__________________

Last edited by xPaw; 12-16-2009 at 09:18.
xPaw is offline
miNimaLisim0
New Member
Join Date: Dec 2010
Old 12-25-2010 , 04:34   Re: Christmas!
Reply With Quote #6

Quote:
Originally Posted by xPaw View Post
Have fun.

Code:
#include < amxmodx > #include < engine > #include < cstrike > #include < hamsandwich > new const g_szHatModel[ CsTeams ][ ] = { &nbsp;&nbsp;&nbsp;&nbsp;"",
&nbsp;&nbsp;&nbsp;&nbsp;"models/santahat.mdl",
&nbsp;&nbsp;&nbsp;&nbsp;"models/santahat_blue.mdl",
&nbsp;&nbsp;&nbsp;&nbsp;"" };

new g_iHats[ 33 ];

public plugin_init( ) { &nbsp;&nbsp;&nbsp;&nbsp;register_plugin( "Santa Hat + Snow", "1.3", "xPaw" );
&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;register_cvar( "santa_hat", "1.3", FCVAR_SERVER );
&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;register_event( "TeamInfo", "EventTeamInfo", "a" );
&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;RegisterHam( Ham_Spawn, "player", "FwdHamPlayerSpawn", 1 );
} public plugin_precache( ) { //&nbsp;&nbsp;&nbsp;&nbsp;create_entity( "env_snow" ); &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;precache_model( g_szHatModel[ CS_TEAM_T ] );
&nbsp;&nbsp;&nbsp;&nbsp;precache_model( g_szHatModel[ CS_TEAM_CT ] );
} public client_disconnect( id ) &nbsp;&nbsp;&nbsp;&nbsp;if( is_valid_ent( g_iHats[ id ] ) ) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb sp;remove_entity( g_iHats[ id ] );

public FwdHamPlayerSpawn( const id ) { &nbsp;&nbsp;&nbsp;&nbsp;if( is_user_alive( id ) ) { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb sp;new iEntity = g_iHats[ id ];
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb sp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb sp;if( !is_valid_ent( iEntity ) ) { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb sp;&nbsp;&nbsp;&nbsp;&nbsp;if( !( iEntity = g_iHats[ id ] = create_entity( "info_target" ) ) ) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;return; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb sp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb sp;&nbsp;&nbsp;&nbsp;&nbsp;new CsTeams:iTeam = cs_get_user_team( id );
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb sp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb sp;&nbsp;&nbsp;&nbsp;&nbsp;if( iTeam != CS_TEAM_T && iTeam != CS_TEAM_CT ) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;iTeam = CS_TEAM_T; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb sp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb sp;&nbsp;&nbsp;&nbsp;&nbsp;entity_set_model( iEntity, g_szHatModel[ iTeam ] );
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb sp;&nbsp;&nbsp;&nbsp;&nbsp;entity_set_int( iEntity, EV_INT_movetype, MOVETYPE_FOLLOW );
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb sp;&nbsp;&nbsp;&nbsp;&nbsp;entity_set_edict( iEntity, EV_ENT_aiment, id );
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb sp;} &nbsp;&nbsp;&nbsp;&nbsp;} } public EventTeamInfo( ) { &nbsp;&nbsp;&nbsp;&nbsp;new id = read_data( 1 ), iEntity = g_iHats[ id ];
&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;if( !is_valid_ent( iEntity ) ) { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb sp;if( iEntity > 0 ) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb sp;&nbsp;&nbsp;&nbsp;&nbsp;g_iHats[ id ] = 0;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb sp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb sp;return;
&nbsp;&nbsp;&nbsp;&nbsp;} &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;new szTeam[ 2 ];
&nbsp;&nbsp;&nbsp;&nbsp;read_data( 2, szTeam, 1 );
&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;if( szTeam[ 0 ] == 'C' ) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb sp;entity_set_model( iEntity, g_szHatModel[ CS_TEAM_CT ] );
&nbsp;&nbsp;&nbsp;&nbsp;else
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb sp;entity_set_model( iEntity, g_szHatModel[ CS_TEAM_T ] );
}

you can put this into file .sma ? I dont know to copy this :-s
miNimaLisim0 is offline
unforcer
Senior Member
Join Date: Feb 2009
Old 12-25-2010 , 05:27   Re: Christmas!
Reply With Quote #7

lol, is it correct this one ?
unforcer is offline
T-z3P
Senior Member
Join Date: Apr 2008
Location: Iasi, Romania
Old 11-19-2009 , 15:57   Re: Christmas!
Reply With Quote #8

It's working xPaw . Can you make this plugin to enforce "cl_weather 3" on players on connect ?
And another thing : when using semi clip , the santa hat is solid (not transparent like the rest of the skin) . Can you solve this ?

__________________



Last edited by T-z3P; 11-19-2009 at 16:48.
T-z3P is offline
Send a message via Yahoo to T-z3P Send a message via Skype™ to T-z3P
superang
Senior Member
Join Date: Apr 2009
Location: Portugal
Old 11-19-2009 , 16:57   Re: Christmas!
Reply With Quote #9

Thank you xPaw
__________________
superang is offline
Send a message via MSN to superang
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 11-19-2009 , 17:17   Re: Christmas!
Reply With Quote #10

Quote:
Originally Posted by T-z3P View Post
It's working xPaw . Can you make this plugin to enforce "cl_weather 3" on players on connect ?
Slow hacking (:
Quote:
Originally Posted by T-z3P View Post
And another thing : when using semi clip , the santa hat is solid (not transparent like the rest of the skin) . Can you solve this ?
Umm... i don't want to hook massive forwards like prethink, so.. if no one going to give me better solution, no.
__________________
xPaw is offline
Reply



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 15:19.


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