Not sure what the intent is with this. Since your delay is 0.0 seconds then you should call printColorText() directly without using set_task().
Code:
public eventNewRound()
{
if (!get_cvar_num("gn_showmoney"))
return PLUGIN_CONTINUE;
new players[32];
new playercount, i;
get_players(players, playercount);
for (i=0; i<playercount; i++)
set_task(0.0,"printColorText",players[i]);
return PLUGIN_CONTINUE;
}
Here's some help with getting the player data
PHP Code:
new const m_rgpPlayerItems_CBasePlayer[6] = { 367 , 368 , ... };
public ShowInfo( id )
{
new iSlotItem , szItemList[ 128 ] , iPos , szName[ 32 ] , szWeapon[ 20 ] , CsArmorType:csaType , iWeaponBits;
get_user_name( id , szName , charsmax( szName ) );
iPos += formatex( szItemList[ iPos ] , charsmax( szItemList ) - iPos , "%s, $%d, " , szName , cs_get_user_money( id ) );
for ( new iSlot = 1 ; iSlot < 3 ; iSlot++ )
{
iSlotItem = WeaponInSlot( id , iSlot );
if ( iSlotItem > -1 )
{
get_weaponname( iSlotItem , szWeapon , charsmax( szWeapon ) );
iPos += formatex( szItemList[ iPos ] , charsmax( szItemList ) - iPos , "%s, " , szWeapon[ 7 ] );
}
}
iWeaponBits = pev( id , pev_weapons );
if ( iWeaponBits & ( 1 << CSW_HEGRENADE ) )
{
iPos += formatex( szItemList[ iPos ] , charsmax( szItemList ) - iPos , "hegrenade, " );
}
if ( ( iWeaponBits & ( 1 << CSW_FLASHBANG ) ) )
{
iPos += formatex( szItemList[ iPos ] , charsmax( szItemList ) - iPos , "flash, " );
}
if ( ( iWeaponBits & ( 1 << CSW_SMOKEGRENADE ) ) )
{
iPos += formatex( szItemList[ iPos ] , charsmax( szItemList ) - iPos , "smoke, " );
}
if ( cs_get_user_armor( id , csaType ) )
{
iPos += formatex( szItemList[ iPos ] , charsmax( szItemList ) - iPos , csaType == CS_ARMOR_KEVLAR ? "V, " : "VH, " );
}
if ( cs_get_user_defuse( id ) )
{
iPos += formatex( szItemList[ iPos ] , charsmax( szItemList ) - iPos , "D, " );
}
szItemList[ iPos - 2 ] = EOS;
client_print( id , print_chat , szItemList );
}
WeaponInSlot( id , iSlot)
{
new iEntity = get_pdata_cbase( id , m_rgpPlayerItems_CBasePlayer[ iSlot ] );
return ( iEntity > -1 ? cs_get_weapon_id( iEntity ) : -1 );
}
__________________