SA-MP Forums Archive
[Tutorial] Selection of teams (DIALOG) - 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: Tutorials (https://sampforum.blast.hk/forumdisplay.php?fid=70)
+---- Thread: [Tutorial] Selection of teams (DIALOG) (/showthread.php?tid=311284)



Selection of teams (DIALOG) - ...Neno... - 15.01.2012

In this tutorial I'll explain and show how to make the selection of teams in dialog..Lets go.

First you need to make a selection of teams, and we'll do the "OnPlayerConnect" as follows.
Under the "OnPlayerConnect" adding:

Код:
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Izaberi tim", "Tim jedan\nTim dva", "U redu", "");
ShowPlayerDialog - display dialog player
playerid - player id
1 - number of dialogue
DIALOG_STYLE_LIST - dialog that says "the list".


Now we need when choosing a team to win what should be, and it's skin, money, position, etc. will be spawn ...
For this, we will now go under the "OnDialogResponse" and under "OnDialogResponse" adding:

Код:
if(response)
    {
    switch(dialogid)
        {
      case 1:
           {
              switch(listitem)
           {
               case 0:
               {
                AddPlayerClass(97,1199.0999,-2520.6230,13.0624,65.8332,0,0,0,0,0,0); //
               }
               case 1:
               {
               AddPlayerClass(97,1199.0999,-2520.6230,13.0624,65.8332,0,0,0,0,0,0); //
               }
           }
           }
   }
    }
   return 1;
}
AddPlayerClass - giving class player
97 - id skins
1199.0999, -2520.6230,13.0624 - x, y and z coordinates where players will be spawn
65.8332 - angle
0,0,0,0,0,0 - bullets and weapons


TUT By Neno (and sorry for my bad english )


Re: Selection of teams (DIALOG) - seanny - 16.01.2012

Good tut, But next time use [pawn] [/pawn]


Respuesta: Selection of teams (DIALOG) - [Nikk] - 17.01.2012

Nice tut men, but how seanny says, usa [Pawn] [/pawn,]


Re: Selection of teams (DIALOG) - ...Neno... - 17.01.2012

Thanks and ok.


Re: Selection of teams (DIALOG) - Mr.Fames - 24.01.2012

good tutorial


Re: Selection of teams (DIALOG) - Vince - 24.01.2012

Anyone who says that this is a good tutorial, clearly has no idea what he's talking about. AddPlayerClass is only to be used in OnGameModeInit. Have a look at SetSpawnInfo instead. Second, when writing a tutorial, write EVERYTHING in English. I have no idea what "Izaberi tim", "Tim jedan\nTim dva" is supposed to mean. And thirdly, the indentation is messed up.


Re: Selection of teams (DIALOG) - zeromaxell - 27.02.2012

sweet tutorial, thanks man