Advertisement
Guest User

members

a guest
Nov 7th, 2016
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.97 KB | None | 0 0
  1. if(dialogid == DIALOG_MEMBERS)
  2. {
  3. if(response)
  4. {
  5. if(listitem >= 0)
  6. {
  7. if(PlayerInfo[playerid][pRank] >= 6)
  8. {
  9. new name[30],result[30],query[300],test[5],strings[300];
  10. format(query, sizeof(query), "SELECT * FROM `users` WHERE `id`='%d'",Selected[playerid][listitem]);
  11. new Cache: membresult = mysql_query(SQL,query);
  12. for(new i, j = cache_get_row_count (); i != j; ++i)
  13. {
  14. cache_get_field_content(i, "name", result); format(name, 30, result);
  15. cache_get_field_content(i, "Rank", result); format(test, 5, result);
  16. }
  17. cache_delete(membresult);
  18. Selected2[playerid] = Selected[playerid][listitem];
  19. format(strings, sizeof(strings),"%s - %s",test,name);
  20. ShowPlayerDialog(playerid, DIALOG_MEMBERS2, DIALOG_STYLE_LIST, strings, "Change Rank\nFaction Warn\nClear FW\nUninvite - 20 FP\nUninvite - 0 FP", "OK", "Exit");
  21. }
  22. }
  23. }
  24. }
  25. if(dialogid == DIALOG_MEMBERS2)
  26. {
  27. if(response)
  28. {
  29. if(listitem == 0)
  30. {
  31. SendClientMessage(playerid, COLOR_WHITE, "Usage: /changerank <id> <rank>");
  32. }
  33. if(listitem == 1)
  34. {
  35. new string1[256],rank;
  36. if(PlayerInfo[playerid][pSQLID] == Selected2[playerid]) return SendClientMessage(playerid, COLOR_WHITE, "Nu-ti poti da singur FW.");
  37. foreach(Player, i)
  38. {
  39. if(PlayerInfo[i][pSQLID] == Selected2[playerid])
  40. {
  41. if(PlayerInfo[playerid][pRank] == 6 && PlayerInfo[i][pRank] == 7 || PlayerInfo[playerid][pRank] == 6 && PlayerInfo[i][pRank] == 6) return SendClientMessage(playerid, COLOR_WHITE, "Nu-i poti da FW unui membru de rank 6-7.");
  42. }
  43. }
  44. format(string1, sizeof(string1), "SELECT * FROM `users` WHERE `id`='%d'",Selected2[playerid]);
  45. new Cache: membresult = mysql_query(SQL,string1);
  46. for(new i, j = cache_get_row_count (); i != j; ++i)
  47. {
  48. rank = cache_get_field_content_int(i, "Rank");
  49. }
  50. cache_delete(membresult);
  51. if(PlayerInfo[playerid][pRank] == 6 && rank == 6 || PlayerInfo[playerid][pRank] == 6 && rank == 7) return SendClientMessage(playerid, COLOR_WHITE, "Nu-i poti da FW unui membru de rank 6-7.");
  52. ShowPlayerDialog(playerid, DIALOG_FWARN, DIALOG_STYLE_MSGBOX, "Esti sigur?", "Esti sigur ca vrei sa-i dai FW acelui membru?", "Da", "Nu");
  53. }
  54. if(listitem == 2)
  55. {
  56. new string1[256],rank;
  57. if(PlayerInfo[playerid][pSQLID] == Selected2[playerid]) return SendClientMessage(playerid, COLOR_WHITE, "Nu-ti poti da singur clear FW.");
  58. foreach(Player, i)
  59. {
  60. if(PlayerInfo[i][pSQLID] == Selected2[playerid])
  61. {
  62. if(PlayerInfo[playerid][pRank] == 6 && PlayerInfo[i][pRank] == 7 || PlayerInfo[playerid][pRank] == 6 && PlayerInfo[i][pRank] == 6) return SendClientMessage(playerid, COLOR_WHITE, "Nu-i poti da FW clear unui membru de rank 6-7.");
  63. }
  64. }
  65. format(string1, sizeof(string1), "SELECT * FROM `users` WHERE `id`='%d'",Selected2[playerid]);
  66. new Cache: membresult = mysql_query(SQL,string1);
  67. for(new i, j = cache_get_row_count (); i != j; ++i)
  68. {
  69. rank = cache_get_field_content_int(i, "Rank");
  70. }
  71. cache_delete(membresult);
  72. if(PlayerInfo[playerid][pRank] == 6 && rank == 6 || PlayerInfo[playerid][pRank] == 6 && rank == 7) return SendClientMessage(playerid, COLOR_WHITE, "Nu-i poti da FW clear unui membru de rank 6-7.");
  73. ShowPlayerDialog(playerid, DIALOG_FUNWARN, DIALOG_STYLE_MSGBOX, "Esti sigur?", "Esti sigur ca vrei sa-i stergi FW acelui membru?", "Da", "Nu");
  74. }
  75. if(listitem == 3)
  76. {
  77. if(PlayerInfo[playerid][pSQLID] == Selected2[playerid]) return SendClientMessage(playerid, COLOR_WHITE, "Nu-ti poti da singur uninvite.");
  78. foreach(Player, i)
  79. {
  80. if(PlayerInfo[i][pSQLID] == Selected2[playerid])
  81. {
  82. if(PlayerInfo[playerid][pRank] == 6 && PlayerInfo[i][pRank] == 7 || PlayerInfo[playerid][pRank] == 6 && PlayerInfo[i][pRank] == 6) return SendClientMessage(playerid, COLOR_WHITE, "Nu-i poti da uninvite unui membru de rank 6-7.");
  83. }
  84. }
  85. new stringtotal[500],string1[256],ftime,result[30],name[30],rank;
  86. format(string1, sizeof(string1), "SELECT * FROM `users` WHERE `id`='%d'",Selected2[playerid]);
  87. new Cache: membresult = mysql_query(SQL,string1);
  88. for(new i, j = cache_get_row_count (); i != j; ++i)
  89. {
  90. ftime = cache_get_field_content_int(i, "FactionTime");
  91. cache_get_field_content(i, "name", result); format(name, 30, result);
  92. rank = cache_get_field_content_int(i, "Rank");
  93. }
  94. cache_delete(membresult);
  95. if(PlayerInfo[playerid][pRank] == 6 && rank == 6 || PlayerInfo[playerid][pRank] == 6 && rank == 7) return SendClientMessage(playerid, COLOR_WHITE, "Nu-i poti da uninvite unui membru de rank 6-7.");
  96. format(string1, sizeof(string1),"Doresti sa ii dai uninvite lui %s CU 20 FP?\nAcesta are %d zile in factiune.\nScrie motiv-ul pentru care ii acorzi uninvite:",name,ftime);
  97. format(stringtotal, sizeof(stringtotal),"< ATENTIE >: Playerii cu 14 zile in factiune, le poti da uninvite fara FP, daca acesta a abuzat ii poti da uninvite cu 40 FP.\n%s",string1);
  98. ShowPlayerDialog(playerid, DIALOG_FPUNINVITE, DIALOG_STYLE_INPUT, "Uninvite - 20 FP", stringtotal, "Uninvite", "Exit");
  99. }
  100. if(listitem == 4)
  101. {
  102. if(PlayerInfo[playerid][pSQLID] == Selected2[playerid]) return SendClientMessage(playerid, COLOR_WHITE, "Nu-ti poti da singur uninvite.");
  103. foreach(Player, i)
  104. {
  105. if(PlayerInfo[i][pSQLID] == Selected2[playerid])
  106. {
  107. if(PlayerInfo[playerid][pRank] == 6 && PlayerInfo[i][pRank] == 7 || PlayerInfo[playerid][pRank] == 6 && PlayerInfo[i][pRank] == 6) return SendClientMessage(playerid, COLOR_WHITE, "Nu-i poti da uninvite unui membru de rank 6-7.");
  108. }
  109. }
  110. new stringtotal[500],string1[256],ftime,result[30],name[30],rank;
  111. format(string1, sizeof(string1), "SELECT * FROM `users` WHERE `id`='%d'",Selected2[playerid]);
  112. new Cache: membresult = mysql_query(SQL,string1);
  113. for(new i, j = cache_get_row_count (); i != j; ++i)
  114. {
  115. ftime = cache_get_field_content_int(i, "FactionTime");
  116. cache_get_field_content(i, "name", result); format(name, 30, result);
  117. rank = cache_get_field_content_int(i, "Rank");
  118. }
  119. cache_delete(membresult);
  120. if(PlayerInfo[playerid][pRank] == 6 && rank == 6 || PlayerInfo[playerid][pRank] == 6 && rank == 7) return SendClientMessage(playerid, COLOR_WHITE, "Nu-i poti da uninvite unui membru de rank 6-7.");
  121. format(string1, sizeof(string1),"Esti pe cale sa-i dai uninvite lui %s FARA FP.\nAcesta are %d zile in factiune.\nScrie motivul pentru uninvite mai jos:",name,ftime);
  122. format(stringtotal, sizeof(stringtotal),"Atentie!!! Playerii ce au sub 14 zile in factiune se vor da afara cu FP, cu exceptia cazurilor in care un owner iti spune ca e ok sa dai uninvite fara FP.\n%s",string1);
  123. ShowPlayerDialog(playerid, DIALOG_NOUNINVITE, DIALOG_STYLE_INPUT, "Uninvite - 0 FP", stringtotal, "Uninvite", "Exit");
  124. }
  125. }
  126. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement