PHP Code:
public DeathMsg()
{
//You can read the weapon name directly from the message.
new szWeapon[ 10 ];
read_data( 4 , szWeapon , charsmax( szWeapon ) );
client_print( 0 , print_chat , "Death using %s" , szWeapon );
//Or you can read the weapon from msg and search the list of weapons until found.
for ( new i = 0 ; i < sizeof( weapons ) ; i++ )
{
if ( equal( weapons[ i ][ 7 ] , szWeapon ) )
{
client_print( 0 , print_chat , "Death using %s" , weapons[ i ] );
break;
}
}
}
__________________