26.09.2012, 04:14
Me ayudan!!! Seria asi??
Luego de los includes y definiciones, variables, arrays
Y esto dentro del public OnDialogResponse!
Luego de los includes y definiciones, variables, arrays
pawn Код:
#define INVALID_DIALOG_ID (-1)
stock _ShowPlayerDialog(playerid, dialogid, style, caption[], info[], button1[], button2[])
{
SetPVarInt(playerid, "CurrentDialog", dialogid);
return ShowPlayerDialog(playerid, dialogid, style, caption, info, button1, button2);
}
#define ShowPlayerDialog _ShowPlayerDialog
#if defined _ALS_OnDialogResponse
#undef OnDialogResponse
#else
#define _ALS_OnDialogResponse
#endif
#define OnDialogResponse _OnDialogResponse
forward public _OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]);
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(GetPVarInt(playerid, "CurrentDialog") != dialogid)
{
BanEx(playerid, "Dialog hacking");
return 1;
}
SetPVarInt(playerid, "CurrentDialog", INVALID_DIALOG_ID);
if(funcidx("_OnDialogResponse") != -1)
return CallLocalFunction("_OnDialogResponse", "iiiis", playerid, dialogid, response, listitem, inputtext);
return 0;
}