[Pomoc]Sredjivaje payday sistem

Započeo Yakavetta, Septembar 03, 2012, 16:07:47 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Yakavetta

Skripta koju korsitim: RGRP
Problem: Kako sa ovaj payday da uradim da automatski igraci dobijaju RSP a ne da mora da odu u opstinu da plate smetke i onda dobiju RSP
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;
}