SA-MP Forums Archive
Does anyone has clue why its NOT working? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Does anyone has clue why its NOT working? (/showthread.php?tid=271551)



Does anyone has clue why its NOT working? - Ben7544 - 24.07.2011

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.


Re: Does anyone has clue why its NOT working? - =WoR=Varth - 25.07.2011

Quote:

what's wrong down here?

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


Re: Does anyone has clue why its NOT working? - Ben7544 - 25.07.2011

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.




Re: Does anyone has clue why its NOT working? - =WoR=Varth - 25.07.2011

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]);
            }
        }
    }
}