Dialog Input
#9

pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
  if(response)
  {
     if(dialogid == D_CHANGE_SKIN)
     {  
      if(!inputtext[0])
      {
        SendClientMessage(playerid, COLOR, "Type the skin ID you want!");
        ShowPlayerDialog(playerid, D_CHANGE_SKIN, DIALOG_STYLE_INPUT, "Skin", "Type in your wanted skin id into the input box.", "Change", "Cancel");
      }
      else if(IsValidSkin(strval(inputtext)) == 0)
      {
        SendClientMessage(playerid, COLOR, "Invalid skin ID!");
        ShowPlayerDialog(playerid, D_CHANGE_SKIN, DIALOG_STYLE_INPUT, "Skin", "Type in your wanted skin id into the input box.", "Change", "Cancel");
        return 1;
      }
      SetPlayerSkin(playerid, strval(inputtext));
      SetSpawnInfo(playerid, 0, strval(inputtext), 0.0, 0.0, 0.0, 0.0, 0, 0, 0, 0, 0, 0); // recommended
      SendClientMessage(playerid, "You have changed your skin!");
     }
  }
  return 1;
}
Reply


Messages In This Thread
Dialog Input - by TKZ227 - 23.05.2010, 03:01
Re: Dialog Input - by Babul - 23.05.2010, 03:43
Re: Dialog Input - by TKZ227 - 23.05.2010, 04:19
Re: Dialog Input - by Carlton - 23.05.2010, 04:24
Re: Dialog Input - by TKZ227 - 23.05.2010, 04:47
Re: Dialog Input - by Johndaone - 23.05.2010, 04:50
Re: Dialog Input - by Simon - 23.05.2010, 05:29
Re: Dialog Input - by TKZ227 - 29.05.2010, 01:12
Re: Dialog Input - by Miguel - 29.05.2010, 02:07
Re: Dialog Input - by aircombat - 29.05.2010, 07:38

Forum Jump:


Users browsing this thread: 6 Guest(s)