how can i make so maximum money at htakings to be 500.000$?so house is full of money..
PHP код:
if(strcmp(cmd, "/rentroom", true) == 0)
{
if(IsPlayerConnected(playerid))
{
new Float:oldposx, Float:oldposy, Float:oldposz;
GetPlayerName(playerid, playername, sizeof(playername));
GetPlayerPos(playerid, oldposx, oldposy, oldposz);
for(new h = 0; h < sizeof(HouseInfo); h++)
{
if(IsPlayerInRangeOfPoint(playerid, 2, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]) && HouseInfo[h][hOwned] == 1 && HouseInfo[h][hRentabil] == 1)
{
if(PlayerInfo[playerid][pPhousekey] != 255 && strcmp(playername, HouseInfo[PlayerInfo[playerid][pPhousekey]][hOwner], true) == 0)
{
SendClientMessage(playerid, COLOR_WHITE, " You already own a house, type /sellhouse if you want to rent this one.");
return 1;
}
if(PlayerInfo[playerid][pLevel] < 4)
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, " Trebuie sa detineti level 4 pentru a da /rentroom");
return 1;
}
if(PlayerInfo[playerid][pPhousekey] != 255)
{
SendClientMessage(playerid, COLOR_GREY, "Ai deja inchiriat Casa!");
return 1;
}
if(GetPlayerCash(playerid) > HouseInfo[h][hRent])
{
PlayerInfo[playerid][pPhousekey] = h;
GivePlayerCash(playerid,-HouseInfo[h][hRent]);
HouseInfo[h][hTakings] = HouseInfo[h][hTakings]+HouseInfo[h][hRent];
PlayerPlayMusic(playerid);
SetPlayerInterior(playerid,HouseInfo[h][hInt]);
SetPlayerVirtualWorld(playerid,HouseInfo[h][hWorld]);
SetPlayerPos(playerid,HouseInfo[h][hExitx],HouseInfo[h][hExity],HouseInfo[h][hExitz]);
GameTextForPlayer(playerid, "~w~Welcome Home~n~You can exit at any time by moving to this door si typing /exit", 5000, 3);
PlayerInfo[playerid][pLocal] = h;
PlayerInfo[playerid][pVirWorld] = HouseInfo[h][hWorld];
HouseEntered[playerid] = h;
PlayerInfo[playerid][pInteriorNr] = 39;
SendClientMessage(playerid, COLOR_WHITE, "Congratulations, You can enter si exit here anytime.");
SendClientMessage(playerid, COLOR_WHITE, "Type /help to review the new property help section.");
OnPlayerUpdateEx(playerid);
return 1;
}
else
{
SendClientMessage(playerid, COLOR_WHITE, "You don't have the cash for that");
return 1;
}
}
}
}
return 1;
}
anyone??i want so the maximum money is 500.000$ not in /rentroom at [htakings]
I don't understand you, but maybe add this somewhere, at the top or somewhere, I am not going through that code! (
pawn Код:
if( (HouseInfo[h][hTakings]+HouseInfo[h][hRent]) > 500000 ) return SendClientMessage(playerid, COLOR_RED, "RENT: Rent wasn't collected as maximum limit has been reached.");