Quote:
Originally Posted by StDenisGamers
Hello.
I am looking for just a plugin that lets Admins only know via a HUD message when a player disconnects from the server. I know i can see it in the config but during gameplay its often nice not to constantly press the tab(scoreboard).
thanks in advance!
|
I'm not sure if it is possible to create a loop inside the 'client disconnected' function but try this and if it doesn't work I will use another method
PHP Code:
#include <amxmodx>
#include <amxmisc>
#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
// Add your code here...
}
public client_disconnect( id )
{
new iPlayer[ 32 ], szName[ 32 ], iNum;
get_players( iPlayer, iNum, "ch" )
get_user_name( id, szName, charsmax( szName ) )
for( new i, iAdmin; i < iNum; i++ )
{
if( is_user_admin( ( iAdmin = iPlayer[ i ] ) ) )
{
set_hudmessage( 0, 255, 0, -1.0, -1.0 )
show_hudmessage( iAdmin, "Player %s has disconnected", szName )
}
}
}
__________________