View difference between Paste ID: 3et7kfcv and 9JsQSmkB
SHOW: | | - or go back to the newest paste.
1
#include <open.mp>
2
3
// -
4
#define C_GREEN 0x20DD6AFF
5
#define C_ERROR 0xA01616FF
6
7
// -
8
new pCheat[MAX_PLAYERS];
9
// -
10
new rMemAddr[8];
11
12
// -
13
forward autoSobCheck(playerid);
14
forward kickPlayer(playerid);
15
forward OnClientCheckResponse(playerid, actionid, memaddr, retndata);
16
// -
17
18
new opcodes[8] = {
19
	0x06865E,
20
 	0xA88774,
21
  	0xDB6746,
22
   	0xFDB957,
23
    0x52D558,
24
    0xE4FC58,
25
    0x1BA246,
26
    0xB0C56F
27
};
28
29
// -- Callbacks --
30
public OnPlayerConnect(playerid)
31
{
32
    pCheat[playerid] = -1;
33
    // -
34
    SendClientCheck(playerid, 0x47, 0, 0, 0x4);
35
    SendClientCheck(playerid, 0x48, 0, 0, 0x4); 
36
    // -
37
    
38
	for (new i = 0; i < 8; i++) rMemAddr[i] = anotherForm(opcodes[i]), SendClientCheck(playerid, 0x5, rMemAddr[i], 0x0, 0x4);
39
    SetTimerEx("autoSobCheck", 2900, false, "i", playerid);
40
    return 1;
41
}
42
43
public OnClientCheckResponse(playerid, actionid, memaddr, retndata)
44
{
45
	switch(actionid)
46
	{
47
	    case 0x5:
48
	    {
49
		    if ( memaddr == rMemAddr[0] && retndata != 192) pCheat[playerid] = 1;
50
		    if ( memaddr == rMemAddr[1] && retndata != 72) pCheat[playerid] = 2;
51
		    if ( memaddr == rMemAddr[2] && retndata != 192) pCheat[playerid] = 3;
52
		    if ( memaddr == rMemAddr[3] && retndata != 68) pCheat[playerid] = 4;
53
		    if ( memaddr == rMemAddr[4] && retndata != 196) pCheat[playerid] = 5;
54
		    if ( memaddr == rMemAddr[5] && retndata != 64) pCheat[playerid] = 6;
55
		    if ( memaddr == rMemAddr[6] && retndata != 8 ) pCheat[playerid] = 7; // CLEO5+Ultimate ASI Loader
56
			if ( memaddr == rMemAddr[7] && retndata != 200 ) pCheat[playerid] = 8; // SilentPatch
57
		}
58
	}
59
	return 1;
60
}
61
62
public autoSobCheck(playerid)
63
{
64
	if ( pCheat[playerid] > 0 )
65
 	{
66
		for(new i = 0; i < 7; i++) SendClientMessage(playerid, -1, " ");
67
  		SendClientMessage(playerid, C_GREEN, "--------------------------------------------");
68
    }
69
	// --
70
	switch ( pCheat[playerid] )
71
	{
72
	    case 1:SendClientMessage(playerid, C_ERROR, "[ERROR] System has detected that you are using S0beit mod. Remove it and return to the server!"), SetTimerEx("kickPlayer", 2500, false, "d", playerid);
73
		case 2..6:SendClientMessage(playerid, C_ERROR, "[ERROR] System has detected that you are using CLEO mod. Remove it and return to the server!"), SetTimerEx("kickPlayer", 2500, false, "d", playerid);
74
		case 7:SendClientMessage(playerid, C_ERROR, "[ERROR] System has detected that you are using CLEO5+Ultimate ASI Loader mod. Remove it and return to the server!"), SetTimerEx("kickPlayer", 2500, false, "d", playerid);
75
		case 8:SendClientMessage(playerid, C_ERROR, "[ERROR] System has detected that you are using SilentPatch. Remove it and return to the server!"), SetTimerEx("kickPlayer", 2500, false, "d", playerid);
76
	}
77
	return 1;
78
}
79
80
public kickPlayer(playerid) Kick(playerid);
81
82
// --
83
stock anotherForm(input)
84
{
85
    new result;
86
87
    #emit LOAD.S.pri input
88
    #emit CONST.alt 0xFF
89
    #emit AND
90
    #emit CONST.alt 16
91
    #emit SHL
92
    #emit STOR.S.pri result
93
94
    #emit LOAD.S.pri input
95
    #emit CONST.alt 0xFF00
96
    #emit AND
97
    #emit LOAD.S.alt result
98
    #emit ADD
99
    #emit STOR.S.pri result
100
101
    #emit LOAD.S.pri input
102
    #emit CONST.alt 0xFF0000
103
    #emit AND
104
    #emit CONST.alt 16
105
    #emit SHR
106
    #emit LOAD.S.alt result
107
    #emit ADD
108
    #emit STOR.S.pri result
109
110
    return result;
111
}