24.12.2012, 19:45
This is what I have for OnDialogResponse
This is what I have in commands (this is where I want the dialogs to appear)
Here's where my defines are
Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == DIALOG_COMMANDS)
{
//The player has pressed "Close"(because it's de only avaliable button.)
{
if(dialogid == DIALOG_CREDITS)
{
//The player has pressed "Close"(because it's de only avaliable button.)
}
return 0;
}
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/kill", cmdtext, true, 5) == 0)
{
SetPlayerHealth(playerid, 0.0);
return 1;
}
if (strcmp("/credits", cmdtext, true, 8) == 0)
{
ShowPlayerDialog(playerid, DIALOG_CREDITS, DIALOG_STYLE_MSGBOX, "Credits", "Scripter: DJTunes\nHelper: Captainprice", "Close", "");//redits
return 1;
}
if (strcmp("/commands", cmdtext, true, 10) == 0)
{
ShowPlayerDialog(playerid, DIALOG_COMMANDS, DIALOG_STYLE_MSGBOX, "Commands", "/commands = /kill, /credits, ", "Close", "");
return 1;
}
return 0;
}
Код:
#include <a_samp> #if defined FILTERSCRIPT #define DIALOG_COMMANDS 25639 #define DIALOG_CREDITS 27312

