Is it possible to get a variable in DialogResponse
#6

pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
  new family;
    if(dialogid == 1)
    {
    PlayerPlaySound(playerid, 1132, 0.0, 0.0, 0.0);
    ShowPlayerDialog(playerid,2,DIALOG_STYLE_INPUT,"Gang Creation - 2nd step","Please enter the name of the gang you want to create below.","Done","Cancel");
    family = listitem;
    }
    if(dialogid == 2)
  {
        if(!strlen(inputtext))
    {
      SendClientMessage(playerid, 0xFF0000FF, "Gang Creation setup canceled");
      return 1;
    }
    if(!response)
    {
        SendClientMessage(playerid, 0xFF0000FF, "Gang Creation setup canceled");
        return 1;
    }
        new idx;
        new length = strlen(inputtext);
        while ((idx < length) && (inputtext[idx] <= ' '))
        {
          idx++;
        }
        new offset = idx;
        new result[64];
        while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
        {
          result[idx - offset] = inputtext[idx];
          idx++;
        }
        result[idx - offset] = EOS;
        PlayerPlaySound(playerid, 1132, 0.0, 0.0, 0.0);
    strmid(FamilyInfo[family][FamilyName], result, 0, strlen(result), 255);
        SaveFamilies();
    SendClientMessage(playerid, COLOR_WHITE, "You've adjusted your Family's Name.");
    }
    return 1;
}
Updated.....same problem.
Reply


Messages In This Thread
Is it possible to get a variable in DialogResponse - by ||123|| - 17.06.2010, 00:02
Re: Is it possible to get a variable in DialogResponse - by ||123|| - 17.06.2010, 00:28
Re: Is it possible to get a variable in DialogResponse - by ||123|| - 17.06.2010, 01:13
Re: Is it possible to get a variable in DialogResponse - by dpstdd - 17.06.2010, 02:19
Re: Is it possible to get a variable in DialogResponse - by ||123|| - 17.06.2010, 03:28
Re: Is it possible to get a variable in DialogResponse - by ||123|| - 17.06.2010, 03:31

Forum Jump:


Users browsing this thread: 6 Guest(s)