Help with OnDialogResponse
#2

Try this
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
  if(dialogid == DIALOGID)
    {
        if(response)
        {
            if(listitem == 0)

            {
                  SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have picked up a Kevlar Vest from the shelf !");
                  SetPlayerArmour(playerid, 100);
            }

            if(listitem == 1)

            {
                  SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have taken a knife from the draw !");
                  GivePlayerWeapon(playerid, 4, 100000);//Knife
            }

            if(listitem == 2)
            {

                  SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have taken a Desert Eagle from the shelf !");
                  GivePlayerWeapon(playerid, 24, 100000);//Deagle
            }

            if(listitem == 3)
            {

                  SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have have taken an MP5 from the shelf !");
                  GivePlayerWeapon(playerid, 29, 100000);//mp5
            }

            if(listitem == 4)
            {

                  SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have taken an M4 from the shelf !");
                  GivePlayerWeapon(playerid, 31, 100000);//M4
            }

            if(listitem == 5)
            {

                  SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have taken a SPAS 12 from the Gun Locker !");
                  GivePlayerWeapon(playerid, 27, 100000);//spas12

            }

            if(listitem == 6)
            {

                  SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have carefully taken a Sniper Rifle out of the Gun Locker !");
                  GivePlayerWeapon(playerid, 34, 100000);//Sniper Rifle
            }
            if(listitem == 7)
            {

                  SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have taken 2 Grenade's from the shelf");
                  GivePlayerWeapon(playerid, 16, 2);//Naids
            }
            if(listitem == 8)
            {

                  SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have taken 2 Tear Gas' from the shelf !");
                  GivePlayerWeapon(playerid, 17, 2);//Tear Gas
            }
        }
    }
    return true;
}
Reply


Messages In This Thread
Help with OnDialogResponse - by xLowrider - 02.12.2009, 07:22
Re: Help with OnDialogResponse - by Abernethy - 02.12.2009, 07:32
Re: Help with OnDialogResponse - by xLowrider - 02.12.2009, 07:43
Re: Help with OnDialogResponse - by Abernethy - 02.12.2009, 09:28
Re: Help with OnDialogResponse - by MaykoX - 12.01.2010, 17:55

Forum Jump:


Users browsing this thread: 1 Guest(s)