PHP Code:
#include < amxmodx >
new g_iFirstPlayer;
new pCvarFlags;
public plugin_init( )
{
register_plugin( "First Player Flags", "0.0.1", "Exolent" );
pCvarFlags = register_cvar( "first_player_flags", "b" );
}
public client_putinserver( iPlayer )
{
if( !g_iFirstPlayer )
{
g_iFirstPlayer = iPlayer;
set_user_flags( iPlayer, read_pcvar_flags( pCvarFlags ) );
client_print( iPlayer, print_chat, "please use .example to start" );
}
}
public client_disconnect( iPlayer )
{
if( g_iFirstPlayer == iPlayer )
{
g_iFirstPlayer = 0;
}
}
read_pcvar_flags( const pCvar )
{
new szFlags[ 27 ];
get_pcvar_string( pCvar, szFlags, charsmax( szFlags ) );
return read_flags( szFlags );
set_hudmessage(255, 0, 0, 0.0, 0.15, 0, 6.0, 12.0)
show_hudmessage(id, "Admin: ^n iPlayer")
}
I want to get the users name to display in the HUD message but im not quite sure how to pull the users name out of iPlayer.
Can anyone help me out on this?
__________________