Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <YSI\y_hooks>
- new
- gRulesDialog = -1
- ;
- hook OnGameModeInit()
- {
- gRulesDialog = Dialog_ObtainID();
- return 1;
- }
- hook OnPlayerConnect(playerid)
- {
- inline RulesHandler(pid, dialogid, response, listitem, string:inputtext[])
- {
- #pragma unused pid, dialogid, listitem, inputtext
- if(!response) {
- print("DC");
- } else print("NDC");
- }
- Dialog_ShowCallback(playerid, using inline RulesHandler, DIALOG_STYLE_MSGBOX, "Server rules", "Here will be some rules", "I accept", "Exit", .dialog = gRulesDialog);
- return 1;
- }
- #undef _inc_handler
Advertisement
Add Comment
Please, Sign In to add comment