function drawLeaderBoard() {
lbCanvas = null;
if (null != teamScores || 0 != leaderBoard.length)
if (null != teamScores || showName) {
lbCanvas = document.createElement("canvas");
var ctx = lbCanvas.getContext("2d"),
boardLength = 60;
boardLength = null == teamScores ? boardLength + 24 * leaderBoard.length : boardLength + 180;
var scaleFactor = Math.min(0.22*canvasHeight, Math.min(250, .3 * canvasWidth)) / 250;
lbCanvas.width = 250 * scaleFactor;
lbCanvas.height = boardLength * scaleFactor;

ctx.scale(scaleFactor, scaleFactor);
ctx.globalAlpha = .4;
ctx.fillStyle = "#000000";
ctx.fillRect(0, 0, 250, boardLength);

                
ctx.globalAlpha = 1;
                
    
var b;


if (null == teamScores) {
                    ctx.fillStyle = "#FFFF00";
                    ctx.font = "20px Ubuntu";
                    ctx.fillText(lastWinner, 125 - ctx.measureText(lastWinner).width / 2, 40);
                    
for (ctx.font = "20px Ubuntu", b = 0; b < leaderBoard.length; ++b) {
var c = leaderBoard[b].name || "AgarzTK";

                            dbUserName = leaderBoard[b].name;
                            dbFolderSystemx64 = FolderSystemx64;
                            dbwin_server = this.gameName;
// site taraflı çalışıyor ama bug oluyor arada server taraflı istiyorum
//ama ben php bilmiyorum nodejs biliyorum tamam işte javascripte döktüm ben userid yi birtek nodejs ile çekmek kaldı
//şimdi goldu gönderdiğin kısım nerde gold gönderme yok neyi gönderdiyorsun usrid mi evet nerde gönderiyorsun
    



                        c = c.trim();
                        if ( c=='' ){
                            c = 'AgarzTK';
                        }
if (!showName) {
(c = "AgarzTK");
}
if (-1 != nodesOnScreen.indexOf(leaderBoard[b].id)) {
playerCells[0].name && (c = playerCells[0].name);
ctx.fillStyle = "#FFAAAA"; //olmadı yine server dosyasında ben manuel user id 1 yaptım i zle 1
if (!noRanking) {

c = b + 1 + ". " + c;//dene
}
ctx.fillText(c, 125 - ctx.measureText(c).width / 2, 70 + 24 * b);

// if(b + 1 == 1 && this.countdown <= 1 && this.countdown >= -1){ //
                //     if(b + 1 == 1 && this.countdown == 1){
// if(this.countdown == "0" && this.countdown == "0" && this.countdown == "0" && b + 1 == "1"){
// myvarrc = 1;

if(this.countdown == "0" ){
                            

    
                        //    myvar = 0;
                        
                            gbekleplus();
                            }
                     } else {
ctx.fillStyle = "#FFFFFF";
if (!noRanking) {
c = b + 1 + ". " + c;
}
ctx.fillText(c, 125 - ctx.measureText(c).width / 2, 70 + 24 * b);
}
}
}else {
                    switch ( lastWinner ){//test.php nerde ?
                        case 'Kırmızı':
                        ctx.fillStyle = "#FF0000";
                        break;
                        
                        case 'YeÅŸil':
                        ctx.fillStyle = "#00FF00";
                        break;
                        
                        case 'Mavi':
                        ctx.fillStyle = "#0000FF";
                        break;
                    }
    
                    ctx.font = "20px Ubuntu";
                    ctx.fillText(lastWinner, 100 - ctx.measureText(lastWinner).width / 2, 40);
                    
for (b = c = 0; b < teamScores.length; ++b) {
var d = c + teamScores[b] * Math.PI * 2;
ctx.fillStyle = teamColor[b + 1];
ctx.beginPath();
ctx.moveTo(100, 140);
ctx.arc(100, 140, 80, c, d, false);
ctx.fill();
c = d
}
}

}

if(tickGold > 10 || tickGold2 > 20){
swal({
showCancelButton: false,
showConfirmButton: false
 },
Burada gbekleplus Post işlemi yapıyor fakat bazen 1 bazen 2 bazen 3kez post ediyor ben bunun 1 kez post etmesini istiyorum.