SA-MP Forums Archive
AntiCheat [HELP] - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: AntiCheat [HELP] (/showthread.php?tid=335175)



AntiCheat [HELP] - Sting. - 17.04.2012

How do I create my own AntiCheat?

1st of all, I don't want to use any filterscripts done by other people. I want to create this stuff listed below:

1. Health Hack
2. Speed Hack

This two main important hacks. For the weapons one, I already have an anticheat for that and the rest. Only this two important ones. If anyone can help, I'll give them reputation. Thanks.


Re: AntiCheat [HELP] - Cjgogo - 17.04.2012

Well,for Speed Hack,just register the fastest GTA SA vehicle speed(if you have a speed system),then script the code that way that if the player has the speed higher than the greatest speed in GTA SA(Vehicle:Hydra;Speed 235kmph),ban him.I heard someone registering every vehicles speed,but,to be honest,it makes no sense,I saw a hack wich made Perennial go 10 times faster than Hydra.


Re: AntiCheat [HELP] - iNorton - 17.04.2012

Delete please. Missread


Re: AntiCheat [HELP] - Sting. - 17.04.2012

Lol, I still don't understand....


Re: AntiCheat [HELP] - WarriorEd22 - 17.04.2012

Make it so if a vehicle goes above 240 kmh, then ban or kick him. It's easy. I would make it but im on mobile right now.


Re: AntiCheat [HELP] - Spooky - 17.04.2012

pawn Код:
OnPlayerDeath(playerid, killerid, reason)
{
If(GetPlayerWeapon(killerid) == MINIGUN)//Define the miniguns model id
{
Ban(killerid);
}
return 1;
}
Or you can make an enum and saves pWeapon1 - 12 and Then saves it and on OnPlayerUpdate make a script in which players saved weapons matches the current weapons. Its also a good way


Re: AntiCheat [HELP] - Sting. - 18.04.2012

Weapons AntiCheat done. What about Health hack and speed hack?


Re: AntiCheat [HELP] - Cjgogo - 18.04.2012

I told you about speed hack,look,use this function to get player/vehicle speed(works for both,DESPITE name):
pawn Код:
stock GetPlayerSpeed(playerid, bool:kmh = true)
{
    new
        Float:xx,
        Float:yy,
        Float:zz,
        Float:pSpeed;

    if(IsPlayerInAnyVehicle(playerid))
    {
        GetVehicleVelocity(GetPlayerVehicleID(playerid),xx,yy,zz);
    }
    else
    {
        GetPlayerVelocity(playerid,xx,yy,zz);
    }

    pSpeed  = floatsqroot((xx * xx) + (yy * yy) + (zz * zz));
    return kmh ? floatround((pSpeed * 195.12)) : floatround((pSpeed * 136.66667));
}
USAGE:
pawn Код:
if(GetPlayerSpeed(playerid) > 235) Ban(playerid);
CREDITS don't go to me,the function is old,and I forgot who scripted it,sorry.


Re: AntiCheat [HELP] - Shetch - 18.04.2012

Once a player connects, set his health to 99.
Anyone who will have 100 health is a hacker.


Re: AntiCheat [HELP] - Cjgogo - 18.04.2012

Quote:
Originally Posted by Shetch
Посмотреть сообщение
Once a player connects, set his health to 99.
Anyone who will have 100 health is a hacker.
Better,when he spawns,as after death he will spawn with 100 health,but Shetch idea is very good .