[Pomoc] Respekti


Započeo Sαѕυкє, Jul 22, 2011, 18:04:33 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim: GF Edit
Detaljan opis problema: Ovako nikako mi ne daje respekte, ima sve normalno ono respekti 0/4, i sada kada bude npr. 16:00 i treba dobit respkt pise niste igrali dovoljno dugo, a bas sam jednom probao i bio citav sat na serveru i opet isto, a kada idem setstat sve je normalno
Dio skripte: //
Neke slike/video za lakse dobivanje pomoci(neobavezno): //

pa daj public payday..
Vratio sam se ponovo ocekjute novi server...

Kod: c
public PayDay()
{
	new string[128];
	new account,interest;
	new rent = 0;
	for(new i = 0; i < MAX_PLAYERS; i++)
	{
		if(IsPlayerConnected(i))
		{
		    if(PlayerInfo[i][pLevel] > 0)
		    {
				new playername2[MAX_PLAYER_NAME];
				GetPlayerName(i, playername2, sizeof(playername2));
				account = PlayerInfo[i][pAccount];
				new key = PlayerInfo[i][pPhousekey];
				if(key != 255)
				{
					rent = HouseInfo[key][hRent];
					if(strcmp(playername2, HouseInfo[key][hOwner], true) == 0)
					{
						rent = 0;
					}
					else if(rent > GetPlayerMoney(i))
					{
						PlayerInfo[i][pPhousekey] = 255;
						SendClientMessage(i, COLOR_WHITE, "Iseljeni ste iz kuce.");
						rent = 0;
					}
					HouseInfo[key][hTakings] = HouseInfo[key][hTakings]+rent;
				}
				new tmpintrate;
				if (key != 255 && strcmp(playername2, HouseInfo[key][hOwner], true) == 0)
				{
				    if(PlayerInfo[i][pDonateRank] > 0) { tmpintrate = intrate+4; }
					else { tmpintrate = intrate+2; }//HouseInfo[key][hLevel]
				}
				else
				{
				    if(PlayerInfo[i][pDonateRank] > 0) { tmpintrate = 3; }
					else { tmpintrate = 1; }
				}
				if(PlayerInfo[i][pPayDay] >= 5)
				{
				    Tax += TaxValue;//Should work for every player online
				    PlayerInfo[i][pAccount] -= TaxValue;
					new checks = PlayerInfo[i][pPayCheck] / 5;
					if(PlayerInfo[i][pDonateRank] > 0)
					{
					    new bonus = PlayerInfo[i][pPayCheck] / 10;
					    checks += bonus;
					}
				    new ebill = (PlayerInfo[i][pAccount]/10000)*(PlayerInfo[i][pLevel]);
				    //ConsumingMoney[i] = 1;
				    //GivePlayerMoney(i, checks);
				    account += checks;
				    if(PlayerInfo[i][pAccount] > 0)
				    {
				    	PlayerInfo[i][pAccount] -= ebill;
				    	SBizzInfo[4][sbTill] += ebill;
					}
					else
					{
					    ebill = 0;
					}
					interest = (PlayerInfo[i][pAccount]/1000)*(tmpintrate);
					PlayerInfo[i][pExp]++;
					PlayerPlayMusic(i);
					PlayerInfo[i][pAccount] = account+interest;
                    new playerid;
				    format(string,sizeof(string),"~y~Los Santos Banka:~n~~n~~w~ Iznos plate:~y~ %d~g~$~n~~w~ Racuni/Takse: ~r~-%d~g~$~n~~w~ Racun za struju: ~r~-%d~g~$~n~~w~ Racun renta: ~r~-%d~g~$~n~~y~Novi racun: ~g~$%d~n~~y~Stisni ~w~ENTER~y~ ukoliko zelis zatvoriti ovaj prozor",checks, TaxValue, ebill, rent,PlayerInfo[i][pAccount]);
				    TextDrawSetString(ag, string);
				    TextDrawShowForPlayer(playerid, ag);
				    TextDrawShowForPlayer(playerid, paytextdraw);
					format(string, sizeof(string), "~y~PayDay~n~~w~Placa");
					GameTextForPlayer(i, string, 5000, 1);
					rent = 0;
					PlayerInfo[i][pPayDay] = 0;
					PlayerInfo[i][pPayCheck] = 0;
					PlayerInfo[i][pConnectTime] += 1;
					if(PlayerInfo[i][pDonateRank] > 0)
					{
					    PlayerInfo[i][pPayDayHad] += 1;
					    if(PlayerInfo[i][pPayDayHad] >= 5)
					    {
					        PlayerInfo[i][pExp]++;
					        PlayerInfo[i][pPayDayHad] = 0;
					    }
					}
				}
				else
				{
				    SendClientMessage(i, COLOR_LIGHTRED, "* Niste igrali dovoljno dugo da bi dobili payday.");
				}
			}
		}
	}
	Checkprop();
	return 1;
}