I sort of messed up and gave you guys the old code :s
PHP Code:
#include < amxmodx >
#define TASK_PRINT_TEXT 135784 // random num
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;
SetUserFlags( iPlayer );
remove_task(TASK_PRINT_TEXT);
set_task(15.0, "PrintText", TASK_PRINT_TEXT);
}
}
public PrintText()
{
if( g_iFirstPlayer && is_user_connected(g_iFirstPlayer) )
{
client_print( g_iFirstPlayer, print_chat, "[Practice Mod] Please use .menu to configure the server" )
}
}
public client_infochanged( id )
{
if( id == g_iFirstPlayer )
{
SetUserFlags( id );
}
}
public client_disconnect( iPlayer )
{
if( g_iFirstPlayer == iPlayer )
{
g_iFirstPlayer = 0;
remove_task(TASK_PRINT_TEXT);
}
}
SetUserFlags( id )
{
new szFlags[ 27 ];
get_pcvar_string( pCvarFlags, szFlags, charsmax( szFlags ) );
set_user_flags( id, read_flags( szFlags ) )
}
Is there a way to get that message to show to all the people that will join the server and use the new code?
__________________