House exit problem
#1

pawn Код:
if (PRESSED(KEY_SECONDARY_ATTACK))
    {
        new Name[255];
        GetPlayerName(playerid, Name, sizeof(Name));
        for(new houseid = 1; houseid < sizeof(HouseInfo); houseid++)
        {
            if(IsPlayerInRangeOfPoint(playerid, 3.0, HouseInfo[houseid][hEnterX], HouseInfo[houseid][hEnterY], HouseInfo[houseid][hEnterZ]))
            {
                if(HouseInfo[houseid][hOwned] == 1)
                {
                    if(!strcmp(Name, HouseInfo[houseid][hOwner], false, strlen(Name)))
                    {
                        SetPlayerInterior(playerid, HouseInfo[houseid][hInterior]);
                        SetPlayerPos(playerid, HouseInfo[houseid][hExitX], HouseInfo[houseid][hExitY], HouseInfo[houseid][hExitZ]);
                    }
                }
            }
            if(IsPlayerInRangeOfPoint(playerid, 3.0, HouseInfo[houseid][hExitX], HouseInfo[houseid][hExitY], HouseInfo[houseid][hExitZ]))
            {
                SetPlayerInterior(playerid, 0);
                SetPlayerPos(playerid, HouseInfo[houseid][hEnterX], HouseInfo[houseid][hEnterY], HouseInfo[houseid][hEnterZ]);
            }
        }
    }
    return 1;
}
when im at the enter house pos it link me to the house interior but when im at the exit house pos it link me to the air :\

please someone help me

thank you in advance
Reply


Messages In This Thread
House exit problem - by timaoux - 26.09.2011, 04:53
Re : House exit problem - by timaoux - 26.09.2011, 05:09

Forum Jump:


Users browsing this thread: 1 Guest(s)