AntiDesktopDialog v0.2 -
Meta - 05.10.2011
~~~ AntiDesktopDialog v0.2 ~~~
Hi guys!
I present to you the ultimate include to prevent wrong processes of answered dialogs!
Storyline:
Quote:
You all know it, you're on your desktop and something ingame happens. You get a dialog-window!
So now, you want to re-enter the game. How do you do it? With return or ESC.
Damn!
There's been some important stuff to read and you didn't see it! What to do?
(More info about that "bug": Link.)
|
The Answer: Use this include!
It prevents incorrect dialogs being sent and shows up the dialog again!
Simple and clever!
All you have to do is to include it into your scripts
(or a_samp.inc?).
pawn Код:
#include <AntiDesktopDialog>
Warning: If you've got a very big script, it could be that you're using very large dialogs (e.g. /stats). So you have to change the arraysize in
line 49!
Changelog:
[v0.2]:
- Fixed an issue where dialogs for playerIDs did not hide after a relog/disconnect.
[v0.1]:
Here you go:
Download.
Pastebin
Post in german forums
Greetz
Meta.
PS: Critics and comments are welcome

Some testing would be great, too. I tested it, but it still could be buggy because of recent changes.
AW: AntiDesktopDialog v0.1 -
olaf137 - 05.10.2011
really nice
Re: AntiDesktopDialog v0.1 -
System64 - 05.10.2011
wow awesome, now kalcor just have to put this in client
Re: AntiDesktopDialog v0.1 -
Tigerkiller - 05.10.2011
useful but if i connect and go to desktop
switch back and got kicked by dialog
but yea ^^
AW: AntiDesktopDialog v0.1 -
Meta - 05.10.2011
simple question: did you include it right?
@all: If you got an error because of "!NPC(playerid)", please redownload or change it to "!IsPlayerNPC(playerid)"
Re: AntiDesktopDialog v0.1 -
KoczkaHUN - 05.10.2011
1:
pawn Код:
CallLocalFunction("ADD_OnDialogResponse", "dddds", playerid, dialogid, response, listitem, inputtext);
will crash the script with empty inputtext. fix:
pawn Код:
if (inputtext[0] = 0) inputtext[0] = 1;
CallLocalFunction("ADD_OnDialogResponse", "dddds", playerid, dialogid, response, listitem, inputtext);
2:
in ShowPlayerDialogWin.............. you have forgotten a debug message:
pawn Код:
SendClientMessageToAll(0xFFFFFFFF, "ShowPlayerDialog");
BTW, it can be nice
Edit
Nah, I've found a bug..
pawn Код:
CallLocalFunction("ADD_OnDialogResponse", "dddds", playerid, dialogid, response, listitem, inputtext);
return 1;
If it returns 1, it won't pass the response to another callbacks. So I suggest doing this:
pawn Код:
return CallLocalFunction("ADD_OnDialogResponse", "dddds", playerid, dialogid, response, listitem, inputtext);
AW: AntiDesktopDialog v0.1 -
Meta - 05.10.2011
thanks for your feedback. I'll change it.
Btw I had this debug message but if someone needs it, he/she could add it
EDIT: I remember inputtext is "#" by default, isn't it?
Anyway I'll fix it.
Re: AntiDesktopDialog v0.1 -
TheArcher - 05.10.2011
Awesome work, it should be added directily in the client.
Re: AW: AntiDesktopDialog v0.1 -
wups - 06.10.2011
Quote:
Originally Posted by Meta
thanks for your feedback. I'll change it.
Btw I had this debug message but if someone needs it, he/she could add it
EDIT: I remember inputtext is "#" by default, isn't it?
Anyway I'll fix it.
|
No, it isn't.
Re : AntiDesktopDialog v0.1 -
TheBest6 - 06.10.2011
Thanks!