House wont work?
#1

warning 202: number of arguments does not match definition
topic say it.

pawn Код:
forward UpdatePlayersHouseInfo();
public UpdatePlayersHouseInfo()
{
    new str[100]; //The string we are gonna format
    for(new i = 0; i < MAX_PLAYERS; i++) //Loop through all the players
    {
        for(new j = 0; j < MAX_HOUSES; j++) //Loop through all the houses
        {
            if(IsPlayerInRangeOfPoint(j, HouseInfo[j][hEnterX], HouseInfo[j][hEnterY], HouseInfo[j][hEnterZ]) && GetPlayerInterior(i) == HouseInfo[j][hOutsideInt] && GetPlayerVirtualWorld(i) == HouseInfo[j][hOutsideVir]) //You already know this! If you don't know it, do step 3 again!
            {
                if(HouseInfo[j][hOwned]) //Is house owned?
                    format(str, 100, "~w~House owned by ~r~%s", HouseInfo[j][hOwner]); //Will give: {white_color}House owned by {yellow_color}OWNER
                else //House isn't owned
                    format(str, 100, "~w~House for sale!~n~Price: ~g~$%d,-", HouseInfo[j][hPrice]); //Will give: {white_color}House for sale!{new line}Price: {green_color}$PRICE
                GameTextForPlayer(i, str, 2000, 3); //Show the text 2 seconds!
            }
         }
    }
    return 1;
}
Reply
#2

i think this is the problem:
Код:
if(IsPlayerInRangeOfPoint(j, HouseInfo[j][hEnterX], HouseInfo[j][hEnterY], HouseInfo[j][hEnterZ]) && GetPlayerInterior(i) == HouseInfo[j][hOutsideInt] && GetPlayerVirtualWorld(i) == HouseInfo[j][hOutsideVir])

Код:
if(IsPlayerInRangeOfPoint(playerid, range, x, y, z))
Reply
#3

Thanks.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)