Help with DialogResponse
#2

pawn Код:
CMD:test(playerid, params[])
}
     ShowPlayerDialog(playerid, 0, DIALOG_STYLE_LIST, "Dialog Name", "Teleport\nCheckpoint", "Select", "Close");
     return 1;
{
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(response)
        {
            switch(dialogid == 0)
           {
               case 1:
               {
                  switch(listitem)
                 {
                case 0:
               {
                    SetPlayerPos(playerid, X, Y, Z);
               }
               case 1:
               {
                   SetPlayerCheckpoint(playerid, X, Y, Z, SIZE);
               }
           }
        }
    }
 }


public OnPlayerEnterCheckpoint(playerid)
{
    GivePlayerMoney(playerid, 1000);
    DisablePlayerCheckpoint(playerid);
    return 1;
}
Like this?
Reply


Messages In This Thread
Help with DialogResponse - by LeXuZ - 24.11.2014, 17:37
Re: Help with DialogResponse - by Jakwob - 24.11.2014, 17:48
Re: Help with DialogResponse - by LeXuZ - 24.11.2014, 17:51
Re: Help with DialogResponse - by Jakwob - 24.11.2014, 18:02
Re: Help with DialogResponse - by LeXuZ - 24.11.2014, 18:47

Forum Jump:


Users browsing this thread: 4 Guest(s)