[Pomoc] Plata

Započeo Blaeks
22. Feb. 2012. Zaključano
688
pregleda
7
postova
Blaeks_Biofor
5
Forum Don
22. Feb. 2012.
Skripta koju koristim: Gta rp
Detaljan opis problema : PayDay... ne primam platu na svakih sat odnosno ne primam je uopste, inace gledao sam ali ne kapiram
Dio skripte:
public PayDay()
{
new string;
new account,interest;
new rent = 0;
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
    if(PlayerInfo > 0)
    {
    if(MoneyMessage==1)
{
    SendClientMessage(i, COLOR_LIGHTRED, "Nisi uspio platiti dugove, pritvoreno vrijeme.");
    GameTextForPlayer(i, "~r~Uhapsen!", 2000, 1);
    SetPlayerInterior(i, 6);
    PlayerInfo = 6;
  SetPlayerPos(i, 264.6288,77.5742,1001.0391);
            PlayerInfo = 1;
            SafeResetPlayerWeapons(i);
            SafeResetPlayerMoney(i);
WantedPoints = 0;
PlayerInfo = 240;
format(string, sizeof(string), "Zatvoren si %d sekundi.  Kaucija: zabranjena", PlayerInfo);
SendClientMessage(i, COLOR_WHITE, string);
}
new playername2;
GetPlayerName(i, playername2, sizeof(playername2));
account = PlayerInfo;
new key = PlayerInfo;
if(key != 255)
{
rent = HouseInfo;
if(strcmp(playername2, HouseInfo, true) == 0)
{
rent = 0;
}
else if(rent > GetPlayerMoney(i))
{
PlayerInfo = 255;
SendClientMessage(i, COLOR_WHITE, "You have been evicted.");
rent = 0;
}
HouseInfo = HouseInfo+rent;
}
new tmpintrate;
if (key != 255 && strcmp(playername2, HouseInfo, true) == 0)
{
    if(PlayerInfo > 0) { tmpintrate = intrate+4; }
else { tmpintrate = intrate+2; }
}
else
{
    if(PlayerInfo > 0) { tmpintrate = 3; }
else { tmpintrate = 1; }
}
if(PlayerInfo >= 5)
{
    Tax += TaxValue;
    PlayerInfo -= TaxValue;
new checks = PlayerInfo / 5;
if(PlayerInfo > 0)
{
    new bonus = PlayerInfo / 10;
    checks += bonus;
}
new vbill = (PlayerInfo/10000)*(PlayerInfo);
    account += checks;
    if(PlayerInfo > 0)
    {
    PlayerInfo -= vbill;
    SBizzInfo += vbill;
}
else
{
    vbill = 0;
}
    new ebill = (PlayerInfo/10000)*(PlayerInfo);
    account += checks;
    if(PlayerInfo > 0)
    {
    PlayerInfo -= ebill;
    SBizzInfo += ebill;
}
else
{
    ebill = 0;
}
interest = (PlayerInfo/1000)*(tmpintrate);
PlayerInfo++;
PlayerPlayMusic(i);
PlayerInfo = account+interest;
SendClientMessage(i, COLOR_RED, "|___ BANKOVNI STATUS ___|");
format(string, sizeof(string), "  Plata: $%d  Tax Novac: -$%d", checks, TaxValue);
    SendClientMessage(i, COLOR_WHITE, string);
if(PlayerInfo != 255 || PlayerInfo != 255)
                    {
    format(string, sizeof(string), "  Voda: -$%d", vbill);
SendClientMessage(i, COLOR_GRAD1, string);
}
{
    format(string, sizeof(string), "  Struja: -$%d", ebill);
SendClientMessage(i, COLOR_GRAD1, string);
}
format(string, sizeof(string), "  Balance: $%d", account - checks);
SendClientMessage(i, COLOR_WHITE, string);
format(string, sizeof(string), "  Interest Rate: 0.%d percent",tmpintrate);
SendClientMessage(i, COLOR_GRAD2, string);
format(string, sizeof(string), "  Interest Gained $%d", interest);
SendClientMessage(i, COLOR_GRAD3, string);
SendClientMessage(i, COLOR_GREEN, "|--------------------------------------|");
format(string, sizeof(string), "  Novi iznos: $%d", PlayerInfo);
SendClientMessage(i, COLOR_GRAD5, string);
format(string, sizeof(string), "  Najam: -$%d", rent);
SendClientMessage(i, COLOR_GRAD5, string);
format(string, sizeof(string), "~y~Plata~n~~w~Vasa plata je legla u Banku");
GameTextForPlayer(i, string, 5000, 1);
rent = 0;
PlayerInfo = 0;
PlayerInfo = 0;
PlayerInfo += 1;
if(FarmerVar == 0)
{
FarmerPickup = 0;
}
if(DrugFarmerVar == 0)
{
DrugFarmerPickup = 0;
}
if(SmugglerWork == 0)
{
PayDaySecure = 0;
}
if(PlayerInfo > 0)
{
    PlayerInfo += 1;
    if(PlayerInfo >= 5)
    {
        PlayerInfo++;
        PlayerInfo = 0;
    }
}
}
else
{
    SendClientMessage(i, COLOR_WHITE, "* Nisi igrao dovoljno dugo da bi dobio platu.");
}
}
}
}
SaveAccounts();
Checkprop();
return 1;
}

Neke slike/video za lakse dobivanje pomoci(neobavezno):
Deleted User
Obrisan korisnik
22. Feb. 2012.
Jel imas uopste timer za PayDay?
Blaeks_Biofor
5
Forum Don
22. Feb. 2012.
Pa nisam se nesto cackao sa platama i ne znam nista o njima dali imam ili ne kazi mi gde se nalazi da proverim  😢
Deleted User
Obrisan korisnik
22. Feb. 2012.
Quote from February 22, 2012, 2:51 pm:
Pa nisam se nesto cackao sa platama i ne znam nista o njima dali imam ili ne kazi mi gde se nalazi da proverim  😢


Ne umes da nadjes timer?  😢 😢

Pogledaj pod OnGamemodeInit callback-u dal postoji timer pod imenom "PayDay" .Ukoliko nema napravi obican na 60 min.
Blaeks_Biofor
5
Forum Don
22. Feb. 2012.
Ne vidim ja nigde PayDay pod ongamemodeinit
Blaeks_Biofor
5
Forum Don
22. Feb. 2012.
Please Help me?  🙂
Deleted User
Obrisan korisnik
22. Feb. 2012.
//Pod definicije 
new paydaytimer;

// pod OnGamemodeInit
paydaytimer= SetTimer("PayDay", 60000, 1);

//pod OnGameModeExit
KillTimer(paydaytimer);

Morate biti prijavljeni da biste odgovorili na ovu temu.

Prijava

© 2026 SmartShark. All rights reserved.

Powered by Momentum|v2026.3.001 Alpha