Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include a_samp.inc
- #include mailer.inc
- #define DIALOG_REPORT 1478
- #define AdminMail "kazax.samp@gmail.com"
- public OnFilterScriptInit()
- {
- printf("kReport: Loaded");
- return true;
- }
- public OnFilterScriptExit()
- {
- printf("kReport: UnLoaded");
- return true;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if(strcmp(cmdtext, "/репорт", true) == 0 || strcmp(cmdtext, "/report", true) == 0)
- {
- ShowPlayerDialog(playerid,DIALOG_REPORT, DIALOG_STYLE_INPUT, "Репорт", "Введите ваше сообщение администраторам:", "Отправить", "Отмена");
- return true;
- }
- return false;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- if(dialogid == DIALOG_REPORT)
- {
- if(!response)SendClientMessage(playerid, 0xFFFFFFFF, "Вы отменили действие!");
- new hour,minute,second,str[256],name[MAX_PLAYER_NAME+1],day,month,year;
- GetPlayerName(playerid, name, sizeof(name));
- gettime(hour,minute,second);
- getdate(year,month,day);
- format(str,256,"Новый репорт:\nНик игрока: %s\nТекст: %s\nВремя отправки: %02d:%02d\nДата: %02d.%02d.%d",name,inputtext,hour,minute,day,month,year);
- SendMail( AdminMail, "kReportSystem@", name, "kaZax", str);
- return true;
- }
- return false;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement