Pretraga

Pritisnite Enter za pretragu ili Escape za zatvaranje

Zaključano

[Pomoc] Dupli Respekt

Započeo Andrijan
pre 11 godina
309
pregleda
9
postova
Ova tema je zaključana. Samo moderatori i administratori mogu odgovarati.
Andrijan
Shot Caller
pre 11 godina
Skripta koju koristim:FB
Detaljan opis problema: Pokusao sam na mng nacina i ne znam kako da napravim da vikendom dobijaju igraci duple respekte kad bude plata,bez komande da ja palim i gasim to mi ne treba znaci svakog videnda da dobijaju duple respekte i da pise Vikend je dobili ste dupli respekt.
Dio skripte:
public PayDay()
{
new string;
new Nalog,interest;
new rent = 0;
foreach(Player, i)
{
if(IsPlayerConnected(i) && !IsPlayerNPC(i))
{
    if(PlayerInfo > 0)
    {
    if(MoneyMessage == 1)
{
    new bank = PlayerInfo;
    SCM(i, COLOR_LIGHTRED, "Niste isplatili vase dugove, idete u zatvor.");
    GameTextForPlayer(i, "~r~Uhapseni ste!", 2000, 1);
    SafeSetPlayerInterior(i, 6);
  new rand = random(sizeof(gPrisonSpawn));
SafeSetPlayerPos(i, gPrisonSpawn, gPrisonSpawn, gPrisonSpawn);
SetPlayerWorldBounds(i, 266.9, 262.1, 89.2, 74.7);
            PlayerInfo = 1;
            SafeResetPlayerWeapons(i);
            SafeResetPlayerMoney(i);
SafeGivePlayerMoney(i, 1);
WantedPoints = 0;
PlayerInfo = (bank + DebtMoney);
DebtMoney = 0;
PlayerInfo += 240;
TextDrawShowForPlayer(i, Textdraw1);
format(string, sizeof(string), "Zatvoreni ste na %d sekundi.  Kaucija: Onemogucena", PlayerInfo);
SCM(i, COLOR_WHITE, string);
}
new playername2;
GetPlayerName(i, playername2, sizeof(playername2));
Nalog = PlayerInfo;
new key = PlayerInfo;
if(key != 9999)
{
rent = HouseInfo;
if(strcmp(playername2, HouseInfo, true) == 0)
{
rent = 0;
}
else if(rent > GetPlayerMoney(i))
{
PlayerInfo = 9999;
SCM(i, COLOR_WHITE, "Vi ste iseljeni, pronadjite novu kucu.");
rent = 0;
}
HouseInfo = HouseInfo+rent;
}
new tmpintrate;
if(key != 9999 && strcmp(playername2, HouseInfo, true) == 0)
{
tmpintrate = intrate+2;//HouseInfo
}
else
{
tmpintrate = 1;
}
if(PlayerInfo >= 5)
{
    Tax += TaxValue;//Should work for every player online
    PlayerInfo -= TaxValue;
new checks = PlayerInfo/10;
if(PlayerInfo == 1)
{
    new bonus = (PlayerInfo/10)/4;
    checks += bonus;
}
else if(PlayerInfo == 2)
{
    new bonus = (PlayerInfo/10)/10*4;
    checks += bonus;
}
else if(PlayerInfo == 3)
{
    new bonus = (PlayerInfo/10)/10*7;
    checks += bonus;
}
else if(PlayerInfo == 4)
{
    new bonus = PlayerInfo/10;
    checks += bonus;
}
    new ebill = (PlayerInfo/9000)*(PlayerInfo);
new porez = (PlayerInfo/20000)*(PlayerInfo);
    Nalog += checks;
DrzavniBudzet -= checks;
    if(PlayerInfo > 0)
    {
    Nalog -= ebill;
    sBizzInfo += ebill/2;
DrzavniBudzet += ebill/2;
}
else
{
    ebill = 0;
}
if(PlayerInfo < 4)
{
if(PlayerInfo > 1000000 && key != 9999 || GetPlayerMoney(i) > 1000000 && key != 9999)
{
Nalog -= porez;
DrzavniBudzet += porez;
}
else
{
porez = 0;
}
}
interest = (PlayerInfo/1000)*(tmpintrate);
PlayerInfo++;
PlayerPlayMusic(i);
PlayerInfo = Nalog+interest;
SCM(i, COLOR_GREEN, "|___ Izvestaj Banke ___|");
format(string, sizeof(string), "  Plata: $%d  Takse: -$%d", checks, TaxValue);
SCM(i, COLOR_WHITE, string);
if(PlayerInfo != 9999 || PlayerInfo != 9999)
{
    format(string, sizeof(string), "  Racun za struju: -$%d", ebill);
SCM(i, COLOR_GRAD1, string);
}
format(string, sizeof(string), "  Staro stanje: $%d", (Nalog - interest - checks + ebill + porez));
SCM(i, COLOR_WHITE, string);
format(string, sizeof(string), "  Kamatna stopa: 0.%d procenata",tmpintrate);
SCM(i, COLOR_GRAD2, string);
format(string, sizeof(string), "  Stecen interes $%d", interest);
SCM(i, COLOR_GRAD3, string);
if(PlayerInfo < 4)
{
if(PlayerInfo > 1000000 && key != 9999 || GetPlayerMoney(i) > 1000000 && key != 9999)
{
format(string, sizeof(string), "  Porez na bogatstvo: -$%d", porez);
SCM(i, COLOR_GRAD1, string);
}
}
if(PlayerInfo < 3)
{
if(PlayerInfo != 9999 && PlayerInfo != 9999)
{
PlayerInfo -= 2000;
DrzavniBudzet += 2000;
SCM(i, COLOR_GREY,"  Porez na drugo vozilo 2000$");
}
}
SCM(i, COLOR_GREEN, "|--------------------------------------|");
format(string, sizeof(string), "  Novo stanje: $%d", PlayerInfo);
SCM(i, COLOR_GRAD5, string);
format(string, sizeof(string), "  Rent: -$%d", rent);
SCM(i, COLOR_GRAD5, string);
if(PlayerInfo != 0)
{
SCM(i, COLOR_GREEN, "|--------------------------------------|");
format(string, sizeof(string), "  Ukupan Kredit: $%d", PlayerInfo);
SCM(i, COLOR_GRAD5, string);
}
if(PlayerInfo >= 475)
{
SCM(i, COLOR_GRAD5,"  Rata za Kredit: $500");
PlayerInfo -= 475;
Nalog -= 500;
SCM(i, COLOR_GREEN, "|--------------------------------------|");
}
else if(PlayerInfo < 475 && PlayerInfo != 0)
{
PlayerInfo = 0;
SCM(i, COLOR_GRAD5,"Otplatili ste vas kredit.");
SCM(i, COLOR_GREEN, "|--------------------------------------|");
}
format(string, sizeof(string), "~y~Plata~n~~w~Proverite vas nalog");
GameTextForPlayer(i, string, 5000, 1);
rent = 0;
PlayerInfo = 0;
PlayerInfo = 0;
if(FarmerVar == 0)
{
FarmerPickup = 0;
}
if(DrugFarmerVar == 0)
{
DrugFarmerPickup = 0;
}
if(SmugglerWork == 0)
{
PayDaySecure = 0;
}
}
else
{
    SCM(i, COLOR_WHITE, "* Niste igrali dovoljno dugo da bi dobili platu.");
}
}
}
}
MonkeyBussines();
new rand = random(1000); rand += 500;
  Jackpot += rand;
    SaveStuff();
    SaveAnticheat();
    format(string, sizeof(string), "Lotto vesti: JackPot je povecan i on sada iznosi $%d.", Jackpot);
OOCOff(COLOR_WHITE, string);
return 1;
}

