#define ShowErrorDialog(%1,%2) ShowPlayerDialog(%1, DIALOG_ERROR, DIALOG_STYLE_MSGBOX, "ADMIN MESSAGE", %2, "OK", "") enum { DIALOG_NONE=12345, DIALOG_ERROR=12346, };
ShowPlayerDialog(playerid, DIALOG_NONE, DIALOG_STYLE_MSGBOX, "Chatman", "Don't spam the mighty chatman!", "OK", "");
CMD:help(playerid, params[]) { new info[1024]; strcat(info, "/generalhelp\n", sizeof(info)); strcat(info, "/jobhelp\n", sizeof(info)); strcat(info, "/playerhelp \n", sizeof(info)); strcat(info, "/chathelp \n", sizeof(info)); strcat(info, "/passporthelp\n", sizeof(info)); strcat(info, "/phonehelp\n", sizeof(info)); strcat(info, "/vehiclehelp\n", sizeof(info)); strcat(info, "/businesshelp\n", sizeof(info)); strcat(info, "/animhelp\n", sizeof(info)); strcat(info, "/licensehelp\n", sizeof(info)); strcat(info, "/tradehelp\n", sizeof(info)); strcat(info, "/bankhelp\n", sizeof(info)); strcat(info, "/spousehelp\n", sizeof(info)); strcat(info, "/househelp\n", sizeof(info)); strcat(info, "/ocmds - Organization commands\n", sizeof(info)); strcat(info, "/gps\n\n", sizeof(info)); strcat(info, "/bodyhelp\n\n", sizeof(info)); strcat(info, "/bribe - Bribe an officer.\n", sizeof(info)); strcat(info, "/showlicenses - Shows your licenses to an police officer.\n", sizeof(info)); ShowPlayerDialog(playerid, DIALOG_NONE, DIALOG_STYLE_MSGBOX, "Los Angeles Roleplay Server Help", info, "OK", ""); return 1; }
I think this is what you mean:
I use it for /commands etc in my server. Might be a bit messy because i lost track of it a little myself. Код:
#define ShowErrorDialog(%1,%2) ShowPlayerDialog(%1, DIALOG_ERROR, DIALOG_STYLE_MSGBOX, "ADMIN MESSAGE", %2, "OK", "") enum { DIALOG_NONE=12345, DIALOG_ERROR=12346, }; For example, I created a chatbot which talks back to you in public chat if you ask him questions. He will send a message to you if you are are flooding/spamming the bot. Код:
ShowPlayerDialog(playerid, DIALOG_NONE, DIALOG_STYLE_MSGBOX, "Chatman", "Don't spam the mighty chatman!", "OK", ""); Код:
CMD:help(playerid, params[]) { new info[1024]; strcat(info, "/generalhelp\n", sizeof(info)); strcat(info, "/jobhelp\n", sizeof(info)); strcat(info, "/playerhelp \n", sizeof(info)); strcat(info, "/chathelp \n", sizeof(info)); strcat(info, "/passporthelp\n", sizeof(info)); strcat(info, "/phonehelp\n", sizeof(info)); strcat(info, "/vehiclehelp\n", sizeof(info)); strcat(info, "/businesshelp\n", sizeof(info)); strcat(info, "/animhelp\n", sizeof(info)); strcat(info, "/licensehelp\n", sizeof(info)); strcat(info, "/tradehelp\n", sizeof(info)); strcat(info, "/bankhelp\n", sizeof(info)); strcat(info, "/spousehelp\n", sizeof(info)); strcat(info, "/househelp\n", sizeof(info)); strcat(info, "/ocmds - Organization commands\n", sizeof(info)); strcat(info, "/gps\n\n", sizeof(info)); strcat(info, "/bodyhelp\n\n", sizeof(info)); strcat(info, "/bribe - Bribe an officer.\n", sizeof(info)); strcat(info, "/showlicenses - Shows your licenses to an police officer.\n", sizeof(info)); ShowPlayerDialog(playerid, DIALOG_NONE, DIALOG_STYLE_MSGBOX, "Los Angeles Roleplay Server Help", info, "OK", ""); return 1; } |