04.02.2017, 18:21
Quote:
Ah, one of my half-way finished projects. Great to see one released as I never got around finishing mine.
Here's a suggestion for you, thats a huge array sitting somewhere unused until they use dialogs, so use PVars instead. |
Quote:
Another amazing release! Good job over there Lordz
I'll be looking at the code and tell you if find some bug :P |
Quote:
The bug is still there. I think it's not possible to fix it as it's impossible to get the whole inputtext.
|
A minor update has been done to this include to prevent false alarms on empty header dialog. This is the code I used right now for testing:
pawn Code:
//testing safeDialogs
#define FILTERSCRIPT
#include <a_samp>
#include <safeDialogs>
#include <zcmd>
static const dialogSpoofReasons[][] = {
{"spoofing dialog ID"},
{"spoofing list-item"},
{"spoofing input-text"}
};
public OnDialogSpoof(playerid, spooftype) {
new
tempString[144],
tempName[MAX_PLAYER_NAME + 1]
;
GetPlayerName(playerid, tempName, sizeof(tempName));
format(tempString, sizeof(tempString), "%s (ID:%d) has been caught for %s",
tempName, playerid, dialogSpoofReasons[spooftype]);
SendClientMessageToAll(-1, tempString);
print("\a"); //Beep sound.
print(tempString);
return 0;
}
CMD:showdialog(playerid, params[]) {
if(isnull(params))
return SendClientMessage(playerid, 0xFF0000FF, "USAGE : /showdialog [type]");
if(!strcmp(params, "list", true)) {
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "DIALOG_STYLE_LIST",
"Item1\nItem2\nItem3\nItem4", "Select", "Close");
}
else if(!strcmp(params, "msgbox", true)) {
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_MSGBOX, "DIALOG_STYLE_MSGBOX",
"Item1\nItem2\nItem3\nItem4", "Select", "Close");
}
else if(!strcmp(params, "header", true)) {
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_TABLIST_HEADERS,
"DIALOG_STYLE_TABLIST_HEADERS",
"Item\tIndex\n\
Item\t1\n\
Stuff\t2\n\
Other\t3", "Select", "Close");
/*ShowPlayerDialog(playerid, 1, DIALOG_STYLE_TABLIST_HEADERS,
"DIALOG_STYLE_TABLIST_HEADERS",
"Item\tIndex\n", "Select", "Close");*/
}
else if(!strcmp(params, "tablist", true)) {
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_TABLIST,
"DIALOG_STYLE_TABLIST",
"Item\t1\n\
Stuff\t2\n\
Other\t3", "Select", "Close");
}
else if(!strcmp(params, "input", true)) {
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_INPUT, "DIALOG_STYLE_INPUT",
"Input some stuff", "Select", "Close");
}
return 1;
}