SA-MP Forums Archive
Changing Entrance Name 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: Changing Entrance Name Problem (/showthread.php?tid=604176)



Changing Entrance Name Problem - theonethatownz - 01.04.2016

Got a problem here, not sure why.

When I create a entrance, I am able to do change the entrance's name after.

Once I GMX or restart, I am unable and returns my not near entrance error?

The text and icons spawn, I am also unable to /enter.

Dialog:
PHP код:
            case 1: //Change Entrance Name
            
{
                if(
InRangeOfEntrance(playerid))
                {
                    
Dialog_Show(playerid, ChangeEntranceName, DIALOG_STYLE_INPUT, "Entrance Editor", "Please enter the desired name:", "Continue","Cancel");
                }
                else
                {
                    
SendErrorMessage(playerid, "You need to be standing in the entrance icon you wish to change the name of!");
                }
            } 
InRangeOfEntrance
PHP код:
public InRangeOfEntrance(playerid)
{
    for(new 
id = 0; id < MAX_ENTER; id++)
    {
        if(
IsPlayerInRangeOfPoint(playerid, 3.0, Entrance[id][PosX], Entrance[id][PosY], Entrance[id][PosZ]))
        {
            return 
id;
        }
    }
    return 
0;
} 



Re: Changing Entrance Name Problem - DTV - 01.04.2016

Are your entrance positions saving correctly?


Re: Changing Entrance Name Problem - theonethatownz - 01.04.2016

Yes. I have made the above a stock and decreased the range. Ive added a /einfo which shows my nearest entrance using the above function. I need to double check but i believe it updates the text but I am unable to use /enter