Your theory is forging the server performance.
PHP Code:
new g_iBoughtTimes[ 33 ];
public plugin_init( )
register_logevent( "RoundStart", 2, "1=Round_Start" );
public client_putinserver( iPlayer )
{
g_iBoughtTimes[ iPlayer ] = 0;
}
public client_bought_what_we_want( iPlayer )
{
if( g_iBoughtTimes[ iPlayer ] > 2 )
{
client_print( iPlayer, print_chat, "This item was bought three times this round!" );
/* If you want to restore ammo packs */
zp_set_user_ammo_packs( iPlayer, zp_get_user_ammo_packs( iPlayer ) + THIS_ITEM_PRICE );
return PLUGIN_HANDLED;
}
g_iBoughtTimes[ iPlayer ] += 1;
return PLUGIN_HANDLED;
}
public RoundStart( )
{
static i;
for( i = 1; i < get_maxplayers( ) + 1; i++ )
g_iBoughtTimes[ i ] = 0;
}