Money drop?
#9

Quote:
Originally Posted by Jefff
Maybe something like this?

Код:
//Top
new bool:Set[200];
new Timer[200];

///OnGameModeInit
SetTimer("CheckCash", 2000, true);

//somewhere
forward CheckCash();
public CheckCash()
{
	for(new i=0; i < GetMaxPlayers(); i++) if(IsPlayerConnected(i) && GetPlayerMoney(i) >= 1000000)
	{
		if(!Set[i])
		{
			Set[i] = true;
			Timer[i] = SetTimerEx("GetCash", 5000, 1, "d", i);
		}
	}
	return 1;
}

forward GetCash(playerid);
public GetCash(playerid)
{
	if(!GetPlayerMoney(playerid)) // if moneys == 0, timer stop
	{
		KillTimer(Timer[playerid]);
		Timer[playerid] = 0;
		Set[playerid] = false;
		return 1;
	}
	//if(GetPlayerMoney(playerid) < 1000000) Set[playerid] = false;
	GivePlayerMoney(playerid, -10000);
	SendClientMessage(playerid, 0xFFFF00AA, "SERVER: You have dropped 10k Please deposit your money");
	return 1;
}
That only dropped money once...then after that it didnt drop it again. How do i fix this
Reply


Messages In This Thread
Money drop? - by killdahobo99 - 19.07.2009, 19:20
Re: Money drop? - by Weirdosport - 19.07.2009, 19:22
Re: Money drop? - by killdahobo99 - 19.07.2009, 19:59
Re: Money drop? - by killdahobo99 - 19.07.2009, 20:46
Re: Money drop? - by killdahobo99 - 19.07.2009, 22:15
Re: Money drop? - by Annihalation - 19.07.2009, 23:31
Re: Money drop? - by killdahobo99 - 19.07.2009, 23:40
Re: Money drop? - by Jefff - 19.07.2009, 23:50
Re: Money drop? - by killdahobo99 - 19.07.2009, 23:57
Re: Money drop? - by Jefff - 19.07.2009, 23:59

Forum Jump:


Users browsing this thread: 2 Guest(s)