Am pus astea direct aici ca sa nu fie nevoie de alt link altadata
Break Version:
break_info_chat_colord.sma
Code: Select all
#include <amxmodx>
#include <hamsandwich>
#include <engine>
public plugin_init()
{
register_plugin("Breakable","1.0","Raheem")
RegisterHam(Ham_TakeDamage,"func_breakable","FwdHamBreakableKilled",1)
}
public FwdHamBreakableKilled(ent, weapon, killer)
{
if(entity_get_float(ent,EV_FL_health)<0)
{
static name[ 32 ];
get_user_name( killer, name, charsmax( name ) );
print_colored(0,"!y*** !gPlayer !t%s !ghas broken Something!y ***",name)
return(HAM_IGNORED);
}
return(HAM_IGNORED);
}
/* Color Stocks */
stock print_colored( const id, const input[], any: ... )
{
new count = 1, players[32], i, player;
static msg[191];
if ( numargs() == 2 )
copy( msg, 190, input );
else
vformat( msg, 190, input, 3 );
replace_all( msg, 190, "!g", "^4" );
replace_all( msg, 190, "!y", "^1" );
replace_all( msg, 190, "!t", "^3" );
if ( id )
{
if ( !is_user_connected( id ) ) return;
players[0] = id;
} else get_players( players, count, "ch" );
for ( i = 0; i < count; i++ )
{
player = players[i];
message_begin( MSG_ONE_UNRELIABLE, get_user_msgid( "SayText" ), _, player );
write_byte( player );
write_string( msg );
message_end();
}
}
break_info_dhud.sma
Code: Select all
#include <amxmodx>
#include <hamsandwich>
#include <dhudmessage>
#include <engine>
public plugin_init()
{
register_plugin("Breakable","1.0","Raheem")
RegisterHam(Ham_TakeDamage,"func_breakable","FwdHamBreakableKilled",1)
}
public FwdHamBreakableKilled(ent, weapon, killer)
{
if(entity_get_float(ent,EV_FL_health)<0)
{
static name[ 32 ];
get_user_name( killer, name, charsmax( name ) );
set_dhudmessage( random( 255 ), random( 255 ), random( 256 ), -1.0, 0.35, 2, 6.0, 3.0, 0.1, 1.5)
show_dhudmessage( 0, "**** Player %s has broken Something ****", name )
return(HAM_IGNORED);
}
return(HAM_IGNORED);
}
Damage Version:
break_info_colord_chat.sma
Code: Select all
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>
public plugin_init()
{
register_plugin( "Breakable", "1.0", "Raheem" );
RegisterHam( Ham_TakeDamage, "func_breakable", "ham_attacked" );
}
public ham_attacked( ent, weapon, killer, dmg )
{
new health = pev( ent, pev_health );
if ( health - dmg <= 0.0 )
{
static name[32];
get_user_name( killer, name, charsmax( name ) );
print_colored( 0, "!y**** !g Player !t%s !gis Breaking Something !y****", name );
return(HAM_IGNORED);
}
return(HAM_IGNORED);
}
/* Color Stocks */
stock print_colored( const id, const input[], any: ... )
{
new count = 1, players[32], i, player;
static msg[191];
if ( numargs() == 2 )
copy( msg, 190, input );
else
vformat( msg, 190, input, 3 );
replace_all( msg, 190, "!g", "^4" );
replace_all( msg, 190, "!y", "^1" );
replace_all( msg, 190, "!t", "^3" );
if ( id )
{
if ( !is_user_connected( id ) ) return;
players[0] = id;
} else get_players( players, count, "ch" );
for ( i = 0; i < count; i++ )
{
player = players[i];
message_begin( MSG_ONE_UNRELIABLE, get_user_msgid( "SayText" ), _, player );
write_byte( player );
write_string( msg );
message_end();
}
}
break_info_dhud.sma
Code: Select all
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>
#include <dhudmessage>
public plugin_init()
{
register_plugin( "Breakable", "1.0", "Raheem" );
RegisterHam( Ham_TakeDamage, "func_breakable", "ham_attacked" );
}
public ham_attacked( ent, weapon, killer, dmg )
{
new health = pev( ent, pev_health );
if ( health - dmg <= 0.0 )
{
static name[32];
get_user_name( killer, name, charsmax( name ) );
set_dhudmessage( random( 255 ), random( 255 ), random( 256 ), -1.0, 0.35, 0, 0.0, 1.0, 0.0, 0.0 );
show_dhudmessage( 0, "**** Player %s is Breaking Something ****", name );
return(HAM_IGNORED);
}
return(HAM_IGNORED);
}