Only admin who can see who use the button
Code: Select all
#include <zombie_escape>
#define PLUGIN "Button Info"
#define AUTHOR "SeRious_SaM"
#define VERSION "1.0"
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
RegisterHam(Ham_Use,"func_button","fwButtonUsed",1)
}
public fwButtonUsed( ent, idcaller )
{
new szName[33];
get_user_name( idcaller, szName, charsmax( szName ) );
ze_colored_print( 0, "!y****%s Pressed the button****", szName );
}
/* 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();
}
}