// verificaзгo: new Float: vida; GetPlayerHealth(playerid, vida); if(vida > GetPVarFloat(playerid, #PlayerVida)) { new giveplayer[MAX_PLAYER_NAME]; new bstring[128]; GetPlayerName(playerid, giveplayer, sizeof(giveplayer)); format(bstring, sizeof(bstring), "ANTICHEAT: %s foi detectado por: HEALTH HACK", PlayerName(playerid) ); ABroadCast(COLOR_LIGHTGREEN,bstring,3); SetPlayerHealthEx(playerid, 5); } new Float: colete; GetPlayerArmour(playerid, colete); if(colete > GetPVarFloat(playerid, #PlayerColete)) { new giveplayer[MAX_PLAYER_NAME]; new bstring[128]; GetPlayerName(playerid, giveplayer, sizeof(giveplayer)); format(bstring, sizeof(bstring), "ANTICHEAT: %s foi detectado por: ARMOUR HACK", PlayerName(playerid) ); ABroadCast(COLOR_LIGHTGREEN,bstring,3); SetPlayerArmourEx(playerid, 0); }
new Float: vida[MAX_PLAYERS];
new Float: colete[MAX_PLAYERS];
GetPlayerHealth(playerid, vida[playerid]);
if(vida[playerid] > GetPVarFloat(playerid, #PlayerVida))
{
new giveplayer[MAX_PLAYER_NAME], bstring[128];
GetPlayerName(playerid, giveplayer, sizeof(giveplayer));
format(bstring, sizeof(bstring), "ANTICHEAT: %s foi detectado por: HEALTH HACK", giveplayer );
ABroadCast(COLOR_LIGHTGREEN,bstring,3);
SetPlayerHealthEx(playerid, 5);
}
GetPlayerArmour(playerid, colete[playerid]);
if(colete[playerid] > GetPVarFloat(playerid, #PlayerColete))
{
new giveplayer[MAX_PLAYER_NAME], bstring[128];
GetPlayerName(playerid, giveplayer, sizeof(giveplayer));
format(bstring, sizeof(bstring), "ANTICHEAT: %s foi detectado por: ARMOUR HACK", giveplayer );
ABroadCast(COLOR_LIGHTGREEN,bstring,3);
SetPlayerArmourEx(playerid, 0);
}
PHP код:
|
stock SetPlayerHealthEx(playerid, Float: vida) { SetPVarFloat(playerid, #PlayerVida, vida); return SetPlayerHealth(playerid, vida); } stock SetPlayerArmourEx(playerid, Float: colete) { SetPVarFloat(playerid, #PlayerColete, colete); return SetPlayerArmour(playerid, colete); }
enum hInfo {
Float:vida,
Float:colete,
TIMERcheck
}
new HackInfo[MAX_PLAYERS][hInfo];
forward CheckHack(playerid);
public OnPlayerDisconnect(playerid, reason)
{
KillTimer(HackInfo[playerid][TIMERcheck]);
return 1;
}
public OnPlayerSpawn(playerid)
{
KillTimer(HackInfo[playerid][TIMERcheck]);
HackInfo[playerid][TIMERcheck] = SetTimerEx("CheckHack", 1000, true, "i", playerid);
return 1;
}
public CheckHack(playerid)
{
GetPlayerHealth(playerid, HackInfo[playerid][vida]);
GetPlayerArmour(playerid, HackInfo[playerid][colete]);
if(HackInfo[playerid][vida] > GetPVarFloat(playerid, "PlayerVida"))
{
new giveplayer[MAX_PLAYER_NAME], bstring[128];
GetPlayerName(playerid, giveplayer, sizeof(giveplayer));
format(bstring, sizeof(bstring), "ANTICHEAT: %s foi detectado por: HEALTH HACK", giveplayer );
ABroadCast(COLOR_LIGHTGREEN,bstring,3);
SetPlayerHealthEx(playerid, 5);
}
if(HackInfo[playerid][colete] > GetPVarFloat(playerid, "PlayerColete"))
{
new giveplayer[MAX_PLAYER_NAME], bstring[128];
GetPlayerName(playerid, giveplayer, sizeof(giveplayer));
format(bstring, sizeof(bstring), "ANTICHEAT: %s foi detectado por: ARMOUR HACK", giveplayer );
ABroadCast(COLOR_LIGHTGREEN,bstring,3);
SetPlayerArmourEx(playerid, 0);
}
return 1;
}
stock SetPlayerHealthEx(playerid, Float: vidas)
{
SetPVarFloat(playerid, "PlayerVida", vidas);
return SetPlayerHealth(playerid, vidas);
}
stock SetPlayerArmourEx(playerid, Float: coletes)
{
SetPVarFloat(playerid, "PlayerColete", coletes);
return SetPlayerArmour(playerid, coletes);
}
PHP код:
|
Fico me perguntando o que vocкs tem na mente pra usar uma "proteзгo anti-cheater" que nem hook usa, hook й fundamental pra isso, PVars pra anti-cheater? Sйrio? Que tenso
|