i want to dectect the team winning in roundend and give random Points by (these natives) and for all team win Alive/Dead
but my idea is 1 player is worth = 5,000 Points so 2 is 10,000 as died
Code:
native get_user_cash( Index ) // get the amount of cash a player have
native set_user_cash( Index, amount ) // set the amount of cash for a player
That message example i tried to do:
Code:
public MessageWon()
{
new iPlayers[ 32 ], iNum, Index;
get_players( iPlayers, iNum, "ch" );
for( new i = 0; i < iNum; i++ )
{
Index = iPlayers[i]
if( !is_user_connected( Index ) )
continue;
switch( get_user_team( Index ) )
{
case 1:
{
client_print(0, print_chat, "Debug: TRs Won" );
set_user_cash(Index, get_user_cash(Index) + get_pcvar_num(TeCash) );
}
case 2:
{
client_print(0, print_chat, "Debug: CT Won" );
set_user_cash(Index, get_user_cash(Index) + get_pcvar_num(CtCash) );
}
}
}
}