Advertisement
BlooDMasK

Untitled

Jul 18th, 2017
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 8.72 KB | None | 0 0
  1. #define DIALOG_CERCA 1
  2.  
  3. new Text:TextDrawPol5[MAX_PLAYERS];
  4.  
  5.  
  6. //onplayerconncet
  7.     TextDrawPol5[playerid] = TextDrawCreate(317.000000, 262.000000, "Cerca");
  8.     TextDrawAlignment(TextDrawPol5[playerid], 2);
  9.     TextDrawBackgroundColor(TextDrawPol5[playerid], 255);
  10.     TextDrawFont(TextDrawPol5[playerid], 1);
  11.     TextDrawLetterSize(TextDrawPol5[playerid], 0.500000, 2.000000);
  12.     TextDrawColor(TextDrawPol5[playerid], -1);
  13.     TextDrawSetOutline(TextDrawPol5[playerid], 0);
  14.     TextDrawSetProportional(TextDrawPol5[playerid], 1);
  15.     TextDrawSetShadow(TextDrawPol5[playerid], 1);
  16.     TextDrawUseBox(TextDrawPol5[playerid], 1);
  17.     TextDrawBoxColor(TextDrawPol5[playerid], 255);
  18.     TextDrawTextSize(TextDrawPol5[playerid], 15.000000, 48.000000);
  19.     TextDrawSetSelectable(TextDrawPol5[playerid], 1);
  20.     TextDrawBoxColor(TextDrawPol5[playerid], 0x00000070 );
  21.     TextDrawBackgroundColor(TextDrawPol5[playerid], 0x00000070);
  22.  
  23.  
  24. //sotto clickedid==SpritePolDx
  25.  
  26.         if(Skin[playerid] == 70)  Skin[playerid] = 71;//Security Guard
  27.         if(Skin[playerid] == 73)  Skin[playerid] = 74;//Null
  28.  
  29. //Sotto clickedid==SpritePolSx
  30.         if(Skin[playerid] ==  72) Skin[playerid] = 71;
  31.         if(Skin[playerid] ==  75) Skin[playerid] = 74;
  32.  
  33.  
  34. //SOTTO onplayerclicktextdraw
  35.         if(clickedid == TextDrawPol5[playerid]){//CERCA
  36.         TextDrawHideForPlayer(playerid, TextDrawPol0[playerid]);
  37.         TextDrawHideForPlayer(playerid, TextDrawPol1[playerid]);
  38.         TextDrawHideForPlayer(playerid, TextDrawPol2[playerid]);
  39.         TextDrawHideForPlayer(playerid, TextDrawPol3[playerid]);
  40.         TextDrawHideForPlayer(playerid, TextDrawPol4[playerid]);
  41.         TextDrawHideForPlayer(playerid, TextDrawPol5[playerid]);
  42.         TextDrawHideForPlayer(playerid, SpritePolDx[playerid]);
  43.         TextDrawHideForPlayer(playerid, SpritePolSx[playerid]);
  44.         ShowPlayerDialog(playerid, DIALOG_CERCA, DIALOG_STYLE_INPUT, "Cerca l'ID", "Inserisci l'ID della Skin che cerchi.", "Cerca", "Indietro");
  45.         return 1;}
  46.  
  47.  
  48. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  49. {
  50.     if(dialogid == DIALOG_CERCA){
  51.     if(!response){
  52.     TextDrawShowForPlayer(playerid, TextDrawPol0[playerid]);
  53.     TextDrawShowForPlayer(playerid, TextDrawPol1[playerid]);
  54.     TextDrawShowForPlayer(playerid, TextDrawPol2[playerid]);
  55.     TextDrawShowForPlayer(playerid, TextDrawPol3[playerid]);
  56.     TextDrawShowForPlayer(playerid, TextDrawPol4[playerid]);
  57.     TextDrawShowForPlayer(playerid, TextDrawPol5[playerid]);
  58.     TextDrawShowForPlayer(playerid, SpritePolDx[playerid]);
  59.     TextDrawShowForPlayer(playerid, SpritePolSx[playerid]);}
  60.     if(response){
  61.     new string2[500];
  62.     //=========//
  63.     new string_inputtext0[500];//Nessun ID inserito
  64.     new string_inputtext1[500];//ID invalido
  65.     //====0====//
  66.     strcat(string_inputtext0, "Devi inserire un ID!\n");
  67.     strcat(string_inputtext0, "Inserisci l'ID della Skin che cerchi.");
  68.     //====1====//
  69.     strcat(string_inputtext1, "Devi inserire un ID valido!\n");
  70.     strcat(string_inputtext1, "Inserisci l'ID della Skin che cerchi.");
  71.     //=========//
  72.     if(sscanf(inputtext, "d", Skin[playerid])) return ShowPlayerDialog(playerid, DIALOG_CERCA, DIALOG_STYLE_INPUT, "Cerca l'ID", string_inputtext0, "Cerca", "Indietro");
  73.     if(Skin[playerid] > 311 || Skin[playerid] < 0) return ShowPlayerDialog(playerid, DIALOG_CERCA, DIALOG_STYLE_INPUT, "Cerca l'ID", string_inputtext1 , "Cerca", "Indietro");
  74.     if(Skin[playerid] == 0)         return ShowPlayerDialog(playerid, DIALOG_CERCA, DIALOG_STYLE_INPUT, "Cerca l'ID", string_inputtext1, "Cerca", "Indietro");
  75.     else if(Skin[playerid] == 71)   return ShowPlayerDialog(playerid, DIALOG_CERCA, DIALOG_STYLE_INPUT, "Cerca l'ID", string_inputtext1, "Cerca", "Indietro");
  76.     else if(Skin[playerid] == 74)   return ShowPlayerDialog(playerid, DIALOG_CERCA, DIALOG_STYLE_INPUT, "Cerca l'ID", string_inputtext1, "Cerca", "Indietro");
  77.     else if(Skin[playerid] == 217)  return ShowPlayerDialog(playerid, DIALOG_CERCA, DIALOG_STYLE_INPUT, "Cerca l'ID", string_inputtext1, "Cerca", "Indietro");
  78.     else if(Skin[playerid] == 265)  return ShowPlayerDialog(playerid, DIALOG_CERCA, DIALOG_STYLE_INPUT, "Cerca l'ID", string_inputtext1, "Cerca", "Indietro");
  79.     else if(Skin[playerid] == 266)  return ShowPlayerDialog(playerid, DIALOG_CERCA, DIALOG_STYLE_INPUT, "Cerca l'ID", string_inputtext1, "Cerca", "Indietro");
  80.     else if(Skin[playerid] == 267)  return ShowPlayerDialog(playerid, DIALOG_CERCA, DIALOG_STYLE_INPUT, "Cerca l'ID", string_inputtext1, "Cerca", "Indietro");
  81.     else if(Skin[playerid] == 274)  return ShowPlayerDialog(playerid, DIALOG_CERCA, DIALOG_STYLE_INPUT, "Cerca l'ID", string_inputtext1, "Cerca", "Indietro");
  82.     else if(Skin[playerid] == 276)  return ShowPlayerDialog(playerid, DIALOG_CERCA, DIALOG_STYLE_INPUT, "Cerca l'ID", string_inputtext1, "Cerca", "Indietro");
  83.     else if(Skin[playerid] == 277)  return ShowPlayerDialog(playerid, DIALOG_CERCA, DIALOG_STYLE_INPUT, "Cerca l'ID", string_inputtext1, "Cerca", "Indietro");
  84.     else if(Skin[playerid] == 278)  return ShowPlayerDialog(playerid, DIALOG_CERCA, DIALOG_STYLE_INPUT, "Cerca l'ID", string_inputtext1, "Cerca", "Indietro");
  85.     else if(Skin[playerid] == 279)  return ShowPlayerDialog(playerid, DIALOG_CERCA, DIALOG_STYLE_INPUT, "Cerca l'ID", string_inputtext1, "Cerca", "Indietro");
  86.     else if(Skin[playerid] == 280)  return ShowPlayerDialog(playerid, DIALOG_CERCA, DIALOG_STYLE_INPUT, "Cerca l'ID", string_inputtext1, "Cerca", "Indietro");
  87.     else if(Skin[playerid] == 281)  return ShowPlayerDialog(playerid, DIALOG_CERCA, DIALOG_STYLE_INPUT, "Cerca l'ID", string_inputtext1, "Cerca", "Indietro");
  88.     else if(Skin[playerid] == 282)  return ShowPlayerDialog(playerid, DIALOG_CERCA, DIALOG_STYLE_INPUT, "Cerca l'ID", string_inputtext1, "Cerca", "Indietro");
  89.     else if(Skin[playerid] == 283)  return ShowPlayerDialog(playerid, DIALOG_CERCA, DIALOG_STYLE_INPUT, "Cerca l'ID", string_inputtext1, "Cerca", "Indietro");
  90.     else if(Skin[playerid] == 284)  return ShowPlayerDialog(playerid, DIALOG_CERCA, DIALOG_STYLE_INPUT, "Cerca l'ID", string_inputtext1, "Cerca", "Indietro");
  91.     else if(Skin[playerid] == 285)  return ShowPlayerDialog(playerid, DIALOG_CERCA, DIALOG_STYLE_INPUT, "Cerca l'ID", string_inputtext1, "Cerca", "Indietro");
  92.     else if(Skin[playerid] == 286)  return ShowPlayerDialog(playerid, DIALOG_CERCA, DIALOG_STYLE_INPUT, "Cerca l'ID", string_inputtext1, "Cerca", "Indietro");
  93.     else if(Skin[playerid] == 287)  return ShowPlayerDialog(playerid, DIALOG_CERCA, DIALOG_STYLE_INPUT, "Cerca l'ID", string_inputtext1, "Cerca", "Indietro");
  94.     else if(Skin[playerid] == 288)  return ShowPlayerDialog(playerid, DIALOG_CERCA, DIALOG_STYLE_INPUT, "Cerca l'ID", string_inputtext1, "Cerca", "Indietro");
  95.     else if(Skin[playerid] == 300)  return ShowPlayerDialog(playerid, DIALOG_CERCA, DIALOG_STYLE_INPUT, "Cerca l'ID", string_inputtext1, "Cerca", "Indietro");
  96.     else if(Skin[playerid] == 301)  return ShowPlayerDialog(playerid, DIALOG_CERCA, DIALOG_STYLE_INPUT, "Cerca l'ID", string_inputtext1, "Cerca", "Indietro");
  97.     else if(Skin[playerid] == 302)  return ShowPlayerDialog(playerid, DIALOG_CERCA, DIALOG_STYLE_INPUT, "Cerca l'ID", string_inputtext1, "Cerca", "Indietro");
  98.     else if(Skin[playerid] == 306)  return ShowPlayerDialog(playerid, DIALOG_CERCA, DIALOG_STYLE_INPUT, "Cerca l'ID", string_inputtext1, "Cerca", "Indietro");
  99.     else if(Skin[playerid] == 307)  return ShowPlayerDialog(playerid, DIALOG_CERCA, DIALOG_STYLE_INPUT, "Cerca l'ID", string_inputtext1, "Cerca", "Indietro");
  100.     else if(Skin[playerid] == 308)  return ShowPlayerDialog(playerid, DIALOG_CERCA, DIALOG_STYLE_INPUT, "Cerca l'ID", string_inputtext1, "Cerca", "Indietro");
  101.     else if(Skin[playerid] == 309)  return ShowPlayerDialog(playerid, DIALOG_CERCA, DIALOG_STYLE_INPUT, "Cerca l'ID", string_inputtext1, "Cerca", "Indietro");
  102.     else if(Skin[playerid] == 310)  return ShowPlayerDialog(playerid, DIALOG_CERCA, DIALOG_STYLE_INPUT, "Cerca l'ID", string_inputtext1, "Cerca", "Indietro");
  103.     else if(Skin[playerid] == 311)  return ShowPlayerDialog(playerid, DIALOG_CERCA, DIALOG_STYLE_INPUT, "Cerca l'ID", string_inputtext1, "Cerca", "Indietro");
  104.     Skin[playerid] = Skin[playerid];
  105.     format(string2, sizeof(string2), "Seleziona la tua Skin: %d", Skin[playerid]);
  106.     TextDrawSetString(TextDrawPol2[playerid], string2); //"Seleziona la tua Skin: ID skin"//
  107.     TextDrawSetPreviewModel(TextDrawPol0[playerid], Skin[playerid]);//Preview Sx
  108.     TextDrawSetPreviewModel(TextDrawPol1[playerid], Skin[playerid]);//Preview Dx
  109.     TextDrawShowForPlayer(playerid, TextDrawPol0[playerid]);
  110.     TextDrawShowForPlayer(playerid, TextDrawPol1[playerid]);
  111.     TextDrawShowForPlayer(playerid, TextDrawPol2[playerid]);
  112.     TextDrawShowForPlayer(playerid, TextDrawPol3[playerid]);
  113.     TextDrawShowForPlayer(playerid, TextDrawPol4[playerid]);
  114.     TextDrawShowForPlayer(playerid, TextDrawPol5[playerid]);
  115.     TextDrawShowForPlayer(playerid, SpritePolDx[playerid]);
  116.     TextDrawShowForPlayer(playerid, SpritePolSx[playerid]);}
  117.     return 1;}
  118.  
  119.     return 0;
  120. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement