SA-MP Forums Archive
Help in Selection - 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: Help in Selection (/showthread.php?tid=166100)



Help in Selection - DreamKillah - 07.08.2010

OKay guys, I hope you could help me with this, I'm a new scripter. So I wanna ask is that,
I scripted 2 Teams, Like.. Red Team and Blue Team. I want to make these people who join my server to
choose, so How can I make them choose?


Re: Help in Selection - ViruZZzZ_ChiLLL - 07.08.2010

pawn Код:
public OnPlayerConnect(playerid)
{
  ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Team Choosing", "Please choose your team :\nRed Team\nBlue Team", "Select", "Cancel");
  return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
   if(dialogid == 1 && response)
   {
      switch(listitem)
      {
         case 0:{ }
         case 1:
         {
              // do somethings here for the Red Team
         }
         case 2:
         {
              // do somethings here for the Blue Team
         }
     }
  }
  return 1;
}
Maybe like that?


Re: Help in Selection - DreamKillah - 07.08.2010

Ay thanks let me try it