Justin_Thomson
Новичок
Некоторые наверное замечали , что в моде RLS кварплата снимается тока у тех кто онлайн , а те кто оффлайн у них она не снимается ! Кто поможет дам 3 +++
PHP:
public PayDay()
{
new string[128];
SaveBankFrac();
SaveBankMafia();
new sendername[MAX_PLAYER_NAME];
for(new h = 0; h < sizeof(HouseInfo); h++)
{
if(HouseInfo[h][hStyle] >=1 && HouseInfo[h][hMats] >=1000)
{
HouseInfo[h][hMats] -=1000;
if(HouseInfo[h][hSost] <=3)
{
HouseInfo[h][hSost] +=1;
}
}
if (IsPlayerConnected( ReturnUser(HouseInfo[h][hOwner]) ))
{
if(HouseInfo[h][hKlass] == 0 && HouseInfo[h][hOwned] == 1)//Êëàññû äîìîâ
{
HouseInfo[h][hTakings] -=50;
}
if(HouseInfo[h][hKlass] == 1 && HouseInfo[h][hOwned] == 1)//Êëàññû äîìîâ
{
HouseInfo[h][hTakings] -=100;
}
if(HouseInfo[h][hKlass] == 2 && HouseInfo[h][hOwned] == 1)//Êëàññû äîìîâ
{
HouseInfo[h][hTakings] -=150;
}
if(HouseInfo[h][hKlass] == 3 && HouseInfo[h][hOwned] == 1)//Êëàññû äîìîâ
{
HouseInfo[h][hTakings] -=200;
}
if(HouseInfo[h][hKlass] == 4 && HouseInfo[h][hOwned] == 1)//Êëàññû äîìîâ
{
HouseInfo[h][hTakings] -=250;
}
}
if(HouseInfo[h][hTakings] <= 0 && HouseInfo[h][hOwned] == 1)
{
new housecash = HouseInfo[h][hValue];
format(string, sizeof(string), "%s.ini",HouseInfo[h][hOwner]);
new File = ini_openFile(string);
ini_setInteger(File,"House",255);
ini_setInteger(File,"Housecash",housecash);
ini_setInteger(File,"Text",1);
ini_closeFile(File);
HouseInfo[h][hHel] = 1;
HouseInfo[h][hLock] = 1;
HouseInfo[h][hOwned] = 1;
HouseInfo[h][hStyle] = 1;
HouseInfo[h][hSost] = 1;
strmid(HouseInfo[h][hOwner], "The State", 0, strlen("The State"), 255);
}
}
for(new i = 0; i < MAX_PLAYERS; i++)
{
new house = PlayerInfo[i][pPhousekey];
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][pLevel] > 0)
{
new playername2[MAX_PLAYER_NAME];
GetPlayerName(i, playername2, sizeof(playername2));
new exp = PlayerInfo[i][pExp];
new nxtlevel = PlayerInfo[i][pLevel]+1;
new expamount = nxtlevel*levelexp;
if(exp == expamount)
{
PlayerInfo[i][pLevel] += 1;
PlayerInfo[i][pExp] = 0;
}
if(armmatbi < 0)
{
armmatbi = 0;
}
else if(armmatsf < 0)
{
armmatsf = 0;
}
if(PlayerInfo[i][pZvezdi] >= 3){
WantedLevel[i] -= 3;
PlayerInfo[i][pZvezdi] -=3;
}
PHP:
if(PlayerInfo[i][pPhousekey] != 255)
{
if(HouseInfo[house][hKlass] == 0)//Êëàññû äîìîâ
{
format(string, sizeof(string), "- Ïëàòà çà ýëåêòðè÷åñòâî êâàðòèðû: 100 âèðò");
SendClientMessage(i, COLOR_WHITE, string);
}
if(HouseInfo[house][hKlass] == 1)//Êëàññû äîìîâ
{
format(string, sizeof(string), "- Ïëàòà çà ýëåêòðè÷åñòâî êâàðòèðû: 200 âèðò");
SendClientMessage(i, COLOR_WHITE, string);
}
if(HouseInfo[house][hKlass] == 2)//Êëàññû äîìîâ
{
format(string, sizeof(string), "- Ïëàòà çà ýëåêòðè÷åñòâî êâàðòèðû: 300 âèðò");
SendClientMessage(i, COLOR_WHITE, string);
}
if(HouseInfo[house][hKlass] == 3)//Êëàññû äîìîâ
{
format(string, sizeof(string), "- Ïëàòà çà ýëåêòðè÷åñòâî êâàðòèðû: 400 âèðò");
SendClientMessage(i, COLOR_WHITE, string);
}
if(HouseInfo[house][hKlass] == 4)//Êëàññû äîìîâ
{
format(string, sizeof(string), "- Ïëàòà çà ýëåêòðè÷åñòâî êâàðòèðû: 500 âèðò");
SendClientMessage(i, COLOR_WHITE, string);
}
if(HouseInfo[house][hTakings] <= 0)
{
PlayerInfo[i][pCash] +=HouseInfo[house][hValue];
HouseInfo[house][hHel] = 0;
HouseInfo[house][hLock] = 1;
HouseInfo[house][hOwned] = 0;
HouseInfo[house][hStyle] = 0;
HouseInfo[house][hSost] = 0;
GetPlayerName(i, sendername, sizeof(sendername));
strmid(HouseInfo[house][hOwner], "The State", 0, strlen("The State"), 255);
//PlayerPlaySound(i, 1052, 0.0, 0.0, 0.0);
SendClientMessage(i, COLOR_REDD, "- Âàø äîì ïðîäàí, çà íåóïëàòó ýëåêòðîýíåðãèè!");
HouseInfo[house][hTakings] = 0;
PlayerInfo[i][pPhousekey] = 255;
SetPlayerInterior(i,0);
SetPlayerVirtualWorld(i, 0);
SetPlayerPos(i,HouseInfo[house][hEntrancex],HouseInfo[house][hEntrancey],HouseInfo[house][hEntrancez]);
PlayerInfo[i][pInt] = 0;
}
}
Последнее редактирование:
