SA-MP Forums Archive
Creating an Item Box - 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: Creating an Item Box (/showthread.php?tid=147649)



Creating an Item Box - TheNuttyScientist - 13.05.2010

I am planning on creating a /teleports command with the menu seen on single player. What I need to know is how to have the player teleporting upon selecting one of the teleport areas. Help?


Re: Creating an Item Box - ViruZZzZ_ChiLLL - 13.05.2010

its TextDraws I think
anyways, you don't want ShowPlayerDialog??


Re: Creating an Item Box - TheNuttyScientist - 13.05.2010

ShowPlayerDialog? Well, if it will help me, yes I do. :P


Re: Creating an Item Box - ViruZZzZ_ChiLLL - 13.05.2010

Quote:
Originally Posted by BlackBlood1337
ShowPlayerDialog? Well, if it will help me, yes I do. :P
Okay, so we don't spam, add me in msn virusandchill@yahoo.com
and I'll teach you


Re: Creating an Item Box - ettans - 13.05.2010

https://sampwiki.blast.hk/wiki/ShowPlayerDialog
https://sampwiki.blast.hk/wiki/OnDialogResponse


Re: Creating an Item Box - TheNuttyScientist - 13.05.2010

What I need to know is where to put SetPlayerPos within creating the menu.


Re: Creating an Item Box - ViruZZzZ_ChiLLL - 13.05.2010

Quote:
Originally Posted by BlackBlood1337
What I need to know is where to put SetPlayerPos within creating the menu.
Yes
pawn Код:
if(dialogid == 1 && response);
{
SetPlayerPos(....)
}



Re: Creating an Item Box - juice.j - 13.05.2010

As he already said he wants to use single player menus:

https://sampwiki.blast.hk/wiki/CreateMenu
https://sampwiki.blast.hk/wiki/ShowMenuForPlayer

and regarding your specific question on how to use it:

https://sampwiki.blast.hk/wiki/OnPlayerSelectedMenuRow

Taken directly from the wiki example (modify as you wish):

Код:
public OnPlayerSelectedMenuRow(playerid, row)
{
  new Menu:current;
  current = GetPlayerMenu(playerid);
  if(current == menu)
  {
    switch(row)
    {
      case 0: SetPlayerPos(...);
      case 1: SetPlayerPos(...);
    }
  }
  return 1;
}