Help with on dialog response
#1

Hello, i've been working on a new death match and all is well, it's just this response, it all works fine, it's just not teleporting me nor giving me a weapon when i press yes on the dialog, i am not that good with responses, so this is me trying to learn it.
pawn Code:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(response)
        {
            switch(dialogid == Deathmatch)
           {
               case 1:
               {
                    switch(listitem)
                    {
                         case 0:
                         {
                          ShowPlayerDialog(playerid, LSDM, DIALOG_STYLE_MSGBOX, "LS carpark DM", "You have chosen LS carpark DM, do you want to start the death match?", "Yes", "No");
                         }
                         case 1:
                         {
                          ShowPlayerDialog(playerid, LVDM, DIALOG_STYLE_MSGBOX, "LV warehouse DM", "You have chosen LV warehouse DM, do you want to start the death match?", "Yes", "No");
                         }
                         case 2:
                         {
                         ShowPlayerDialog(playerid, SFDM, DIALOG_STYLE_MSGBOX, "SF tennis courts DM", "You have chosen SF tennis courts DM, do you want to start the death match?", "Yes", "No");
                         {
                         if(dialogid == LSDM)
                         {
                         if(response)
                         {
                         new string[240];
                         format(string, sizeof(string), "has started LS carpark deathmatch, type /dm to join!");
                         SendClientMessageToAll(-1, string);
                         SetPlayerPos(playerid, 2798.2031,-1465.9199,24.1875);
                         GivePlayerWeapon(playerid, 28, 999999);
                         SetPlayerHealth(playerid, 100);
                         }
                         }
                         }

                    }
                }
            }
        }
}
    return 1;
}
If you can tell me where i am going wrong that would be great, thank you!
Reply


Messages In This Thread
Help with on dialog response - by LeXuZ - 01.12.2014, 18:07
Re: Help with on dialog response - by Runn3R - 01.12.2014, 18:16
Re: Help with on dialog response - by LeXuZ - 01.12.2014, 18:28
Re: Help with on dialog response - by Runn3R - 01.12.2014, 18:31
Re: Help with on dialog response - by LeXuZ - 01.12.2014, 18:32
Re: Help with on dialog response - by Runn3R - 01.12.2014, 18:39
Re: Help with on dialog response - by LeXuZ - 01.12.2014, 18:43
Re: Help with on dialog response - by LeXuZ - 01.12.2014, 19:19
Re: Help with on dialog response - by Runn3R - 01.12.2014, 19:24
Re: Help with on dialog response - by LeXuZ - 01.12.2014, 19:30

Forum Jump:


Users browsing this thread: 1 Guest(s)