Re: Pawn.RakNet - write the best anticheat -
GuyYahood1 - 07.10.2017
how can I know when player do ESC?
Re: Pawn.RakNet - write the best anticheat -
IlanZ - 08.10.2017
Quote:
Originally Posted by DimaShift
Anti-InvalidSeat (Anti-Crasher)
Код:
const PASSENGER_SYNC = 211;
IPacket:PASSENGER_SYNC(playerid, BitStream:bs){
if GetPlayerVehicleSeat(playerid) == 0 *then{
new string[100],name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(string,sizeof(string),"[Anti-CrasherHack]: %q (ID:%d) auto-kicked [Reason: InvalidSeat]",name,playerid);
SendClientMessageToAll(-1,string);
string[0] = EOS;
Kick(playerid);
return false;
}
return true;
}
|
Very good!!!
Re: Pawn.RakNet - write the best anticheat -
KoloradO - 11.10.2017
I need an anti-airbreak for my server because my server has system build base and not with airbreak spoils the whole game. Is it possible to do an anti-airbreak with this plugin?
Sorry my bad english
Re: Pawn.RakNet - write the best anticheat -
sammp - 12.10.2017
Quote:
Originally Posted by KoloradO
I need an anti-airbreak for my server because my server has system build base and not with airbreak spoils the whole game. Is it possible to do an anti-airbreak with this plugin?
Sorry my bad english
|
Look for onplayerairbreak.inc
Re: Pawn.RakNet - write the best anticheat -
Kraeror - 12.10.2017
Wrong place, sorry!
Re: Pawn.RakNet - write the best anticheat -
KoloradO - 12.10.2017
I've tried to use it, but for my server this does not help much. I need something to detect at the same time.
Re: Pawn.RakNet - write the best anticheat -
Kaperstone - 14.10.2017
won't it increase latency?
As I understood it works like so
sampgdk(Receive data) > pawn(Pawn.RakNet) > sampgdk(Process) >pawn(the rest) ?
Re: Pawn.RakNet - write the best anticheat -
YourShadow - 14.10.2017
It works without sampgdk.
Re: Pawn.RakNet - write the best anticheat -
Kaperstone - 14.10.2017
Quote:
Originally Posted by YourShadow
It works without sampgdk.
|
I meant the latency, won't it increase the time taken to process data?
Re: Pawn.RakNet - write the best anticheat -
Max_Andolini - 14.10.2017
Quote:
Originally Posted by YourShadow
It works without sampgdk.
|
Can you publish us examples of this plugin.
Re: Pawn.RakNet - write the best anticheat -
Kaperstone - 14.10.2017
Quote:
Originally Posted by Max_Andolini
Can you publish us examples of this plugin.
|
There are some on GitHub's wiki
https://github.com/urShadow/Pawn.RakNet/wiki
Re: Pawn.RakNet - write the best anticheat -
YourShadow - 14.10.2017
Quote:
Originally Posted by Kaperstone
I meant the latency, won't it increase the time taken to process data?
|
Insignificantly.
Plugin works well with 1000 players online.
Re: Pawn.RakNet - write the best anticheat -
GuyYahood1 - 15.10.2017
Quote:
Originally Posted by YourShadow
Insignificantly.
Plugin works well with 1000 players online.
|
Can I detect ESC?
Re: Pawn.RakNet - write the best anticheat -
DimaShift - 15.10.2017
Quote:
Originally Posted by GuyYahood1
Can I detect ESC?
|
test this!
Код:
#include <a_samp>
#include <Pawn.RakNet>
new bool:PlayerAFK[MAX_PLAYERS],TimerEx[MAX_PLAYERS];
forward OnPlayerAFK(playerid);
public OnPlayerConnect(playerid)
{
TimerEx[playerid] = SetTimerEx("OnPlayerAFK", 1000, true, "i", playerid);
return true;
}
public OnIncomingPacket(playerid, packetid, BitStream:bs)
{
PlayerAFK[playerid] = false;
return true;
}
public OnPlayerAFK(playerid) return PlayerAFK[playerid] = true;
public OnPlayerDisconnect(playerid, reason)
{
KillTimer(TimerEx[playerid]);
TimerEx[playerid] = 0;
PlayerAFK[playerid] = false;
return true;
}
/* if(PlayerAFK[playerid] == true){
player is pause
}else{
not in pause
}*/
Re: Pawn.RakNet - write the best anticheat -
CodeStyle175 - 15.10.2017
Can you make anti-airbreak system with that?
Re: Pawn.RakNet - write the best anticheat -
Fratello - 15.10.2017
Quote:
Originally Posted by CodeStyle175
Can you make anti-airbreak system with that?
|
If you meant is it possible to make such system, yes.
Re: Pawn.RakNet - write the best anticheat -
Kaperstone - 16.10.2017
Quote:
Originally Posted by CodeStyle175
Can you make anti-airbreak system with that?
|
No.
This plugin gives you functions to manipulate/modify packets before they are being processed by your server. (as well as deny them)
I don't think there is a callback that is being triggered like a "OnPlayerRequestAirbreak" therefore you'd need to play with player coordinates to detect it, there is an include by Kar as far as I know, that does that job.
@DimaShift, I like your approach, tho, I think it would be nicer to do it with y_iterate and a single timer than timer for each player.
Re: Pawn.RakNet - write the best anticheat -
CodeStyle175 - 16.10.2017
That Kar include sucks, because those distances and false rates are too big and it detects when player is flying to the other side of the map and then also its questionable.
Re: Pawn.RakNet - write the best anticheat -
Abagail - 16.10.2017
Quote:
Originally Posted by CodeStyle175
That Kar include sucks, because those distances and false rates are too big and it detects when player is flying to the other side of the map and then also its questionable.
|
Emmet wrote an airbreak include which I think is pretty accurate.
OnPlayerAirbreak. Isn't being updated though as he has pretty much abandoned SA-MP from what I know.
Re: Pawn.RakNet - write the best anticheat -
DimaShift - 16.10.2017
Anti-SpeedHack
Anti-SpeedCar
Код:
const VEHICLE_SYNC = 200;
IPacket:VEHICLE_SYNC(playerid, BitStream:bs)
{
new inCarData[PR_InCarSync];
BS_IgnoreBits(bs, 8);
BS_ReadInCarSync(bs, inCarData);
static Float:S = floatsqroot(floatpower(floatabs(inCarData[PR_velocity][0]), 2.0) + floatpower(floatabs(inCarData[PR_velocity][1]), 2.0) + floatpower(floatabs(inCarData[PR_velocity][2]), 2.0)) * 253.3;
if(S > 350.0) {
new string[144],name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(string,sizeof(string),"{FF0000}[Anti-SpeedCar]: {FFFF00}%s {999999}(ID:%d) {00FF00}auto-kicked {FF0000}[Reason: SpeedCar]", name,playerid);
SendClientMessageToAll(-Unu, string);
string[0] = EOS;
Kick(playerid);
return false;
}
return true;
}
Anti-SpeedSkin
Код:
const PLAYER_SYNC = 207;
IPacket:PLAYER_SYNC(playerid, BitStream:bs)
{
new onFootData[PR_OnFootSync];
BS_IgnoreBits(bs, 8);
BS_ReadInCarSync(bs, onFootData);
static Float:S = floatsqroot(floatpower(floatabs(onFootData[PR_velocity][0]), 2.0) + floatpower(floatabs(onFootData[PR_velocity][1]), 2.0) + floatpower(floatabs(onFootData[PR_velocity][2]), 2.0)) * 253.3;
if(S > 100.0) {
new string[144],name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(string,sizeof(string),"{FF0000}[Anti-SpeedSkin]: {FFFF00}%s {999999}(ID:%d) {00FF00}auto-kicked {FF0000}[Reason: SpeedSkin]", name,playerid);
SendClientMessageToAll(-Unu, string);
string[0] = EOS;
Kick(playerid);
return false;
}
return true;
}