Dialog confirm - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Dialog confirm (
/showthread.php?tid=657055)
Dialog confirm -
KinderClans - 30.07.2018
Hello, how i can add a confirm dialog to this? It's a remove robbery dialog, i wanna add something like: "Are you sure you wish to remove this robbery?"
pawn Код:
case DIALOG_REMOVE_ROBBERY:
{
new id = strval(inputtext);
if(!RobberyData[id][Exists]) return SendClientMessage(playerid, 0xE74C3CFF, "ERROR: {FFFFFF}Robbery doesn't exist.");
for(new i, mp = GetPlayerPoolSize(); i <= mp; i++)
{
if(!IsPlayerConnected(i)) continue;
if(PlayerRobberyData[i][RobID] == id) Robbery_ResetPlayer(i);
}
if(RobberyData[id][Timer] != -1) KillTimer(RobberyData[id][Timer]);
DestroyDynamicCP(RobberyData[id][Checkpoint]);
DestroyDynamic3DTextLabel(RobberyData[id][Label]);
RobberyData[id][OccupiedBy] = RobberyData[id][Timer] = RobberyData[id][Checkpoint] = -1;
RobberyData[id][Label] = Text3D: -1;
RobberyData[id][Exists] = false;
stmt_bind_value(RemoveRobbery, 0, DB::TYPE_INTEGER, id);
if(stmt_execute(RemoveRobbery)) SendClientMessage(playerid, 0x3498DBFF, "[ROBBERY] {FFFFFF}Robbery removed.");
return 1;
}
Re: Dialog confirm -
Jing_Chan - 30.07.2018
Create a second dialog such as DIALOG_REMOVE_ROBBERY_CONFIRM which opens after the initial dialogue - such as
pawn Код:
ShowPlayerDialog(playerid, DIALOG_REMOVE_ROBBERY_CONFIRM, DIALOG_STYLE_INPUT, "etc", "etc", "Select", "Cancel");