[POMOC] Plata i sati igranja

Započeo limpo, April 03, 2013, 14:12:11 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 2 gostiju pregledaju ovu temu.

Skripta koju koristim:E.xplosion
Detaljan opis problema:Kada stigne plata u statsu ne dolaze sati igranja i respecti ,nekad dodje u statsu 9 sati od jednom pa se vrati na jedan u glavnom ne racuna kako treba i nekad uopste ne dodaje :/
Dio skripte:Ne znam tacno koji dio da dadnem ,trazite sta treba evo ovo
public PayDay()   // PLATA
{
new string[150];
foreach (Player, i)
{
new playername2[MAX_PLAYER_NAME];
GetPlayerName(i, playername2, sizeof(playername2));
    if(PlayerInfo[i][pPayDay] == 2) // ako nije na vreme podigao platu
{
if (PlayerInfo[i][pPlata] == 1)
{
PlayerInfo[i][pPlata] = 0;
SendClientMessage(i, COLOR_LIGHTRED, "Niste platili racune, platite ih ili idete u zatvor.");
}
}
    if(PlayerInfo[i][pPayDay] == 3) // ako nije na vreme podigao platu
{
if (PlayerInfo[i][pPlata] == 1)
{
PlayerInfo[i][pPlata] = 0;
SendClientMessage(i, COLOR_LIGHTRED, "Niste platili racune, platite ih ili idete u zatvor.");
}
}
    if(PlayerInfo[i][pPayDay] == 4) // ako nije na vreme podigao platu
{
if (PlayerInfo[i][pPlata] == 1)
{
PlayerInfo[i][pPlata] = 0;

SendClientMessage(i, COLOR_LIGHTRED, "Niste platili racune, idete u zatvor.");
GameTextForPlayer(i, "~r~Uhapsen!", 2000, 1);
new rand = random(sizeof(gRandomJailSpawns));
SetPlayerPos(i, gRandomJailSpawns[rand][0], gRandomJailSpawns[rand][1], gRandomJailSpawns[rand][2]);
PlayerInfo[i][pJailed] = 1;
SafeJBC_ResetPlayerWeapons(i);
WantedPoints[i] = 0;
PlayerInfo[i][pJailTime] = 100;
format(string, sizeof(string), "Uhapseni ste na %d sekundi.   Kaucija: Nedostupna", PlayerInfo[i][pJailTime]);
SendClientMessage(i, COLOR_WHITE, string);
}
}

if(PlayerInfo[i][pPayDay] >= 5) // ako ispunjava uslove za platu
{
if(MoneyMessage[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));
SetPlayerPos(i, gRandomJailSpawns[rand][0], gRandomJailSpawns[rand][1], gRandomJailSpawns[rand][2]);
PlayerInfo[i][pJailed] = 1;
SafeJBC_ResetPlayerWeapons(i);
SafeJBC_ResetPlayerMoney(i);
WantedPoints[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);
}

Neke slike/video za lakse dobivanje pomoci(neobavezno):/


Evo sve
public PayDay()   // PLATA
{
new string[150];
foreach (Player, i)
{
new playername2[MAX_PLAYER_NAME];
GetPlayerName(i, playername2, sizeof(playername2));
    if(PlayerInfo[i][pPayDay] == 2) // ako nije na vreme podigao platu
{
if (PlayerInfo[i][pPlata] == 1)
{
PlayerInfo[i][pPlata] = 0;
SendClientMessage(i, COLOR_LIGHTRED, "Niste platili racune, platite ih ili idete u zatvor.");
}
}
    if(PlayerInfo[i][pPayDay] == 3) // ako nije na vreme podigao platu
{
if (PlayerInfo[i][pPlata] == 1)
{
PlayerInfo[i][pPlata] = 0;
SendClientMessage(i, COLOR_LIGHTRED, "Niste platili racune, platite ih ili idete u zatvor.");
}
}
    if(PlayerInfo[i][pPayDay] == 4) // ako nije na vreme podigao platu
{
if (PlayerInfo[i][pPlata] == 1)
{
PlayerInfo[i][pPlata] = 0;

SendClientMessage(i, COLOR_LIGHTRED, "Niste platili racune, idete u zatvor.");
GameTextForPlayer(i, "~r~Uhapsen!", 2000, 1);
new rand = random(sizeof(gRandomJailSpawns));
SetPlayerPos(i, gRandomJailSpawns[rand][0], gRandomJailSpawns[rand][1], gRandomJailSpawns[rand][2]);
PlayerInfo[i][pJailed] = 1;
SafeJBC_ResetPlayerWeapons(i);
WantedPoints[i] = 0;
PlayerInfo[i][pJailTime] = 100;
format(string, sizeof(string), "Uhapseni ste na %d sekundi.   Kaucija: Nedostupna", PlayerInfo[i][pJailTime]);
SendClientMessage(i, COLOR_WHITE, string);
}
}

if(PlayerInfo[i][pPayDay] >= 5) // ako ispunjava uslove za platu
{
if(MoneyMessage[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));
SetPlayerPos(i, gRandomJailSpawns[rand][0], gRandomJailSpawns[rand][1], gRandomJailSpawns[rand][2]);
PlayerInfo[i][pJailed] = 1;
SafeJBC_ResetPlayerWeapons(i);
SafeJBC_ResetPlayerMoney(i);
WantedPoints[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);
}
// *****************************************************************************
    new stringd[256];
    PlayerInfo[i][pPlata] = 1;
format(stringd, sizeof(stringd), "{FF0000}Stigli su vam racuni !\n{FFFF00}Idite u opstinu,\n{FFFF00}da platite\n{0000CC}ROK ZA UPLATU 20min.");
ShowPlayerDialog( i, PLATA, DIALOG_STYLE_MSGBOX, "{FFFFFF}Izvestaj banke :", stringd, "Uredu", "" );
}
else
{
PlayerInfo[i][pPlata] = 0;
    SendClientMessage(i, COLOR_WHITE, "* Niste igrali dovoljno dugo da biste dobili racune.");
}

}
SaveAccounts();
return 1;
}
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
strtok(const string[], &index)
{
new length = strlen(string);
while ((index < length) && (string[index] <= ' '))
{
index++;
}

new offset = index;
new result[20];
while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
{
result[index - offset] = string[index];
index++;
}
result[index - offset] = EOS;
return result;
}

public split(const strsrc[], strdest[][], delimiter)
{
new i, li;
new aNum;
new len;
while(i <= strlen(strsrc)){
    if(strsrc[i]==delimiter || i==strlen(strsrc)){
        len = strmid(strdest[aNum], strsrc, li, i, 128);
        strdest[aNum][len] = 0;
        li = i+1;
        aNum++;
}
i++;
}
return 1;
}


a evo i ovo ako treba,ma da mozda ovo nije bug sad sam baš skontao kada dodje payday ne dobiješ respect niti sate igranja,ali odes u opstinu i platis racune onda dodje respect,pa je tako vjerovatno namjesteno :)

