SA-MP Forums Archive
Interior Locations - 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: Interior Locations (/showthread.php?tid=462331)



Interior Locations - JaKe Elite - 06.09.2013

I saw Cueball's Location Script,
However it is bugged when player is inside the interior,
It shows wrong location like when you're in a interior (for example only) it will show Mount Chilliad (the location of interior) instead of the Interior name.

Is there anyway to fix this?


Re: Interior Locations - JaKe Elite - 07.09.2013

Bump.


Re: Interior Locations - XcorelloX - 07.09.2013

That's due to the fact that the interiors are mapped over those locations, I suppose you could modify the include / filterscript to detect whether the players interior (GetPlayerInterior) is equal to 0. That will remove the showing of the textdraw whilst inside an interior (as long as the players interior is set upon entering).

As for having the names of the interiors, you would have to get the coordinates for each corner of the interior (like adding a gangzone) and enter them into the array that stores the zones and inputting a new one (with your above coordinates) and enter the interior name.

Hope this helps.


Re: Interior Locations - JaKe Elite - 07.09.2013

^Yes current i use a code to detect if player is interior to avoid this problem.
But is there any other way to this?

If there is no other way then i should use your way.


Re: Interior Locations - JaKe Elite - 07.09.2013

Now i'm having a problem, Some of the stores shares the same interior and i'm expecting that it will kept showing "Starfish Casino 24/7" because it uses the same zone area. Any way to fix this?

pawn Код:
{"Starfish Casino 24/7",        {-38.1375,-58.1593,1007.7020,-16.6392,-47.8263,1007.7020}},
    {"The Emerald Isle 24/7",       {-38.1375,-58.1593,1007.7020,-16.6392,-47.8263,1007.7020}},
from the location arrays.

pawn Код:
stock GetPlayer2DZone(playerid, zone[], len) //Credits to Cueball, Betamaster, Mabako, and Simon (for finetuning).
{
    new Float:x, Float:y, Float:z;
    GetPlayerPos(playerid, x, y, z);
    for(new i = 0; i != sizeof(gSAZones); i++ )
    {
        if(x >= gSAZones[i][SAZONE_AREA][0] && x <= gSAZones[i][SAZONE_AREA][3] && y >= gSAZones[i][SAZONE_AREA][1] && y <= gSAZones[i][SAZONE_AREA][4])
        {
            return format(zone, len, gSAZones[i][SAZONE_NAME], 0);
        }
    }
    return 0;
}