Teams
#6

New code:

pawn Код:
#define DIALOG_SKILLS 255 //Or another positive number
#define SKILL_0 0
#define SKILL_1 1
#define SKILL_2 2
#define SKILL_3 3

new playerSkill[MAX_PLAYERS];

public OnPlayerSpawn(playerid)
{
    ShowPlayerDialog(playerid, DIALOG_SKILLS, DIALOG_STYLE_LIST, "Select a skill:" , "Skill 0\nSkill 1\nSkill 2\nSkill 3", "Select", "");
  return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
  switch(dialogid)
  {
    case DIALOG_SKILLS:
    {
      if(!response) return 1;
      switch(listitem)
      {
        case 0: { playerSkill[playerid] = SKILL_0; SendClientMessage(playerid, 0x00FF00FF, "You selected skill '0'"); }//Forgot this ...
        case 1: { playerSkill[playerid] = SKILL_1; SendClientMessage(playerid, 0x00FF00FF, "You selected skill '1'"); }
        case 2: { playerSkill[playerid] = SKILL_2; SendClientMessage(playerid, 0x00FF00FF, "You selected skill '2'"); }
        case 3: { playerSkill[playerid] = SKILL_3; SendClientMessage(playerid, 0x00FF00FF, "You selected skill '3'"); }

      }

    }

  }
  return 0;
}
PS:
Quote:

This forum requires that you wait 120 seconds between posts. Please try again in 37 seconds.
This forum requires that you wait 120 seconds between posts. Please try again in 22 seconds.
This forum requires that you wait 120 seconds between posts. Please try again in 11 seconds.

LoL
Reply


Messages In This Thread
Teams - by Sid_Alexander - 19.05.2011, 16:10
Re: Teams - by Sasino97 - 19.05.2011, 16:26
Re: Teams - by Sid_Alexander - 19.05.2011, 16:37
Re: Teams - by Sasino97 - 19.05.2011, 16:39
Re: Teams - by Sid_Alexander - 19.05.2011, 16:40
Re: Teams - by Sasino97 - 19.05.2011, 16:41
Re: Teams - by Sid_Alexander - 19.05.2011, 16:47

Forum Jump:


Users browsing this thread: 1 Guest(s)