17.09.2012, 00:06
(
Последний раз редактировалось TheChaoz; 17.09.2012 в 06:09.
)
Agrega este codigo dentro de tu GM (deberia ser antes de cualquier callback):
pawn Код:
#define INVALID_DIALOG_ID (-1)
new CurrentDialog[MAX_PLAYERS];
stock _ShowPlayerDialog(playerid, dialogid, style, caption[], info[], button1[], button2[])
{
CurrentDialog[playerid] = dialogid;
return ShowPlayerDialog(playerid, dialogid, style, caption, info, button1, button2);
}
#define ShowPlayerDialog _ShowPlayerDialog
public OnPlayerConnect(playerid)
{
CurrentDialog[playerid] = INVALID_DIALOG_ID;
if(funcidx("_OnPlayerConnect") != -1)
return CallLocalFunction("_OnPlayerConnect", "i", playerid);
return 1;
}
#if defined _ALS_OnPlayerConnect
#undef OnPlayerConnect
#else
#define _ALS_OnPlayerConnect
#endif
#define OnPlayerConnect _OnPlayerConnect
forward public _OnPlayerConnect(playerid);
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(CurrentDialog[playerid] != dialogid)
{
BanEx(playerid, "Dialog hacking");
return 1;
}
if(funcidx("_OnDialogResponse") != -1)
return CallLocalFunction("_OnDialogResponse", "iiiis", playerid, dialogid, response, listitem, inputtext);
return 0;
}
#if defined _ALS_OnDialogResponse
#undef OnDialogResponse
#else
#define _ALS_OnDialogResponse
#endif
#define OnDialogResponse _OnDialogResponse
forward public _OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]);

