[Pomoć] - Random davanje novaca

Započeo elemental., Septembar 30, 2012, 13:21:55 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim: Xoomer RP
Detaljan opis problema: Skriptao sam neki PayDay sistem, i napravio da daje samo 300$ na svakom paydayu. Kako sada napraviti da daje random, ali da bude više od 50$ ?
Dio skripte: Evo public PayDay:

public PayDay(playerid)
{
	for (new i; i < MAX_PLAYERS; i++)
	{
	new nxtlevel = P_Data[playerid][pScore];
 	new payday = nxtlevel*300;
			GivePlayerMoney(i,payday);
			P_Data[playerid][pExp]++;
			GameTextForPlayer(playerid,"  ~p~ PayDay",6,5000);
		if(P_Data[playerid][pKredit] > 0)
		{
		P_Data[playerid][pKredit] -= P_Data[playerid][pRata];
		}
	}
}

Vegas.

Nisam te nešto skontao baš, ali ovako..
public PayDay(playerid)
{
	for (new i; i < MAX_PLAYERS; i++)
	{
		new nxtlevel = P_Data[playerid][pScore];
	 	new payday = nxtlevel*300;
	 	new rand = random(3) * 40;
	 	GivePlayerMoney(playerid, rand);
			GivePlayerMoney(i,payday);
			P_Data[playerid][pExp]++;
			GameTextForPlayer(playerid,"  ~p~ PayDay",6,5000);
		if(P_Data[playerid][pKredit] > 0)
		{
		P_Data[playerid][pKredit] -= P_Data[playerid][pRata];
		}
	}
}