15.11.2012, 21:36
Quote:
#define DIALOG_CARSELL 9999 //on top |
Quote:
ShowPlayerDialog(targetid, DIALOG_CARSELL, DIALOG_STYLE_MSGBOX, "Car sell", string, "Yes", "No"); // after has offered you his car |
Quote:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])// under { if(dialogid == DIALOG_CARSELL) { if(response) // If they clicked 'Yes' or pressed enter { SendClientMessage(playerid, COLOR_GREEN, "Thank you for buying this car!"); } else // Pressed ESC or clicked cancel { SendClientMessage(playerid, COLOR_RED, "You not accepted."); } return 1; // We handled a dialog, so return 1. Just like OnPlayerCommandText. } return 0; // You MUST return 0 here! Just like OnPlayerCommandText. } |
https://sampwiki.blast.hk/wiki/ShowPlayerDialog
https://sampwiki.blast.hk/wiki/OnDialogResponse