[Tutorial] Selection of teams (DIALOG)
#1

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 )
Reply
#2

Good tut, But next time use [pawn] [/pawn]
Reply
#3

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

Thanks and ok.
Reply
#5

good tutorial
Reply
#6

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.
Reply
#7

sweet tutorial, thanks man
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)