Anticheat detect problem - 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 detect problem (
/showthread.php?tid=626190)
Anticheat detect problem -
YouHack - 11.01.2017
I have an anticheat that always detects speed hack when someone jumps over Chiliad with a car,
You know that the speed will be ~400km/h
Tried to solve / edit script like that:
PHP код:
if(GetPlayerState(i) == PLAYER_STATE_DRIVER && !IsAPlane(idcar))
{
new speed = Carspeed(i),
antispeed[300],
sendername[25];
GetPlayerName(i,sendername,sizeof(sendername));
new Float: fDistance = GetVehicleDistanceFromPoint(GetPlayerVehicleID(i), -3427.4290, 483.9504, 2.5524),
if(fDistance > 100)
{
if(speed > 222)
{
format(antispeed, sizeof(antispeed), "(N) %s (%d, level %d) may be using speed hack, vehicle: %s, speed: %.0d.",sendername,i,PlayerInfo[i][pLevel],aVehicleNames[GetVehicleModel(GetPlayerVehicleID(i))-400],speed);
ABroadCast(COLOR_RED,antispeed,1);
}
return 1;
}
}
And recieved the following errors:
Код:
C:\Documents and Settings\Youssef\Bureau\RPG_Romania_1.00.40\gamemodes\ruby.pwn(14202) : error 001: expected token: "-identifier-", but found "if"
C:\Documents and Settings\Youssef\Bureau\RPG_Romania_1.00.40\gamemodes\ruby.pwn(14201) : warning 204: symbol is assigned a value that is never used: "fDistance"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Error.
Re: Anticheat detect problem -
YouHack - 11.01.2017
Oh, i didn't notice to add the Float var under antispeed[300], , solved.
Thanks.