SA-MP Forums Archive
i need 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: i need help! (/showthread.php?tid=346498)



i need help! - Don_pepe - 28.05.2012

Hello Friends, I have a Samp Server, and has been a blessed hacker got my server to fuck, here I leave some pictures and video to capture what happens:



http://www.youtube.com/watch?v=l0Q1h...ature=*********

As you can see is a Hacker Score and deaths, need to know if there is any anti hack for this, I need your help please, I'll be very grateful!

Well That's it, I hope to help me ..

GREETINGS.


Re: i need help! - Face9000 - 28.05.2012

I'm 100% sure he's using fake kills spam.Put a limit using gettime,like 5 kills at same moment as maximum.Is there are more than 5 kills,ban the player.

For the humans,it's impossible to make 5 kills in 1 second or 10ms unless you're using fake kills bots.

EDIT: Here,i maked a fast code for you.

pawn Код:
new TotalDeaths[MAX_PLAYERS];
new LastDeath[MAX_PLAYERS];
OnPlayerDeath:

pawn Код:
if(TotalDeths[playerid] == 0)
    {
       LastDeath[playerid] = gettime();
    }
   
    TotalDeths[playerid]++;
   
        if(TotalDeths[playerid] == 5) //Number of maxium deaths at same time
        {
        if((gettime() - LastDeath[playerid]) <= 5)
        {
            new name[MAX_PLAYER_NAME],string[190],string2[190];
            GetPlayerName(playerid, name, sizeof(name));
            new Year, Month, Day, Hour, Minute, Second;
            getdate(Year, Month, Day);
            gettime(Hour, Minute, Second);
            format(string,sizeof(string),"You have been banned by AntiCheat for Fake Kills. - %02d/%02d/%d - %02d:%02d:%02d",Day,Month,Year,Hour,Minute,Second);
            SendClientMessage(playerid,red,string);
            format(string2, sizeof(string), "AC: %s has been banned for Fake Kills. - %02d/%02d/%d - %02d:%02d:%02d",name,reason,Day,Month,Year,Hour,Minute,Second);
            SendClientMessageToAll(red,string2);
            BanEx(playerid,string2);
        }
        else
        if((gettime() - LastDeath[playerid]) > 5)
        {
            TotalDeths[playerid]=0;
        }
    }



Respuesta: i need help! - Don_pepe - 28.05.2012

Thanks friend, but I get these errors:

Quote:

(3587) : error 017: undefined symbol "TotalDeths"
(3587) : warning 215: expression has no effect
(3587) : error 001: expected token: ";", but found "]"
(3587) : error 029: invalid expression, assumed zero
(3587) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


4 Errors.

greetings, blessings!


Re: i need help! - Face9000 - 28.05.2012

Paste line 3587.


Re: i need help! - ReneG - 28.05.2012

Upgrade your server to 0.3e. Multiplayer hacks are currently patched.


Re: i need help! - TheDominator - 28.05.2012

You were spelling deaths wrong:
pawn Код:
TotalDeaths[playerid]++;
Instead it needs to be:
pawn Код:
TotalDeaths[playerid]++;
Add this code instead:

pawn Код:
if(TotalDeaths[playerid] == 0)
    {
       LastDeath[playerid] = gettime();
    }
   
    TotalDeaths[playerid]++;
   
        if(TotalDeaths[playerid] == 5) //Number of maxium deaths at same time
        {
        if((gettime() - LastDeath[playerid]) <= 5)
        {
            new name[MAX_PLAYER_NAME],string[190],string2[190];
            GetPlayerName(playerid, name, sizeof(name));
            new Year, Month, Day, Hour, Minute, Second;
            getdate(Year, Month, Day);
            gettime(Hour, Minute, Second);
            format(string,sizeof(string),"You have been banned by AntiCheat for Fake Kills. - %02d/%02d/%d - %02d:%02d:%02d",Day,Month,Year,Hour,Minute,Second);
            SendClientMessage(playerid,red,string);
            format(string2, sizeof(string), "AC: %s has been banned for Fake Kills. - %02d/%02d/%d - %02d:%02d:%02d",name,reason,Day,Month,Year,Hour,Minute,Second);
            SendClientMessageToAll(red,string2);
            BanEx(playerid,string2);
        }
        else
        if((gettime() - LastDeath[playerid]) > 5)
        {
            TotalDeaths[playerid]=0;
        }
    }



Re: i need help! - Face9000 - 28.05.2012

Ah sorry,i maked a small mistake.


Re: i need help! - TheDominator - 28.05.2012

Quote:
Originally Posted by Logitech90
Посмотреть сообщение
Ah sorry,i maked a small mistake.
Who doesn't mate


Respuesta: i need help! - Don_pepe - 28.05.2012

perfect thank you very much friends.....

I have a question, want to help me with a anticheat for my server, because the hacker gives same score to all users on my server, I want to know if there is any solution for this problem!

well this is all thanks muhas friends to help me, God bless..


Re: i need help! - Face9000 - 29.05.2012

Quote:
Originally Posted by TheDominator
Посмотреть сообщение
Who doesn't mate


Quote:
Originally Posted by Don_pepe
Посмотреть сообщение
perfect thank you very much friends.....

I have a question, want to help me with a anticheat for my server, because the hacker gives same score to all users on my server, I want to know if there is any solution for this problem!

well this is all thanks muhas friends to help me, God bless..
The score is probably caused by the fake kills,with the script i gave you,the problem should be resolved.