[Pomoc] Respekti i placa!

Započeo ѕєуzιι¢н™.amx, Avgust 07, 2011, 16:16:26 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 i placu, 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: public PayDay: 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;
}

Neke slike/video za lakse dobivanje pomoci(neobavezno): //
Poslednja Izmena: Avgust 07, 2011, 18:17:57 POSLE PODNE od SeYziicH
Izrada web aplikacija/desktop aplikacija, kontakt PM.
VPS/Dedi managment 'n' hosting @pm also.

Proveri na koliko minuta ti se povećava vrednost promenjive pPayDay, i onda na osnovu toga izmeni sledeći uslov:
if(PlayerInfo[i][pPayDay] >= 5)

a gdje da to promjenim nisam bas razumio :S
Izrada web aplikacija/desktop aplikacija, kontakt PM.
VPS/Dedi managment 'n' hosting @pm also.

pa da kucas ctrl + f i onda nades omg
Uskoro novi stunt server iStunt. DoÄ'ite i zabavite se!




   
   




Dizajniram za $$$
Popis stvari koje radim:

Wallpaper √  Signature ×  Logo √  Dizajn stranice (Ne kodiranje) √  Baner √  Avatar √  Animacija √  Intro √

Kolko sam shvatio ovo treba :S?
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;
}
Izrada web aplikacija/desktop aplikacija, kontakt PM.
VPS/Dedi managment 'n' hosting @pm also.

Da, to treba. Samo proveri na koliko minuta ti se menja pPayDay.

Ako ti se menja na svakih 15minuta, u navedenom uslovu umesto 5 napisi naprimer 2. (15x2 = 30minuta za dobijanje plate)
Ako se menja na svakih 2min, u uslovu namesto 5 napisi oko 10.  (2x10 = 20minuta za dobijanje plate)

Naravno, ovo su primeri, ako želiš da se platu igra 40minuta, stavi da se promenjiva pPayDay povećava naprimer na svaka 2minuta, i da se u uslovu nalazi:
if(PlayerInfo[pPayDay] >= 20)
Zato Å¡to 2x20=40minuta

Koji deo nije jasan? :D