Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- totalPlayers = 0;
- totalCapacity = 0;
- $( '.server-info > .server-info-right > .server-info-players' ).each( function ( index, element ) {
- splitCounts = element.innerHTML.split( '/' );
- totalPlayers += parseInt( splitCounts[0] );
- totalCapacity += parseInt( splitCounts[1] );
- } );
- console.log( 'Total players: ' + totalPlayers );
- console.log( 'Total capacity: ' + totalCapacity );
Advertisement
Add Comment
Please, Sign In to add comment