Jump to content
Hostul a fost schimbat. Daca vedeti serverul offline readaugati rpg.b-zone.ro sau 141.95.124.78:7777 in clientul de sa-mp ×

[PAWNO] Sistem AntiTrollHack


Jackson Brooklyn
 Share

Recommended Posts

Salutare, astazi revin cu un sistem AntiTrollHack. Am setat sa iti dea BAN cand detecteaza TrollHack, dar voi daca nu sunteti siguri de sistemele terta a serverului, va rog sa setati pe KICK, nu BAN.

 

Creati variabila:

new Float:LastVelocity[MAX_PLAYERS][3];

Apoi adaugati aceasta linie in gamemode:

TrollDetect(playerid, troll = 0)
{
	if(troll == 1)
	{
		new str[128], name[MAX_PLAYER_NAME+1];
		GetPlayerName(playerid, name, sizeof name);
		format(str, sizeof str, "AdmCmd: %s was banned by AdmBot, reason: Cheats(Troll)", name);
		SendClientMessageToAll(COLOR_SANCTION, str);
		Ban(playerid);
		return 1;
	}
	if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
	{
		if(OnFly[playerid] == false)
		{
			new Float:Velocity[3];
			GetPlayerVelocity(playerid, Velocity[0], Velocity[1], Velocity[2]);
			new Float:amount = Velocity[0]-LastVelocity[playerid][0];
			new Float:amount2 = Velocity[1]-LastVelocity[playerid][1];
			if(amount > 3.0 || amount < -4.0 || amount2  > 10.0 || amount2 < -10.0 || Velocity[2] == 0.100000)
			{
				new str[128], name[MAX_PLAYER_NAME+1];
				GetPlayerName(playerid, name, sizeof name);
				format(str, sizeof str, "AdmCmd: %s was banned by AdmBot, reason: Cheats(Troll)", name);
				SendClientMessageToAll(COLOR_SANCTION, str);
				Ban(playerid);
				return 1;
			}
		}
	}
	if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
	{
		new Float:Velocity[3];
		GetVehicleVelocity(GetPlayerVehicleID(playerid), Velocity[0], Velocity[1], Velocity[2]);
		if(Velocity[1] == -90.000000 && Velocity[2] == 0.100000)
		{
			new str[128], name[MAX_PLAYER_NAME+1];
			GetPlayerName(playerid, name, sizeof name);
			format(str, sizeof str, "AdmCmd: %s was banned by AdmBot, reason: Cheats(Troll)", name);
			SendClientMessageToAll(COLOR_SANCTION, str);
			Ban(playerid);
			return 1;
		}
	}
	if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT) GetPlayerVelocity(playerid, LastVelocity[playerid][0],  LastVelocity[playerid][1],  LastVelocity[playerid][2]);
	return 1;
}

Adaugati linia asta la inceputul OnPlayerEnterVehicle:

if(IsPlayerInAnyVehicle(playerid)) return TrollDetect(playerid, 1);

Si linia asta la OnPlayerUpdate:

TrollDetect(playerid);

 

!!! ATENTIE !!! PENTRU ACEST SISTEM DE ANTI TROLL HACK, VA ROG SA AVETI SI ACEST SISTEM FACUT DE FNZ, FLY: 

 

 

Link to comment
Share on other sites

1 minute ago, FnZ said:

Pai ce faci sefu, te fac scripter la b-zone? @Jackson Brooklyn

Hmm... poate pe viitor, dupa ce termin facultate, dupa ce termin cu ratele, sa stau si eu linistit sa nu mai lucrez si peste program pt. bonus :))) Si poate o sa intru si eu in ajutor la script :))))

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.