-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathze_break_info.sma
50 lines (47 loc) · 1.35 KB
/
ze_break_info.sma
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#include <amxmodx>
#include <hamsandwich>
#include <engine>
public plugin_init()
{
register_plugin("[ZE] Break Info","1.0","Multipower")
RegisterHam(Ham_TakeDamage,"func_breakable","Broken",1)
}
public Broken(ent, weapon, killer)
{
if(entity_get_float(ent,EV_FL_health)<0)
{
static name[ 32 ];
get_user_name( killer, name, charsmax( name ) );
display_message(0,"!g[ZE] !y%s !thas broken something.",name)
return(HAM_IGNORED);
}
return(HAM_IGNORED);
}
stock display_message( 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();
}
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1055\\ f0\\ fs16 \n\\ par }
*/