SA-MP Forums Archive
House exit problem - 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)
+--- Thread: House exit problem (/showthread.php?tid=285946)



House exit problem - timaoux - 26.09.2011

pawn Код:
if (PRESSED(KEY_SECONDARY_ATTACK))
    {
        new Name[255];
        GetPlayerName(playerid, Name, sizeof(Name));
        for(new houseid = 1; houseid < sizeof(HouseInfo); houseid++)
        {
            if(IsPlayerInRangeOfPoint(playerid, 3.0, HouseInfo[houseid][hEnterX], HouseInfo[houseid][hEnterY], HouseInfo[houseid][hEnterZ]))
            {
                if(HouseInfo[houseid][hOwned] == 1)
                {
                    if(!strcmp(Name, HouseInfo[houseid][hOwner], false, strlen(Name)))
                    {
                        SetPlayerInterior(playerid, HouseInfo[houseid][hInterior]);
                        SetPlayerPos(playerid, HouseInfo[houseid][hExitX], HouseInfo[houseid][hExitY], HouseInfo[houseid][hExitZ]);
                    }
                }
            }
            if(IsPlayerInRangeOfPoint(playerid, 3.0, HouseInfo[houseid][hExitX], HouseInfo[houseid][hExitY], HouseInfo[houseid][hExitZ]))
            {
                SetPlayerInterior(playerid, 0);
                SetPlayerPos(playerid, HouseInfo[houseid][hEnterX], HouseInfo[houseid][hEnterY], HouseInfo[houseid][hEnterZ]);
            }
        }
    }
    return 1;
}
when im at the enter house pos it link me to the house interior but when im at the exit house pos it link me to the air :\

please someone help me

thank you in advance


Re : House exit problem - timaoux - 26.09.2011

bumb, i found