You want that when he reaches the max value it displays the max value on every kill? If so:
PHP Code:
public forward_kill( id )
{
if( bKill[ id ] == MAX_KILLS )
{
get_user_name( id, szName, charsmax( szName ) );
color_print( 0, "^3%s^1 has reached the number %d!", name, MAX_KILLS );
}
else if( bKill[ id ] < MAX_KILLS )
{
bKill[ id ]++;
}
}
If you don't want it to display
PHP Code:
public forward_kill( id )
{
if( bKill[ id ] == MAX_KILLS )
{
get_user_name( id, szName, charsmax( szName ) );
color_print( 0, "^3%s^1 has reached the number %d!", name, MAX_KILLS );
}
if( bKill[ id ] <= MAX_KILLS )
{
bKill[ id ]++;
}
}
And if you want to use
bKill[ id ] in another place having its
MAX_VALUE at
MAX_KILLS but you don't want the message to appear in every kill saying that you have the
MAX_VALUE you must use it like
PHP Code:
bKill[ id ] > MAX_KILLS ? MAX_KILLS : bKill[ id ]
because if you do
PHP Code:
bKill[ id ] = MAX_KILLS
the message will appear again in the next kill
Edit:
Nevermind the last part of what I said. Do this:
PHP Code:
public forward_kill( id )
{
if( bKill[ id ] < MAX_KILLS )
{
if( ++bKill[ id ] == MAX_KILLS )
{
get_user_name( id, szName, charsmax( szName ) );
color_print( 0, "^3%s^1 has reached the number %d!", name, MAX_KILLS );
}
}
}