Closed Xeroner closed 8 years ago
Can you maybe explain a little more in detail or maybe make a quick sketch?
@Stuffa1991 any idea?
@Stuffa1991
The will be winner animation ? @ztizzlegaming I found 2 files, meaby will help u
The first one uses socket which is node.js
Only looked at it briefly, havent had time all week
I'll take a look at it tonight
Currently i just made edits to history.html
-Players in pot -Players deposited x$ -Players chances
You can see the changes here http://www.faagavekort.dk/history.php You can take the changes directly for the source or i can make a tutorial later :)
Realy cool dude ! :) Can you Pullrequest?
My files are altered to .php and i use .htaccess to remove the .php on the website So a pull request wouldnt make sense :)
So i'm waiting for tutorial :))
//Sorting the arrays so we dont get duplicates of the same player - To get number of actual players in the pot and not a person per item
var arr = [], //to collect id values
collection = []; //collect unique object
$.each(allItems, function (index, value) {
if ($.inArray(value.itemSteamOwnerInfo.steamid, arr) == -1) { //check if id value not exits than add it
arr.push(value.itemSteamOwnerInfo.steamid);//push id value in arr
collection.push(value); //put object in collection to access it's all values
}
});
//Calculating persons in the pot
for (var i2 = 0; i2 < collection.length; i2++) {
var item = collection[i2];
var itemOwner = item['itemSteamOwnerInfo'];
var itemOwnerInfo = itemOwner['personaname'];
var itemOwnerAvatar = itemOwner['avatarfull'];
var itemOwnerId = itemOwner['steamid'];
var itemPlayerPrice = 0;
//Calculating each persons total price
for (var i3 = 0; i3 < allItems.length; i3++){
var itemPriceTotal = allItems[i3];
var itemOwner = itemPriceTotal['itemSteamOwnerInfo'];
var itemPriceTotalOwner = itemOwner['steamid'];
if(itemOwnerId == itemPriceTotalOwner){
itemPlayerPrice += parseFloat(itemPriceTotal['itemPrice']);
}
}
//Getting players chance
var itemOwnerChance = (itemPlayerPrice / potPrice * 100).toFixed(2);
str += '<img title="' + itemOwnerInfo + ' - ' + getFormattedPrice(itemPlayerPrice) + ' - ' + itemOwnerChance + '%" src="' + itemOwnerAvatar + '" width="60px" height="60px" class="img-rounded showTooltip">';
}
This is the function that calculates Total players in the pot Price put in by player - itemPlayerPrice Chance of winning - itemOwnerChance
Now do it with it what you want :) and make it your own
Iv'e made it :)) Closed.
i need to do canvas animation with images inside and centered border line on skinsprojekt.pl . It need to be infinited spining horizontaly. Any ideas how to do it ?