25.06.2015, 21:15
(
Последний раз редактировалось JoshNudock; 26.06.2015 в 11:21.
)
Hello! can someone help me please? I studied all day today the code below, the problem is that with this code enabled on the gamemode, nothing below it does not run (I think), it is used in Payday server, and when a person buys a room at the hotel ("PlayerInfo[i][pPhousekey] == -1"), the payday it is not executed, ie does not show your salary and etc .. if it is not a room in the hotel, the public payday, is executed usually .. can someone help me please?
PHP код:
new nome[MAX_PLAYER_NAME];
GetPlayerName(i, nome, sizeof(nome));
new key = PlayerInfo[i][pPhousekey];
if (PlayerInfo[i][pPhousekey] != 255)
{
rent = HouseInfo[key][hRent];
//if (PlayerInfo[i][pPhousekey] == -1) rent = 600;
if (strcmp(nome, HouseInfo[key][hOwner], true) == 0) rent = 0;
else if (account > rent)
{
PlayerInfo[i][pPhousekey] = 255;
SendClientMessage(i, -1, "You have been evicted from hotel / home for not having money to pay");
rent = 0;
}
HouseInfo[key][hTakings] = HouseInfo[key][hTakings] + rent;
}
new tmpintrate;
if (key != 255 && strcmp(nome, HouseInfo[key][hOwner], true) == 0)
{
if (PlayerInfo[i][pDonateRank] > 0) tmpintrate = intrate + 4;
else tmpintrate = intrate + 2;
}
else
{
if (PlayerInfo[i][pDonateRank] > 0) tmpintrate = 3;
else tmpintrate = 1;
}