SA-MP Forums Archive
DIALOG SPOOF PROBLEM - 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 PROBLEM (/showthread.php?tid=513791)



DIALOG SPOOF PROBLEM - cedizon - 18.05.2014

Hey i made a new Faction then when i using the Command /rapid this is a locker for a faction then it works and the Menu Shows but when i choose one of it the server saying


pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) {
    new
        sendername[MAX_PLAYER_NAME];

    new string[876];
    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;
    }
is possible trying to spoof a dialog ID . . .. . . ..

the CMD is here
pawn Код:
CMD:rapid(playerid, params[])
{
    if(PlayerInfo[playerid][pFaction] == 6 || PlayerInfo[playerid][pLeader] == 6 || PlayerInfo[playerid][pFaction] == 17 || PlayerInfo[playerid][pLeader] == 17)
    {
        ShowPlayerDialog(playerid, RRMENU, DIALOG_STYLE_LIST, "Rapid Recovery","Rapid Uniforms\nRapid Equipment\nRefill Health($1000)\nKevlar Vest($1000)\nMechanic Job", "Select", "Cancel");
    }
    return 1;
}

HELP HELP!


Re: DIALOG SPOOF PROBLEM - ball - 18.05.2014

You have to save the player dialogid in the pvar while using command

Код:
CMD:rapid(playerid, params[])
{
    if(PlayerInfo[playerid][pFaction] == 6 || PlayerInfo[playerid][pLeader] == 6 || PlayerInfo[playerid][pFaction] == 17 || PlayerInfo[playerid][pLeader] == 17)
    {
        SetPVarInt(playerid, "dialog", RRMENU);
        ShowPlayerDialog(playerid, RRMENU, DIALOG_STYLE_LIST, "Rapid Recovery","Rapid Uniforms\nRapid Equipment\nRefill Health($1000)\nKevlar Vest($1000)\nMechanic Job", "Select", "Cancel");
    }
    return 1;
}
You have to change all dialogs like that or you can hook ShowPlayerDialog.

@down - yes, you are right, my bad, edited.


Re: DIALOG SPOOF PROBLEM - jihadmeneer - 18.05.2014

Quote:
Originally Posted by ball
Посмотреть сообщение
You have to save the player dialogid in the pvar while using command

Код:
CMD:rapid(playerid, params[])
{
    if(PlayerInfo[playerid][pFaction] == 6 || PlayerInfo[playerid][pLeader] == 6 || PlayerInfo[playerid][pFaction] == 17 || PlayerInfo[playerid][pLeader] == 17)
    {
        SetPVarInt(playerid, "dialog", 6);
        ShowPlayerDialog(playerid, RRMENU, DIALOG_STYLE_LIST, "Rapid Recovery","Rapid Uniforms\nRapid Equipment\nRefill Health($1000)\nKevlar Vest($1000)\nMechanic Job", "Select", "Cancel");
    }
    return 1;
}
You have to change all dialogs like that or you can hook ShowPlayerDialog.
Actually you are wrong, you are now putting down that the PVar 'Dialog' is always 6?

If you know the synthax of the ShowPlayerDialog, you know that the second variable is the ID of the dialog, therefore the code should be
Код:
SetPVarInt(playerid, "dialog", RRMENU);
It should always be the second variable of the ShowPlayerDialog.


Re: DIALOG SPOOF PROBLEM - cedizon - 18.05.2014

Well Sorry Misters , i'm new Scripting

Can you show me how exactly Give me a Example

I really need help this is the last thing then my Faction is Perfect :3