27.12.2013, 19:07
(
Последний раз редактировалось Dieguinho; 27.12.2013 в 21:57.
)
Bom galera estou com este filterscript aqui e preciso da ajuda de vocкs , e simples ele contem umas funзгo de cвmera etc. Pois bem nгo vou enrolar preciso de ajudar para fazer esse filterscript detectar "sorvete" instalados
eu fiz dessa maneira , qual quer erro me falem aqui !
Obs: funcionar sу que nгo detectar o sorvete !
eu fiz dessa maneira , qual quer erro me falem aqui !
Obs: funcionar sу que nгo detectar o sorvete !
PHP код:
/*
// =============================================================================
### ## ## ######## ####
## ## ### ## ## ##
## ## #### ## ## ##
## ## ## ## ## ## ##
######### ## #### ## ##
## ## ## ### ## ##
## ## ## ## ## ####
###### ####### ######## ## ## ######## ######## ######## ########
## ## ## ## ## ## ## ## ## ## ## ## ##
## ## ## ## ## ## ## ## ## ## ## ##
###### ## ## ######## ## ## ###### ######## ## ######
## ## ## ## ## ## ## ## ## ## ## ##
## ## ## ## ## ## ## ## ## ## ## ## ##
###### ####### ## ## ### ######## ## ## ## ########
// =============================================================================
*/
#define FILTERSCRIPT
#include <a_samp>
#include <zcmd>
#include <sscanf2>
#define WARN 1
#define HACKS 2
#define DETECTIONS 3
// Some arrays.
new a_string[512];
enum p_Info
{
LastPunishment,
};
new PInfo[MAX_PLAYERS][p_Info];
enum a_Settings // Anticheat configuraзхes
{
// Puniзгo para hacks especнficos.
// 0 - Nada, 1 - Ban, 2 - Kick, 3 - Administraзгo Warning.
punishment[DETECTIONS],
// Nгo й realmente um cenбrio, mas pode descansar aqui.
detected, // nгo й realmente uma definiзгo, mas pode descansar aqui.
};
new Settings[a_Settings];
#if defined FILTERSCRIPT
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Cridado Por McLouco_Moto");
print("° | -Diego Henrique - | °");
print(" Cridado Por McLouco_Moto");
print("--------------------------------------\n");
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
#else
main()
{
print("\n--------------------------------------");
print(" Cridado Por McLouco_Moto");
print("° | -Diego Henrique - | °");
print(" Cridado Por McLouco_Moto");
print("--------------------------------------\n");
}
#endif
CMD:checar(playerid, params[])
{
new pid;
if(sscanf(params, "u", pid)) return SendClientMessage(playerid, -1, "USAGE: /checar [playerid]");
if(!IsPlayerConnected(pid)) return SendClientMessage(playerid, -1, "Jogador nгo estб conectado.");
Starts0bCheck(pid, 0);
SendClientMessage(playerid, -1, "Invoking a ****** check.");
return 1;
}
public OnGameModeInit()
{
return 1;
}
public OnGameModeExit()
{
return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
return 1;
}
public OnPlayerConnect(playerid)
{
SendClientMessage(playerid, -1, "Cridado Por {00FF00}McLouco_Moto");
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
return 1;
}
public OnPlayerSpawn(playerid)
{
SetTimerEx("Starts0bCheck", 1000 + (GetPlayerPing(playerid) * 2), 0, "ii", playerid, 1);
SendClientMessage(playerid, -1, "Fazendo verificaзгo!.");
return 1;
}
forward Starts0bCheck(playerid, type);
public Starts0bCheck(playerid, type)
{
if(IsPlayerConnected(playerid))
{
// Don't check people in tutorial or hospital.
if( IsPlayerInRangeOfPoint(playerid, 1.0, 1192.256836, -1304.637939, 7.0000) || // All Saints
IsPlayerInRangeOfPoint(playerid, 1.0, 2012.323608, -1436.354370, 5.0000) || // County General
IsPlayerInRangeOfPoint(playerid, 1.0, 764.4561160, -1761.971436, 0.0000) || // Tutorial First Position.
IsPlayerInRangeOfPoint(playerid, 1.0, 2324.685303, -2340.955078, 0.0000)) return 1; // Tutorial Second Position.
if(type == 1) SendClientMessage(playerid, -1, "Por favor aguarde enquanto processamos o seu personagem.");
if(IsPlayerInAnyVehicle(playerid))
{
new Float:pos[3];
GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
SetPlayerPos(playerid, pos[0], pos[1], pos[2]);
}
SetCameraBehindPlayer(playerid);
TogglePlayerControllable(playerid, 0);
SetTimerEx("Finishs0bCheck", 3000, 0, "ii", playerid, type);
}
return 1;
}
forward Finishs0bCheck(playerid, type);
public Finishs0bCheck(playerid, type)
{
if(IsPlayerConnected(playerid))
{
new Float:testpos[6];
GetPlayerCameraPos(playerid, testpos[0], testpos[1], testpos[2]);
GetPlayerPos(playerid, testpos[3], testpos[4], testpos[5]);
TogglePlayerControllable(playerid, 1);
if(floatabs(testpos[2] - testpos[5]) > 1.5)
{
PunishForType(playerid, HACKS);
if(Settings[punishment][HACKS] == WARN && type == 1)
{
SendClientMessage(playerid, -1, "Obrigado, aproveite sua estadia.");
}
GetPlayerName(playerid, a_string, MAX_PLAYER_NAME);
printf("[Anticheat]: %s ****** instalado.", a_string);
printf("[Anticheat]: Camera Position: %f, %f, %f.", testpos[0], testpos[1], testpos[2]);
printf("[Anticheat]: Posiзгo do Jogador: %f, %f, %f.", testpos[3], testpos[4], testpos[5]);
printf("[Anticheat]: diferenзa absoluta: %f, %f, %f.", floatabs(testpos[0] - testpos[3]),
floatabs(testpos[1] - testpos[4]),
floatabs(testpos[2] - testpos[5]));
}
else
{
SendClientMessage(playerid, -1, "Obrigado, aproveite sua estadia.");
}
}
}
stock PunishForType(playerid, type)
{
if(GetTickCount() - PInfo[playerid][LastPunishment] > 1000) // Avoid spam!!!
{
PInfo[playerid][LastPunishment] = GetTickCount();
if(Settings[punishment][type] == WARN)
{
HackWarning(playerid, type);
}
GetPlayerName(playerid, a_string, MAX_PLAYER_NAME);
printf("[Anticheat Debugging]: %s estб sendo punido por\"%s\".", a_string, GetHackNameFromType(type));
printf("[Anticheat Debugging]: Ъltima Puniзгo = %d.", PInfo[playerid][LastPunishment]);
}
}
stock GetHackNameFromType(type)
{
new hackname[32];
if(type == HACKS)
{
format(hackname, sizeof(hackname), "hacks instalados");
}
return hackname;
}
stock HackWarning(playerid, type)
{
// level de admin 1
Settings[detected]++;
GetPlayerName(playerid, a_string, MAX_PLAYER_NAME);
format(a_string, sizeof(a_string), "Adm Warning {FFFFFF}:% s provocou o anticheat, motivo:% s", a_string, GetHackNameFromType(type));
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i)) continue;
// level de admin 0
{
SendClientMessage(i, 0xFF0000FF, a_string);
}
}
return 1;
}