Advertisement
Nixsy

Untitled

Jan 24th, 2015
276
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.             var gamblerArray = [];
  2.             var countGam = 0;
  3.  
  4.             function contains(a) {
  5.                 var index = gamblerArray.indexOf('984615');
  6.  
  7.                 if (index > -1) {
  8.                     gamblerArray.splice(index, 1);
  9.                 }
  10.  
  11.                 if (gamblerArray.length >= 11) {
  12.                     gamblerArray.shift();
  13.                     if (countGam == 0) {
  14.                         countGam = 1;
  15.                         chat('/pm 98066 Gambler array populated');
  16.                     }
  17.                 }
  18.                 if (gamblerArray.indexOf(a) != -1) {
  19.                     //console.log(gamblerArray);
  20.                 } else {
  21.                     gamblerArray.push(a);
  22.                     //console.log('Added ' + a);
  23.                 }
  24.             }
  25.  
  26.             socket.on("result", function (data) {
  27.                 var bet = parseFloat(data.bet).toFixed(8);
  28.                 if (bet > 0) {
  29.                     contains(data.uid);
  30.                 }
  31.             });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement