houses.
#1

Hi, I have the system modified Sandra properties ladmin my system, the problem is that to buy a property takes money from everyone, and when it is given at home five minutes, gives all, meaning that when buying a home purchased for all players not able to get Right eh Any solution? ..
Reply
#2

You must have used foreach or something like this
PHP код:
for(new 0MAX_PLAYERSi++) 
That will take money from all the players.
Show me the part of code that takes money from the player i can't tell..
Reply
#3

it is this feature?...
Код:
forward PropertyPayout();
public PropertyPayout()
{
for(new i; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerProps[i] > 0)
{
GivePlayerMoney(i, EarningsForPlayer[i]);
			}
		}
	}
}
just as I said, is that when buying a buy for all ..
Here's the system admin who has: http://www.solidfiles.com/d/1fd0dcd1ea/
Reply
#4

This put it up at all:
Код:
forward PropertyPayout();
This put it in OnGamemodeInit:
Код:
SetTimer("PropertyPayout", 60000, 1);
This put it down at all:
Код:
public PropertyPayout()
{
new str[64];
for(new i; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerProps[i] > 0)
{
GivePlayerMoney(i, EarningsForPlayer[i]);
format(str, 64, "You won $%d of its properties!", EarningsForPlayer[i]);
SendClientMessage(i, 0xFFFF00AA, str);
}
}
}
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)