DIALOG SPOOF [NEED HELP]
#1

When i type setgraffiti, nothing happens it return 1

Код:
CMD:setgraffiti(playerid, params[], help)
{
    ShowPlayerDialogEx(playerid,1,DIALOG_STYLE_INPUT,"{DAA520}Graffiti","{FFFFFF}Enter text graffiti.\n\nMaximum number of characters: {ff0000}18","Ok","Cancel");
    SetPVarInt(playerid, "SettingGraffiti", 1);
    PreloadAnimLib(playerid, "SPRAYCAN");
	return 1;
}
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) {
    new
        string[128],
        sendername[MAX_PLAYER_NAME];

    if(GetPVarInt(playerid, "dialog") != dialogid ) { // Confirm the dialogid matches what we have in the PVar
        format(string, sizeof(string), "{AA3333}AdmWarning{FFFF00}: %s (ID %d) is possibly trying to spoof a dialog ID (%d).", GetPlayerNameEx(playerid), playerid, dialogid);
        ABroadCast(COLOR_YELLOW, string, 2);

        format(string, sizeof(string), "%s has possibly tried to spoof a dialog ID.", GetPlayerNameEx(playerid));
        AddAutomatedFlag(playerid, string);

        format(string, sizeof(string), "%s has possibly tried to spoof a dialog ID (%d, %d).", GetPlayerNameEx(playerid), dialogid, response);
        Log("logs/crash.log", string);

        return 1;
    }
Reply
#2

pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) {
    new
        string[128],
        sendername[MAX_PLAYER_NAME];
    if(strlen(inputtext) == "Graffiti")
   {
    if(GetPVarInt(playerid, "dialog") != dialogid ) { // Confirm the dialogid matches what we have in the PVar
        format(string, sizeof(string), "{AA3333}AdmWarning{FFFF00}: %s (ID %d) is possibly trying to spoof a dialog ID (%d).", GetPlayerNameEx(playerid), playerid, dialogid);
        ABroadCast(COLOR_YELLOW, string, 2);

        format(string, sizeof(string), "%s has possibly tried to spoof a dialog ID.", GetPlayerNameEx(playerid));
        AddAutomatedFlag(playerid, string);

        format(string, sizeof(string), "%s has possibly tried to spoof a dialog ID (%d, %d).", GetPlayerNameEx(playerid), dialogid, response);
        Log("logs/crash.log", string);
        }
        return 1;
    }
Reply
#3

Quote:
Originally Posted by Eth
Посмотреть сообщение
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) {
    new
        string[128],
        sendername[MAX_PLAYER_NAME];
    if(strlen(inputtext) == "Graffiti")
   {
    if(GetPVarInt(playerid, "dialog") != dialogid ) { // Confirm the dialogid matches what we have in the PVar
        format(string, sizeof(string), "{AA3333}AdmWarning{FFFF00}: %s (ID %d) is possibly trying to spoof a dialog ID (%d).", GetPlayerNameEx(playerid), playerid, dialogid);
        ABroadCast(COLOR_YELLOW, string, 2);

        format(string, sizeof(string), "%s has possibly tried to spoof a dialog ID.", GetPlayerNameEx(playerid));
        AddAutomatedFlag(playerid, string);

        format(string, sizeof(string), "%s has possibly tried to spoof a dialog ID (%d, %d).", GetPlayerNameEx(playerid), dialogid, response);
        Log("logs/crash.log", string);
        }
        return 1;
    }
I mean, it should not be saying "spoofed"
Reply
#4

dont set dialogid to 1, set the pvar to the name of the dialog
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)