[Include] GUIS - Prevent people from hacking your server (Updated v1.2)
#1

GUIS - GUI Security PAWN Library v1.3

What is GUIS?
GUIS is a few-lines-of-code PAWN Library which fixed a SA-MP bug where players could change their dialogid. In SA-MP dialogid is not server-side nor checked by server-side later. To change your dialogid which is stored in your computer memory you can hack it with programs like Cheat Engine but thats not what this topic is about and I won't write more about it.

So how do I use it?
Well ofcourse firstly you need to download it. Download links are at the bottom of the post. After you get it, put it in pawno/include directory. In your gamemode & filterscripts you add:
pawn Код:
#include <GUIS>
Is it compatible with Gamer_Z's FDLG?
Ofcourse it is. Just put my include before his and you should be ok.


Functions!

pawn Код:
native ShowPlayerDialog_Old(playerid, dialogid, style, caption[], info[], button1[], button2[]);
If you're using this library I'm sure you would not use this function but it still exists. This is an old ShowPlayerDialog function.

pawn Код:
native ShowPlayerDialog(playerid, dialogid, style, caption[], info[], button1[], button2[]);
Same function and params as before, just runs some more of the code now.

pawn Код:
native GetPlayerDialogID(playerid);
Gets player's real dialogid, not the one which is his/her computer memory.

pawn Код:
native HidePlayerDialog(dialogid);
Hides current player dialog, just felt like it to add this.


Callbacks!

pawn Код:
forward OnPlayerChangeDialogID(playerid, dialogid, newdialogid);
Called when player presses one of the GUI buttons and his/her dialogid is different than the one in server memory. Can be also called when a filterscript is not using GUIS so be careful. When returned 0, OnDialogResponse will not be called and player's server-sided dialogid will not be updated as well (can be done manually).


Download!
v1.3
Direct Link (I514X.TK)
v1.2
Direct Link (I514X.TK)
Earlier versions are not to be used due to bugs/crashes and instability.

All credits are in the code!

regards, i514x.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)