17.01.2017, 00:37
I'm not sure if this is possible, and I'm probably over thinking it.....
What I'm trying to do is when a player does /report ID 1 TP hacks, the report doesn't get sent immediately, instead a confirmation dialog pops up the first time they report during that log in session and say a message reminding what /report is used for and not used for, and "Are you sure you want to send this report?" When they click yes, the report is sent, when no, then the report is cancelled. I can do the "1 time per login session" but basically achieving the "pause until they click "Yes" on the dialog" is where I'm stuck at. I'm returning to SA-MP after being gone for a few years and have forgotten a lot of things lol
Any help would be appreciated.
What I'm trying to do is when a player does /report ID 1 TP hacks, the report doesn't get sent immediately, instead a confirmation dialog pops up the first time they report during that log in session and say a message reminding what /report is used for and not used for, and "Are you sure you want to send this report?" When they click yes, the report is sent, when no, then the report is cancelled. I can do the "1 time per login session" but basically achieving the "pause until they click "Yes" on the dialog" is where I'm stuck at. I'm returning to SA-MP after being gone for a few years and have forgotten a lot of things lol
Any help would be appreciated.
Код:
CMD:report(playerid, params[]) { new reportid = -1; if (isnull(params)) { SendSyntaxMessage(playerid, "/report [reason]"); SendClientMessage(playerid, COLOR_LIGHTRED, "[WARNING]:{FFFFFF} Please only use this command for valid purposes only."); return 1; } if (Report_GetCount(playerid) > 5) return SendErrorMessage(playerid, "You already have 5 active reports!"); if (PlayerData[playerid][pReportTime] >= gettime()) return SendErrorMessage(playerid, "You must wait %d seconds before sending another report.", PlayerData[playerid][pReportTime] - gettime()); if ((reportid = Report_Add(playerid, params)) != -1) { ShowPlayerFooter(playerid, "Your ~g~report~w~ has been sent!"); foreach (new i : Player) { if (PlayerData[i][pAdmin] > 0 && PlayerData[i][pAdminDuty]) { SendClientMessageEx(i, COLOR_LIGHTYELLOW, "[REPORT %d]: %s (ID: %d) reports: %s", reportid, ReturnName(playerid, 0), playerid, params); } } PlayerData[playerid][pReportTime] = gettime() + 15; SendServerMessage(playerid, "Your report has been sent to any admins online."); } else { SendErrorMessage(playerid, "The report list is full. Please wait for a while."); } return 1; }