new SS = PlayerInfo[playerid][pAccount];
PlayerInfo[playerid][pAccount] = NS;
PlayerInfo[playerid][pPayDay] = 0;
PlayerInfo[playerid][pPayCheck] = 0;
PlayerInfo[playerid][pConnectTime] += 1;
PlayerInfo[playerid][pExp] +=1; // raspecti
if(FarmerVar[playerid] == 0)
{FarmerPickup[playerid][0] = 0;}
Rent = 0;
PlayerInfo[playerid][pPlata] = 0;
if(GetPlayerMoney(playerid) < 0)
{
    if(MoneyMessage[playerid]==0)
    {
    format(string, sizeof(string), "U dugovima ste, imate vremena do sledece provjere da skupite: %d$ ili idete u zatvor.", GetPlayerMoney(playerid));
SendClientMessage(playerid, COLOR_LIGHTRED, string);
MoneyMessage[playerid] = 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(playerid,PLATAI,DIALOG_STYLE_MSGBOX,"Izrada racuna :",clickstring,"Uredu","Uredu");



OnPropUpdate();
OnPlayerUpdateCustom(playerid);
}
return 1;
}

ovo ti je prazan dialog sa jednom porukom , sta ocekujes od njega ?

Na Explosionu koliko ja znam tebaš platiti račune u opštini da bi dobio respekt -.- , mogoa si i sam skontati vidiš da ti piše "NISTE PLATILI RAČUNE"

ne koristim ja te gf modove a i ne zanimaju me , tako da ne znam, uostalom, ako se vec ti racuni placaju u opstini, gde ovde pisu sati igranja i jos nesto ?

Daj bar komandu kad plaćaš račune ..

Dobro je ljudi vidite da sam pocetnik  >:( ,mozete lock nije bio bug...