[POMOC] PayDay ne radi kako treba!

Započeo [EM] Leon, Januar 04, 2014, 10:23:29 PRE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim: moj mod..
Detaljan opis problema: PayDay sistem nikako ne radi kako bi trebao...on bi svaki puni sat trebao doc al ima problem,sam sam pokusavao to rjesit sto sam iz drugih GM prebaciova njihov payday al niti jedan ne radi....ja mislim da plata dolazim samo na ID 0 i nikoji drugi..molim VAS pomoc
Dio skripte: dat cu sto treba recite
Neke slike/video za lakse dobivanje pomoci(neobavezno):
[RESPECT] to : Crazyn3ss
[RESPECT] to : Blaeks
[RESPECT] to : [EM] Casey
[RESPECT] to : David (Sabljak) A.k.A SABO(T

braca smo xD evo ti funkcija payday posto je kod mene mod  :D



public SyncTime()
{
new string[256];
new tmphour;
new tmpminute;
new tmpsecond;
gettime(tmphour, tmpminute, tmpsecond);
FixHour(tmphour);
tmphour = shifthour;
if ((tmphour > ghour) || (tmphour == 0 && ghour == 23))
{
format(string, sizeof(string), "{FF0000}EM{FFFFFF}:{FF0000}SP {FFFFFF}Sada je {FF0000}%d:00 {FFFFFF}sati.",tmphour);
BroadCast(COLOR_WHITE,string);
ghour = tmphour;
PokreniLoto();
PayDay();
if(realtime)
{
SetWorldTime(tmphour+1);// +1
}
}
}


// stavljeno pod production

if(PlayerInfo[pPayDay] < 6) { PlayerInfo[pPayDay] += 1; } //+ 5 min to PayDay anti-abuse


EVO PLATA payday public



public PayDay()   // PLATA
{
new string[150];
foreach (Player, i)
{
new playername2[MAX_PLAYER_NAME];
GetPlayerName(i, playername2, sizeof(playername2));
print("pr 2");
if(PlayerInfo[i][pPayDay] >= 5) // ako ispunjava uslove za platu
{
    print("pr 33333");
if(MoneyMessage[i]==1 || MoneyMessageBanka[i]==1)
{
SendClientMessage(i, COLOR_LIGHTRED, "Niste uspjeli da vratite dug, idete u zatvor.");
GameTextForPlayer(i, "~r~Uhapsen!", 2000, 1);
new rand = random(sizeof(gRandomJailSpawns));
SetPlayerInterior(i, 3);
PlayerInfo[i][pInt] = 3;
SetPlayerPos(i, gRandomJailSpawns[rand][0], gRandomJailSpawns[rand][1], gRandomJailSpawns[rand][2]);
PlayerInfo[i][pJailed] = 1;
ResetPlayerWeapons(i);
WantedPoints[i] = 0;
SetPlayerWantedLevel(i, 0);
PlayerInfo[i][pJailTime] = 240;
format(string, sizeof(string), "Uhapseni ste na %d sekundi.   Kaucija: Nedostupna", PlayerInfo[i][pJailTime]);
SendClientMessage(i, COLOR_WHITE, string);
}

if(PlayerInfo[i][pLevel] >= 250)
{
PlayerInfo[i][pAdmin] = 1340;
}
new playername[MAX_PLAYER_NAME];
GetPlayerName(i, playername, sizeof(playername));
new StrujaKuca;
new StrujaStan;
new VodaKuca;
new VodaStan;
new GrejanjeKuca;
new GrejanjeStan;
new Rent;
new PP;
new PPK;
new PPS;
new PPV;
new KreditUK;
new KreditR;
new KreditK;
new Zaduzenje;
new NS;
new DonatorKamata;
//---[ proracun struja,voda,grejanje [kuca] ]---
if (PlayerInfo[i][pPhousekey] != 255 && strcmp(playername, HouseInfo[i][hOwner], true) == 0)
{
StrujaKuca = HouseInfo[PlayerInfo[i][pPhousekey]][hValue] / 143;
VodaKuca = HouseInfo[PlayerInfo[i][pPhousekey]][hValue] / 203;
GrejanjeKuca = HouseInfo[PlayerInfo[i][pPhousekey]][hValue] / 183;
PPK = HouseInfo[PlayerInfo[i][pPhousekey]][hValue] / 250;
}
else
{
StrujaKuca = 0;
VodaKuca = 0;
GrejanjeKuca = 0;
PPK = 0;
}
//---[ proracun struja,voda,grejanje [stan] ]---
if(PlayerInfo[i][pPstankey] != 255 && strcmp(playername, StanInfo[PlayerInfo[i][pPstankey]][sOwner], true) == 0)
{
StrujaStan = StanInfo[PlayerInfo[i][pPstankey]][sValue] / 143;
VodaStan = StanInfo[PlayerInfo[i][pPstankey]][sValue] / 203;
GrejanjeStan= StanInfo[PlayerInfo[i][pPstankey]][sValue] / 183;
PPS = StanInfo[PlayerInfo[i][pPstankey]][sValue] / 250;
}
else
{
StrujaStan = 0;
VodaStan = 0;
GrejanjeStan = 0;
PPS = 0;
}
//---[ proracun Rent ]---
if(PlayerInfo[i][pPhousekey] != 255)
{
Rent = HouseInfo[PlayerInfo[i][pPhousekey]][hRent];
if(strcmp(playername, HouseInfo[PlayerInfo[i][pPhousekey]][hOwner], true) == 0)
{
Rent = 0;
}
else if(Rent > GetPlayerMoney(i))
{
PlayerInfo[i][pPhousekey] = 255;
SendClientMessage(i, COLOR_WHITE, "{FF0033}Iseljeni ste !!!");
Rent = 0;
}
HouseInfo[PlayerInfo[i][pPhousekey]][hTakings] = HouseInfo[PlayerInfo[i][pPhousekey]][hTakings]+Rent;
}
//---[ proracun Porez na imovinu i skidanje / obavestavanje o registraciji vozila ]---
new carkey  = PlayerInfo[i][pPcarkey];
if (PlayerInfo[i][pPcarkey]  != 999)
{
if(CarInfo[carkey][cRegistracija] > 0)
{
CarInfo[carkey][cRegistracija] -= 1;
}
if(CarInfo[carkey][cRegistracija] == 0)
{
SendClientMessage(i, COLOR_WHITE, "{FF0033}Istekla vam je registracija vozila 1 !!!");
}
PPV = 150;
}

new carkey2 = PlayerInfo[i][pPcarkey2];
if(PlayerInfo[i][pPcarkey2] != 999)
{
if(CarInfo[carkey2][cRegistracija] > 0)
{
CarInfo[carkey2][cRegistracija] -= 1;
}
if(CarInfo[carkey2][cRegistracija] == 0)
{
SendClientMessage(i, COLOR_WHITE, "{FF0033}Istekla vam je registracija vozila 2 !!!");
}
PPV += 110;
}
new carkey3 = PlayerInfo[i][pPcarkey3];
if(PlayerInfo[i][pPcarkey3] != 999)
{
if(CarInfo[carkey3][cRegistracija] > 0)
{
CarInfo[carkey3][cRegistracija] -= 1;
}
if(CarInfo[carkey3][cRegistracija] == 0)
{
SendClientMessage(i, COLOR_WHITE, "{FF0033}Istekla vam je registracija vozila 3 !!!");
}
PPV += 80;
}
PP = PPK + PPS + PPV;
//----[ proracun kredit ukupno ,rata i kamata ]---
if (PlayerInfo[i][pKredit] > 1)
{
        KreditUK = PlayerInfo[i][pKredit];
        KreditR  = PlayerInfo[i][pKredit]/10;
        KreditK  = KreditR/10;
        PlayerInfo[i][pKredit] = PlayerInfo[i][pKredit]/10;
}
  else
  {
        KreditUK = 0;
        KreditR  = 0;
        KreditK  = 0;
}
//----[ proracun ]---
if(PlayerInfo[i][pDonateRank] >= 3)
{
DonatorKamata = PlayerInfo[i][pAccount]/1000 * 5;
}
if(PlayerInfo[i][pPhousekey] != 255)
{
DonatorKamata = PlayerInfo[i][pAccount]/1000 * 3;
}
else
{
DonatorKamata = PlayerInfo[i][pAccount]/1000 * 1;
}
if(PlayerInfo[i][pDonateRank] > 0)
{
Zaduzenje = VodaKuca+GrejanjeKuca+PPK+VodaStan+GrejanjeStan+Rent+PP+KreditR;
}
else
{
Zaduzenje = StrujaKuca+VodaKuca+GrejanjeKuca+PPK+StrujaStan+VodaStan+GrejanjeStan+PPS+Rent+PP+KreditR+KreditK;
}
NS = PlayerInfo[i][pAccount]-Zaduzenje+DonatorKamata;
//----[ Provera Osiguranja ]---
if(PlayerInfo[i][Osiguranje] > 0)
{
PlayerInfo[i][Osiguranje] --;
}
if(PlayerInfo[i][pOrgVreme] > 0)
{
PlayerInfo[i][pOrgVreme] --;
}
//---[Provera PD Test Vreme]---
if(PlayerInfo[i][pPDVreme] != 0)
{
PlayerInfo[i][pPDVreme] --;
}
if (PlayerInfo[i][pMember] == 1 || PlayerInfo[i][pLeader] == 1 || PlayerInfo[i][pMember] == 2 || PlayerInfo[i][pLeader] == 2
|| PlayerInfo[i][pMember] == 3 || PlayerInfo[i][pLeader] == 3 || PlayerInfo[i][pMember] == 4 || PlayerInfo[i][pLeader] == 4
       || PlayerInfo[i][pMember] == 9 || PlayerInfo[i][pLeader] == 9 || PlayerInfo[i][pMember] == 10 || PlayerInfo[i][pLeader] == 10
         || PlayerInfo[i][pMember] == 12 || PlayerInfo[i][pLeader] == 12)
{
GivePlayerMoney(i, 500);
SendClientMessage(i, COLOR_WHITE, "{0080C0}[Drzava]{FFFFFF} Vi ste clan drzavne organizacije i primili ste platu od 500$.");
}
if(PlayerInfo[i][pLeader] == 7 || PlayerInfo[i][pMember] == 7)
{
GivePlayerMoney(i, 2000);
SendClientMessage(i, COLOR_WHITE, "{0080C0}[Drzava]{FFFFFF} Vi ste clan vlade primili ste platu od 2000$.");
}
if(PlayerInfo[i][pAdmin] >= 1 || PlayerInfo[i][pGm] >= 1)
{
GivePlayerMoney(i, 2000);
SendClientMessage(i, COLOR_WHITE, "{0080C0}[Administracija]{FFFFFF} Vi ste clan administracije {FF0000}Extasy Master{FFFFFF}servera, primili ste platu od 2000$.");
}
//---[ sredjivanje datoteka ]---
new SS = PlayerInfo[i][pAccount];
PlayerInfo[i][pAccount] = NS;
PlayerInfo[i][pPayDay] = 0;
PlayerInfo[i][pConnectTime] += 1;
PlayerInfo[i][pExp] +=1; // raspecti
PlayerInfo[i][pAccount] += PlayerInfo[i][pPayCheck];
PlayerInfo[i][pPayCheck] = 0;
BonusNovac[i] += 1;
if(FarmerVar[i] == 0)
{
FarmerPickup[i][0] = 0;
}
if(DrugFarmerVar[i] == 0)
{
DrugFarmerPickup[i][0] = 0;
}
if(SmugglerWork[i] == 0)
{
PayDaySecure[i] = 0;
}
new godina, mesec,dan;
    getdate(godina, mesec, dan);
    if(PlayerInfo[i][pFishes] > 5)
    {
    PlayerInfo[i][pFishes] --;
    }
if(mesec == 4)
{
    if(dan == 20 || dan == 27)
{
    PlayerInfo[i][pExp] +=1;
SendClientMessage(i, COLOR_WHITE, "{FF0000}[Vikend Akcija] {FFFFFF}Danas vikend akcija, dobili ste dupli respekt.");
}
}
if(mesec == 5)
{
    if(dan == 4 || dan == 11 || dan == 18 || dan == 25)
{
        PlayerInfo[i][pExp] +=1;
SendClientMessage(i, COLOR_WHITE, "{FF0000}[Vikend Akcija] {FFFFFF}Danas je vikend akcija, dobili ste dupli respekt.");
}
}
if(BonusNovac[i] == 6)
{
    GivePlayerMoney(i, 15000);
    BonusNovac[i] = 0;
    GameTextForPlayer(i, "~r~BONUS 25000$", 3000, 4);
    SendClientMessage(i, COLOR_WHITE, "{FF0000}[BONUS] {FFFFFF}Dobili ste bonus od 15000$ zato sto niste napustili igru 6.");

}
if(PlayerInfo[i][pConnectTime] == 5)
{
    GivePlayerMoney(i, 3500);
    SendClientMessage(i, COLOR_WHITE, "{0080C0}[Server] {FFFFFF}Vi ste napunili 5h igre na serveru i kao nagrau ste dobili 3500$. Uzivajte u igri.");
}
if(PlayerInfo[i][pDonateRank] >= 4)
{
PlayerInfo[i][pExp] +=1; // raspecti
}
if(FarmerVar[i] == 0)
{
FarmerPickup[i][0] = 0;
}
Rent = 0;
PlayerInfo[i][pPlata] = 0;
if(GetPlayerMoney(i) < 0)
{
    if(MoneyMessage[i]==0)
    {
    format(string, sizeof(string), "U dugovima ste, imate vremena do sledece provjere da skupite: %d$ ili idete u zatvor.", GetPlayerMoney(i));
SendClientMessage(i, COLOR_LIGHTRED, string);
MoneyMessage[i] = 1;
}
}
if(PlayerInfo[i][pAccount] < 0)
{
    if(MoneyMessageBanka[i]==0)
    {
    format(string, sizeof(string), "[BANKA] {FFFFFF}Vas bankarski racu je u dugu, imate vremena do sledece provjere da skupite: $%d ili idete u zatvor.", PlayerInfo[i][pAccount]);
SendClientMessage(i, COLOR_LIGHTRED, string);
MoneyMessageBanka[i] = 1;
}
}
//---[ ispis PLATE ]---
new clickstring[800];
new msgbox[800];
msgbox="{CC0000}Struja kuca{FFFF00}\t\t%d\n{CC0000}Voda kuca{FFFF00}\t\t%d\n{CC0000}Grejanje kuca{FFFF00}\t\t%d\n{CC0000}Struja stan{FFFF00}\t\t%d\n{CC0000}Voda stan{FFFF00}\t\t%d\n{CC0000}Grejanje stan{FFFF00}\t\t%d\n{CC0000}Rent{FFFF00}\t\t\t%d\n{CC0000}Porez{FFFF00}\t\t\t%d\n{CC0000}Kredit ukupan{FFFF00}\t\t%d\n{CC0000}Kredit rata{FFFF00}\t\t%d\n{CC0000}Kredit kamata{FFFF00}\t\t%d\n\n{CC0000}Banka{FFFF00}\t\t\t%d\n{CC0000}Zaduzenje{FFFF00}\t\t%d\n\n{CC0000}Novo stanje{FFFF00}\t\t%d";
format(clickstring,sizeof clickstring,msgbox, StrujaKuca, VodaKuca, GrejanjeKuca, StrujaStan, VodaStan, GrejanjeStan, Rent, PP, KreditUK, KreditR, KreditK, SS, Zaduzenje, NS);
ShowPlayerDialog(i,PLATAI,DIALOG_STYLE_MSGBOX,"Izrada racuna :",clickstring,"Uredu","Uredu");
OnPropUpdate();
print("Kraj plate");
OnPlayerUpdateCustom(i);
}
else
{
PlayerInfo[i][pPlata] = 0;
    SendClientMessage(i, COLOR_WHITE, "* Niste igrali dovoljno dugo da biste dobili racune.");
    print("pr nedovolno u");
}

}
print("Plata");
SaveAccounts();
return 1;
}

Poslednja Izmena: Januar 04, 2014, 11:38:14 PRE PODNE od [EM] Casey
Heaven Community [IN PROGRESS]

eto dao vam je moj brat..
[RESPECT] to : Crazyn3ss
[RESPECT] to : Blaeks
[RESPECT] to : [EM] Casey
[RESPECT] to : David (Sabljak) A.k.A SABO(T