16.01.2012, 14:59
pawn Код:
new price = 123, Float:dif; //change to your price amount
new count = 0;
for(new i=0; i<GetMaxPlayers(); i++)
{
if(IsPlayerConnected(i) && Winner[i] == 1)
{
count++;
}
}
if(count > 0)
{
dif = price / count;
price = floatround(dif, floatround_round);
for(new i=0; i<GetMaxPlayers(); i++)
{
if(IsPlayerConnected(i) && Winner[i] == 1)
{
GivePlayerMoney(i, price);
SendClientMessage(i, 0x99999AA, "You won!");
}
}
}

