07.12.2015, 15:29
print your house info & player info to see if they're loaded right,
if setting player pos wrongly print your house float:
PHP код:
else if(IsPlayerInRangeOfPoint(playerid, 2.0, HouseInfo[hid][XEnt],HouseInfo[hid][YEnt],HouseInfo[hid][ZEnt])) //enter house!
{
printf(Player House ID: %d, House OwnerID: %d",pinfo[playerid][ID],HouseInfo[hid][HOwnerID]);
if(pinfo[playerid][ID] != HouseInfo[hid][HOwnerID] && HouseInfo[hid][HOwned] == 1) return SendClientMessage(playerid,-1,""COL_RED"SERVER"COL_WHITE":You can't enter the house since it's not yours");
if(pinfo[playerid][ID] == HouseInfo[hid][HOwnerID] && HouseInfo[hid][HOwned] == 1)
{
EnterHouse(playerid,hid);
}
}
PHP код:
function EnterHouse(playerid,houseid)
{
SetPlayerPos(playerid,HouseInfo[houseid][XExit],HouseInfo[houseid][YExit],HouseInfo[houseid][ZExit]);
printf("%f, %f, %f",HouseInfo[houseid][XExit],HouseInfo[houseid][YExit],HouseInfo[houseid][ZExit]);
SetPlayerInterior(playerid,HouseInfo[houseid][HInterior]);
SetPlayerVirtualWorld(playerid,HouseInfo[houseid][HVirtualWorld]);
Loading(playerid);
return 1;
}