07.12.2015, 16:13
Quote:
|
Sorry for all this but had to mention that it happens vice versa it enters to house id 2 but not at houseid 1
anyway i did what you tell me and i noticed that when i go at house id 1 again i can't enter and says you are not near any house but at house id 2 i can |
Код:
stock GetHouseID(playerid)
{
for(new i=0; i<MAX_HOUSES; i++)
{
if(IsPlayerInRangeOfPoint(playerid, 2, HouseInfo[i][XExit], HouseInfo[i][YExit], HouseInfo[i][ZExit]))
{
return i;
}
else if(IsPlayerInRangeOfPoint(playerid, 2, HouseInfo[i][XEnt], HouseInfo[i][YEnt], HouseInfo[i][ZEnt]))
{
return i;
}
}
return INVALID_HOUSE_ID;
}

