Problem with my lock and unlock in the housesystem
#2

pawn Код:
if(dialogid == 20)
{
    if(response == 1)
    {
        for(new h = 0; h < MAX_HOUSES; h++)
        {
            if(listitem == 0)
            {
                if(IsPlayerInRangeOfPoint(playerid, 2.0, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]))
                {
                    HouseInfo[h][hLocked] = 1;
                    SendClientMessage(playerid, COLOR_RED, "You locked your house.");
                    return 1;
                }
                if(IsPlayerInRangeOfPoint(playerid, 2.0, HouseInfo[h][hExitx], HouseInfo[h][hExity], HouseInfo[h][hExitz]))
                {
                    HouseInfo[h][hLocked] = 1;
                    SendClientMessage(playerid, COLOR_RED, "You locked your house.");
                    return 1;
                }
            }
            if(listitem == 1)
            {
                if(IsPlayerInRangeOfPoint(playerid, 2.0, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]))
                {
                    HouseInfo[h][hLocked] = 0;
                    SendClientMessage(playerid, COLOR_RED, "You unlocked your house.");
                    return 1;
                }
                if(IsPlayerInRangeOfPoint(playerid, 2.0, HouseInfo[h][hExitx], HouseInfo[h][hExity], HouseInfo[h][hExitz]))
                {
                    HouseInfo[h][hLocked] = 0;
                    SendClientMessage(playerid, COLOR_RED, "You unlocked your house.");
                    return 1;
                }
            }
        }
    }
    return 1;
}
There's a cleaned up and indented version of it. I'm not quite sure what the problem is. You say it works fine from the outside but not at all from the inside?
Reply


Messages In This Thread
Problem with my lock and unlock in the housesystem - by Mystique - 27.10.2010, 18:09
Re: Problem with my lock and unlock in the housesystem - by Backwardsman97 - 27.10.2010, 19:26
Re: Problem with my lock and unlock in the housesystem - by BeriT - 27.10.2010, 19:28
Re: Problem with my lock and unlock in the housesystem - by Mystique - 27.10.2010, 19:42
Re: Problem with my lock and unlock in the housesystem - by playbox12 - 27.10.2010, 19:49
Re: Problem with my lock and unlock in the housesystem - by Mystique - 27.10.2010, 20:03

Forum Jump:


Users browsing this thread: 4 Guest(s)