Neke slike/video za lakse dobivanje pomoci(neobavezno): http://www.dodaj.rs/f/10/13c/WujUtZZ/sa-mp-685.png
GGC
Godfather
pre 11 godina
http://wiki.sa-mp.com/wiki/Getdate

+ logika 🙂
Andrijan
Shot Caller
pre 11 godina
Neko drugi jasnije malo ?
Vuzimir
Kingpin
pre 11 godina
evo ti:
stock GetWeek(d,m,y) //by drakins,thanks vine 
{
    m=(m-=2);
    if(m<=0) --y,m+=12;
    return ( ((
        (d+((13*m-1)/5)+(y%100)+((y%100)/4)+(((y%100)%100)/4)-2*(y%100))%7) == 0)?
        (((d+((13*m-1)/5)+(y%100)+((y%100)/4)+(((y%100)%100)/4
        )-2*(y%100))%7) + 1) : (((d+((13*m-1)/5)+(y%100)+((y%100)/4)+
        (((y%100)%100)/4)-2*(y%100))%7)
    ) );
}

#define GetWeek() ((getdate() % 0x7) + 0x6)
Andrijan
Shot Caller
pre 11 godina
A jel trebam da dodam u payday nesto za respekte i da pise nako Vikend je dobili ste dupli respekt ?
Andrijan
Shot Caller
pre 11 godina
Neko ?
Blaeks_Biofor
Forum Don
pre 11 godina
Zasto ne cekas odgovor ? zasto refreshujes temu, sledeci put ti ide lock

Razmisli malo, ako se radi o plati, da li treba u platu da se doda nesto ?

Kreni ovu funkciju da koristis ovako:
new d,m s;

GetWeek(d,m,s);

//i ovde samo proveri i uradi reakciju
Andrijan
Shot Caller
pre 11 godina
Sredim super ovo GetWeek, ali u payday nmg nikako da stavim da daje 2 respekta neko ko bi pomogo ?
Blaeks_Biofor
Forum Don
pre 11 godina
PI += 2;

Morate biti prijavljeni da biste odgovorili na ovu temu.

Prijava