Help with on dialog response
#5

Code:
       	case LSDM: // ANOTHER DIALOGID THAT IS CALLED
        {
            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);
            }
        }
full code
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");
                         }
                         }
                         }

                    }
                }
        case LSDM: // ANOTHER DIALOGID THAT IS CALLED
        {
            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);
            }
        }
        /*case LVDM:
        {
            if(response)
            {
                //CODE HERE
            }
        }
        case SFDM:
        {
            if(response)
            {
                //CODE HERE
            }*/

        }
    return 1;
}
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)