public cmdDistributePointsH( id, iMenu, iItem ) { new iPoints = ( gPlayerInfo[ id ][ piClass ][ pciLevel ] * 2 ) - ( gPlayerInfo[ id ][ piClass ][ pciHealth ] + gPlayerInfo[ id ][ piClass ][ pciStrength ] + gPlayerInfo[ id ][ piClass ][ pciIntelligence ] + gPlayerInfo[ id ][ piClass ][ pciCondition ] ) ; new any:iState; switch( iItem ) { case 0..3: { iState = iItem + 3; if( gPlayerInfo[ id ][ piClass ][ iState ] + 1 > 500 ) ColorChat( id, TEAM_COLOR, "[^x04 NewCodMod^x02 ]^x01 %s", gszStateInfo[ iState - 3 ] ) else gPlayerInfo[ id ][ piClass ][ iState ] ++; } case 4..7: { iState = iItem - 1; if( gPlayerInfo[ id ][ piClass ] + 15 > iPoints ) ColorChat( id, TEAM_COLOR, "[^x04 NewCodMod^x02 ]^x01 Nie masz tylu punktow!" ); else if( gPlayerInfo[ id ][ piClass ][ iState ] + 15 > 500 ) ColorChat( id, TEAM_COLOR, "[^x04 NewCodMod^x02 ]^x01 %s", gszStateInfo[ iState - 3 ] ) else gPlayerInfo[ id ][ piClass ][ iState ] ++; } case 8..11: { iState = iItem - 5; gPlayerInfo[ id ][ piClass ][ iState ] += ( iPoints + gPlayerInfo[ id ][ piClass ][ iState ] ) > 500 ? 500 - gPlayerInfo[ id ][ piClass ][ iState ] : iPoints; if( gPlayerInfo[ id ][ piClass ][ iState ] == 500 ) ColorChat( id, TEAM_COLOR, "[^x04 NewCodMod^x02 ]^x01 %s", gszStateInfo[ iState - 3 ] ) } } cmdDistributePoints( id ); }