House system problem..
#1

i got like 300 houses with different interiors and different virtual worlds each.

so the problem is..

when i go to a house (/enter) then i (/exit) i'm teleported to other house ExitX,Y,Z location.. and not
to the house that i've entered Exit location..

i dont know how to fix this.. like a mentioned at the top of the post, i got different virtual worlds in each house..

do i need to add something more?..

thanks..
Reply
#2

I seen it mention before about virtualworlds being the same ids Damn if i can remember but i remember something about it spawn you where else when exit...


Are you Sure your X,Y,Z are different From the other house 300 Houses Hehe is it just 1 or all of em?
Reply
#3

300 houses with all diferend virtualworlds... o_0
hmm if they are are diferent than u will not have problems with /exit command :/
btw and i have the problem with this /exit but i have 5 same interiors... :/
Reply
#4

if i had five interiors I put em in five different locations not the same location
Reply
#5

yeah yeha i know and i have 5 same interiors in deferent locations.. but idk how to solve that :/
Reply
#6

Well I aint got nothing better to do... PM your MSN if you have one ill help you with them 5 houses
Reply
#7

listen.. i have like bunch of files (HOUSEID.ini) in that .ini file i got all the house info..
when i said i have 300 houses i mean 300 .ini files and in each file i got a row (VirWorld=HOUSEID)
so...... if the house id is lets say.. 269 so the virtual world of the house will be the same.. (VirWorld=269)

basically the virtual world i think it's ok..

but the house interiors of all 300 houses are the same!
example:
house 26
VirWorld = 26
HouseInt = 10

house 128
VirWorld = 128
HouseInt = 10

As you can see the (HouseInt) is the same.. so when a player (/exit) they got to a different location..
maybe the problem is this..
Reply
#8

Well just make a damn Exit for the house to the front door on the out side of house
and make a exit command problem Solved ... if all houses are Set up to exit then Then do
Else IF(playeratpointrange something x y z
{
Setplayerpos(playerid, X, Y ,Z);
SetPlayerInterior(playerid) = 0;
SetPlayerVirtualWorld 0 get my drift

do ur next exit
Reply
#9

pawn Код:
if(strcmp(cmd, "/exit", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            for(new i = 0; i <  sizeof(HouseInfo); i++)
            {
                if(PlayerToPoint(5.0, playerid, HouseInfo[i][hExitX], HouseInfo[i][hExitY], HouseInfo[i][hExitZ]))
                {
                    SafeSetPlayerInterior(playerid,0);
                    SetPlayerPos(playerid,HouseInfo[i][hEntranceX],HouseInfo[i][hEntranceY],HouseInfo[i][hEntranceZ]);
                    PlayerInfo[playerid][pLocal] = 9999;
                    SetCameraBehindPlayer(playerid);
                    SetPlayerVirtualWorld(playerid,0);
                    PlayerInfo[playerid][pVirWorld] = 0;
                    PlayerInfo[playerid][pHouseEntered] = 9999;
                    if(HouseInfo[i][hHel] == 1)
                    {
                        new Float:tempheal;
                        GetPlayerHealth(playerid,tempheal);
                        if(tempheal < 100.0)
                        {
                            SetPlayerHealth(playerid,100.0);
                        }
                        return 1;
                    }
                }
            }
            for(new i = 0; i <  sizeof(BizzInfo); i++)
            {
                          ...........................
                          .............
thats my Exit command..

the exit if working fine i guess, but the if the houses got the same INTERIOR and i (/exit) it will teleport me in to other house with the same int but to the exit pos of hes..

example:

house 1 > /enter > im in the house now > /exit > im at the outside door of house 2

house 2 > same story but it will get me outside door of house 2 (THE SAME HOUSE)

so..... *** the house 1 is bugged cuz it have the same int of house 2 and house 2 is working fine ***

and thats the problem..
Reply
#10

Store in a variable or something the ID of the house that the player entered, Then when exiting instead of checking all the houses, simply Use that stored ID
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)