Anticheat detect problem
#1

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 
FloatfDistance GetVehicleDistanceFromPoint(GetPlayerVehicleID(i), -3427.4290483.95042.5524),
                if(
fDistance 100)
                {
                    if(
speed 222)
                    {
                        
format(antispeedsizeof(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.
Reply
#2

Oh, i didn't notice to add the Float var under antispeed[300], , solved.
Thanks.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)