16.09.2011, 18:54
(
Last edited by wups; 03/10/2011 at 09:27 AM.
)
GetPlayerDialogID v2
Also, with Anti-DialogHack
Quote:
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/includesInsert this code on top of your game mode after #include <a_samp>
pawn Code:
#include <GPDID>
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.2Version 1.0
Feel free to do anything you want with it.