I'm trying to make a stock to return the whole team money, idk why is not currentyl working ..
Idk what methot should i add, however here's the code:
PHP Code:
#include <amxmodx>
#include <cstrike>
new iTeMoney;
public plugin_init( )
{
register_clcmd( "say /test", "test" );
}
public test( id )
{
client_print( id , print_chat , "Tero team total money: %i, your money: %i", cs_temoney_team( ) , cs_get_user_money( id ) );
}
stock cs_temoney_team( )
{
new tePlayers[32] , iteNum;
get_players( tePlayers , iteNum , "e" , "1" );
for( new i = 0 ; i < iteNum ; i++ )
{
iTeMoney += cs_get_user_money( tePlayers[ i ] );
}
return iTeMoney;
}
__________________