[Include] GetPlayerDialogID + Anti-DialogHack
#12

If you would use the stored dialogid instead of the passed value, it can be used for anti-dialog hack aswell:
pawn Код:
public OnDialogResponse(playerid,dialogid,response,listitem,inputtext[])
{
        new GPD_retval=(GPD_ODR)?CallLocalFunction("GPD_OnDialogResponse","iii",playerid,GPD_pdialog[playerid],response,listitem,inputtext):0;
        GPD_pdialog[playerid]=-1;
        return GPD_retval;
}
also returning 0 in the callback is assumed in an include like this - you can pass the dialog to other scripts aswell:
Quote:

Returning 0 in this callback will pass the dialog to another script in case no matching code were found in your gamemode's callback.

also, a friendly idea: if you use PVar (which is slower than static variable) for storing dialog ID, the script will be cross compatible, e.g. in FilterScript1 there is a ShowPlayerDialog with id 1435, you can use GetPlayerDialog in FilterScript2 or in GameMode and it will return 1435.

BTW, good idea.

Edit: also you're doing it wrong with CallLocalFunction. You only pass the first 3 integers, change "iii" to "iiiis".
Reply


Messages In This Thread
GetPlayerDialogID + Anti-DialogHack - by wups - 16.09.2011, 18:54
Re: GetPlayerDialogID - by Wesley221 - 16.09.2011, 19:02
Re: GetPlayerDialogID - by Raimis_R - 16.09.2011, 19:05
Re: GetPlayerDialogID - by =WoR=Varth - 16.09.2011, 19:06
Re: GetPlayerDialogID - by skullmuncher1337 - 16.09.2011, 19:08
Re: GetPlayerDialogID - by =WoR=Varth - 16.09.2011, 19:10
Re: GetPlayerDialogID - by wups - 16.09.2011, 19:15
Re: GetPlayerDialogID - by =WoR=Varth - 16.09.2011, 19:30
Re: GetPlayerDialogID - by RockandRol123 [PH] - 17.09.2011, 00:24
Re: GetPlayerDialogID - by wups - 17.09.2011, 08:16
Re: GetPlayerDialogID - by Hiddos - 17.09.2011, 08:20
Re: GetPlayerDialogID - by KoczkaHUN - 20.09.2011, 16:51
Re: GetPlayerDialogID - by Edvin - 20.09.2011, 17:49
Re: GetPlayerDialogID - by [MWR]Blood - 20.09.2011, 18:06
Re: GetPlayerDialogID - by wups - 21.09.2011, 11:35
Re: GetPlayerDialogID - by Lorenc_ - 21.09.2011, 11:38
Re: GetPlayerDialogID - by wups - 21.09.2011, 11:39
Re: GetPlayerDialogID - by Edvin - 21.09.2011, 11:39
Re: GetPlayerDialogID - by Y_Less - 21.09.2011, 14:22
Re: GetPlayerDialogID + Anti-DialogHack - by BaubaS - 21.09.2011, 14:52
Re : Re: GetPlayerDialogID + Anti-DialogHack - by Naruto_Emilio - 21.09.2011, 15:32
Re: Re : Re: GetPlayerDialogID + Anti-DialogHack - by wups - 21.09.2011, 16:32
Re: GetPlayerDialogID - by KoczkaHUN - 21.09.2011, 16:44
Re: GetPlayerDialogID - by wups - 21.09.2011, 17:34
Re: GetPlayerDialogID + Anti-DialogHack - by wups - 03.10.2011, 07:00
Re: GetPlayerDialogID + Anti-DialogHack - by System64 - 03.10.2011, 08:30
Re: GetPlayerDialogID + Anti-DialogHack - by wups - 03.10.2011, 09:26
Re: GetPlayerDialogID + Anti-DialogHack - by OKStyle - 13.10.2011, 08:27
Re : GetPlayerDialogID + Anti-DialogHack - by TheBest6 - 13.10.2011, 11:58
Re: GetPlayerDialogID + Anti-DialogHack - by Dredd - 14.10.2011, 11:04
Re: GetPlayerDialogID + Anti-DialogHack - by KoczkaHUN - 16.10.2011, 10:04
Re: GetPlayerDialogID + Anti-DialogHack - by Yousha - 21.06.2017, 08:13

Forum Jump:


Users browsing this thread: 2 Guest(s)