Advertisement
Guest User

Untitled

a guest
Apr 9th, 2020
263
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.18 KB | None | 0 0
  1. case 0:
  2. {
  3.     if(!strlen(factionInfo[arr][fType1]))
  4.     {
  5.         access = 0;
  6.     }
  7. }
  8.  
  9. //
  10.  
  11. if(access == 0)
  12. {
  13.     new
  14.         listing[60],
  15.         acc[10],
  16.         nb = 0;
  17.  
  18.     for(new i; i < sizeof(ScriptFactionInfo); i++)
  19.     {
  20.         format(acc, sizeof(acc), "%s\n", ScriptFactionInfo[i][scriptnom]);
  21.         strcat(listing, acc);
  22.  
  23.         MenuItems[playerid][nb] = i;
  24.         nb++;
  25.     }
  26.     ListitemDialog[playerid] = listitem;
  27.     ShowPlayerDialog(playerid, DIALOG_FSCRIPT+1, DIALOG_STYLE_LIST, "Ajouter un script", listing, "Sélectionner", "Fermer");
  28. }
  29. else
  30. {
  31.     ListitemDialog[playerid] = listitem;
  32.     ShowPlayerDialog(playerid, DIALOG_SCRIPT-1, DIALOG_STYLE_MSGBOX, "Retrait de script", "T'es sur ?", "Oui", "X");
  33. }
  34.  
  35. //
  36.  
  37. if(dialogid == DIALOG_SCRIPT)
  38. {
  39.     if(response)
  40.     {
  41.         new arr = FactionDialog[playerid];
  42.         if(arr > -1 && ListitemDialog[playerid] > -1)
  43.         {
  44.             switch(ListitemDialog[playerid])
  45.             {
  46.                 case 0:
  47.                 {
  48.                     format(FactionInfo[arr][fPerm1], 64, "");
  49.                     format(query, sizeof(query), "UPDATE `factions` SET Perm1='%s' WHERE Fid=%d", FactionInfo[arr][fPerm1], FactionInfo[arr][fSQL]);
  50.                 }
  51.             }
  52.             SendClientMessage(playerid, -1, "Script retiré.");
  53.             ListitemDialog[playerid] = -1;
  54.         }
  55.     }
  56.     return 1;
  57. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement