Lotto system
#3

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!");
    }
  }
}
something like that.. you will have to edit it to make it fit to your system ofc.
Reply


Messages In This Thread
Lotto system - by BGMike - 16.01.2012, 14:54
Re: Lotto system - by thimo - 16.01.2012, 14:58
Re: Lotto system - by Sascha - 16.01.2012, 14:59
Re: Lotto system - by BGMike - 17.01.2012, 11:18
Re: Lotto system - by viper_viper - 17.01.2012, 11:38
Re: Lotto system - by BGMike - 17.01.2012, 14:19
Re: Lotto system - by cs_waller - 30.01.2012, 12:32
Re: Lotto system - by Sascha - 03.02.2012, 12:28

Forum Jump:


Users browsing this thread: 1 Guest(s)