30.07.2018, 19:24
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;
}