SA-MP Forums Archive
A Question about Dialogs - 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: A Question about Dialogs (/showthread.php?tid=244975)



A Question about Dialogs - Compton - 29.03.2011

Hello, sorry for such a silly question but I made a dialog and I just wonder how can I move it to a interior(24/7), so it will work only there, cause now I can activate the dialog window anywhere.

-Thank you


Re: A Question about Dialogs - Markx - 29.03.2011

https://sampwiki.blast.hk/wiki/GetPlayerInterior
https://sampwiki.blast.hk/wiki/InteriorIDs

Get the players interior, if it work, return 1, if not, return it 0.


Re: A Question about Dialogs - Compton - 29.03.2011

Ok but tell me where should I actually put the GetPlayerInterior line to in my script?


Re: A Question about Dialogs - xir - 29.03.2011

You can do it like this

pawn Код:
COMMAND:dialog(playerid, params[])
{
    if(!IsPlayerInRangeOfPoint(playerid,2.0, the coords of the 24/7 store)) return SendClientMessage(playerid, -1, "You need to be in the 24/7 store"); // the "2.0" is how many meters the player should be in before the command is available
    else
    {
        ShowPlayerDialog(playerid, 999, YourDialogStyle?, "Your dialog", "Select", "Exit"); // change it to your style
        return 1;
    }
}