-
Notifications
You must be signed in to change notification settings - Fork 2
/
VerificacaoPlataforma.inc
227 lines (208 loc) · 12 KB
/
VerificacaoPlataforma.inc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
/*
include Verificacao Plataforma
Esse include foi inicialmente criado pelo Jekmant, e ultimamente tem sido difícil
encontrá-lo na internet. Então, decidi fazer melhorias e disponibilizá-lo para
vocês.
© [2024] [Calasans]. Todos os direitos reservados.
Discord: ocalasans
Youtube: Calasans
Instagram: ocalasans
SA:MP Programming Comunnity©: https://abre.ai/samp-spc
*/
#if defined _verificacao_plataforma
#undef _verificacao_plataforma
#endif
//
#if defined _verificacao_plataform_included
#endinput
#endif
#define _verificacao_plataform_included
//
#if !defined _samp_included
#error "A biblioteca `a_samp` nao foi ativada. Por favor, ative-a no inicio do seu Gamemode, Ex: `#include <a_samp>`"
#endif
//
#if !defined PAWNRAKNET_INC_
#error "A biblioteca `Pawn.RakNet` nao foi ativada. Por favor, ative-a no seu Gamemode, Ex: `#include <Pawn.RakNet>`"
#endif
//
#if !defined gpci
native gpci(playerid, buffer[], size = sizeof(buffer));
#endif
/*
$$$$$$$\ $$$$$$\ $$\ $$\ $$\ $$$$$$$\ $$$$$$\ $$\ $$\ $$\ $$\
$$ __$$\ $$ __$$\ \__| \__| $$ | $$ __$$\ $$ __$$\ \__| \__| $$ | \__|
$$ | $$ | $$$$$$\ $$ / \__|$$\ $$$$$$$\ $$\ $$$$$$$\ $$$$$$\ $$$$$$\ $$$$$$$\ $$ | $$ | $$ | $$$$$$\ $$ / \__|$$\ $$$$$$$\ $$\ $$$$$$\ $$\ $$$$$$\ $$$$$$$\ $$$$$$$\
$$ | $$ |$$ __$$\ $$$$\ $$ |$$ __$$\ $$ |$$ _____|$$ __$$\ $$ __$$\ $$ _____| \__| $$ | $$ |$$ __$$\ $$$$\ $$ |$$ __$$\ $$ |\_$$ _| $$ |$$ __$$\ $$ __$$\ $$ _____|
$$ | $$ |$$$$$$$$ |$$ _| $$ |$$ | $$ |$$ |$$ / $$ / $$ |$$$$$$$$ |\$$$$$$\ $$\ $$ | $$ |$$$$$$$$ |$$ _| $$ |$$ | $$ |$$ | $$ | $$ |$$ / $$ |$$ | $$ |\$$$$$$\
$$ | $$ |$$ ____|$$ | $$ |$$ | $$ |$$ |$$ | $$ | $$ |$$ ____| \____$$\ $$ | $$ | $$ |$$ ____|$$ | $$ |$$ | $$ |$$ | $$ |$$\ $$ |$$ | $$ |$$ | $$ | \____$$\
$$$$$$$ |\$$$$$$$\ $$ | $$ |$$ | $$ |$$ |\$$$$$$$\ \$$$$$$ |\$$$$$$$\ $$$$$$$ | $$ | $$$$$$$ |\$$$$$$$\ $$ | $$ |$$ | $$ |$$ | \$$$$ |$$ |\$$$$$$ |$$ | $$ |$$$$$$$ |
\_______/ \_______|\__| \__|\__| \__|\__| \_______| \______/ \_______|\_______/ \__| \_______/ \_______|\__| \__|\__| \__|\__| \____/ \__| \______/ \__| \__|\_______/
*/
#define VPI_tamanho_pacote 3
#define VPI_chave_android "ED40ED0E8089CC44C08EE9580F4C8C44EE8EE990"
/*
$$\ $$\ $$\ $$\ $$\ $$\ $$\ $$\ $$\ $$\
$$ | $$ | \__| \__| $$ | $$ | $$ | \__| $$ | $$ |
$$ | $$ |$$$$$$\ $$$$$$\ $$\ $$$$$$\ $$\ $$\ $$$$$$\ $$\ $$$$$$$\ $$ | $$ | $$ |$$$$$$\ $$$$$$\ $$\ $$$$$$\ $$$$$$$\ $$ | $$$$$$\ $$$$$$$\
\$$\ $$ |\____$$\ $$ __$$\ $$ | \____$$\\$$\ $$ |$$ __$$\ $$ |$$ _____| \__| \$$\ $$ |\____$$\ $$ __$$\ $$ | \____$$\ $$ __$$\ $$ |$$ __$$\ $$ _____|
\$$\$$ / $$$$$$$ |$$ | \__|$$ | $$$$$$$ |\$$\$$ / $$$$$$$$ |$$ |\$$$$$$\ $$\ \$$\$$ / $$$$$$$ |$$ | \__|$$ | $$$$$$$ |$$ | $$ |$$ |$$$$$$$$ |\$$$$$$\
\$$$ / $$ __$$ |$$ | $$ |$$ __$$ | \$$$ / $$ ____|$$ | \____$$\ $$ | \$$$ / $$ __$$ |$$ | $$ |$$ __$$ |$$ | $$ |$$ |$$ ____| \____$$\
\$ / \$$$$$$$ |$$ | $$ |\$$$$$$$ | \$ / \$$$$$$$\ $$ |$$$$$$$ | $$ | \$ / \$$$$$$$ |$$ | $$ |\$$$$$$$ |$$$$$$$ |$$ |\$$$$$$$\ $$$$$$$ |
\_/ \_______|\__| \__| \_______| \_/ \_______|\__|\_______/ \__| \_/ \_______|\__| \__| \_______|\_______/ \__| \_______|\_______/
*/
const VPI_sincronizacao_pers = 221;
const VPI_iniciar_android = 0x10;
enum enum_player_android {
bool:VPI_Android,
bool:VPI_Mira_Automatica
}
static VPI_player_android[MAX_PLAYERS][enum_player_android];
/*
$$$$$$\ $$\ $$\ $$$$$$\ $$\ $$\
$$ __$$\ $$ | $$ | $$ __$$\ $$ | $$ |
$$ / $$ |$$\ $$\ $$$$$$\ $$$$$$\ $$$$$$\ $$$$$$$\ $$ | $$ / $$ |$$$$$$\ $$$$$$$\ $$$$$$\ $$$$$$\ $$$$$$$\
$$ | $$ |$$ | $$ |\_$$ _| $$ __$$\ $$ __$$\ $$ _____| \__| $$ | $$ |\_$$ _| $$ __$$\ $$ __$$\ $$ __$$\ $$ _____|
$$ | $$ |$$ | $$ | $$ | $$ | \__|$$ / $$ |\$$$$$$\ $$\ $$ | $$ | $$ | $$ | $$ |$$$$$$$$ |$$ | \__|\$$$$$$\
$$ | $$ |$$ | $$ | $$ |$$\ $$ | $$ | $$ | \____$$\ $$ | $$ | $$ | $$ |$$\ $$ | $$ |$$ ____|$$ | \____$$\
$$$$$$ |\$$$$$$ | \$$$$ |$$ | \$$$$$$ |$$$$$$$ | $$ | $$$$$$ | \$$$$ |$$ | $$ |\$$$$$$$\ $$ | $$$$$$$ |
\______/ \______/ \____/ \__| \______/ \_______/ \__| \______/ \____/ \__| \__| \_______|\__| \_______/
*/
public OnGameModeInit()
{
print(" ");
print("__________________________________________________________________");
print("||==============================================================||");
print("|| ||");
print("|| Verificar Plataforma | Check Platform ||");
print("|| ||");
print("|| 8b d8 88888888ba ||");
print("|| `8b d8' 88 `8b ||");
print("|| `8b d8' 88 ,8P ||");
print("|| `8b d8' 88aaaaaa8P' ||");
print("|| `8b d8' aaaaaaaa 88======= ||");
print("|| `8b d8' ======== 88 ||");
print("|| `888' 88 ||");
print("|| `8' 88 ||");
print("|| ||");
print("|| ||");
print("|| ||");
print("|| By: Jekmant ||");
print("|| Updated: Calasans ||");
print("|| Discord: abre.ai/samp-spc ||");
print("|| ||");
print("||==============================================================||");
print("__________________________________________________________________");
print(" ");
//
#if defined VPI_print_gamemodeinit
return VPI_print_gamemodeinit();
#else
return true;
#endif
}
public OnPlayerConnect(playerid)
{
new VPI_string[64];
//
gpci(playerid, VPI_string, sizeof VPI_string);
//
if(!strcmp(VPI_string, VPI_chave_android))
VPI_player_android[playerid][VPI_Android] = true;
//
else
VPI_player_android[playerid][VPI_Android] = false;
//
#if defined VPI_playerconnect
return VPI_playerconnect(playerid);
#else
return true;
#endif
}
public OnPlayerDisconnect(playerid, reason)
{
VPI_player_android[playerid][VPI_Android] = false;
VPI_player_android[playerid][VPI_Mira_Automatica] = false;
//
#if defined VPI_playerdisconnect
return VPI_playerdisconnect(playerid, reason);
#else
return true;
#endif
}
IRawPacket:VPI_sincronizacao_pers(playerid, BitStream:bs)
{
new bytes, rpcid;
//
BS_GetNumberOfBytesUsed(bs, bytes);
//
if(bytes < VPI_tamanho_pacote)
return false;
//
BS_ReadValue(bs, PR_IGNORE_BITS, 8, PR_UINT8, rpcid);
//
if(rpcid == VPI_iniciar_android)
{
new autoaim;
//
BS_ReadValue(bs, PR_UINT8, autoaim);
//
VPI_player_android[playerid][VPI_Android] = true;
VPI_player_android[playerid][VPI_Mira_Automatica] = bool:autoaim;
}
return true;
}
/*
$$$$$$$$\ $$\ $$$$$$$$\ $$\ $$\
$$ _____| $$ | $$ _____| $$ | \__|
$$ | $$\ $$\ $$$$$$$\ $$$$$$$\ $$$$$$\ $$$$$$\ $$$$$$$\ $$ | $$ | $$\ $$\ $$$$$$$\ $$$$$$$\ $$$$$$\ $$\ $$$$$$\ $$$$$$$\ $$$$$$$\
$$$$$\ $$ | $$ |$$ __$$\ $$ _____|$$ __$$\ $$ __$$\ $$ _____| \__| $$$$$\ $$ | $$ |$$ __$$\ $$ _____|\_$$ _| $$ |$$ __$$\ $$ __$$\ $$ _____|
$$ __|$$ | $$ |$$ | $$ |$$ / $$ / $$ |$$$$$$$$ |\$$$$$$\ $$\ $$ __|$$ | $$ |$$ | $$ |$$ / $$ | $$ |$$ / $$ |$$ | $$ |\$$$$$$\
$$ | $$ | $$ |$$ | $$ |$$ | $$ | $$ |$$ ____| \____$$\ $$ | $$ | $$ | $$ |$$ | $$ |$$ | $$ |$$\ $$ |$$ | $$ |$$ | $$ | \____$$\
$$ | \$$$$$$ |$$ | $$ |\$$$$$$$\ \$$$$$$ |\$$$$$$$\ $$$$$$$ | $$ | $$ | \$$$$$$ |$$ | $$ |\$$$$$$$\ \$$$$ |$$ |\$$$$$$ |$$ | $$ |$$$$$$$ |
\__| \______/ \__| \__| \_______| \______/ \_______|\_______/ \__| \__| \______/ \__| \__| \_______| \____/ \__| \______/ \__| \__|\_______/
*/
stock bool:IsPlayerAndroid(playerid)
return VPI_player_android[playerid][VPI_Android];
//
stock bool:PlayerHasAutoAim(playerid)
return VPI_player_android[playerid][VPI_Mira_Automatica];
/*
$$$$$$\ $$\ $$\ $$$$$$$\ $$$$$$\ $$\ $$\ $$\ $$\
$$ __$$\ $$ | $$ | $$ __$$\ $$ __$$\ \__| \__| $$ | \__|
$$ / $$ |$$$$$$\ $$$$$$$\ $$$$$$\ $$$$$$\ $$ | $$ | $$$$$$\ $$ / \__|$$\ $$$$$$$\ $$\ $$$$$$\ $$\ $$$$$$\ $$$$$$$\ $$$$$$$\
$$ | $$ |\_$$ _| $$ __$$\ $$ __$$\ $$ __$$\ $$ | $$ |$$ __$$\ $$$$\ $$ |$$ __$$\ $$ |\_$$ _| $$ |$$ __$$\ $$ __$$\ $$ _____|
$$ | $$ | $$ | $$ | $$ |$$$$$$$$ |$$ | \__| $$ | $$ |$$$$$$$$ |$$ _| $$ |$$ | $$ |$$ | $$ | $$ |$$ / $$ |$$ | $$ |\$$$$$$\
$$ | $$ | $$ |$$\ $$ | $$ |$$ ____|$$ | $$ | $$ |$$ ____|$$ | $$ |$$ | $$ |$$ | $$ |$$\ $$ |$$ | $$ |$$ | $$ | \____$$\
$$$$$$ | \$$$$ |$$ | $$ |\$$$$$$$\ $$ | $$$$$$$ |\$$$$$$$\ $$ | $$ |$$ | $$ |$$ | \$$$$ |$$ |\$$$$$$ |$$ | $$ |$$$$$$$ |
\______/ \____/ \__| \__| \_______|\__| \_______/ \_______|\__| \__|\__| \__|\__| \____/ \__| \______/ \__| \__|\_______/
*/
#if defined _ALS_OnGameModeInit
#undef OnGameModeInit
#else
#define _ALS_OnGameModeInit
#endif
#define OnGameModeInit VPI_print_gamemodeinit
#if defined VPI_print_gamemodeinit
forward VPI_print_gamemodeinit();
#endif
//
#if defined _ALS_OnPlayerConnect
#undef OnPlayerConnect
#else
#define _ALS_OnPlayerConnect
#endif
#define OnPlayerConnect VPI_playerconnect
#if defined VPI_playerconnect
forward VPI_playerconnect(playerid);
#endif
//
#if defined _ALS_OnPlayerDisconnect
#undef OnPlayerDisconnect
#else
#define _ALS_OnPlayerDisconnect
#endif
#define OnPlayerDisconnect VPI_playerdisconnect
#if defined VPI_playerdisconnect
forward VPI_playerdisconnect(playerid, reason);
#endif