0.3z anti health hack?
#10

Quote:
Originally Posted by cessil
Посмотреть сообщение
what are you doing with the first 2 hits? you do nothing with that oldhealth, the only time it compares is from shot 3 - 4 ...
Server will store player's health into the oldhealth variable if players take 2 damages. Like, if they took 1 damage, server will store the health; If they took another damage, server will update the stored health. If they took another damage(3rd damage), server will store player's health into a new variable, newhealth AND we will compare the oldhealth and the newhealth. If they're same, ban.

Quote:
Originally Posted by cessil
Посмотреть сообщение
and the time inbetween could be less than 50ms, which isn't enough for the clients to update getting shot and taking damage.
How bout now?
pawn Код:
new hit[MAX_PLAYERS], Float:oldhealth[MAX_PLAYERS], Float:newhealth[MAX_PLAYERS];
public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
{
    switch(hittype)
    {
        case BULLET_HIT_TYPE_PLAYER:
        {
            hit[hitid]++;
            switch(hit[hitid])
            {
                case 1..5: GetPlayerHealth(hitid, oldhealth[hitid]); //changed 1..5 instead of 1..3 [can be increased if still not enough]
                case 6..10: //changed 4..6 instead of 6..10 [can be increased if still not enough]
                {
                    GetPlayerHealth(hitid, newhealth[hitid]);
                    if(newhealth[hitid] == oldhealth[hitid])
                    {
                        //Ban(playerid); //cheat
                        SendClientMessage(playerid, -1, "cheat");
                    }
                }
                default:hit[hitid] = 0;
            }
        }
    }
    return 1;
}
Reply


Messages In This Thread
0.3z anti health hack? - by newbienoob - 20.01.2014, 04:59
Re: 0.3z anti health hack? - by CuervO - 20.01.2014, 06:11
Re: 0.3z anti health hack? - by Optimus_Sprite - 20.01.2014, 06:22
Re: 0.3z anti health hack? - by CuervO - 20.01.2014, 06:42
Re: 0.3z anti health hack? - by chencong - 20.01.2014, 07:17
Respuesta: 0.3z anti health hack? - by MugiwaraNoLuffy - 20.01.2014, 07:29
Re: 0.3z anti health hack? - by cessil - 20.01.2014, 11:39
Re: 0.3z anti health hack? - by Cypress - 20.01.2014, 13:11
Re: 0.3z anti health hack? - by Riddick94 - 20.01.2014, 13:20
Re: 0.3z anti health hack? - by newbienoob - 20.01.2014, 13:54

Forum Jump:


Users browsing this thread: 1 Guest(s)