SA-MP Forums Archive
DIALOG SPOOF [NEED HELP] - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: DIALOG SPOOF [NEED HELP] (/showthread.php?tid=511728)



DIALOG SPOOF [NEED HELP] - Trynda - 07.05.2014

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;
    }



Re: DIALOG SPOOF [NEED HELP] - Eth - 07.05.2014

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;
    }



Re: DIALOG SPOOF [NEED HELP] - Trynda - 07.05.2014

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"


Re: DIALOG SPOOF [NEED HELP] - taylorcro - 07.05.2014

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