SA-MP Forums Archive
Need Help - Houses with same interior ! - 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: Need Help - Houses with same interior ! (/showthread.php?tid=271654)



Need Help - Houses with same interior ! - MrBlake - 25.07.2011

Hi everyone ! I have a problem with the houses.
I create in propety.cfg six houses with the same interior / spawn coordonates but with diferents virtual worlds. And when I enter on a house at /exit it's teleporting me at other house with the same interior. What I can to do ?



Re: Need Help - Houses with same interior ! - =WoR=Varth - 26.07.2011

Use unique ID or https://sampwiki.blast.hk/wiki/GetPlayerVirtualWorld


Re: Need Help - Houses with same interior ! - MrBlake - 26.07.2011

But how I can use unique ID ?


Re: Need Help - Houses with same interior ! - [MG]Dimi - 26.07.2011

Probably use SetPlayerInterior AND SetPlayerVirtualWorld


Re: Need Help - Houses with same interior ! - MrBlake - 26.07.2011

At /enter command is used SetPlayerInterior and SetPlayerVirtualWorld(playerid, i)
and at /exit command is used SetPlayerInterior(playerid, 0) and SetPlayerVirtualworld(playerid, 0)

But i don't have problems with other players in the house, because i use differents virtual worlds, but my problem is :

I ENTER IN A HOUSE WITH INTERIOR 2 FOR EXAMPLE AND AT /EXIT IT'S TELEPORTING ME TO THE PICKUP OF THE LAST HOUSE CREATED IN THE SCRIPTFILES WITH INTERIOR 2.
Who want help me with this problem, my messenger id is myster_blake



Re: Need Help - Houses with same interior ! - Compton - 26.07.2011

Ye, I got the same problem but not with houses but with 24/7 stores with same interior. Looking for some help how to solve it.


Re: Need Help - Houses with same interior ! - =WoR=Varth - 27.07.2011

As I said you can make a unique house ID.
f.e:
pawn Code:
new ThisIsUnique[MAX_PLAYERS];

//Somewhere in your enter command
if(IsPlayerInRangeOfPoint(playerid,3,xxx,yyy,zzz))
{
    ThisIsUnique[playerid] = 3;
    .....................
//End

//Somewhere in your exit command
if(IsPlayerInRangeOfPoint(playerid,3,xxx,yyy,zzz) && ThisIsUnique[playerid] = 3)
{
    ThisIsUnique[playerid] = 0;
    .....................



Re: Need Help - Houses with same interior ! - MrBlake - 31.07.2011

Fixed !

Close, please !