Does anyone has clue why its NOT working?
#1

I really dont see what's wrong with that, maybe the variable i? but I setted it good.. atleast, I think so.
Anyways, does anyone has clue what's wrong down here? it is supposed to check if player has a house, and if he does, it will spawn him into his house's interior.
pawn Код:
else if(Player[playerid][House] != 0) {
                for(new i = 0; i < sizeof(Houses); i++) {
                    if(Player[playerid][PrisonID] != 1) {
                        if(Player[playerid][PrisonID] != 2) {
                            Player[playerid][InHouse] = i;
                            SetPlayerInterior(playerid, Houses[i][hInteriorID]);
                            SetPlayerVirtualWorld(playerid, 55000+i);
                            SetPlayerPos(playerid, Houses[Player[playerid][House]][hInteriorX], Houses[Player[playerid][House]][hInteriorY], Houses[Player[playerid][House]][hInteriorZ]);
                            }
                        }
                    }
                }
            }
Thank you.
Reply
#2

Quote:

what's wrong down here?

You tell us. What's wrong with the code? It give you an error or what?
Reply
#3

It is not working properly, I mean... its not working at all,
Quote:

it is supposed to check if player has a house, and if he does, it will spawn him into his house's interior.

Reply
#4

Where did you put that code?
Use debug, if it's called or not each statement.
pawn Код:
else if(Player[playerid][House] != 0)
{
    print("1");
    for(new i = 0; i < sizeof(Houses); i++)
    {
        print("2");
        if(Player[playerid][PrisonID] != 1)
        {
            print("3");
            if(Player[playerid][PrisonID] != 2)
            {
                print("4");
                Player[playerid][InHouse] = i;
                SetPlayerInterior(playerid, Houses[i][hInteriorID]);
                SetPlayerVirtualWorld(playerid, 55000+i);
                SetPlayerPos(playerid, Houses[Player[playerid][House]][hInteriorX], Houses[Player[playerid][House]][hInteriorY], Houses[Player[playerid][House]][hInteriorZ]);
            }
        }
    }
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)