YiinY

replace

May 20th, 2013
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.10 KB | None | 0 0
  1. PRIVATE: ShowPlayerConfigDialog (playerid)
  2. {
  3. SetPVarInt(playerid, "ACDialogID", DIALOG_CFG);
  4. ShowPlayerDialog (playerid, DIALOG_CFG, DIALOG_STYLE_LIST, "JunkBuster", "Set a variable\nLoad configuration from file\nSave configuration to file\nLoad default configuration\nSee JunkBuster reports\nSee JunkBuster commands for admins", "Choose", "Close");
  5. }
  6.  
  7. PRIVATE: ShowPlayerHackCodeDialog (playerid)
  8. {
  9. SetPVarInt(playerid, "ACDialogID", DIALOG_HACKCODES);
  10. new string [1024];
  11.  
  12. strcat (string, "{0CB7EB}Not reloading:{FFFFFF}\n\tCode 1: Player probably uses 2-shot with sawn-off shotgun.\n\tCode 2: Player is shooting really fast with sawn-off shotgun. Hack, not 2-shot.\n\n");
  13. strcat (string, "{0CB7EB}Teleporthack:{FFFFFF}\n\tCode 1: Player has teleport to a position know from cheat tools.\n\tCode 2: Teleport suspected, position not defined. Teleported to another player?\n\tCode 3: Teleport to a pickup.\n\n");
  14. strcat (string, "{0CB7EB}Speedhack:{FFFFFF}\n\tCode 1: Player's speed is higher than the global limit.\n\tCode 2: Player's speed is higher than the vehicle model's limit.\n\n");
  15. strcat (string, "{0CB7EB}Health-/armourhack:{FFFFFF}\n\tCode 1: Health/armour is higher than 100.\n\tCode 2: Player's health/armour is higher than JunkBuster actually expects.");
  16. ShowPlayerDialog (playerid, DIALOG_HACKCODES, DIALOG_STYLE_MSGBOX, "JunkBuster hack codes", string, "Close", "");
  17. }
  18.  
  19. PRIVATE: ShowPlayerVarlistDialog (playerid)
  20. {
  21. SetPVarInt(playerid, "ACDialogID", DIALOG_STYLE_LIST);
  22. new string [MAX_JB_VARIABLES * 64];
  23.  
  24. for (new i = 0; i < MAX_JB_VARIABLES; ++i)
  25. {
  26. if (JB::Variables [i] > 0)
  27. format (string, sizeof (string), "%s{33AA33}", string);
  28. else
  29. format (string, sizeof (string), "%s{AA3333}", string);
  30. format (string, sizeof (string), "%s%s = %d\n", string, JB::VariableNames [i], JB::Variables [i]);
  31. }
  32.  
  33. ShowPlayerDialog (playerid, DIALOG_VARLIST, DIALOG_STYLE_LIST, "JunkBuster variables", string, "Choose", "Go back");
  34. }
  35.  
  36. PRIVATE: ShowPlayerSetvarDialog (playerid, var)
  37. {
  38. SetPVarInt(playerid, "ACDialogID", DIALOG_SETVAR + var);
  39. new
  40. string [64],
  41. description [512];
  42.  
  43. format (string, sizeof (string), "JunkBuster variable: %s = %d", JB::VariableNames [var], JB::Variables [var]);
  44. strunpack (description, JB::VarDescription [var]);
  45. ShowPlayerDialog (playerid, DIALOG_SETVAR + var, DIALOG_STYLE_INPUT, string, description, "Set var", "Go back");
  46. }
  47.  
  48. PRIVATE: ShowPlayerReportDialog (playerid)
  49. {
  50. SetPVarInt(playerid, "ACDialogID", DIALOG_REPORTS);
  51. new
  52. string [(sizeof (JB::Reports []) * 4 + 8) * MAX_REPORTS],
  53. buf [sizeof (JB::Reports []) * 4 + 8];
  54.  
  55. for (new i = 0; i < JB::ReportCount; ++i)
  56. {
  57. buf [0] = '\0';
  58. strunpack (buf, JB::Reports [(JB::ReportIndex - 1 - i) % JB::ReportCount]);
  59. if (buf [0])
  60. {
  61. strcat (string, buf);
  62. strcat (string, "\n");
  63. }
  64. }
  65. if (string [0])
  66. ShowPlayerDialog (playerid, DIALOG_REPORTS, DIALOG_STYLE_LIST, "JunkBuster reports", string, "Close", "");
  67. else
  68. ShowPlayerDialog (playerid, DIALOG_REPORTS, DIALOG_STYLE_MSGBOX, "JunkBuster reports", "There are no reports.", "Close", "");
  69. }
Advertisement
Add Comment
Please, Sign In to add comment