Can't see House Interior!
#1

When I spawned or enter a house, I can only see blue sky without interior, how do I fix this problem? (If I set my virtual world to something, it's work but I already set it in script but still not working).

PHP код:
enum h_Info
{
    
hID,
    
hOwner[MAX_PLAYER_NAME],
    
bool:hRentable,
    
hRentprice,
    
hLevel,
    
bool:hClosed,
    
hSellprice,
    
bool:hBuyable,
    
hInteriorPack,
    
Float:hX,
    
Float:hY,
    
Float:hZ,
    
hInterior,
    
hVirtualWorld,
}
new 
HouseInfo[MAX_HOUSES][h_Info];
enum hInteriors
{
    
intLevel,
    
Float:intX,
    
Float:intY,
    
Float:intZ,
    
hVirtual,
    
intModel,
    
intPrice,
    
_stars,
}
new 
IntInfo[][hInteriors] = {
    {
0,445.04,508.861001.42,12,2,0,1},
    {
1,2807.62,-1171.90,1025.57,8,15,500000,1}
}; 
When player enter the house
PHP код:
    new tmpid;
    
tmpid IsPlayerOutHouse(playerid);
    if(
tmpid != -&& !IsPlayerInAnyVehicle(playerid))
    {
        if(
HouseInfo[tmpid][hClosed] == true && PlayerInfo[playerid][housenum] != tmpid) return GameTextForPlayer(playerid,"~r~Closed"30003);
        new 
intpack HouseInfo[tmpid][hInteriorPack];
        
SetPlayerPos(playeridIntInfo[intpack][intX], IntInfo[intpack][intY], IntInfo[intpack][intZ]);
        
SetPlayerInterior(playeridtmpid+1);
        
SetPlayerVirtualWorld(playeridtmpid+1);
        
SetPlayerFacingAngle(playeridIntInfo[intpack][intY]);
        
SetCameraBehindPlayer(playerid);
        
PlayerTemp[playerid][tmphouse] = tmpid;
        
SaveHouse(tmpid);
        return 
1;
    } 
Reply
#2

Try removing the one i've marked red, the interior must be 0

Quote:

new tmpid;
tmpid = IsPlayerOutHouse(playerid);
if(tmpid != -1 && !IsPlayerInAnyVehicle(playerid))
{
if(HouseInfo[tmpid][hClosed] == true && PlayerInfo[playerid][housenum] != tmpid) return GameTextForPlayer(playerid,"~r~Closed", 3000, 3);
new intpack = HouseInfo[tmpid][hInteriorPack];
SetPlayerPos(playerid, IntInfo[intpack][intX], IntInfo[intpack][intY], IntInfo[intpack][intZ]);
SetPlayerInterior(playerid, tmpid+1);
SetPlayerVirtualWorld(playerid, tmpid+1);
SetPlayerFacingAngle(playerid, IntInfo[intpack][intY]);
SetCameraBehindPlayer(playerid);
PlayerTemp[playerid][tmphouse] = tmpid;
SaveHouse(tmpid);
return 1;
}

Reply
#3

doesnt fix the problem
Reply
#4

Can you send the code from your IsPlayerOutHouse function?
Reply
#5

here

PHP код:
stock IsPlayerOutHouse(playeridextra 0)
{
    new 
temp = -1iSize;
    if(
extraiSize 5;
    else 
iSize 2;
    
HouseLoop(h)
    {
        if(
HouseInfo[h][hActive] != true) continue;
        if(
GetPlayerInterior(playerid) == HouseInfo[h][hInterior] && GetPlayerVirtualWorld(playerid) == HouseInfo[h][hVirtualWorld])
        {
            if(
IsPlayerInRangeOfPoint(playeridiSizeHouseInfo[h][hX], HouseInfo[h][hY], HouseInfo[h][hZ]))
                return 
h;
        }
    }
    return 
temp;

Reply
#6

Код:
When I spawned or enter a house, I can only see blue sky without interior
Are you using GTA San Andreas interiors? g00gle about them. You must always set a certain interior for those - it's not the virtual world that's responsible for them being streamed in for you properly.
Reply
#7

Quote:
Originally Posted by Maxandmov
Посмотреть сообщение
Код:
When I spawned or enter a house, I can only see blue sky without interior
Are you using GTA San Andreas interiors? g00gle about them. You must always set a certain interior for those - it's not the virtual world that's responsible for them being streamed in for you properly.
Indeed, in your script you might use vw 0, instead of its exact virtual world.
Reply
#8

new tmpid;
tmpid = IsPlayerOutHouse(playerid);
Код:
  if(tmpid != -1 && !IsPlayerInAnyVehicle(playerid))
    {
        if(HouseInfo[tmpid][hClosed] == true && PlayerInfo[playerid][housenum] != tmpid) return GameTextForPlayer(playerid,"~r~Closed", 3000, 3);
        new intpack = HouseInfo[tmpid][hInteriorPack];
        SetPlayerPos(playerid, IntInfo[intpack][intX], IntInfo[intpack][intY], IntInfo[intpack][intZ]);
        SetPlayerInterior(playerid, House Interior Id variable);
        SetPlayerVirtualWorld(playerid, houseid + 1000);
        SetPlayerFacingAngle(playerid, IntInfo[intpack][intY]);
        SetCameraBehindPlayer(playerid);
        PlayerTemp[playerid][tmphouse] = tmpid;
        SaveHouse(tmpid);
        return 1;
    }
Reply
#9

Yes, I'm using SA-MP Interior not custom.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)