23.07.2012, 03:35
(
Last edited by Mercurio; 23/07/2012 at 04:09 AM.
)
Ok
Quando coloco a linha:
Eu obtenho o seguinte erro:
@EDIT
Eu estou utilizando o cуdigo em FS assim:
E nгo estб funfando...
Alguйm pode me ajudar?
Quando coloco a linha:
pawn Code:
if(IsPlayerBOT(playerid)) return false;
pawn Code:
error 017: undefined symbol "IsPlayerBOT"
Eu estou utilizando o cуdigo em FS assim:
pawn Code:
#include a_samp
#if !defined varGet
#define varGet(%0) getproperty(0,%0)
#endif
#if !defined varSet
#define varSet(%0,%1) setproperty(0, %0, %1)
#endif
#define IsPlayerBot(%0)\
GetPlayerPing(%0) == 65535 && (gettime() - varGet((GetPlayerIp(%0, botGetIP, sizeof botGetIP), botGetIP)) > 5)
public OnPlayerConnect(playerid) {
if(IsPlayerNPC(playerid)) return false;
static
playerip[24]
;
GetPlayerIp(playerid, playerip, 24);
if(gettime() - varGet(playerip) < 2) {
strcat(playerip, "di_S");
if(gettime() - varGet(playerip) < 3) {
return false;
}
printf("%d Entrou em menos de 2 segundos", playerid);
GetPlayerIp(playerid, playerip, 20);
varSet(playerip, gettime());
strcat(playerip, "x");
static timers ;
timers = varGet(playerip);
varSet(playerip, 1+ timers);
if(timers > 2) {
playerip[strlen(playerip) - 2] = 0;
printf("BOT: ID -> %d IP -> %s", playerid, playerip);
BanEx(playerid, "Bot Connect");
}
}
if(IsPlayerNPC(playerid)) return false;
return varSet(playerip, gettime());
}
public OnPlayerDisconnect(playerid, reason) {
if(reason == 2) {
static
playerip[20]
;
GetPlayerIp(playerid, playerip, 20);
strcat(playerip, "di_S");
varSet(playerip, gettime());
}
if(IsPlayerNPC(playerid)) return false;
return false;
}
Alguйm pode me ajudar?