SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts > Includes

Reply
 
Thread Tools Display Modes
Old 16/09/2011, 06:54 PM   #1
wups
High-roller
 
wups's Avatar
 
Join Date: Apr 2010
Location: Lithuania
Posts: 1,216
Reputation: 141
Default GetPlayerDialogID + Anti-DialogHack

GetPlayerDialogID v2

Also, with Anti-DialogHack

Quote:
Originally Posted by wups View Post
Without this, clients can change their DIALOGID with some specific programs(and for example evade login).


I was scripting, and I thought this function would be very useful in some specific cases.

ChangeLog:
Quote:
Version 2:
-Bug fixes.
-Anti DialogHack.
-Using PVars, so filterscript support.
Version 1:
-Initial release.
Usage:
Firstly, copy both include files into /pawno/includes
Insert this code on top of your game mode after #include <a_samp>
pawn Code:
#include <GPDID>
That's it! You're ready to go. No script modifications are needed, since the script is Plug&Play.
How to use the function?
pawn Code:
public OnPlayerCommandText(playerid,cmdtext[])
{
    new ID = GetPlayerDialogID(playerid);
    if(ID != -1) // in case a player sees the dialog
    {
        SendClientMessage(playerid,-1,"No dialog evading!");
        return 0;
    }
    return 1;
}

Installing:
Download and save to pawn/includes folder!

Download:

Version 2.2
Version 1.0

Feel free to do anything you want with it.

Last edited by wups; 03/10/2011 at 09:27 AM.
wups is offline   Reply With Quote
Old 16/09/2011, 07:02 PM   #2
Wesley221
High-roller
 
Wesley221's Avatar
 
Join Date: Apr 2011
Posts: 1,564
Reputation: 714
Default Re: GetPlayerDialogID

So thsi checks if a player has a dialog opened?
And do you have to use a different function to check if he has a dialog open, or is it just with the normal ShowPlayerDialog?
__________________
yes
Wesley221 is offline   Reply With Quote
Old 16/09/2011, 07:05 PM   #3
Raimis_R
Huge Clucker
 
Raimis_R's Avatar
 
Join Date: Nov 2010
Location: Lithuania
Posts: 398
Reputation: 15
Default Re: GetPlayerDialogID

Quote:
Originally Posted by Wesley221 View Post
So thsi checks if a player has a dialog opened?
And do you have to use a different function to check if he has a dialog open, or is it just with the normal ShowPlayerDialog?
You need to use:
pawn Code:
GPD_ShowPlayerDialog(playerid,dialogid,style,caption[],info[],button1[],button2[])

Edit: I didnt saw #define ShowPlayerDialog GPD_ShowPlayerDialog

You can use ShowPlayerDialog
__________________
Veni, Vidi, Vici
Raimis_R is offline   Reply With Quote
Old 16/09/2011, 07:06 PM   #4
=WoR=Varth
High-roller
 
=WoR=Varth's Avatar
 
Join Date: Apr 2011
Location: Indonesia
Posts: 2,001
Reputation: 133
Default Re: GetPlayerDialogID

pawn Code:
static
        bool:GPD_OPC,
        bool:GPD_ODR;

What is this code for?
http://wiki.sa-mp.com/wiki/Funcidx
__________________
(RETIRED)
=WoR=Varth is offline   Reply With Quote
Old 16/09/2011, 07:08 PM   #5
skullmuncher1337
Big Clucker
 
Join Date: Aug 2011
Location: Elizabethtown, Pennsylvania, USA
Posts: 137
Reputation: 24
Default Re: GetPlayerDialogID

Quote:
Originally Posted by varthshenon View Post
pawn Code:
static
        bool:GPD_OPC,
        bool:GPD_ODR;

What is this code for?
http://wiki.sa-mp.com/wiki/Funcidx
It appears to be used multiple times in the code, so it must be important.
__________________
Quote:
Originally Posted by Logitech90 View Post
Sa-Mp is like the pussy.You have fun playing it and never dies.
Quote:
Originally Posted by lolumadd_ View Post
Deleting your System32 also helps increase your performance.
Quote:
Originally Posted by Rapgangsta View Post
Angry ****** is angry xD
skullmuncher1337 is offline   Reply With Quote
Old 16/09/2011, 07:10 PM   #6
=WoR=Varth
High-roller
 
=WoR=Varth's Avatar
 
Join Date: Apr 2011
Location: Indonesia
Posts: 2,001
Reputation: 133
Default Re: GetPlayerDialogID

Quote:
Originally Posted by skullmuncher1337 View Post
It appears to be used multiple times in the code, so it must be important.
What do you mean?
__________________
(RETIRED)
=WoR=Varth is offline   Reply With Quote
Old 16/09/2011, 07:15 PM   #7
wups
High-roller
 
wups's Avatar
 
Join Date: Apr 2010
Location: Lithuania
Posts: 1,216
Reputation: 141
Default Re: GetPlayerDialogID

Thanks for the responses, It's Plug&Play. You just use ShowPlayerDialog(no changes in the script are necessary).
pawn Code:
GPD_ODR = (funcidx("GPD_OnDialogResponse") != -1);
About that, I don't have much time to explain, search for some tutorials, i'm pretty sure ****** made at least one about this.
wups is offline   Reply With Quote
Old 16/09/2011, 07:30 PM   #8
=WoR=Varth
High-roller
 
=WoR=Varth's Avatar
 
Join Date: Apr 2011
Location: Indonesia
Posts: 2,001
Reputation: 133
Default Re: GetPlayerDialogID

Quote:
Originally Posted by wups View Post
Thanks for the responses, It's Plug&Play. You just use ShowPlayerDialog(no changes in the script are necessary).
pawn Code:
GPD_ODR = (funcidx("GPD_OnDialogResponse") != -1);
About that, I don't have much time to explain, search for some tutorials, i'm pretty sure ****** made at least one about this.
I got the point now.
__________________
(RETIRED)
=WoR=Varth is offline   Reply With Quote
Old 17/09/2011, 12:24 AM   #9
RockandRol123 [PH]
Little Clucker
 
Join Date: Jul 2011
Posts: 20
Reputation: 0
Default Re: GetPlayerDialogID

Can I see some screenshots please?
__________________
RockandRol123 [PH] is offline   Reply With Quote
Old 17/09/2011, 08:16 AM   #10
wups
High-roller
 
wups's Avatar
 
Join Date: Apr 2010
Location: Lithuania
Posts: 1,216
Reputation: 141
Default Re: GetPlayerDialogID

Quote:
Originally Posted by RockandRol123 [PH] View Post
Can I see some screenshots please?
No. You Can't see screenshots of a function.
wups is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[FilterScript] Anti-Flood / Anti-Repeat + High Ping Kicker KoczkaHUN Filterscripts 21 25/01/2014 09:44 PM
[FilterScript] [FS]Zadmin2.0|Admin System + Anticheat + Anti-flood + Anti high ping [ZFM]Zuc Filterscripts 32 18/06/2012 05:29 PM
[PEDIDO] Sistema Anti-Flood/Anti-Spam ViCtOr_Mc Português/Portuguese 15 28/08/2011 01:27 PM
[FilterScript] [K.A.S] Knight's Anti Cheat (Anti: Armas, Spam, DB, MaxPing, Palavrões, Money Hack) The Knight Lançamentos/Releases 5 05/05/2011 03:41 AM


All times are GMT. The time now is 10:44 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.