Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- PRIVATE: ShowPlayerConfigDialog (playerid)
- {
- SetPVarInt(playerid, "ACDialogID", DIALOG_CFG);
- 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");
- }
- PRIVATE: ShowPlayerHackCodeDialog (playerid)
- {
- SetPVarInt(playerid, "ACDialogID", DIALOG_HACKCODES);
- new string [1024];
- 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");
- 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");
- 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");
- 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.");
- ShowPlayerDialog (playerid, DIALOG_HACKCODES, DIALOG_STYLE_MSGBOX, "JunkBuster hack codes", string, "Close", "");
- }
- PRIVATE: ShowPlayerVarlistDialog (playerid)
- {
- SetPVarInt(playerid, "ACDialogID", DIALOG_STYLE_LIST);
- new string [MAX_JB_VARIABLES * 64];
- for (new i = 0; i < MAX_JB_VARIABLES; ++i)
- {
- if (JB::Variables [i] > 0)
- format (string, sizeof (string), "%s{33AA33}", string);
- else
- format (string, sizeof (string), "%s{AA3333}", string);
- format (string, sizeof (string), "%s%s = %d\n", string, JB::VariableNames [i], JB::Variables [i]);
- }
- ShowPlayerDialog (playerid, DIALOG_VARLIST, DIALOG_STYLE_LIST, "JunkBuster variables", string, "Choose", "Go back");
- }
- PRIVATE: ShowPlayerSetvarDialog (playerid, var)
- {
- SetPVarInt(playerid, "ACDialogID", DIALOG_SETVAR + var);
- new
- string [64],
- description [512];
- format (string, sizeof (string), "JunkBuster variable: %s = %d", JB::VariableNames [var], JB::Variables [var]);
- strunpack (description, JB::VarDescription [var]);
- ShowPlayerDialog (playerid, DIALOG_SETVAR + var, DIALOG_STYLE_INPUT, string, description, "Set var", "Go back");
- }
- PRIVATE: ShowPlayerReportDialog (playerid)
- {
- SetPVarInt(playerid, "ACDialogID", DIALOG_REPORTS);
- new
- string [(sizeof (JB::Reports []) * 4 + 8) * MAX_REPORTS],
- buf [sizeof (JB::Reports []) * 4 + 8];
- for (new i = 0; i < JB::ReportCount; ++i)
- {
- buf [0] = '\0';
- strunpack (buf, JB::Reports [(JB::ReportIndex - 1 - i) % JB::ReportCount]);
- if (buf [0])
- {
- strcat (string, buf);
- strcat (string, "\n");
- }
- }
- if (string [0])
- ShowPlayerDialog (playerid, DIALOG_REPORTS, DIALOG_STYLE_LIST, "JunkBuster reports", string, "Close", "");
- else
- ShowPlayerDialog (playerid, DIALOG_REPORTS, DIALOG_STYLE_MSGBOX, "JunkBuster reports", "There are no reports.", "Close", "");
- }
Advertisement
Add Comment
Please, Sign In to add comment