22.04.2018, 17:22
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).
When player enter the house
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.86, 1001.42,12,2,0,1},
{1,2807.62,-1171.90,1025.57,8,15,500000,1}
};
PHP код:
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;
}