22.10.2017, 09:56
anti car-jack pls))
#include <a_samp> #include <Pawn.RakNet> new GetPlayerVehicleId[MAX_PLAYERS]; const VEHICLE_SYNC = 200; IPacket:VEHICLE_SYNC(playerid, BitStream:bs) { new inCarData[PR_InCarSync]; BS_IgnoreBits(bs, 8); BS_ReadInCarSync(bs, inCarData); if(IsPlayerInAnyVehicle(playerid) && GetPlayerVehicleId[playerid] != inCarData[PR_vehicleId]) {//I put it IsPlayerInAnyVehicle(playerid), the packet gets updated faster than PutPlayerInVehicle so we do not get bug new string[144],name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, sizeof(name)); format(string,sizeof(string),"{FF0000}[Anti-CarJack]: {FFFF00}%s {999999}(ID:%d) {00FF00}auto-kicked {FF0000}[Reason: CarJack]", name,playerid); SendClientMessageToAll(-1, string); string[0] = EOS; Kick(playerid); return false; } return true; } public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger) return GetPlayerVehicleId[playerid] = vehicleid; public OnPlayerStateChange(playerid, newstate, oldstate){ switch(oldstate){ case PLAYER_STATE_PASSENGER: return GetPlayerVehicleId[playerid] = -1; case PLAYER_STATE_DRIVER: return GetPlayerVehicleId[playerid] = -1;} return true; } public OnPlayerDisconnect(playerid, reason) { GetPlayerVehicleId[playerid] = 0; return true; } /*exemple if you will use it PutPlayerInVehicle cmd:infernus(playerid) { static Float:X,Float:Y,Float:Z,Float:Angle; GetPlayerPos(playerid,X,Y,Z); GetPlayerFacingAngle(playerid,Angle); GetPlayerVehicleId[playerid] = CreateVehicle(411,X,Y,Z+2,Angle,random(255),random(255),-1,-1); SetVehicleVirtualWorld(GetPlayerVehicleId[playerid],GetPlayerVirtualWorld(playerid)); LinkVehicleToInterior(GetPlayerVehicleId[playerid], GetPlayerInterior(playerid)); PutPlayerInVehicle(playerid,GetPlayerVehicleId[playerid],0); return true; }*/
I've written a few (anti-crashers) but administrators deleted! because I do not explain every word, but I'm not a poet to write texts!
|
onFootData[PR_animationId] = 1189;
onFootData[PR_velocity][0] = onFootData[PR_velocity][1] = onFootData[PR_velocity][2] = 0.0;
BS_SetWriteOffset(bs, 8);
BS_WriteOnFootSync(bs, onFootData);
Say we detect fly hack, can we not re-write animation and velocity? It doesn't seem to do anything:
pawn Code:
|
const PLAYER_SYNC = 207;
public OnIncomingPacket(playerid, packetid, BitStream: bs)
{
switch (packetid)
{
case PLAYER_SYNC:
{
new onFootData[PR_OnFootSync];
BS_IgnoreBits(bs, 8);
BS_ReadOnFootSync(bs, onFootData);
switch (onFootData[PR_animationId])
{
case 157, 159, 161:
{
if (!IsPlayerInAnyVehicle(playerid))
{
onFootData[PR_animationId] = 1189;
onFootData[PR_velocity][0] = onFootData[PR_velocity][1] = onFootData[PR_velocity][2] = 0.0;
BS_SetWriteOffset(bs, 8);
BS_WriteOnFootSync(bs, onFootData);
}
}
}
}
}
return 1;
}
It's from OverLight v3; Fly (the bmx animations):
pawn Code:
So my question is can we make the cheater unable to use them (make him to stop moving etc)? EDIT: Setting PR_position to old position stored does indeed show to everyone the player standing but in cheater's screen still riding. |
const PLAYER_SYNC = 207; public OnIncomingPacket(playerid, packetid, BitStream: bs) { switch (packetid) { case PLAYER_SYNC: { new onFootData[PR_OnFootSync]; BS_IgnoreBits(bs, 8); BS_ReadOnFootSync(bs, onFootData); if onFootData[PR_velocity][0] > 0.0 && onFootData[PR_animationId] == 1189) return Kick(playerid); } } return true; }
No. Unfortunately you cannot force anything on the client. The mod is working on his side and changing his position. By that, the client is sending these data to the server. The good thing with this plugin is that it modifies the packets that are sent through the server to all the clients but not himself. My best guess at this is getting rid of the cheater and avoid any others cheats that the client might have that your script cannot detect.
|
Is it possible with the help of the plug-in to find out whether cleo is installed for example anticrasher and so on
|
This plugin is only a middleware for the server, it can only tell you about the packets that are coming before they're being processed by the server, messages like location, sync, desync etc.
This plugin is nowhere near invading player's personal game folder, it has "write the best anti-cheat" in the title because some cheats you cannot detect so simply without it. (if at all) This plugin completes the *existing* anti cheats but isn't an entire anti cheat by itself. If you're searching for a complete anti cheat; then you're in the wrong thread. It won't detect air break, it maybe won't detect many other things. |
Your text is useless, I already know all this. it is possible to do a yes anti-airbreak with this plugin, but the question is how
|